src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/Compiler.java

Print this page




  86     public static final String OBJECTS_PACKAGE = "jdk/nashorn/internal/objects";
  87 
  88     private final ScriptEnvironment env;
  89 
  90     private final Source source;
  91 
  92     private final String sourceName;
  93 
  94     private final ErrorManager errors;
  95 
  96     private final boolean optimistic;
  97 
  98     private final Map<String, byte[]> bytecode;
  99 
 100     private final Set<CompileUnit> compileUnits;
 101 
 102     private final ConstantData constantData;
 103 
 104     private final CodeInstaller<ScriptEnvironment> installer;
 105 
 106     /** logger for compiler, trampolines, splits and related code generation events
 107      *  that affect classes */
 108     private final DebugLogger log;
 109 
 110     private final Context context;
 111 
 112     private final TypeMap types;
 113 
 114     // Runtime scope in effect at the time of the compilation. Used to evaluate types of expressions and prevent overly
 115     // optimistic assumptions (which will lead to unnecessary deoptimizing recompilations).
 116     private final TypeEvaluator typeEvaluator;
 117 
 118     private final boolean strict;
 119 
 120     private final boolean onDemand;
 121 
 122     /**
 123      * If this is a recompilation, this is how we pass in the invalidations, e.g. programPoint=17, Type == int means
 124      * that using whatever was at program point 17 as an int failed.
 125      */
 126     private final Map<Integer, Type> invalidatedProgramPoints;




  86     public static final String OBJECTS_PACKAGE = "jdk/nashorn/internal/objects";
  87 
  88     private final ScriptEnvironment env;
  89 
  90     private final Source source;
  91 
  92     private final String sourceName;
  93 
  94     private final ErrorManager errors;
  95 
  96     private final boolean optimistic;
  97 
  98     private final Map<String, byte[]> bytecode;
  99 
 100     private final Set<CompileUnit> compileUnits;
 101 
 102     private final ConstantData constantData;
 103 
 104     private final CodeInstaller<ScriptEnvironment> installer;
 105 
 106     /** logger for compiler, trampolines and related code generation events
 107      *  that affect classes */
 108     private final DebugLogger log;
 109 
 110     private final Context context;
 111 
 112     private final TypeMap types;
 113 
 114     // Runtime scope in effect at the time of the compilation. Used to evaluate types of expressions and prevent overly
 115     // optimistic assumptions (which will lead to unnecessary deoptimizing recompilations).
 116     private final TypeEvaluator typeEvaluator;
 117 
 118     private final boolean strict;
 119 
 120     private final boolean onDemand;
 121 
 122     /**
 123      * If this is a recompilation, this is how we pass in the invalidations, e.g. programPoint=17, Type == int means
 124      * that using whatever was at program point 17 as an int failed.
 125      */
 126     private final Map<Integer, Type> invalidatedProgramPoints;