aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/DEVELOPER_README9
-rw-r--r--src/jdk/nashorn/internal/codegen/CodeGenerator.java2
-rw-r--r--src/jdk/nashorn/internal/codegen/Splitter.java9
-rw-r--r--src/jdk/nashorn/internal/runtime/PropertyMap.java3
-rw-r--r--src/jdk/nashorn/internal/runtime/options/Options.java2
5 files changed, 17 insertions, 8 deletions
diff --git a/docs/DEVELOPER_README b/docs/DEVELOPER_README
index 747379bc..a4859701 100644
--- a/docs/DEVELOPER_README
+++ b/docs/DEVELOPER_README
@@ -13,6 +13,15 @@ properties described herein are subject to change without notice.
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
diff --git a/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
index 539bcdb4..444c9839 100644
--- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java
+++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
@@ -130,13 +130,11 @@ import jdk.nashorn.internal.runtime.linker.LinkerCallSite;
* 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.
diff --git a/src/jdk/nashorn/internal/codegen/Splitter.java b/src/jdk/nashorn/internal/codegen/Splitter.java
index c692035d..f7f193ee 100644
--- a/src/jdk/nashorn/internal/codegen/Splitter.java
+++ b/src/jdk/nashorn/internal/codegen/Splitter.java
@@ -73,13 +73,14 @@ public class Splitter extends NodeVisitor {
/**
* 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;
}
/**
diff --git a/src/jdk/nashorn/internal/runtime/PropertyMap.java b/src/jdk/nashorn/internal/runtime/PropertyMap.java
index 67ff9642..f2d34c2a 100644
--- a/src/jdk/nashorn/internal/runtime/PropertyMap.java
+++ b/src/jdk/nashorn/internal/runtime/PropertyMap.java
@@ -176,9 +176,10 @@ public final class PropertyMap implements Iterable<Object>, PropertyListener {
/**
* 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);
}
diff --git a/src/jdk/nashorn/internal/runtime/options/Options.java b/src/jdk/nashorn/internal/runtime/options/Options.java
index e0048af0..af883c1d 100644
--- a/src/jdk/nashorn/internal/runtime/options/Options.java
+++ b/src/jdk/nashorn/internal/runtime/options/Options.java
@@ -493,7 +493,7 @@ public final class Options {
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);
}