aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlagergren <none@none>2013-01-07 19:31:36 +0100
committerlagergren <none@none>2013-01-07 19:31:36 +0100
commit9201b84d9b022a52190773ff44781a786d9c2e4e (patch)
tree6b877cb180ad3499123cdf901a2cb5bd27e99009
parentfc6f8e7fe3c15e9a73670b6f7d1fe746d6715e50 (diff)
downloadnashorn-9201b84d9b022a52190773ff44781a786d9c2e4e.tar.gz
8005789: Forgot to document -Dnashorn.unstable.relink.threshold
Summary: Added documentation to DEVELOPER_README, fixed code convention warnings Reviewed-by: attila
-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);
}