< prev index next >

## src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/ScriptEnvironment.java

Print this page

      91     public final boolean _dump_on_error;
      92
      93     /** Invalid lvalue expressions should be reported as early errors */
      94     public final boolean _early_lvalue_error;
      95
      96     /** Empty statements should be preserved in the AST */
      97     public final boolean _empty_statements;
      98
      99     /** Show full Nashorn version */
     100     public final boolean _fullversion;
     101
     102     /** Launch using as fx application */
     103     public final boolean _fx;
     104
     105     /** Use single Global instance per jsr223 engine instance. */
     106     public final boolean _global_per_engine;
     107
     108     /** Enable experimental ECMAScript 6 features. */
     109     public final boolean _es6;
     110

     111
     112     /** Number of times a dynamic call site has to be relinked before it is
     113      * considered unstable (and thus should be linked as if it were megamorphic).
     114      */
     115     public final int _unstable_relink_threshold;
     116
     117     /** Argument passed to compile only if optimistic compilation should take place */
     118     public static final String COMPILE_ONLY_OPTIMISTIC_ARG = "optimistic";
     119
     120     /**
     121      *  Behavior when encountering a function declaration in a lexical context where only statements are acceptable
     122      * (function declarations are source elements, but not statements).
     123      */
     124     public enum FunctionStatementBehavior {
     125         /**
     126          * Accept the function declaration silently and treat it as if it were a function expression assigned to a local
     127          * variable.
     128          */
     129         ACCEPT,
     130         /**
     289         }
     290         _loader_per_compile   = options.getBoolean("loader.per.compile");
     291         _module_path          = options.getString("module.path");
     292         _add_modules          = options.getString("add.modules");
     293         _no_java              = options.getBoolean("no.java");
     294         _no_syntax_extensions = options.getBoolean("no.syntax.extensions");
     295         _no_typed_arrays      = options.getBoolean("no.typed.arrays");
     296         _parse_only           = options.getBoolean("parse.only");
     297         _persistent_cache     = options.getBoolean("persistent.code.cache");
     298         _print_ast            = options.getBoolean("print.ast");
     299         _print_lower_ast      = options.getBoolean("print.lower.ast");
     300         _print_code           = options.getString("print.code") != null;
     301         _print_no_newline     = options.getBoolean("print.no.newline");
     302         _print_parse          = options.getBoolean("print.parse");
     303         _print_lower_parse    = options.getBoolean("print.lower.parse");
     304         _print_symbols        = options.getBoolean("print.symbols");
     305         _scripting            = options.getBoolean("scripting");
     306         _strict               = options.getBoolean("strict");
     307         _version              = options.getBoolean("version");
     308         _verify_code          = options.getBoolean("verify.code");

     309
     310         final int configuredUrt = options.getInteger("unstable.relink.threshold");
     311         // The default for this property is -1, so we can easily detect when
     312         // it is not specified on command line.
     313         if (configuredUrt < 0) {
     314             // In this case, use a default of 8, or 16 for optimistic types.
     315             // Optimistic types come with dual fields, and in order to get
     316             // performance on benchmarks with a lot of object instantiation and
     317             // then field reassignment, it can take slightly more relinks to
     318             // become stable with type changes swapping out an entire property
     319             // map and making a map guard fail. Also, honor the "nashorn.*"
     320             // system property for now. It was documented in DEVELOPER_README
     321             // so we should recognize it for the time being.
     322             _unstable_relink_threshold = Options.getIntProperty(
     323                     "nashorn.unstable.relink.threshold",
     324                     _optimistic_types ? 16 : 8);
     325         } else {
     326             _unstable_relink_threshold = configuredUrt;
     327         }
     328
      91     public final boolean _dump_on_error;
      92
      93     /** Invalid lvalue expressions should be reported as early errors */
      94     public final boolean _early_lvalue_error;
      95
      96     /** Empty statements should be preserved in the AST */
      97     public final boolean _empty_statements;
      98
      99     /** Show full Nashorn version */
     100     public final boolean _fullversion;
     101
     102     /** Launch using as fx application */
     103     public final boolean _fx;
     104
     105     /** Use single Global instance per jsr223 engine instance. */
     106     public final boolean _global_per_engine;
     107
     108     /** Enable experimental ECMAScript 6 features. */
     109     public final boolean _es6;
     110
     111     /** do not show deprecation warning for nashorn engine and jjs usage. */
     112     public final boolean _no_deprecation_warning;
     113
     114     /** Number of times a dynamic call site has to be relinked before it is
     115      * considered unstable (and thus should be linked as if it were megamorphic).
     116      */
     117     public final int _unstable_relink_threshold;
     118
     119     /** Argument passed to compile only if optimistic compilation should take place */
     120     public static final String COMPILE_ONLY_OPTIMISTIC_ARG = "optimistic";
     121
     122     /**
     123      *  Behavior when encountering a function declaration in a lexical context where only statements are acceptable
     124      * (function declarations are source elements, but not statements).
     125      */
     126     public enum FunctionStatementBehavior {
     127         /**
     128          * Accept the function declaration silently and treat it as if it were a function expression assigned to a local
     129          * variable.
     130          */
     131         ACCEPT,
     132         /**
     291         }
     292         _loader_per_compile   = options.getBoolean("loader.per.compile");
     293         _module_path          = options.getString("module.path");
     294         _add_modules          = options.getString("add.modules");
     295         _no_java              = options.getBoolean("no.java");
     296         _no_syntax_extensions = options.getBoolean("no.syntax.extensions");
     297         _no_typed_arrays      = options.getBoolean("no.typed.arrays");
     298         _parse_only           = options.getBoolean("parse.only");
     299         _persistent_cache     = options.getBoolean("persistent.code.cache");
     300         _print_ast            = options.getBoolean("print.ast");
     301         _print_lower_ast      = options.getBoolean("print.lower.ast");
     302         _print_code           = options.getString("print.code") != null;
     303         _print_no_newline     = options.getBoolean("print.no.newline");
     304         _print_parse          = options.getBoolean("print.parse");
     305         _print_lower_parse    = options.getBoolean("print.lower.parse");
     306         _print_symbols        = options.getBoolean("print.symbols");
     307         _scripting            = options.getBoolean("scripting");
     308         _strict               = options.getBoolean("strict");
     309         _version              = options.getBoolean("version");
     310         _verify_code          = options.getBoolean("verify.code");
     311         _no_deprecation_warning = options.getBoolean("no.deprecation.warning");
     312
     313         final int configuredUrt = options.getInteger("unstable.relink.threshold");
     314         // The default for this property is -1, so we can easily detect when
     315         // it is not specified on command line.
     316         if (configuredUrt < 0) {
     317             // In this case, use a default of 8, or 16 for optimistic types.
     318             // Optimistic types come with dual fields, and in order to get
     319             // performance on benchmarks with a lot of object instantiation and
     320             // then field reassignment, it can take slightly more relinks to
     321             // become stable with type changes swapping out an entire property
     322             // map and making a map guard fail. Also, honor the "nashorn.*"
     323             // system property for now. It was documented in DEVELOPER_README
     324             // so we should recognize it for the time being.
     325             _unstable_relink_threshold = Options.getIntProperty(
     326                     "nashorn.unstable.relink.threshold",
     327                     _optimistic_types ? 16 : 8);
     328         } else {
     329             _unstable_relink_threshold = configuredUrt;
     330         }
     331

< prev index next >