8223451: Make optimistic types disabled by default

Reviewed-by: sundar, jlaskey, attila
This commit is contained in:
Hannes Wallnöfer 2019-07-11 16:43:15 +02:00
parent 987fad27b7
commit 61d10a507d
2 changed files with 4 additions and 4 deletions
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/resources
test/nashorn/script/nosecurity

@ -288,7 +288,7 @@ nashorn.option.optimistic.types = {
name="--optimistic-types", \
short_name="-ot", \
desc="Use optimistic type assumptions with deoptimizing recompilation. This makes the compiler try, for any program symbol whose type cannot be proven at compile time, to type it as narrow and primitive as possible. If the runtime encounters an error because symbol type is too narrow, a wider method will be generated until steady stage is reached. While this produces as optimal Java Bytecode as possible, erroneous type guesses will lead to longer warmup. Optimistic typing is currently enabled by default, but can be disabled for faster startup performance.", \
default=true \
default=false \
}
nashorn.option.parse.only = { \

@ -27,7 +27,7 @@
*
* @test
* @fork
* @option -Dnashorn.debug=true
* @option -Dnashorn.debug=true -ot=true
*/
/*
@ -98,8 +98,8 @@ function check(str, strs) {
print("check ok!");
}
str = runScriptEngine(["--log=codegen,compiler=finest,methodhandles=finest,fields=finest"], __DIR__ + "../basic/NASHORN-19.js");
str += runScriptEngine(["--log=codegen,compiler=finest,methodhandles=finest,fields=finest"], __DIR__ + "../basic/varargs.js");
str = runScriptEngine(["--log=codegen,compiler=finest,methodhandles=finest,fields=finest", "-ot=true"], __DIR__ + "../basic/NASHORN-19.js");
str += runScriptEngine(["--log=codegen,compiler=finest,methodhandles=finest,fields=finest", "-ot=true"], __DIR__ + "../basic/varargs.js");
check(str, methodsCalled);
check(str, ['return', 'get', 'set', '[fields]']);