Mercurial > people > rkennke > jdk9-shenandoah-final > nashorn
changeset 7:1e3f411f47bf
8005789: Forgot to document -Dnashorn.unstable.relink.threshold
Summary: Added documentation to DEVELOPER_README, fixed code convention warnings
Reviewed-by: attila
author | lagergren |
---|---|
date | Mon, 07 Jan 2013 19:31:36 +0100 |
parents | 5a1b0714df0e |
children | 41c7093477ae |
files | docs/DEVELOPER_README src/jdk/nashorn/internal/codegen/CodeGenerator.java src/jdk/nashorn/internal/codegen/Splitter.java src/jdk/nashorn/internal/runtime/PropertyMap.java src/jdk/nashorn/internal/runtime/options/Options.java |
diffstat | 5 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/DEVELOPER_README Fri Jan 04 09:58:33 2013 -0400 +++ b/docs/DEVELOPER_README Mon Jan 07 19:31:36 2013 +0100 @@ -13,6 +13,15 @@ This documentation of the system property flags assume that the default value of the flag is false, unless otherwise specified. +SYSTEM PROPERTY: -Dnashorn.unstable.relink.threshold=x + +This property controls how many call site misses are allowed before a +callsite is relinked with "apply" semantics to never change again. +In the case of megamorphic callsites, this is necessary, or the +program would spend all its time swapping out callsite targets. Dynalink +has a default value (currently 8 relinks) for this property if it +is not explicitly set. + SYSTEM PROPERTY: -Dnashorn.callsiteaccess.debug
--- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java Fri Jan 04 09:58:33 2013 -0400 +++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Jan 07 19:31:36 2013 +0100 @@ -130,13 +130,11 @@ * keeps track of the contents of the byte code stack. This way we avoid a large * number of special cases on the form * <pre> - * {@code * if (type == INT) { * visitInsn(ILOAD, slot); * } else if (type == DOUBLE) { * visitInsn(DOUBLE, slot); * } - * } * </pre> * This quickly became apparent when the code generator was generalized to work * with all types, and not just numbers or objects.
--- a/src/jdk/nashorn/internal/codegen/Splitter.java Fri Jan 04 09:58:33 2013 -0400 +++ b/src/jdk/nashorn/internal/codegen/Splitter.java Mon Jan 07 19:31:36 2013 +0100 @@ -73,13 +73,14 @@ /** * Constructor. * - * @param compiler the compiler - * @param functionNode function node to split + * @param compiler the compiler + * @param functionNode function node to split + * @param scriptCompileUnit script compile unit */ - public Splitter(final Compiler compiler, final FunctionNode functionNode, final CompileUnit compileUnit) { + public Splitter(final Compiler compiler, final FunctionNode functionNode, final CompileUnit scriptCompileUnit) { this.compiler = compiler; this.functionNode = functionNode; - this.scriptCompileUnit = compileUnit; + this.scriptCompileUnit = scriptCompileUnit; } /**
--- a/src/jdk/nashorn/internal/runtime/PropertyMap.java Fri Jan 04 09:58:33 2013 -0400 +++ b/src/jdk/nashorn/internal/runtime/PropertyMap.java Mon Jan 07 19:31:36 2013 +0100 @@ -176,9 +176,10 @@ /** * Return a sharable empty map. * + * @param context the context * @return New empty {@link PropertyMap}. */ - public static PropertyMap newEmptyMap(Context context) { + public static PropertyMap newEmptyMap(final Context context) { return new PropertyMap(jdk.nashorn.internal.scripts.JO$.class, context, EMPTY_MAP); }
--- a/src/jdk/nashorn/internal/runtime/options/Options.java Fri Jan 04 09:58:33 2013 -0400 +++ b/src/jdk/nashorn/internal/runtime/options/Options.java Mon Jan 07 19:31:36 2013 +0100 @@ -493,7 +493,7 @@ return new Option<>(value != null && Boolean.parseBoolean(value)); case "integer": try { - return new Option<>((Integer)((value == null)? 0 : Integer.parseInt(value))); + return new Option<>((value == null) ? 0 : Integer.parseInt(value)); } catch (final NumberFormatException nfe) { throw new IllegalOptionException(t); }