# HG changeset patch
# User lana
# Date 1439322541 25200
# Node ID 645ffd6ff142d08f9a7e2593f9359af500d4aae1
# Parent 3be31159ea489dfba2b6483059c67f89972a4ef6# Parent 9d2a2e4b4aad4b7c1345b8887db2d3e3892efc79
Merge
diff -r 3be31159ea48 -r 645ffd6ff142 make/build.xml
--- a/make/build.xml Fri Aug 07 11:55:46 2015 -0700
+++ b/make/build.xml Tue Aug 11 12:49:01 2015 -0700
@@ -209,10 +209,11 @@
+
+ additionalparam="-quiet" failonerror="true" useexternalfile="true">
@@ -226,10 +227,23 @@
+
+
+
+
+
+
+
+
+
+
+
+ windowtitle="${nashorn.product.name}" additionalparam="-quiet" failonerror="true" useexternalfile="true">
@@ -238,7 +252,6 @@
-
@@ -460,7 +473,7 @@
-
+
diff -r 3be31159ea48 -r 645ffd6ff142 samples/javabind.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/javabind.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// bind on a Java method
+
+// #javascript "bind" function
+var bind = Function.prototype.bind;
+
+// Java console object
+var console = java.lang.System.console();
+
+// arguments "this" and prompt string of Console.readLine method are bound
+var readName = bind.call(console.readLine, console, "Your name: ");
+
+// Now call it like a function that takes no arguments!
+print("Hello,", readName());
diff -r 3be31159ea48 -r 645ffd6ff142 samples/javaconstructorbind.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/javaconstructorbind.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// bind on a Java constructor
+
+// See Function.prototype.bind:
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
+var bind = Function.prototype.bind;
+
+var URL = Java.type("java.net.URL");
+
+// get the constructor that accepts URL, String parameters.
+// constructor signatures are properties of type object.
+var newURL = URL["(URL, String)"];
+
+// bind "context" URL parameter.
+var TwitterURL = bind.call(newURL, null, new URL('https://www.twitter.com'));
+
+// now you can create context relative URLs using the bound constructor
+print(new TwitterURL("sundararajan_a"));
+
+// read the URL content and print (optional part)
+
+var BufferedReader = Java.type("java.io.BufferedReader");
+var InputStreamReader = Java.type("java.io.InputStreamReader");
+
+// function to retrieve text content of the given URL
+function readTextFromURL(url) {
+ var str = '';
+ var u = new URL(url);
+ var reader = new BufferedReader(
+ new InputStreamReader(u.openStream()));
+ try {
+ reader.lines().forEach(function(x) str += x);
+ return str;
+ } finally {
+ reader.close();
+ }
+}
+
+print(readTextFromURL(new TwitterURL("sundararajan_a")));
diff -r 3be31159ea48 -r 645ffd6ff142 samples/mapwith.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/samples/mapwith.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Oracle nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// Using a Java map with Javascript "with" statement
+
+var map = new java.util.HashMap();
+map.put("foo", 34);
+map.put("bar", "hello");
+
+var obj = {
+ __noSuchProperty__: function(name) {
+ return map.get(name);
+ }
+};
+
+with(obj) {
+ print(foo);
+ print(bar);
+}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/AssignSymbols.java
--- a/src/jdk/nashorn/internal/codegen/AssignSymbols.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/AssignSymbols.java Tue Aug 11 12:49:01 2015 -0700
@@ -551,9 +551,7 @@
private void defineVarIdent(final VarNode varNode) {
final IdentNode ident = varNode.getName();
final int flags;
- if (varNode.isAnonymousFunctionDeclaration()) {
- flags = IS_INTERNAL;
- } else if (!varNode.isBlockScoped() && lc.getCurrentFunction().isProgram()) {
+ if (!varNode.isBlockScoped() && lc.getCurrentFunction().isProgram()) {
flags = IS_SCOPE;
} else {
flags = 0;
@@ -785,12 +783,13 @@
// If this is a declared variable or a function parameter, delete always fails (except for globals).
final String name = ident.getName();
final Symbol symbol = ident.getSymbol();
- final boolean failDelete = strictMode || (!symbol.isScope() && (symbol.isParam() || (symbol.isVar() && !symbol.isProgramLevel())));
- if (failDelete && symbol.isThis()) {
+ if (symbol.isThis()) {
+ // Can't delete "this", ignore and return true
return LiteralNode.newInstance(unaryNode, true).accept(this);
}
final Expression literalNode = (Expression)LiteralNode.newInstance(unaryNode, name).accept(this);
+ final boolean failDelete = strictMode || (!symbol.isScope() && (symbol.isParam() || (symbol.isVar() && !symbol.isProgramLevel())));
if (!failDelete) {
args.add(compilerConstantIdentifier(SCOPE));
@@ -800,6 +799,8 @@
if (failDelete) {
request = Request.FAIL_DELETE;
+ } else if (symbol.isGlobal() && !symbol.isFunctionDeclaration()) {
+ request = Request.SLOW_DELETE;
}
} else if (rhs instanceof AccessNode) {
final Expression base = ((AccessNode)rhs).getBase();
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/CodeGenerator.java
--- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java Tue Aug 11 12:49:01 2015 -0700
@@ -1480,7 +1480,7 @@
}
@Override
void consumeStack() {
- dynamicCall(2 + argsCount, flags);
+ dynamicCall(2 + argsCount, flags, ident.getName());
}
}.emit();
}
@@ -1538,7 +1538,7 @@
@Override
void consumeStack() {
// Ordinary call
- dynamicCall(2 + argsCount, flags);
+ dynamicCall(2 + argsCount, flags, "eval");
method._goto(eval_done);
method.label(invoke_direct_eval);
@@ -1610,7 +1610,7 @@
}
@Override
void consumeStack() {
- dynamicCall(2 + argCount, flags);
+ dynamicCall(2 + argCount, flags, node.getProperty());
}
}.emit();
@@ -1637,7 +1637,7 @@
void consumeStack() {
final int flags = getCallSiteFlags();
//assert callNodeType.equals(callee.getReturnType()) : callNodeType + " != " + callee.getReturnType();
- dynamicCall(2 + argsCount, flags);
+ dynamicCall(2 + argsCount, flags, origCallee.getName());
}
}.emit();
return false;
@@ -1667,7 +1667,7 @@
@Override
void consumeStack() {
final int flags = getCallSiteFlags();
- dynamicCall(2 + argsCount, flags);
+ dynamicCall(2 + argsCount, flags, null);
}
}.emit();
return false;
@@ -1687,7 +1687,7 @@
@Override
void consumeStack() {
final int flags = getCallSiteFlags() | CALLSITE_SCOPE;
- dynamicCall(2 + argsCount, flags);
+ dynamicCall(2 + argsCount, flags, null);
}
}.emit();
return false;
@@ -3707,10 +3707,12 @@
final CallNode callNode = (CallNode)unaryNode.getExpression();
final List args = callNode.getArgs();
+ final Expression func = callNode.getFunction();
// Load function reference.
- loadExpressionAsObject(callNode.getFunction()); // must detect type error
-
- method.dynamicNew(1 + loadArgs(args), getCallSiteFlags());
+ loadExpressionAsObject(func); // must detect type error
+
+ method.dynamicNew(1 + loadArgs(args), getCallSiteFlags(),
+ func instanceof IdentNode? ((IdentNode)func).getName() : null);
}
private void loadNOT(final UnaryNode unaryNode) {
@@ -4818,11 +4820,11 @@
return method.dynamicGetIndex(resultBounds.within(expression.getType()), nonOptimisticFlags(flags), isMethod);
}
- MethodEmitter dynamicCall(final int argCount, final int flags) {
+ MethodEmitter dynamicCall(final int argCount, final int flags, final String msg) {
if (isOptimistic) {
- return method.dynamicCall(getOptimisticCoercedType(), argCount, getOptimisticFlags(flags));
- }
- return method.dynamicCall(resultBounds.within(expression.getType()), argCount, nonOptimisticFlags(flags));
+ return method.dynamicCall(getOptimisticCoercedType(), argCount, getOptimisticFlags(flags), msg);
+ }
+ return method.dynamicCall(resultBounds.within(expression.getType()), argCount, nonOptimisticFlags(flags), msg);
}
int getOptimisticFlags(final int flags) {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/Compiler.java
--- a/src/jdk/nashorn/internal/codegen/Compiler.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/Compiler.java Tue Aug 11 12:49:01 2015 -0700
@@ -607,7 +607,7 @@
newFunctionNode.uniqueName(reservedName);
}
- final boolean info = log.levelFinerThanOrEqual(Level.INFO);
+ final boolean info = log.isLoggable(Level.INFO);
final DebugLogger timeLogger = env.isTimingEnabled() ? env._timing.getLogger() : null;
@@ -644,8 +644,8 @@
if (info) {
final StringBuilder sb = new StringBuilder("<< Finished compile job for ");
sb.append(newFunctionNode.getSource()).
- append(':').
- append(quote(newFunctionNode.getName()));
+ append(':').
+ append(quote(newFunctionNode.getName()));
if (time > 0L && timeLogger != null) {
assert env.isTimingEnabled();
@@ -713,7 +713,7 @@
if (cacheKey != null && env._persistent_cache) {
// If this is an on-demand compilation create a function initializer for the function being compiled.
// Otherwise use function initializer map generated by codegen.
- Map initializers = new HashMap<>();
+ final Map initializers = new HashMap<>();
if (isOnDemandCompilation()) {
initializers.put(functionNode.getId(), new FunctionInitializer(functionNode, getInvalidatedProgramPoints()));
} else {
@@ -829,9 +829,9 @@
final long totalSize = osc.calculateObjectSize(functionNode);
sb.append(phaseName).
- append(" Total size = ").
- append(totalSize / 1024 / 1024).
- append("MB");
+ append(" Total size = ").
+ append(totalSize / 1024 / 1024).
+ append("MB");
log.info(sb);
Collections.sort(list, new Comparator() {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/DumpBytecode.java
--- a/src/jdk/nashorn/internal/codegen/DumpBytecode.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/DumpBytecode.java Tue Aug 11 12:49:01 2015 -0700
@@ -88,7 +88,7 @@
}
- // should code be dumped to disk - only valid in compile_only mode?
+ // should code be dumped to disk
if (env._dest_dir != null) {
final String fileName = className.replace('.', File.separatorChar) + ".class";
final int index = fileName.lastIndexOf(File.separatorChar);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/FoldConstants.java
--- a/src/jdk/nashorn/internal/codegen/FoldConstants.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/FoldConstants.java Tue Aug 11 12:49:01 2015 -0700
@@ -353,8 +353,8 @@
return null;
}
- isInteger &= JSType.isRepresentableAsInt(value) && !JSType.isNegativeZero(value);
- isLong &= JSType.isRepresentableAsLong(value) && !JSType.isNegativeZero(value);
+ isInteger &= JSType.isStrictlyRepresentableAsInt(value);
+ isLong &= JSType.isStrictlyRepresentableAsLong(value);
if (isInteger) {
return LiteralNode.newInstance(token, finish, (int)value);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/MethodEmitter.java
--- a/src/jdk/nashorn/internal/codegen/MethodEmitter.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/MethodEmitter.java Tue Aug 11 12:49:01 2015 -0700
@@ -2133,10 +2133,25 @@
* @return the method emitter
*/
MethodEmitter dynamicNew(final int argCount, final int flags) {
+ return dynamicNew(argCount, flags, null);
+ }
+
+ /**
+ * Generate a dynamic new
+ *
+ * @param argCount number of arguments
+ * @param flags callsite flags
+ * @param msg additional message to be used when reporting error
+ *
+ * @return the method emitter
+ */
+ MethodEmitter dynamicNew(final int argCount, final int flags, final String msg) {
assert !isOptimistic(flags);
debug("dynamic_new", "argcount=", argCount);
final String signature = getDynamicSignature(Type.OBJECT, argCount);
- method.visitInvokeDynamicInsn("dyn:new", signature, LINKERBOOTSTRAP, flags);
+ method.visitInvokeDynamicInsn(
+ msg != null && msg.length() < LARGE_STRING_THRESHOLD? "dyn:new:" + NameCodec.encode(msg) : "dyn:new",
+ signature, LINKERBOOTSTRAP, flags);
pushType(Type.OBJECT); //TODO fix result type
return this;
}
@@ -2151,10 +2166,26 @@
* @return the method emitter
*/
MethodEmitter dynamicCall(final Type returnType, final int argCount, final int flags) {
+ return dynamicCall(returnType, argCount, flags, null);
+ }
+
+ /**
+ * Generate a dynamic call
+ *
+ * @param returnType return type
+ * @param argCount number of arguments
+ * @param flags callsite flags
+ * @param msg additional message to be used when reporting error
+ *
+ * @return the method emitter
+ */
+ MethodEmitter dynamicCall(final Type returnType, final int argCount, final int flags, final String msg) {
debug("dynamic_call", "args=", argCount, "returnType=", returnType);
final String signature = getDynamicSignature(returnType, argCount); // +1 because the function itself is the 1st parameter for dynamic calls (what you call - call target)
debug(" signature", signature);
- method.visitInvokeDynamicInsn("dyn:call", signature, LINKERBOOTSTRAP, flags);
+ method.visitInvokeDynamicInsn(
+ msg != null && msg.length() < LARGE_STRING_THRESHOLD? "dyn:call:" + NameCodec.encode(msg) : "dyn:call",
+ signature, LINKERBOOTSTRAP, flags);
pushType(returnType);
return this;
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java
--- a/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/ObjectClassGenerator.java Tue Aug 11 12:49:01 2015 -0700
@@ -69,7 +69,6 @@
import jdk.nashorn.internal.runtime.logging.DebugLogger;
import jdk.nashorn.internal.runtime.logging.Loggable;
import jdk.nashorn.internal.runtime.logging.Logger;
-import jdk.nashorn.internal.runtime.options.Options;
/**
* Generates the ScriptObject subclass structure with fields for a user objects.
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/SharedScopeCall.java
--- a/src/jdk/nashorn/internal/codegen/SharedScopeCall.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/SharedScopeCall.java Tue Aug 11 12:49:01 2015 -0700
@@ -169,7 +169,7 @@
slot += type.getSlots();
}
// Shared scope calls disabled in optimistic world. TODO is this right?
- method.dynamicCall(returnType, 2 + paramTypes.length, flags);
+ method.dynamicCall(returnType, 2 + paramTypes.length, flags, symbol.getName());
}
method._return(returnType);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/codegen/SplitIntoFunctions.java
--- a/src/jdk/nashorn/internal/codegen/SplitIntoFunctions.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/codegen/SplitIntoFunctions.java Tue Aug 11 12:49:01 2015 -0700
@@ -308,10 +308,6 @@
assert !varNode.isBlockScoped(); //TODO: we must handle these too, but we currently don't
final Expression init = varNode.getInit();
- if (varNode.isAnonymousFunctionDeclaration()) {
- // We ain't moving anonymous function declarations.
- return super.enterVarNode(varNode);
- }
// Move a declaration-only var statement to the top of the outermost function.
getCurrentFunctionState().varStatements.add(varNode.setInit(null));
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/ir/RuntimeNode.java
--- a/src/jdk/nashorn/internal/ir/RuntimeNode.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/ir/RuntimeNode.java Tue Aug 11 12:49:01 2015 -0700
@@ -56,6 +56,8 @@
REFERENCE_ERROR,
/** Delete operator */
DELETE(TokenType.DELETE, Type.BOOLEAN, 1),
+ /** Delete operator for slow scopes */
+ SLOW_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false),
/** Delete operator that always fails -- see Lower */
FAIL_DELETE(TokenType.DELETE, Type.BOOLEAN, 1, false),
/** === operator with at least one object */
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/ir/VarNode.java
--- a/src/jdk/nashorn/internal/ir/VarNode.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/ir/VarNode.java Tue Aug 11 12:49:01 2015 -0700
@@ -262,12 +262,4 @@
public boolean isFunctionDeclaration() {
return init instanceof FunctionNode && ((FunctionNode)init).isDeclared();
}
-
- /**
- * Returns true if this is an anonymous function declaration.
- * @return true if this is an anonymous function declaration.
- */
- public boolean isAnonymousFunctionDeclaration() {
- return isFunctionDeclaration() && ((FunctionNode)init).isAnonymous();
- }
}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/lookup/MethodHandleFactory.java
--- a/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/lookup/MethodHandleFactory.java Tue Aug 11 12:49:01 2015 -0700
@@ -131,8 +131,8 @@
static Object traceReturn(final DebugLogger logger, final Object value) {
final String str = " return" +
(VOID_TAG.equals(value) ?
- ";" :
- " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
+ ";" :
+ " " + stripName(value) + "; // [type=" + (value == null ? "null]" : stripName(value.getClass()) + ']'));
if (logger == null) {
err(str);
} else if (logger.isEnabled()) {
@@ -164,13 +164,13 @@
}
sb.append('\'').
- append(stripName(argString(args[i]))).
- append('\'').
- append(' ').
- append('[').
- append("type=").
- append(args[i] == null ? "null" : stripName(args[i].getClass())).
- append(']');
+ append(stripName(argString(args[i]))).
+ append('\'').
+ append(' ').
+ append('[').
+ append("type=").
+ append(args[i] == null ? "null" : stripName(args[i].getClass())).
+ append(']');
if (i + 1 < args.length) {
sb.append(", ");
@@ -216,8 +216,8 @@
if (arg instanceof ScriptObject) {
return arg.toString() +
- " (map=" + Debug.id(((ScriptObject)arg).getMap()) +
- ')';
+ " (map=" + Debug.id(((ScriptObject)arg).getMap()) +
+ ')';
}
return arg.toString();
@@ -262,7 +262,7 @@
return addDebugPrintout(null, Level.OFF, mh, paramStart, printReturnValue, tag);
}
- /**
+ /**
* Add a debug printout to a method handle, tracing parameters and return values
*
* @param logger a specific logger to which to write the output
@@ -278,7 +278,7 @@
//if there is no logger, or if it's set to log only coarser events
//than the trace level, skip and return
- if (logger != null && logger.levelCoarserThan(level)) {
+ if (logger == null || !logger.isLoggable(level)) {
return mh;
}
@@ -289,9 +289,9 @@
trace = MethodHandles.foldArguments(
mh,
trace.asCollector(
- Object[].class,
- type.parameterCount()).
- asType(type.changeReturnType(void.class)));
+ Object[].class,
+ type.parameterCount()).
+ asType(type.changeReturnType(void.class)));
final Class> retType = type.returnType();
if (printReturnValue) {
@@ -299,7 +299,7 @@
final MethodHandle traceReturn = MethodHandles.insertArguments(TRACE_RETURN, 0, logger);
trace = MethodHandles.filterReturnValue(trace,
traceReturn.asType(
- traceReturn.type().changeParameterType(0, retType).changeReturnType(retType)));
+ traceReturn.type().changeParameterType(0, retType).changeReturnType(retType)));
} else {
trace = MethodHandles.filterReturnValue(trace, MethodHandles.insertArguments(TRACE_RETURN_VOID, 0, logger));
}
@@ -355,9 +355,9 @@
sb.append("] ");
} else {
sb.append(d)
- .append('{')
- .append(Integer.toHexString(System.identityHashCode(d)))
- .append('}');
+ .append('{')
+ .append(Integer.toHexString(System.identityHashCode(d)))
+ .append('}');
}
if (i + 1 < data.length) {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/objects/Global.java
--- a/src/jdk/nashorn/internal/objects/Global.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/objects/Global.java Tue Aug 11 12:49:01 2015 -0700
@@ -88,14 +88,14 @@
*/
@ScriptClass("Global")
public final class Global extends Scope {
- // Placeholder value used in place of a location property (__FILE__, __DIR__, __LINE__)
- private static final Object LOCATION_PROPERTY_PLACEHOLDER = new Object();
+ // This special value is used to flag a lazily initialized global property.
+ // This also serves as placeholder value used in place of a location property
+ // (__FILE__, __DIR__, __LINE__)
+ private static final Object LAZY_SENTINEL = new Object();
+
private final InvokeByName TO_STRING = new InvokeByName("toString", ScriptObject.class);
private final InvokeByName VALUE_OF = new InvokeByName("valueOf", ScriptObject.class);
- // placeholder value for lazily initialized global objects
- private static final Object LAZY_SENTINEL = new Object();
-
/**
* Optimistic builtin names that require switchpoint invalidation
* upon assignment. Overly conservative, but works for now, to avoid
@@ -182,15 +182,15 @@
/** Value property NaN of the Global Object - ECMA 15.1.1.1 NaN */
@Property(attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final double NaN = Double.NaN;
+ public static final double NaN = Double.NaN;
/** Value property Infinity of the Global Object - ECMA 15.1.1.2 Infinity */
@Property(attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final double Infinity = Double.POSITIVE_INFINITY;
+ public static final double Infinity = Double.POSITIVE_INFINITY;
/** Value property Undefined of the Global Object - ECMA 15.1.1.3 Undefined */
@Property(attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final Object undefined = UNDEFINED;
+ public static final Object undefined = UNDEFINED;
/** ECMA 15.1.2.1 eval(x) */
@Property(attributes = Attribute.NOT_ENUMERABLE)
@@ -830,15 +830,15 @@
/** Nashorn extension: current script's file name */
@Property(name = "__FILE__", attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final Object __FILE__ = LOCATION_PROPERTY_PLACEHOLDER;
+ public static final Object __FILE__ = LAZY_SENTINEL;
/** Nashorn extension: current script's directory */
@Property(name = "__DIR__", attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final Object __DIR__ = LOCATION_PROPERTY_PLACEHOLDER;
+ public static final Object __DIR__ = LAZY_SENTINEL;
/** Nashorn extension: current source line number being executed */
@Property(name = "__LINE__", attributes = Attribute.NON_ENUMERABLE_CONSTANT)
- public final Object __LINE__ = LOCATION_PROPERTY_PLACEHOLDER;
+ public static final Object __LINE__ = LAZY_SENTINEL;
private volatile NativeDate DEFAULT_DATE;
@@ -1768,38 +1768,10 @@
return ScriptFunction.getPrototype(getBuiltinFloat64Array());
}
- private ScriptFunction getBuiltinArray() {
- return builtinArray;
- }
-
ScriptFunction getTypeErrorThrower() {
return typeErrorThrower;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin array has not been overridden
- */
- public static boolean isBuiltinArray() {
- final Global instance = Global.instance();
- return instance.array == instance.getBuiltinArray();
- }
-
- private ScriptFunction getBuiltinBoolean() {
- return builtinBoolean;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin boolean has not been overridden
- */
- public static boolean isBuiltinBoolean() {
- final Global instance = Global.instance();
- return instance._boolean == instance.getBuiltinBoolean();
- }
-
private synchronized ScriptFunction getBuiltinDate() {
if (this.builtinDate == null) {
this.builtinDate = initConstructorAndSwitchPoint("Date", ScriptFunction.class);
@@ -1810,30 +1782,6 @@
return this.builtinDate;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin date has not been overridden
- */
- public static boolean isBuiltinDate() {
- final Global instance = Global.instance();
- return instance.date == LAZY_SENTINEL || instance.date == instance.getBuiltinDate();
- }
-
- private ScriptFunction getBuiltinError() {
- return builtinError;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin error has not been overridden
- */
- public static boolean isBuiltinError() {
- final Global instance = Global.instance();
- return instance.error == instance.getBuiltinError();
- }
-
private synchronized ScriptFunction getBuiltinEvalError() {
if (this.builtinEvalError == null) {
this.builtinEvalError = initErrorSubtype("EvalError", getErrorPrototype());
@@ -1841,31 +1789,11 @@
return this.builtinEvalError;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin eval error has not been overridden
- */
- public static boolean isBuiltinEvalError() {
- final Global instance = Global.instance();
- return instance.evalError == LAZY_SENTINEL || instance.evalError == instance.getBuiltinEvalError();
- }
-
private ScriptFunction getBuiltinFunction() {
return builtinFunction;
}
/**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin function has not been overridden
- */
- public static boolean isBuiltinFunction() {
- final Global instance = Global.instance();
- return instance.function == instance.getBuiltinFunction();
- }
-
- /**
* Get the switchpoint used to check property changes for Function.prototype.apply
* @return the switchpoint guarding apply (same as guarding call, and everything else in function)
*/
@@ -1906,16 +1834,6 @@
return builtinJSAdapter;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin JSAdapter has not been overridden
- */
- public static boolean isBuiltinJSAdapter() {
- final Global instance = Global.instance();
- return instance.jsadapter == LAZY_SENTINEL || instance.jsadapter == instance.getBuiltinJSAdapter();
- }
-
private synchronized ScriptObject getBuiltinJSON() {
if (this.builtinJSON == null) {
this.builtinJSON = initConstructorAndSwitchPoint("JSON", ScriptObject.class);
@@ -1923,44 +1841,6 @@
return this.builtinJSON;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin JSON has has not been overridden
- */
- public static boolean isBuiltinJSON() {
- final Global instance = Global.instance();
- return instance.json == LAZY_SENTINEL || instance.json == instance.getBuiltinJSON();
- }
-
- private ScriptObject getBuiltinJava() {
- return builtinJava;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin Java has not been overridden
- */
- public static boolean isBuiltinJava() {
- final Global instance = Global.instance();
- return instance.java == instance.getBuiltinJava();
- }
-
- private ScriptObject getBuiltinJavax() {
- return builtinJavax;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin Javax has not been overridden
- */
- public static boolean isBuiltinJavax() {
- final Global instance = Global.instance();
- return instance.javax == instance.getBuiltinJavax();
- }
-
private synchronized ScriptFunction getBuiltinJavaImporter() {
if (this.builtinJavaImporter == null) {
this.builtinJavaImporter = initConstructor("JavaImporter", ScriptFunction.class);
@@ -1975,68 +1855,6 @@
return this.builtinJavaApi;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin Java importer has not been overridden
- */
- public static boolean isBuiltinJavaImporter() {
- final Global instance = Global.instance();
- return instance.javaImporter == LAZY_SENTINEL || instance.javaImporter == instance.getBuiltinJavaImporter();
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin math has not been overridden
- */
- public static boolean isBuiltinMath() {
- final Global instance = Global.instance();
- return instance.math == instance.builtinMath;
- }
-
- private ScriptFunction getBuiltinNumber() {
- return builtinNumber;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin number has not been overridden
- */
- public static boolean isBuiltinNumber() {
- final Global instance = Global.instance();
- return instance.number == instance.getBuiltinNumber();
- }
-
- private ScriptFunction getBuiltinObject() {
- return builtinObject;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin object has not been overridden
- */
- public static boolean isBuiltinObject() {
- final Global instance = Global.instance();
- return instance.object == instance.getBuiltinObject();
- }
-
- private ScriptObject getBuiltinPackages() {
- return builtinPackages;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin package has not been overridden
- */
- public static boolean isBuiltinPackages() {
- final Global instance = Global.instance();
- return instance.packages == instance.getBuiltinPackages();
- }
-
private synchronized ScriptFunction getBuiltinRangeError() {
if (this.builtinRangeError == null) {
this.builtinRangeError = initErrorSubtype("RangeError", getErrorPrototype());
@@ -2044,30 +1862,6 @@
return builtinRangeError;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin range error has not been overridden
- */
- public static boolean isBuiltinRangeError() {
- final Global instance = Global.instance();
- return instance.rangeError == LAZY_SENTINEL || instance.rangeError == instance.getBuiltinRangeError();
- }
-
- private synchronized ScriptFunction getBuiltinReferenceError() {
- return builtinReferenceError;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin reference error has not been overridden
- */
- public static boolean isBuiltinReferenceError() {
- final Global instance = Global.instance();
- return instance.referenceError == instance.getBuiltinReferenceError();
- }
-
private synchronized ScriptFunction getBuiltinRegExp() {
if (this.builtinRegExp == null) {
this.builtinRegExp = initConstructorAndSwitchPoint("RegExp", ScriptFunction.class);
@@ -2081,58 +1875,6 @@
return builtinRegExp;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin regexp has not been overridden
- */
- public static boolean isBuiltinRegExp() {
- final Global instance = Global.instance();
- return instance.regexp == LAZY_SENTINEL || instance.regexp == instance.getBuiltinRegExp();
- }
-
- private ScriptFunction getBuiltinString() {
- return builtinString;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin Java has not been overridden
- */
- public static boolean isBuiltinString() {
- final Global instance = Global.instance();
- return instance.string == instance.getBuiltinString();
- }
-
- private ScriptFunction getBuiltinSyntaxError() {
- return builtinSyntaxError;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin syntax error has not been overridden
- */
- public static boolean isBuiltinSyntaxError() {
- final Global instance = Global.instance();
- return instance.syntaxError == instance.getBuiltinSyntaxError();
- }
-
- private ScriptFunction getBuiltinTypeError() {
- return builtinTypeError;
- }
-
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin type error has not been overridden
- */
- public static boolean isBuiltinTypeError() {
- final Global instance = Global.instance();
- return instance.typeError == instance.getBuiltinTypeError();
- }
-
private synchronized ScriptFunction getBuiltinURIError() {
if (this.builtinURIError == null) {
this.builtinURIError = initErrorSubtype("URIError", getErrorPrototype());
@@ -2140,16 +1882,6 @@
return this.builtinURIError;
}
- /**
- * Called from compiled script code to test if builtin has been overridden
- *
- * @return true if builtin URI error has not been overridden
- */
- public static boolean isBuiltinURIError() {
- final Global instance = Global.instance();
- return instance.uriError == LAZY_SENTINEL || instance.uriError == instance.getBuiltinURIError();
- }
-
@Override
public String getClassName() {
return "global";
@@ -2288,7 +2020,7 @@
* @return true if the value is a placeholder, false otherwise.
*/
public static boolean isLocationPropertyPlaceholder(final Object placeholder) {
- return placeholder == LOCATION_PROPERTY_PLACEHOLDER;
+ return placeholder == LAZY_SENTINEL;
}
/**
@@ -2386,17 +2118,18 @@
}
}
+ final boolean extensible = isExtensible();
for (final jdk.nashorn.internal.runtime.Property property : properties) {
if (property.isLexicalBinding()) {
assert lexScope != null;
- lexicalMap = lexScope.addBoundProperty(lexicalMap, source, property);
+ lexicalMap = lexScope.addBoundProperty(lexicalMap, source, property, true);
if (ownMap.findProperty(property.getKey()) != null) {
// If property exists in the global object invalidate any global constant call sites.
invalidateGlobalConstant(property.getKey());
}
} else {
- ownMap = addBoundProperty(ownMap, source, property);
+ ownMap = addBoundProperty(ownMap, source, property, extensible);
}
}
@@ -2999,9 +2732,9 @@
}
@Override
- protected PropertyMap addBoundProperty(final PropertyMap propMap, final ScriptObject source, final jdk.nashorn.internal.runtime.Property property) {
+ protected PropertyMap addBoundProperty(final PropertyMap propMap, final ScriptObject source, final jdk.nashorn.internal.runtime.Property property, final boolean extensible) {
// We override this method just to make it callable by Global
- return super.addBoundProperty(propMap, source, property);
+ return super.addBoundProperty(propMap, source, property, extensible);
}
private static GuardedInvocation filterInvocation(final GuardedInvocation invocation) {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/parser/Lexer.java
--- a/src/jdk/nashorn/internal/parser/Lexer.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/parser/Lexer.java Tue Aug 11 12:49:01 2015 -0700
@@ -1640,9 +1640,9 @@
//and new Color(float, float, float) will get ambiguous for cases like
//new Color(1.0, 1.5, 1.5) if we don't respect the decimal point.
//yet we don't want e.g. 1e6 to be a double unnecessarily
- if (JSType.isRepresentableAsInt(value) && !JSType.isNegativeZero(value)) {
+ if (JSType.isStrictlyRepresentableAsInt(value)) {
return (int)value;
- } else if (JSType.isRepresentableAsLong(value) && !JSType.isNegativeZero(value)) {
+ } else if (JSType.isStrictlyRepresentableAsLong(value)) {
return (long)value;
}
return value;
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/parser/Parser.java
--- a/src/jdk/nashorn/internal/parser/Parser.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/parser/Parser.java Tue Aug 11 12:49:01 2015 -0700
@@ -2720,6 +2720,11 @@
}
if (isStatement) {
+ if (isAnonymous) {
+ appendStatement(new ExpressionStatement(functionLine, functionToken, finish, functionNode));
+ return functionNode;
+ }
+
final int varFlags = (topLevel || !useBlockScope()) ? 0 : VarNode.IS_LET;
final VarNode varNode = new VarNode(functionLine, functionToken, finish, name, functionNode, varFlags);
if (topLevel) {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/DebuggerSupport.java
--- a/src/jdk/nashorn/internal/runtime/DebuggerSupport.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/DebuggerSupport.java Tue Aug 11 12:49:01 2015 -0700
@@ -3,18 +3,18 @@
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General License version 2 only, as
+ * under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General License
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
- * You should have received a copy of the GNU General License version
+ * You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/FinalScriptFunctionData.java
--- a/src/jdk/nashorn/internal/runtime/FinalScriptFunctionData.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/FinalScriptFunctionData.java Tue Aug 11 12:49:01 2015 -0700
@@ -27,6 +27,7 @@
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodType;
+import java.util.Collection;
import java.util.List;
/**
@@ -72,11 +73,6 @@
}
@Override
- boolean isRecompilable() {
- return false;
- }
-
- @Override
protected boolean needsCallee() {
final boolean needsCallee = code.getFirst().needsCallee();
assert allNeedCallee(needsCallee);
@@ -93,6 +89,20 @@
}
@Override
+ CompiledFunction getBest(final MethodType callSiteType, final ScriptObject runtimeScope, final Collection forbidden) {
+ assert isValidCallSite(callSiteType) : callSiteType;
+
+ CompiledFunction best = null;
+ for (final CompiledFunction candidate: code) {
+ if (!forbidden.contains(candidate) && candidate.betterThanFinal(best, callSiteType)) {
+ best = candidate;
+ }
+ }
+
+ return best;
+ }
+
+ @Override
MethodType getGenericType() {
// We need to ask the code for its generic type. We can't just rely on this function data's arity, as it's not
// actually correct for lots of built-ins. E.g. ECMAScript 5.1 section 15.5.3.2 prescribes that
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/JSONFunctions.java
--- a/src/jdk/nashorn/internal/runtime/JSONFunctions.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/JSONFunctions.java Tue Aug 11 12:49:01 2015 -0700
@@ -104,16 +104,28 @@
final Object val = holder.get(name);
if (val instanceof ScriptObject) {
final ScriptObject valueObj = (ScriptObject)val;
- final Iterator iter = valueObj.propertyIterator();
+ if (valueObj.isArray()) {
+ final int length = JSType.toInteger(valueObj.getLength());
+ for (int i = 0; i < length; i++) {
+ final String key = Integer.toString(i);
+ final Object newElement = walk(valueObj, key, reviver);
- while (iter.hasNext()) {
- final String key = iter.next();
- final Object newElement = walk(valueObj, key, reviver);
+ if (newElement == ScriptRuntime.UNDEFINED) {
+ valueObj.delete(i, false);
+ } else {
+ setPropertyValue(valueObj, key, newElement);
+ }
+ }
+ } else {
+ final String[] keys = valueObj.getOwnKeys(false);
+ for (final String key : keys) {
+ final Object newElement = walk(valueObj, key, reviver);
- if (newElement == ScriptRuntime.UNDEFINED) {
- valueObj.delete(key, false);
- } else {
- setPropertyValue(valueObj, key, newElement);
+ if (newElement == ScriptRuntime.UNDEFINED) {
+ valueObj.delete(key, false);
+ } else {
+ setPropertyValue(valueObj, key, newElement);
+ }
}
}
}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/JSType.java
--- a/src/jdk/nashorn/internal/runtime/JSType.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/JSType.java Tue Aug 11 12:49:01 2015 -0700
@@ -377,8 +377,8 @@
}
/**
- * Returns true if double number can be represented as an int. Note that it returns true for negative zero. If you
- * need to exclude negative zero, combine this check with {@link #isNegativeZero(double)}.
+ * Returns true if double number can be represented as an int. Note that it returns true for negative
+ * zero. If you need to exclude negative zero, use {@link #isStrictlyRepresentableAsInt(double)}.
*
* @param number a double to inspect
*
@@ -389,6 +389,18 @@
}
/**
+ * Returns true if double number can be represented as an int. Note that it returns false for negative
+ * zero. If you don't need to distinguish negative zero, use {@link #isRepresentableAsInt(double)}.
+ *
+ * @param number a double to inspect
+ *
+ * @return true for int representable doubles
+ */
+ public static boolean isStrictlyRepresentableAsInt(final double number) {
+ return isRepresentableAsInt(number) && isNotNegativeZero(number);
+ }
+
+ /**
* Returns true if Object can be represented as an int
*
* @param obj an object to inspect
@@ -403,8 +415,8 @@
}
/**
- * Returns true if double number can be represented as a long. Note that it returns true for negative zero. If you
- * need to exclude negative zero, combine this check with {@link #isNegativeZero(double)}.
+ * Returns true if double number can be represented as a long. Note that it returns true for negative
+ * zero. If you need to exclude negative zero, use {@link #isStrictlyRepresentableAsLong(double)}.
*
* @param number a double to inspect
* @return true for long representable doubles
@@ -414,6 +426,18 @@
}
/**
+ * Returns true if double number can be represented as a long. Note that it returns false for negative
+ * zero. If you don't need to distinguish negative zero, use {@link #isRepresentableAsLong(double)}.
+ *
+ * @param number a double to inspect
+ *
+ * @return true for long representable doubles
+ */
+ public static boolean isStrictlyRepresentableAsLong(final double number) {
+ return isRepresentableAsLong(number) && isNotNegativeZero(number);
+ }
+
+ /**
* Returns true if Object can be represented as a long
*
* @param obj an object to inspect
@@ -428,12 +452,12 @@
}
/**
- * Returns true if the number is the negative zero ({@code -0.0d}).
+ * Returns true if the number is not the negative zero ({@code -0.0d}).
* @param number the number to test
- * @return true if it is the negative zero, false otherwise.
+ * @return true if it is not the negative zero, false otherwise.
*/
- public static boolean isNegativeZero(final double number) {
- return number == 0.0d && Double.doubleToRawLongBits(number) == 0x8000000000000000L;
+ private static boolean isNotNegativeZero(final double number) {
+ return Double.doubleToRawLongBits(number) != 0x8000000000000000L;
}
/**
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/OptimisticReturnFilters.java
--- a/src/jdk/nashorn/internal/runtime/OptimisticReturnFilters.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/OptimisticReturnFilters.java Tue Aug 11 12:49:01 2015 -0700
@@ -184,7 +184,7 @@
@SuppressWarnings("unused")
private static int ensureInt(final double arg, final int programPoint) {
- if (JSType.isRepresentableAsInt(arg) && !JSType.isNegativeZero(arg)) {
+ if (JSType.isStrictlyRepresentableAsInt(arg)) {
return (int)arg;
}
throw new UnwarrantedOptimismException(arg, programPoint);
@@ -206,7 +206,7 @@
// Long into the exception.
if (isPrimitiveNumberWrapper(arg)) {
final double d = ((Number)arg).doubleValue();
- if (JSType.isRepresentableAsInt(d) && !JSType.isNegativeZero(d)) {
+ if (JSType.isStrictlyRepresentableAsInt(d)) {
return (int)d;
}
}
@@ -239,7 +239,7 @@
}
private static long ensureLong(final double arg, final int programPoint) {
- if (JSType.isRepresentableAsLong(arg) && !JSType.isNegativeZero(arg)) {
+ if (JSType.isStrictlyRepresentableAsLong(arg)) {
return (long)arg;
}
throw new UnwarrantedOptimismException(arg, programPoint);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/Property.java
--- a/src/jdk/nashorn/internal/runtime/Property.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/Property.java Tue Aug 11 12:49:01 2015 -0700
@@ -562,8 +562,8 @@
@Override
public int hashCode() {
- final Class> type = getLocalType();
- return Objects.hashCode(this.key) ^ flags ^ getSlot() ^ (type == null ? 0 : type.hashCode());
+ final Class> t = getLocalType();
+ return Objects.hashCode(this.key) ^ flags ^ getSlot() ^ (t == null ? 0 : t.hashCode());
}
@Override
@@ -588,7 +588,7 @@
getKey().equals(otherProperty.getKey());
}
- private static final String type(final Class> type) {
+ private static String type(final Class> type) {
if (type == null) {
return "undef";
} else if (type == int.class) {
@@ -608,8 +608,8 @@
*/
public final String toStringShort() {
final StringBuilder sb = new StringBuilder();
- final Class> type = getLocalType();
- sb.append(getKey()).append(" (").append(type(type)).append(')');
+ final Class> t = getLocalType();
+ sb.append(getKey()).append(" (").append(type(t)).append(')');
return sb.toString();
}
@@ -625,7 +625,7 @@
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
- final Class> type = getLocalType();
+ final Class> t = getLocalType();
sb.append(indent(getKey(), 20)).
append(" id=").
@@ -635,7 +635,7 @@
append(") ").
append(getClass().getSimpleName()).
append(" {").
- append(indent(type(type), 5)).
+ append(indent(type(t), 5)).
append('}');
if (slot != -1) {
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/PropertyMap.java
--- a/src/jdk/nashorn/internal/runtime/PropertyMap.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/PropertyMap.java Tue Aug 11 12:49:01 2015 -0700
@@ -990,10 +990,10 @@
for (final Property p : map0.getProperties()) {
final Property p2 = map1.findProperty(p.getKey());
if (p2 == null) {
- sb.append("FIRST ONLY : [" + p + "]");
+ sb.append("FIRST ONLY : [").append(p).append("]");
found = true;
} else if (p2 != p) {
- sb.append("DIFFERENT : [" + p + "] != [" + p2 + "]");
+ sb.append("DIFFERENT : [").append(p).append("] != [").append(p2).append("]");
found = true;
}
}
@@ -1001,7 +1001,7 @@
for (final Property p2 : map1.getProperties()) {
final Property p1 = map0.findProperty(p2.getKey());
if (p1 == null) {
- sb.append("SECOND ONLY: [" + p2 + "]");
+ sb.append("SECOND ONLY: [").append(p2).append("]");
found = true;
}
}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
--- a/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java Tue Aug 11 12:49:01 2015 -0700
@@ -617,6 +617,7 @@
private CompiledFunction addCode(final MethodHandle target, final Map invalidatedProgramPoints,
final MethodType callSiteType, final int fnFlags) {
final CompiledFunction cfn = new CompiledFunction(target, this, invalidatedProgramPoints, callSiteType, fnFlags);
+ assert noDuplicateCode(cfn) : "duplicate code";
code.add(cfn);
return cfn;
}
@@ -683,14 +684,17 @@
@Override
synchronized CompiledFunction getBest(final MethodType callSiteType, final ScriptObject runtimeScope, final Collection forbidden) {
- CompiledFunction existingBest = super.getBest(callSiteType, runtimeScope, forbidden);
+ assert isValidCallSite(callSiteType) : callSiteType;
+
+ CompiledFunction existingBest = pickFunction(callSiteType, false);
+ if (existingBest == null) {
+ existingBest = pickFunction(callSiteType, true); // try vararg last
+ }
if (existingBest == null) {
existingBest = addCode(compileTypeSpecialization(callSiteType, runtimeScope, true), callSiteType);
}
assert existingBest != null;
- //we are calling a vararg method with real args
- boolean varArgWithRealArgs = existingBest.isVarArg() && !CompiledFunction.isVarArgsType(callSiteType);
//if the best one is an apply to call, it has to match the callsite exactly
//or we need to regenerate
@@ -699,27 +703,18 @@
if (best != null) {
return best;
}
- varArgWithRealArgs = true;
- }
- if (varArgWithRealArgs) {
// special case: we had an apply to call, but we failed to make it fit.
// Try to generate a specialized one for this callsite. It may
// be another apply to call specialization, or it may not, but whatever
// it is, it is a specialization that is guaranteed to fit
- final FunctionInitializer fnInit = compileTypeSpecialization(callSiteType, runtimeScope, false);
- existingBest = addCode(fnInit, callSiteType);
+ existingBest = addCode(compileTypeSpecialization(callSiteType, runtimeScope, false), callSiteType);
}
return existingBest;
}
@Override
- boolean isRecompilable() {
- return true;
- }
-
- @Override
public boolean needsCallee() {
return getFunctionFlag(FunctionNode.NEEDS_CALLEE);
}
@@ -827,6 +822,16 @@
return newFn;
}
+ // Make sure code does not contain a compiled function with the same signature as compiledFunction
+ private boolean noDuplicateCode(final CompiledFunction compiledFunction) {
+ for (final CompiledFunction cf : code) {
+ if (cf.type().equals(compiledFunction.type())) {
+ return false;
+ }
+ }
+ return true;
+ }
+
private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
createLogger();
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/ScriptFunctionData.java
--- a/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java Tue Aug 11 12:49:01 2015 -0700
@@ -359,31 +359,13 @@
* scope is not known, but that might cause compilation of code that will need more deoptimization passes.
* @return the best function for the specified call site type.
*/
- CompiledFunction getBest(final MethodType callSiteType, final ScriptObject runtimeScope, final Collection forbidden) {
- assert callSiteType.parameterCount() >= 2 : callSiteType; // Must have at least (callee, this)
- assert callSiteType.parameterType(0).isAssignableFrom(ScriptFunction.class) : callSiteType; // Callee must be assignable from script function
+ abstract CompiledFunction getBest(final MethodType callSiteType, final ScriptObject runtimeScope, final Collection forbidden);
- if (isRecompilable()) {
- final CompiledFunction candidate = pickFunction(callSiteType, false);
- if (candidate != null) {
- return candidate;
- }
- return pickFunction(callSiteType, true); //try vararg last
- }
-
- CompiledFunction best = null;
- for (final CompiledFunction candidate: code) {
- if (!forbidden.contains(candidate) && candidate.betterThanFinal(best, callSiteType)) {
- best = candidate;
- }
- }
-
- return best;
+ boolean isValidCallSite(final MethodType callSiteType) {
+ return callSiteType.parameterCount() >= 2 && // Must have at least (callee, this)
+ callSiteType.parameterType(0).isAssignableFrom(ScriptFunction.class); // Callee must be assignable from script function
}
-
- abstract boolean isRecompilable();
-
CompiledFunction getGeneric(final ScriptObject runtimeScope) {
return getBest(getGenericType(), runtimeScope, CompiledFunction.NO_FUNCTIONS);
}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/ScriptObject.java
--- a/src/jdk/nashorn/internal/runtime/ScriptObject.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/ScriptObject.java Tue Aug 11 12:49:01 2015 -0700
@@ -287,9 +287,10 @@
*/
public void addBoundProperties(final ScriptObject source, final Property[] properties) {
PropertyMap newMap = this.getMap();
+ final boolean extensible = newMap.isExtensible();
for (final Property property : properties) {
- newMap = addBoundProperty(newMap, source, property);
+ newMap = addBoundProperty(newMap, source, property, extensible);
}
this.setMap(newMap);
@@ -302,13 +303,18 @@
* @param propMap the property map
* @param source the source object
* @param property the property to be added
+ * @param extensible whether the current object is extensible or not
* @return the new property map
*/
- protected PropertyMap addBoundProperty(final PropertyMap propMap, final ScriptObject source, final Property property) {
+ protected PropertyMap addBoundProperty(final PropertyMap propMap, final ScriptObject source, final Property property, final boolean extensible) {
PropertyMap newMap = propMap;
final String key = property.getKey();
final Property oldProp = newMap.findProperty(key);
if (oldProp == null) {
+ if (! extensible) {
+ throw typeError("object.non.extensible", key, ScriptRuntime.safeToString(this));
+ }
+
if (property instanceof UserAccessorProperty) {
// Note: we copy accessor functions to this object which is semantically different from binding.
final UserAccessorProperty prop = this.newUserAccessors(key, property.getFlags(), property.getGetterFunction(source), property.getSetterFunction(source));
@@ -337,11 +343,15 @@
*/
public void addBoundProperties(final Object source, final AccessorProperty[] properties) {
PropertyMap newMap = this.getMap();
+ final boolean extensible = newMap.isExtensible();
for (final AccessorProperty property : properties) {
final String key = property.getKey();
if (newMap.findProperty(key) == null) {
+ if (! extensible) {
+ throw typeError("object.non.extensible", key, ScriptRuntime.safeToString(this));
+ }
newMap = newMap.addPropertyBind(property, source);
}
}
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/ScriptRuntime.java
--- a/src/jdk/nashorn/internal/runtime/ScriptRuntime.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/ScriptRuntime.java Tue Aug 11 12:49:01 2015 -0700
@@ -685,6 +685,33 @@
}
/**
+ * ECMA 11.4.1 - delete operator, implementation for slow scopes
+ *
+ * This implementation of 'delete' walks the scope chain to find the scope that contains the
+ * property to be deleted, then invokes delete on it.
+ *
+ * @param obj top scope object
+ * @param property property to delete
+ * @param strict are we in strict mode
+ *
+ * @return true if property was successfully found and deleted
+ */
+ public static boolean SLOW_DELETE(final Object obj, final Object property, final Object strict) {
+ if (obj instanceof ScriptObject) {
+ ScriptObject sobj = (ScriptObject) obj;
+ final String key = property.toString();
+ while (sobj != null && sobj.isScope()) {
+ final FindProperty find = sobj.findProperty(key, false);
+ if (find != null) {
+ return sobj.delete(key, Boolean.TRUE.equals(strict));
+ }
+ sobj = sobj.getProto();
+ }
+ }
+ return DELETE(obj, property, strict);
+ }
+
+ /**
* ECMA 11.4.1 - delete operator, special case
*
* This is 'delete' that always fails. We have to check strict mode and throw error.
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/Source.java
--- a/src/jdk/nashorn/internal/runtime/Source.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/Source.java Tue Aug 11 12:49:01 2015 -0700
@@ -971,7 +971,7 @@
return initLogger(Context.getContextTrusted());
}
- private File dumpFile(final String dir) {
+ private File dumpFile(final File dirFile) {
final URL u = getURL();
final StringBuilder buf = new StringBuilder();
// make it unique by prefixing current date & time
@@ -986,11 +986,17 @@
buf.append(getName());
}
- return new File(dir, buf.toString());
+ return new File(dirFile, buf.toString());
}
void dump(final String dir) {
- final File file = dumpFile(dir);
+ final File dirFile = new File(dir);
+ final File file = dumpFile(dirFile);
+ if (!dirFile.exists() && !dirFile.mkdirs()) {
+ debug("Skipping source dump for " + name);
+ return;
+ }
+
try (final FileOutputStream fos = new FileOutputStream(file)) {
final PrintWriter pw = new PrintWriter(fos);
pw.print(data.toString());
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/Undefined.java
--- a/src/jdk/nashorn/internal/runtime/Undefined.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/Undefined.java Tue Aug 11 12:49:01 2015 -0700
@@ -96,8 +96,12 @@
switch (operator) {
case "new":
- case "call":
- throw lookupTypeError("cant.call.undefined", desc);
+ case "call": {
+ final String name = desc.getNameTokenCount() > 2? desc.getNameToken(2) : null;
+ final String msg = name != null? "cant.call.undefined.arg" : "cant.call.undefined";
+ throw typeError(msg, name);
+ }
+
case "callMethod":
throw lookupTypeError("cant.read.property.of.undefined", desc);
// NOTE: we support getElem and setItem as JavaScript doesn't distinguish items from properties. Nashorn itself
@@ -125,7 +129,8 @@
}
private static ECMAException lookupTypeError(final String msg, final CallSiteDescriptor desc) {
- return typeError(msg, desc.getNameTokenCount() > 2 ? desc.getNameToken(2) : null);
+ final String name = desc.getNameToken(2);
+ return typeError(msg, name != null && !name.isEmpty()? name : null);
}
private static final MethodHandle GET_METHOD = findOwnMH("get", Object.class, Object.class);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
--- a/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Tue Aug 11 12:49:01 2015 -0700
@@ -150,7 +150,7 @@
public static NashornCallSiteDescriptor get(final MethodHandles.Lookup lookup, final String name,
final MethodType methodType, final int flags) {
final String[] tokenizedName = CallSiteDescriptorFactory.tokenizeName(name);
- assert tokenizedName.length == 2 || tokenizedName.length == 3;
+ assert tokenizedName.length >= 2;
assert "dyn".equals(tokenizedName[0]);
assert tokenizedName[1] != null;
// TODO: see if we can move mangling/unmangling into Dynalink
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/logging/DebugLogger.java
--- a/src/jdk/nashorn/internal/runtime/logging/DebugLogger.java Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/logging/DebugLogger.java Tue Aug 11 12:49:01 2015 -0700
@@ -99,10 +99,10 @@
final StringBuilder sb = new StringBuilder();
sb.append('[')
- .append(record.getLoggerName())
- .append("] ")
- .append(record.getMessage())
- .append('\n');
+ .append(record.getLoggerName())
+ .append("] ")
+ .append(record.getMessage())
+ .append('\n');
return sb.toString();
}
@@ -194,7 +194,7 @@
*/
public void indent(final int pos) {
if (isEnabled) {
- indent += pos * INDENT_SPACE;
+ indent += pos * INDENT_SPACE;
}
}
@@ -227,57 +227,14 @@
}
/**
- * Check if the logger is above the level of detail given
+ * Check if the event of given level will be logged.
* @see java.util.logging.Level
*
- * The higher the level, the more severe the warning
- *
* @param level logging level
- * @return true if level is above the given one
+ * @return true if event of given level will be logged.
*/
- public boolean levelCoarserThan(final Level level) {
- return getLevel().intValue() > level.intValue();
- }
-
- /**
- * Check if the logger is above or equal to the level
- * of detail given
- * @see java.util.logging.Level
- *
- * The higher the level, the more severe the warning
- *
- * @param level logging level
- * @return true if level is above the given one
- */
- public boolean levelCoarserThanOrEqual(final Level level) {
- return getLevel().intValue() >= level.intValue();
- }
-
- /**
- * Check if the logger is below the level of detail given
- * @see java.util.logging.Level
- *
- * The higher the level, the more severe the warning
- *
- * @param level logging level
- * @return true if level is above the given one
- */
- public boolean levelFinerThan(final Level level) {
- return getLevel().intValue() < level.intValue();
- }
-
- /**
- * Check if the logger is below or equal to the level
- * of detail given
- * @see java.util.logging.Level
- *
- * The higher the level, the more severe the warning
- *
- * @param level logging level
- * @return true if level is above the given one
- */
- public boolean levelFinerThanOrEqual(final Level level) {
- return getLevel().intValue() <= level.intValue();
+ public boolean isLoggable(final Level level) {
+ return logger.isLoggable(level);
}
/**
@@ -566,7 +523,7 @@
* @param str string to log
*/
public void log(final Level level, final String str) {
- if (isEnabled && !isQuiet) {
+ if (isEnabled && !isQuiet && logger.isLoggable(level)) {
final StringBuilder sb = new StringBuilder();
for (int i = 0 ; i < indent ; i++) {
sb.append(' ');
@@ -584,7 +541,7 @@
* @param objs objects for which to invoke toString and concatenate to log
*/
public void log(final Level level, final Object... objs) {
- if (isEnabled && !isQuiet) {
+ if (isEnabled && !isQuiet && logger.isLoggable(level)) {
final StringBuilder sb = new StringBuilder();
for (final Object obj : objs) {
sb.append(obj);
diff -r 3be31159ea48 -r 645ffd6ff142 src/jdk/nashorn/internal/runtime/resources/Messages.properties
--- a/src/jdk/nashorn/internal/runtime/resources/Messages.properties Fri Aug 07 11:55:46 2015 -0700
+++ b/src/jdk/nashorn/internal/runtime/resources/Messages.properties Tue Aug 11 12:49:01 2015 -0700
@@ -87,6 +87,7 @@
# operations not permitted on undefined
type.error.cant.call.undefined=Cannot call undefined
+type.error.cant.call.undefined.arg=Cannot call "{0}" that has undefined value
type.error.cant.read.property.of.undefined=Cannot read property "{0}" from undefined
type.error.cant.set.property.of.undefined=Cannot set property "{0}" of undefined
type.error.cant.delete.property.of.undefined=Cannot delete property "{0}" of undefined
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8007456.js
--- a/test/script/basic/JDK-8007456.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8007456.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8026016.js.EXPECTED
--- a/test/script/basic/JDK-8026016.js.EXPECTED Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8026016.js.EXPECTED Tue Aug 11 12:49:01 2015 -0700
@@ -1,182 +1,182 @@
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-TypeError: Cannot call undefined
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such method _,0
-no such method _,1
-no such method _,2
-no such method _,3
-no such method _,4
-no such method _,5
-no such method _,6
-no such method _,7
-no such method _,8
-no such method _,9
-no such method _,10
-no such method _,11
-no such method _,12
-no such method _,13
-no such method _,14
-no such method _,15
-no such method _,16
-no such method _,17
-no such method _,18
-no such method _,19
-no such method _,20
-no such method _,21
-no such method _,22
-no such method _,23
-no such method _,24
-no such method _,25
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-TypeError: Cannot call undefined
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
-no such property _
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+TypeError: Cannot call "_" that has undefined value
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such method _,0
+no such method _,1
+no such method _,2
+no such method _,3
+no such method _,4
+no such method _,5
+no such method _,6
+no such method _,7
+no such method _,8
+no such method _,9
+no such method _,10
+no such method _,11
+no such method _,12
+no such method _,13
+no such method _,14
+no such method _,15
+no such method _,16
+no such method _,17
+no such method _,18
+no such method _,19
+no such method _,20
+no such method _,21
+no such method _,22
+no such method _,23
+no such method _,24
+no such method _,25
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+TypeError: Cannot call "_" that has undefined value
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
+no such property _
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8035712.js
--- a/test/script/basic/JDK-8035712.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8035712.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8051778.js
--- a/test/script/basic/JDK-8051778.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8051778.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8058610.js
--- a/test/script/basic/JDK-8058610.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8058610.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8061113.js
--- a/test/script/basic/JDK-8061113.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8061113.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8062799.js
--- a/test/script/basic/JDK-8062799.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8062799.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
@@ -100,4 +100,4 @@
-
\ No newline at end of file
+
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066221.js
--- a/test/script/basic/JDK-8066221.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066221.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066222.js
--- a/test/script/basic/JDK-8066222.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066222.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066224.js
--- a/test/script/basic/JDK-8066224.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066224.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066225.js
--- a/test/script/basic/JDK-8066225.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066225.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066227.js
--- a/test/script/basic/JDK-8066227.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066227.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066230.js
--- a/test/script/basic/JDK-8066230.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066230.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066232.js
--- a/test/script/basic/JDK-8066232.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066232.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8066236.js
--- a/test/script/basic/JDK-8066236.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8066236.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8067139.js
--- a/test/script/basic/JDK-8067139.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8067139.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8067774.js
--- a/test/script/basic/JDK-8067774.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8067774.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8068573.js
--- a/test/script/basic/JDK-8068573.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8068573.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8068580.js
--- a/test/script/basic/JDK-8068580.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8068580.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8068985.js
--- a/test/script/basic/JDK-8068985.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8068985.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8069002.js
--- a/test/script/basic/JDK-8069002.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8069002.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8072426.js
--- a/test/script/basic/JDK-8072426.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8072426.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8072596.js
--- a/test/script/basic/JDK-8072596.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8072596.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8073733.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8073733.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8073733: TypeError messages with "call" and "new" could be improved
+ *
+ * @test
+ * @run
+ */
+
+var func = undefined;
+try {
+ func();
+} catch (e) {
+ print(e);
+}
+
+var obj = {};
+try {
+ obj.foo();
+} catch (e) {
+ print(e);
+}
+
+try {
+ new func();
+} catch (e) {
+ print(e);
+}
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8073733.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8073733.js.EXPECTED Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,3 @@
+TypeError: Cannot call "func" that has undefined value
+TypeError: Cannot call "foo" that has undefined value
+TypeError: Cannot call "func" that has undefined value
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8075090.js
--- a/test/script/basic/JDK-8075090.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8075090.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8079145.js
--- a/test/script/basic/JDK-8079145.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8079145.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8079269.js
--- a/test/script/basic/JDK-8079269.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8079269.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8079424.js
--- a/test/script/basic/JDK-8079424.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8079424.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8079470.js
--- a/test/script/basic/JDK-8079470.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8079470.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8080182.js
--- a/test/script/basic/JDK-8080182.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8080182.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8080848.js
--- a/test/script/basic/JDK-8080848.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8080848.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8081156.js
--- a/test/script/basic/JDK-8081156.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8081156.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8085802.js
--- a/test/script/basic/JDK-8085802.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8085802.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8087211.js
--- a/test/script/basic/JDK-8087211.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8087211.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8087211_2.js
--- a/test/script/basic/JDK-8087211_2.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8087211_2.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8098578.js
--- a/test/script/basic/JDK-8098578.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8098578.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8114838.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8114838.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8114838: Anonymous functions escape to surrounding scope when defined under "with" statement
+ *
+ * @test
+ * @run
+ */
+
+// do *not* introduce new lines! The next line should be 32
+with({}) { function () {} }
+if (typeof this["L:32"] != 'undefined') {
+ throw new Error("anonymous name spills into global scope");
+}
+
+var func = eval("function() {}");
+if (typeof func != 'function') {
+ throw new Error("eval of anonymous function does not work!");
+}
+
+var ScriptEngineManager = Java.type("javax.script.ScriptEngineManager");
+var engine = new ScriptEngineManager().getEngineByName("nashorn");
+var func2 = engine.eval("function() {}");
+if (typeof func2 != 'function') {
+ throw new Error("eval of anonymous function does not work from script engine!");
+}
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8129410.js
--- a/test/script/basic/JDK-8129410.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/JDK-8129410.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,21 +1,21 @@
/*
- * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
- *
+ *
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
- *
+ *
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
+ *
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8130853.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8130853.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8130853: Non-extensible global is not handled property
+ *
+ * @test
+ * @run
+ */
+
+// don't allow extensions to global
+Object.preventExtensions(this);
+try {
+ eval("var x = 34;");
+ throw new Error("should have thrown TypeError");
+} catch (e) {
+ if (! (e instanceof TypeError)) {
+ throw e;
+ }
+}
+
+try {
+ eval("function func() {}");
+ throw new Error("should have thrown TypeError");
+} catch (e) {
+ if (! (e instanceof TypeError)) {
+ throw e;
+ }
+}
+
+function checkLoad(code) {
+ try {
+ load({ name: "test", script: code });
+ throw new Error("should have thrown TypeError for load: " + code);
+ } catch (e) {
+ if (! (e instanceof TypeError)) {
+ throw e;
+ }
+ }
+}
+
+checkLoad("var y = 55");
+checkLoad("function f() {}");
+
+// check script engine eval
+var ScriptEngineManager = Java.type("javax.script.ScriptEngineManager");
+var e = new ScriptEngineManager().getEngineByName("nashorn");
+var global = e.eval("this");
+e.eval("Object.preventExtensions(this);");
+try {
+ e.eval("var myVar = 33;");
+ throw new Error("should have thrown TypeError");
+} catch (e) {
+ if (! (e.cause.ecmaError instanceof global.TypeError)) {
+ throw e;
+ }
+}
+
+// Object.bindProperties on arbitrary non-extensible object
+var obj = {};
+Object.preventExtensions(obj);
+try {
+ Object.bindProperties(obj, { foo: 434 });
+ throw new Error("should have thrown TypeError");
+} catch (e) {
+ if (! (e instanceof TypeError)) {
+ throw e;
+ }
+}
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8131039.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8131039.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8131039: after adding a function property to Object.prototype, JSON.parse with reviver function goes into infinite loop
+ *
+ * @test
+ * @run
+ */
+
+Object.prototype.func = function() {}
+
+function identity(k, v) { return v };
+var obj = JSON.parse('{\"name\" : \"nashorn\"}', identity);
+Assert.assertTrue(obj.name, "nashorn");
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8131340.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8131340.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8131340: Varargs function is recompiled each time it is linked
+ *
+ * @test
+ * @run
+ */
+
+// This is an indirect test. If repeated calls were to cause recompilation
+// this would trigger an assertion in RecompilableScriptFunctionData.
+
+function varargs() {
+ return arguments;
+}
+
+varargs(1);
+varargs(2);
+varargs(3);
+varargs(4);
+varargs(5);
+varargs(6);
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8131683.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8131683.js Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8131683: Delete fails over multiple scopes
+ *
+ * @test
+ * @run
+ */
+
+a = 1;
+b = 2;
+c = 3;
+
+var A = 1;
+var B = 2;
+var C = 3;
+function D() {}
+
+print((function() {
+ var x; // force creation of scope
+ (function() { x; })();
+ return delete a;
+})());
+
+print((function() {
+ eval("");
+ return delete b;
+})());
+
+print((function() {
+ return eval("delete c");
+})());
+
+print((function() {
+ eval("d = 4");
+ return eval("delete d");
+})());
+
+print(typeof a);
+print(typeof b);
+print(typeof c);
+print(typeof d);
+
+print((function() {
+ var x; // force creation of scope
+ (function() { x; })();
+ return delete A;
+})());
+
+print((function() {
+ eval("");
+ return delete B;
+})());
+
+print((function() {
+ return eval("delete C");
+})());
+
+print((function() {
+ eval("");
+ return delete D;
+})());
+
+print(typeof A);
+print(typeof B);
+print(typeof C);
+print(typeof D);
+
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/JDK-8131683.js.EXPECTED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8131683.js.EXPECTED Tue Aug 11 12:49:01 2015 -0700
@@ -0,0 +1,16 @@
+true
+true
+true
+true
+undefined
+undefined
+undefined
+undefined
+false
+false
+false
+false
+number
+number
+number
+function
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/basic/errors.js.EXPECTED
--- a/test/script/basic/errors.js.EXPECTED Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/basic/errors.js.EXPECTED Tue Aug 11 12:49:01 2015 -0700
@@ -1,31 +1,31 @@
-Error is a function
-EvalError is a function
-RangeError is a function
-ReferenceError is a function
-SyntaxError is a function
-TypeError is a function
-URIError is a function
-Error.arity 1
-EvalError.arity 1
-RangeError.arity 1
-ReferenceError.arity 1
-SyntaxError.arity 1
-TypeError.arity 1
-URIError.arity 1
-true
-my error
-Error
-thrown @ 49
-true
-ReferenceError
-"foo" is not defined
-true
-TypeError
-Cannot call undefined
-Error
-EvalError
-RangeError
-ReferenceError
-SyntaxError
-TypeError
-URIError
+Error is a function
+EvalError is a function
+RangeError is a function
+ReferenceError is a function
+SyntaxError is a function
+TypeError is a function
+URIError is a function
+Error.arity 1
+EvalError.arity 1
+RangeError.arity 1
+ReferenceError.arity 1
+SyntaxError.arity 1
+TypeError.arity 1
+URIError.arity 1
+true
+my error
+Error
+thrown @ 49
+true
+ReferenceError
+"foo" is not defined
+true
+TypeError
+Cannot call "foo_method" that has undefined value
+Error
+EvalError
+RangeError
+ReferenceError
+SyntaxError
+TypeError
+URIError
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/currently-failing/gettersetter.js
--- a/test/script/currently-failing/gettersetter.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/currently-failing/gettersetter.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/currently-failing/property_delete.js
--- a/test/script/currently-failing/property_delete.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/currently-failing/property_delete.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/builtins.js
--- a/test/script/maptests/builtins.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/builtins.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/constructor.js
--- a/test/script/maptests/constructor.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/constructor.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/maputil.js
--- a/test/script/maptests/maputil.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/maputil.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/object_create.js
--- a/test/script/maptests/object_create.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/object_create.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/object_literals.js
--- a/test/script/maptests/object_literals.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/object_literals.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/point.js
--- a/test/script/maptests/point.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/point.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/property_add.js
--- a/test/script/maptests/property_add.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/property_add.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/maptests/proto.js
--- a/test/script/maptests/proto.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/maptests/proto.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/script/sandbox/safeprops.js
--- a/test/script/sandbox/safeprops.js Fri Aug 07 11:55:46 2015 -0700
+++ b/test/script/sandbox/safeprops.js Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
diff -r 3be31159ea48 -r 645ffd6ff142 test/src/jdk/nashorn/test/models/NullProvider.java
--- a/test/src/jdk/nashorn/test/models/NullProvider.java Fri Aug 07 11:55:46 2015 -0700
+++ b/test/src/jdk/nashorn/test/models/NullProvider.java Tue Aug 11 12:49:01 2015 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it