diff --git a/nashorn/docs/DEVELOPER_README b/nashorn/docs/DEVELOPER_README index 747379bc87b..a4859701770 100644 --- a/nashorn/docs/DEVELOPER_README +++ b/nashorn/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/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java index 539bcdb41bb..444c9839123 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/nashorn/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 *
- * {@code
* if (type == INT) {
* visitInsn(ILOAD, slot);
* } else if (type == DOUBLE) {
* visitInsn(DOUBLE, slot);
* }
- * }
*
* This quickly became apparent when the code generator was generalized to work
* with all types, and not just numbers or objects.
diff --git a/nashorn/src/jdk/nashorn/internal/codegen/Splitter.java b/nashorn/src/jdk/nashorn/internal/codegen/Splitter.java
index c692035d42e..f7f193eee6c 100644
--- a/nashorn/src/jdk/nashorn/internal/codegen/Splitter.java
+++ b/nashorn/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/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java
index 67ff96421b7..f2d34c2a3e1 100644
--- a/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java
+++ b/nashorn/src/jdk/nashorn/internal/runtime/PropertyMap.java
@@ -176,9 +176,10 @@ public final class PropertyMap implements Iterable