aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsundar <none@none>2013-07-02 18:39:41 +0530
committersundar <none@none>2013-07-02 18:39:41 +0530
commit6c530a3d85618ed290edde1d97778f72a6dfd1a3 (patch)
tree218526c34a5b267173dfdd0dd990567c03cb40f1
parent3d8d7e29e9ac30cff9abac1f8f41501c642b7ffb (diff)
parent059600dc82e16449a4941086cf23c7f3a2b3becf (diff)
Merge
-rw-r--r--make/build.xml22
-rw-r--r--src/jdk/nashorn/api/scripting/NashornException.java5
-rw-r--r--src/jdk/nashorn/internal/codegen/CodeGenerator.java9
-rw-r--r--src/jdk/nashorn/internal/codegen/types/Type.java10
-rw-r--r--src/jdk/nashorn/internal/ir/LiteralNode.java25
-rw-r--r--src/jdk/nashorn/internal/objects/NativeError.java13
-rw-r--r--src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java5
-rw-r--r--src/jdk/nashorn/internal/parser/Parser.java42
-rw-r--r--src/jdk/nashorn/internal/runtime/ECMAException.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/JSType.java2
-rw-r--r--src/jdk/nashorn/internal/runtime/ScriptRuntime.java11
-rw-r--r--src/jdk/nashorn/internal/runtime/resources/Messages.properties2
-rw-r--r--test/script/basic/JDK-8014781.js.EXPECTED7
-rw-r--r--test/script/basic/JDK-8016667.js34
-rw-r--r--test/script/basic/JDK-8017082.js33
-rw-r--r--test/script/basic/JDK-8017950.js.EXPECTED9
-rw-r--r--test/script/basic/JDK-8019226.js2
-rw-r--r--test/script/basic/JDK-8019226.js.EXPECTED7
-rw-r--r--test/script/basic/JDK-8019473.js62
-rw-r--r--test/script/basic/JDK-8019478.js33
-rw-r--r--test/script/basic/JDK-8019482.js41
-rw-r--r--test/script/basic/JDK-8019488.js68
-rw-r--r--test/script/basic/JDK-8019508.js56
-rw-r--r--test/script/basic/JDK-8019508.js.EXPECTED12
-rw-r--r--test/script/basic/JDK-8019553.js43
-rw-r--r--test/script/basic/JDK-8019553.js.EXPECTED12
-rw-r--r--test/script/basic/NASHORN-51.js8
-rw-r--r--test/script/basic/NASHORN-51.js.EXPECTED96
-rw-r--r--test/script/error/NASHORN-57.js.EXPECTED2
29 files changed, 591 insertions, 82 deletions
diff --git a/make/build.xml b/make/build.xml
index 7c05e789..7e2d999d 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -124,7 +124,7 @@
<echo message="release=${nashorn.version}" file="${build.classes.dir}/jdk/nashorn/internal/runtime/resources/version.properties" append="true"/>
</target>
- <target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar">
+ <target name="jar" depends="compile, run-nasgen, generate-cc-template" description="Creates nashorn.jar" unless="compile.suppress.jar">
<jar jarfile="${dist.jar}" manifest="${meta.inf.dir}/MANIFEST.MF" index="true" filesetmanifest="merge">
<fileset dir="${build.classes.dir}"/>
<manifest>
@@ -139,7 +139,13 @@
</manifest>
</jar>
</target>
-
+
+ <target name="use-promoted-nashorn" depends="init">
+ <delete file="${dist.dir}/nashorn.jar"/>
+ <copy file="${java.home}/lib/ext/nashorn.jar" todir="${dist.dir}"/>
+ <property name="compile.suppress.jar" value="defined"/>
+ </target>
+
<target name="build-fxshell" depends="jar">
<description>Builds the javafx shell.</description>
<mkdir dir="${fxshell.classes.dir}"/>
@@ -238,7 +244,7 @@
<echo message="" file="${build.dir}/nashorn.policy" append="true"/>
<echo message="};" file="${build.dir}/nashorn.policy" append="true"/>
<echo message="" file="${build.dir}/nashorn.policy" append="true"/>
-
+
<!-- TestNG framework jar needs AllPermission -->
<echo message="grant codeBase &quot;file:/${basedir}/${file.reference.testng.jar}&quot; {" file="${build.dir}/nashorn.policy" append="true"/>
<echo message="" file="${build.dir}/nashorn.policy" append="true"/>
@@ -462,24 +468,24 @@
<!-- get all external test scripts -->
<target name="externals" depends="init, check-external-tests, get-test262, get-octane, get-sunspider">
<!-- make external test dir -->
- <mkdir dir="${test.external.dir}"/>
+ <mkdir dir="${test.external.dir}"/>
<!-- jquery -->
- <mkdir dir="${test.external.dir}/jquery"/>
+ <mkdir dir="${test.external.dir}/jquery"/>
<get src="http://code.jquery.com/jquery-1.7.2.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
<get src="http://code.jquery.com/jquery-1.7.2.min.js" dest="${test.external.dir}/jquery" skipexisting="true" ignoreerrors="true"/>
<!-- prototype -->
- <mkdir dir="${test.external.dir}/prototype"/>
+ <mkdir dir="${test.external.dir}/prototype"/>
<get src="http://ajax.googleapis.com/ajax/libs/prototype/1.7.0/prototype.js" dest="${test.external.dir}/prototype" usetimestamp="true" skipexisting="true" ignoreerrors="true"/>
<!-- underscorejs -->
- <mkdir dir="${test.external.dir}/underscore"/>
+ <mkdir dir="${test.external.dir}/underscore"/>
<get src="http://underscorejs.org/underscore.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
<get src="http://underscorejs.org/underscore-min.js" dest="${test.external.dir}/underscore" skipexisting="true" ignoreerrors="true"/>
<!-- yui -->
- <mkdir dir="${test.external.dir}/yui"/>
+ <mkdir dir="${test.external.dir}/yui"/>
<get src="http://yui.yahooapis.com/3.5.1/build/yui/yui.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
<get src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js" dest="${test.external.dir}/yui" skipexisting="true" ignoreerrors="true"/>
diff --git a/src/jdk/nashorn/api/scripting/NashornException.java b/src/jdk/nashorn/api/scripting/NashornException.java
index 0b479856..3cd687cc 100644
--- a/src/jdk/nashorn/api/scripting/NashornException.java
+++ b/src/jdk/nashorn/api/scripting/NashornException.java
@@ -172,12 +172,13 @@ public abstract class NashornException extends RuntimeException {
final StringBuilder buf = new StringBuilder();
final StackTraceElement[] frames = getScriptFrames((Throwable)exception);
for (final StackTraceElement st : frames) {
+ buf.append("\tat ");
buf.append(st.getMethodName());
- buf.append(" @ ");
+ buf.append(" (");
buf.append(st.getFileName());
buf.append(':');
buf.append(st.getLineNumber());
- buf.append('\n');
+ buf.append(")\n");
}
final int len = buf.length();
// remove trailing '\n'
diff --git a/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
index c4b0af99..414d1bb8 100644
--- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java
+++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java
@@ -1110,7 +1110,7 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
* @return the method generator that was used
*/
private MethodEmitter loadArray(final ArrayLiteralNode arrayLiteralNode, final ArrayType arrayType) {
- assert arrayType == Type.INT_ARRAY || arrayType == Type.NUMBER_ARRAY || arrayType == Type.OBJECT_ARRAY;
+ assert arrayType == Type.INT_ARRAY || arrayType == Type.LONG_ARRAY || arrayType == Type.NUMBER_ARRAY || arrayType == Type.OBJECT_ARRAY;
final Node[] nodes = arrayLiteralNode.getValue();
final Object presets = arrayLiteralNode.getPresets();
@@ -1462,7 +1462,9 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
rhs = tmp;
}
- if (isNullLiteral(rhs)) {
+ // this is a null literal check, so if there is implicit coercion
+ // involved like {D}x=null, we will fail - this is very rare
+ if (isNullLiteral(rhs) && lhs.getType().isObject()) {
final Label trueLabel = new Label("trueLabel");
final Label falseLabel = new Label("falseLabel");
final Label endLabel = new Label("end");
@@ -1845,7 +1847,8 @@ final class CodeGenerator extends NodeOperatorVisitor<CodeGeneratorLexicalContex
// If expression not int see if we can convert, if not use deflt to trigger default.
if (!type.isInteger()) {
method.load(deflt);
- method.invoke(staticCallNoLookup(ScriptRuntime.class, "switchTagAsInt", int.class, type.getTypeClass(), int.class));
+ final Class exprClass = type.getTypeClass();
+ method.invoke(staticCallNoLookup(ScriptRuntime.class, "switchTagAsInt", int.class, exprClass.isPrimitive()? exprClass : Object.class, int.class));
}
// If reasonable size and not too sparse (80%), use table otherwise use lookup.
diff --git a/src/jdk/nashorn/internal/codegen/types/Type.java b/src/jdk/nashorn/internal/codegen/types/Type.java
index 57b0212a..ab32a779 100644
--- a/src/jdk/nashorn/internal/codegen/types/Type.java
+++ b/src/jdk/nashorn/internal/codegen/types/Type.java
@@ -36,6 +36,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.DUP_X2;
import static jdk.internal.org.objectweb.asm.Opcodes.IALOAD;
import static jdk.internal.org.objectweb.asm.Opcodes.IASTORE;
import static jdk.internal.org.objectweb.asm.Opcodes.INVOKESTATIC;
+import static jdk.internal.org.objectweb.asm.Opcodes.LALOAD;
import static jdk.internal.org.objectweb.asm.Opcodes.LASTORE;
import static jdk.internal.org.objectweb.asm.Opcodes.NEWARRAY;
import static jdk.internal.org.objectweb.asm.Opcodes.POP;
@@ -43,6 +44,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.POP2;
import static jdk.internal.org.objectweb.asm.Opcodes.SWAP;
import static jdk.internal.org.objectweb.asm.Opcodes.T_DOUBLE;
import static jdk.internal.org.objectweb.asm.Opcodes.T_INT;
+import static jdk.internal.org.objectweb.asm.Opcodes.T_LONG;
import java.lang.invoke.MethodHandle;
import java.util.Collections;
@@ -729,19 +731,19 @@ public abstract class Type implements Comparable<Type>, BytecodeOps {
@Override
public Type aload(final MethodVisitor method) {
- method.visitInsn(IALOAD);
- return INT;
+ method.visitInsn(LALOAD);
+ return LONG;
}
@Override
public Type newarray(final MethodVisitor method) {
- method.visitIntInsn(NEWARRAY, T_INT);
+ method.visitIntInsn(NEWARRAY, T_LONG);
return this;
}
@Override
public Type getElementType() {
- return INT;
+ return LONG;
}
};
diff --git a/src/jdk/nashorn/internal/ir/LiteralNode.java b/src/jdk/nashorn/internal/ir/LiteralNode.java
index c34f9d94..a7cea66a 100644
--- a/src/jdk/nashorn/internal/ir/LiteralNode.java
+++ b/src/jdk/nashorn/internal/ir/LiteralNode.java
@@ -621,8 +621,10 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
elementType = Type.INT;
analyzeElements();
- if (elementType == Type.INT) {
+ if (elementType.isInteger()) {
presetIntArray();
+ } else if (elementType.isLong()) {
+ presetLongArray();
} else if (elementType.isNumeric()) {
presetNumberArray();
} else {
@@ -649,6 +651,25 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
postsets = Arrays.copyOf(computed, nComputed);
}
+ private void presetLongArray() {
+ final long[] array = new long[value.length];
+ final int[] computed = new int[value.length];
+ int nComputed = 0;
+
+ for (int i = 0; i < value.length; i++) {
+ final Object element = objectAsConstant(value[i]);
+
+ if (element instanceof Number) {
+ array[i] = ((Number)element).longValue();
+ } else {
+ computed[nComputed++] = i;
+ }
+ }
+
+ presets = array;
+ postsets = Arrays.copyOf(computed, nComputed);
+ }
+
private void presetNumberArray() {
final double[] array = new double[value.length];
final int[] computed = new int[value.length];
@@ -746,6 +767,8 @@ public abstract class LiteralNode<T> extends Node implements PropertyKey {
public Type getType() {
if (elementType.isInteger()) {
return Type.INT_ARRAY;
+ } else if (elementType.isLong()) {
+ return Type.LONG_ARRAY;
} else if (elementType.isNumeric()) {
return Type.NUMBER_ARRAY;
} else {
diff --git a/src/jdk/nashorn/internal/objects/NativeError.java b/src/jdk/nashorn/internal/objects/NativeError.java
index 12029ad0..07f5d65a 100644
--- a/src/jdk/nashorn/internal/objects/NativeError.java
+++ b/src/jdk/nashorn/internal/objects/NativeError.java
@@ -30,10 +30,7 @@ import static jdk.nashorn.internal.lookup.Lookup.MH;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
-import java.util.ArrayList;
-import java.util.List;
import jdk.nashorn.api.scripting.NashornException;
-import jdk.nashorn.internal.codegen.CompilerConstants;
import jdk.nashorn.internal.lookup.MethodHandleFactory;
import jdk.nashorn.internal.objects.annotations.Attribute;
import jdk.nashorn.internal.objects.annotations.Constructor;
@@ -41,7 +38,6 @@ import jdk.nashorn.internal.objects.annotations.Function;
import jdk.nashorn.internal.objects.annotations.Property;
import jdk.nashorn.internal.objects.annotations.ScriptClass;
import jdk.nashorn.internal.objects.annotations.Where;
-import jdk.nashorn.internal.runtime.ECMAErrors;
import jdk.nashorn.internal.runtime.ECMAException;
import jdk.nashorn.internal.runtime.JSType;
import jdk.nashorn.internal.runtime.PropertyMap;
@@ -123,13 +119,14 @@ public final class NativeError extends ScriptObject {
* Nashorn extension: Error.captureStackTrace. Capture stack trace at the point of call into the Error object provided.
*
* @param self self reference
+ * @return undefined
*/
@Function(attributes = Attribute.NOT_ENUMERABLE, where = Where.CONSTRUCTOR)
public static Object captureStackTrace(final Object self, final Object errorObj) {
Global.checkObject(errorObj);
final ScriptObject sobj = (ScriptObject)errorObj;
final ECMAException exp = new ECMAException(sobj, null);
- sobj.set("stack", NashornException.getScriptStackString(exp), false);
+ sobj.set("stack", getScriptStackString(sobj, exp), false);
return UNDEFINED;
}
@@ -288,7 +285,7 @@ public final class NativeError extends ScriptObject {
final Object exception = ECMAException.getException(sobj);
if (exception instanceof Throwable) {
- return NashornException.getScriptStackString((Throwable)exception);
+ return getScriptStackString(sobj, (Throwable)exception);
} else {
return "";
}
@@ -362,4 +359,8 @@ public final class NativeError extends ScriptObject {
throw new MethodHandleFactory.LookupException(e);
}
}
+
+ private static String getScriptStackString(final ScriptObject sobj, final Throwable exp) {
+ return JSType.toString(sobj) + "\n" + NashornException.getScriptStackString(exp);
+ }
}
diff --git a/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java b/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
index 6b75e70c..66720552 100644
--- a/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
+++ b/src/jdk/nashorn/internal/objects/NativeRegExpExecResult.java
@@ -61,6 +61,11 @@ public final class NativeRegExpExecResult extends ScriptObject {
this.input = result.getInput();
}
+ @Override
+ public String getClassName() {
+ return "Array";
+ }
+
/**
* Length getter
* @param self self reference
diff --git a/src/jdk/nashorn/internal/parser/Parser.java b/src/jdk/nashorn/internal/parser/Parser.java
index 0c2c1633..181dcf83 100644
--- a/src/jdk/nashorn/internal/parser/Parser.java
+++ b/src/jdk/nashorn/internal/parser/Parser.java
@@ -535,15 +535,12 @@ loop:
if (!(lhs instanceof AccessNode ||
lhs instanceof IndexNode ||
lhs instanceof IdentNode)) {
- if (env._early_lvalue_error) {
- throw error(JSErrorType.REFERENCE_ERROR, AbstractParser.message("invalid.lvalue"), lhs.getToken());
- }
- return referenceError(lhs, rhs);
+ return referenceError(lhs, rhs, env._early_lvalue_error);
}
if (lhs instanceof IdentNode) {
if (!checkIdentLValue((IdentNode)lhs)) {
- return referenceError(lhs, rhs);
+ return referenceError(lhs, rhs, false);
}
verifyStrictIdent((IdentNode)lhs, "assignment");
}
@@ -767,8 +764,6 @@ loop:
case LBRACE:
block();
break;
- case RBRACE:
- break;
case VAR:
variableStatement(true);
break;
@@ -1267,6 +1262,7 @@ loop:
case RBRACE:
case SEMICOLON:
case EOL:
+ case EOF:
break;
default:
@@ -1314,6 +1310,7 @@ loop:
case RBRACE:
case SEMICOLON:
case EOL:
+ case EOF:
break;
default:
@@ -1368,6 +1365,7 @@ loop:
case RBRACE:
case SEMICOLON:
case EOL:
+ case EOF:
break;
default:
@@ -1403,6 +1401,7 @@ loop:
case RBRACE:
case SEMICOLON:
case EOL:
+ case EOF:
break;
default:
@@ -1928,7 +1927,7 @@ loop:
// Object context.
// Prepare to accumulate elements.
- // final List<Node> elements = new ArrayList<>();
+ // final List<Node> elements = new ArrayList<>();
final Map<String, PropertyNode> map = new LinkedHashMap<>();
// Create a block for the object literal.
@@ -1941,6 +1940,9 @@ loop:
break loop;
case COMMARIGHT:
+ if (commaSeen) {
+ throw error(AbstractParser.message("expected.property.id", type.getNameOrType()));
+ }
next();
commaSeen = true;
break;
@@ -2566,7 +2568,7 @@ loop:
*/
// just expression as function body
- final Node expr = expression();
+ final Node expr = assignmentExpression(true);
assert lc.getCurrentBlock() == lc.getFunctionBody(functionNode);
// create a return statement - this creates code in itself and does not need to be
// wrapped into an ExecuteNode
@@ -2612,7 +2614,10 @@ loop:
}
}
- private static RuntimeNode referenceError(final Node lhs, final Node rhs) {
+ private RuntimeNode referenceError(final Node lhs, final Node rhs, final boolean earlyError) {
+ if (earlyError) {
+ throw error(JSErrorType.REFERENCE_ERROR, AbstractParser.message("invalid.lvalue"), lhs.getToken());
+ }
final ArrayList<Node> args = new ArrayList<>();
args.add(lhs);
if (rhs == null) {
@@ -2690,18 +2695,18 @@ loop:
final Node lhs = leftHandSideExpression();
// ++, -- without operand..
if (lhs == null) {
- // error would have been issued when looking for 'lhs'
- return null;
+ throw error(AbstractParser.message("expected.lvalue", type.getNameOrType()));
}
+
if (!(lhs instanceof AccessNode ||
lhs instanceof IndexNode ||
lhs instanceof IdentNode)) {
- return referenceError(lhs, null);
+ return referenceError(lhs, null, env._early_lvalue_error);
}
if (lhs instanceof IdentNode) {
if (!checkIdentLValue((IdentNode)lhs)) {
- return referenceError(lhs, null);
+ return referenceError(lhs, null, false);
}
verifyStrictIdent((IdentNode)lhs, "operand for " + opType.getName() + " operator");
}
@@ -2720,16 +2725,21 @@ loop:
case DECPREFIX:
final TokenType opType = type;
final Node lhs = expression;
+ // ++, -- without operand..
+ if (lhs == null) {
+ throw error(AbstractParser.message("expected.lvalue", type.getNameOrType()));
+ }
+
if (!(lhs instanceof AccessNode ||
lhs instanceof IndexNode ||
lhs instanceof IdentNode)) {
next();
- return referenceError(lhs, null);
+ return referenceError(lhs, null, env._early_lvalue_error);
}
if (lhs instanceof IdentNode) {
if (!checkIdentLValue((IdentNode)lhs)) {
next();
- return referenceError(lhs, null);
+ return referenceError(lhs, null, false);
}
verifyStrictIdent((IdentNode)lhs, "operand for " + opType.getName() + " operator");
}
diff --git a/src/jdk/nashorn/internal/runtime/ECMAException.java b/src/jdk/nashorn/internal/runtime/ECMAException.java
index bb4e49a0..a32e721c 100644
--- a/src/jdk/nashorn/internal/runtime/ECMAException.java
+++ b/src/jdk/nashorn/internal/runtime/ECMAException.java
@@ -51,7 +51,7 @@ public final class ECMAException extends NashornException {
/** Field handle to the{@link ECMAException#thrown} field, so that it can be accessed from generated code */
public static final FieldAccess THROWN = virtualField(ECMAException.class, "thrown", Object.class);
- public static final String EXCEPTION_PROPERTY = "nashornException";
+ private static final String EXCEPTION_PROPERTY = "nashornException";
/** Object thrown. */
public final Object thrown;
diff --git a/src/jdk/nashorn/internal/runtime/JSType.java b/src/jdk/nashorn/internal/runtime/JSType.java
index 8f1f1e9e..9507f0d3 100644
--- a/src/jdk/nashorn/internal/runtime/JSType.java
+++ b/src/jdk/nashorn/internal/runtime/JSType.java
@@ -911,7 +911,7 @@ public enum JSType {
for (int i = start; i < length ; i++) {
if (digit(chars[i], radix) == -1) {
- break;
+ return Double.NaN;
}
pos++;
}
diff --git a/src/jdk/nashorn/internal/runtime/ScriptRuntime.java b/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
index 854b3229..15c915cf 100644
--- a/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
+++ b/src/jdk/nashorn/internal/runtime/ScriptRuntime.java
@@ -127,6 +127,17 @@ public final class ScriptRuntime {
* @param deflt default to use if not convertible.
* @return int tag value (or deflt.)
*/
+ public static int switchTagAsInt(final boolean tag, final int deflt) {
+ return deflt;
+ }
+
+ /**
+ * Converts a switch tag value to a simple integer. deflt value if it can't.
+ *
+ * @param tag Switch statement tag value.
+ * @param deflt default to use if not convertible.
+ * @return int tag value (or deflt.)
+ */
public static int switchTagAsInt(final long tag, final int deflt) {
return isRepresentableAsInt(tag) ? (int)tag : deflt;
}
diff --git a/src/jdk/nashorn/internal/runtime/resources/Messages.properties b/src/jdk/nashorn/internal/runtime/resources/Messages.properties
index f058fa33..83c0a5ab 100644
--- a/src/jdk/nashorn/internal/runtime/resources/Messages.properties
+++ b/src/jdk/nashorn/internal/runtime/resources/Messages.properties
@@ -42,6 +42,8 @@ parser.error.expected.literal=Expected a literal but found {0}
parser.error.expected.operand=Expected an operand but found {0}
parser.error.expected.stmt=Expected statement but found {0}
parser.error.expected.comma=Expected comma but found {0}
+parser.error.expected.property.id=Expected property id but found {0}
+parser.error.expected.lvalue=Expected l-value but found {0}
parser.error.expected=Expected {0} but found {1}
parser.error.invalid.return=Invalid return statement
parser.error.no.func.decl.here=Function declarations can only occur at program or function body level. You should use a function expression here instead.
diff --git a/test/script/basic/JDK-8014781.js.EXPECTED b/test/script/basic/JDK-8014781.js.EXPECTED
index 073d3b78..d3586c0e 100644
--- a/test/script/basic/JDK-8014781.js.EXPECTED
+++ b/test/script/basic/JDK-8014781.js.EXPECTED
@@ -1,3 +1,4 @@
-MyError @ test/script/basic/JDK-8014781.js:32
-func @ test/script/basic/JDK-8014781.js:36
-<program> @ test/script/basic/JDK-8014781.js:39
+[object Object]
+ at MyError (test/script/basic/JDK-8014781.js:32)
+ at func (test/script/basic/JDK-8014781.js:36)
+ at <program> (test/script/basic/JDK-8014781.js:39)
diff --git a/test/script/basic/JDK-8016667.js b/test/script/basic/JDK-8016667.js
new file mode 100644
index 00000000..7ac1bb6b
--- /dev/null
+++ b/test/script/basic/JDK-8016667.js
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010, 2013, 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.
+ */
+
+/**
+ * Regression test for erroneous shortcut optimization for object null checks
+ *
+ * @test
+ * @run
+ */
+
+function toto() {
+ var friends = 1;
+ (joe = friends) == null;
+}
diff --git a/test/script/basic/JDK-8017082.js b/test/script/basic/JDK-8017082.js
new file mode 100644
index 00000000..5ac96324
--- /dev/null
+++ b/test/script/basic/JDK-8017082.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, 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.
+ */
+
+/**
+ * Long array literals were broken
+ *
+ * @test
+ * @run
+ */
+function f() {
+ var z= c>>e>>>0;
+ var x = [z];
+}
diff --git a/test/script/basic/JDK-8017950.js.EXPECTED b/test/script/basic/JDK-8017950.js.EXPECTED
index e86d02ef..8c34d213 100644
--- a/test/script/basic/JDK-8017950.js.EXPECTED
+++ b/test/script/basic/JDK-8017950.js.EXPECTED
@@ -1,4 +1,5 @@
-func @ test/script/basic/JDK-8017950.js:33
-f @ test/script/basic/JDK-8017950.js:40
-g @ test/script/basic/JDK-8017950.js:44
-<program> @ test/script/basic/JDK-8017950.js:47
+Error
+ at func (test/script/basic/JDK-8017950.js:33)
+ at f (test/script/basic/JDK-8017950.js:40)
+ at g (test/script/basic/JDK-8017950.js:44)
+ at <program> (test/script/basic/JDK-8017950.js:47)
diff --git a/test/script/basic/JDK-8019226.js b/test/script/basic/JDK-8019226.js
index 67bb67ae..3a1cf2f9 100644
--- a/test/script/basic/JDK-8019226.js
+++ b/test/script/basic/JDK-8019226.js
@@ -30,7 +30,7 @@
function func1() { func2() }
-function func2() { throw new Error() }
+function func2() { throw new Error("failed!") }
try {
func1()
diff --git a/test/script/basic/JDK-8019226.js.EXPECTED b/test/script/basic/JDK-8019226.js.EXPECTED
index 7833bb54..002a3ddb 100644
--- a/test/script/basic/JDK-8019226.js.EXPECTED
+++ b/test/script/basic/JDK-8019226.js.EXPECTED
@@ -1,3 +1,4 @@
-func2 @ test/script/basic/JDK-8019226.js:33
-func1 @ test/script/basic/JDK-8019226.js:31
-<program> @ test/script/basic/JDK-8019226.js:36
+Error: failed!
+ at func2 (test/script/basic/JDK-8019226.js:33)
+ at func1 (test/script/basic/JDK-8019226.js:31)
+ at <program> (test/script/basic/JDK-8019226.js:36)
diff --git a/test/script/basic/JDK-8019473.js b/test/script/basic/JDK-8019473.js
new file mode 100644
index 00000000..5001f3d7
--- /dev/null
+++ b/test/script/basic/JDK-8019473.js
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019473: Parser issues related to functions and blocks
+ *
+ * @test
+ * @run
+ */
+
+function checkNoError(code) {
+ try {
+ Function(code);
+ } catch (e) {
+ print("no error expected for: " + code + " , got " + e);
+ }
+}
+
+// implicit newlines at EOF should be accepted
+checkNoError("for(;;) continue")
+checkNoError("return")
+checkNoError("yield")
+checkNoError("for(;;) break")
+
+function checkError(code) {
+ try {
+ eval(code);
+ print("SyntaxError expected for: " + code);
+ } catch (e) {
+ if (! (e instanceof SyntaxError)) {
+ fail("SyntaxError expected, got " + e);
+ }
+ }
+}
+
+checkError("function f() { case0: }");
+checkError("function f() { if(0) }");
+checkError("function f() { if(0); else }");
+checkError("function f() { while(0) }");
+
+// comma expression as closure expression
+checkError("function sq(x) x, x*x");
diff --git a/test/script/basic/JDK-8019478.js b/test/script/basic/JDK-8019478.js
new file mode 100644
index 00000000..f5e2a645
--- /dev/null
+++ b/test/script/basic/JDK-8019478.js
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019478: Object.prototype.toString.call(/a/.exec("a")) === "[object Array]" should be true
+ *
+ * @test
+ * @run
+ */
+
+if (Object.prototype.toString.call(/a/.exec("a")) !== "[object Array]") {
+ fail("Object.prototype.toString.call(/a/.exec('a')) !== '[object Array]'");
+}
diff --git a/test/script/basic/JDK-8019482.js b/test/script/basic/JDK-8019482.js
new file mode 100644
index 00000000..09f91e42
--- /dev/null
+++ b/test/script/basic/JDK-8019482.js
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019482: Number("0x0.0p0") should evaluate to NaN
+ *
+ * @test
+ * @run
+ */
+
+function checkHexLiteral(str) {
+ if (! isNaN(Number(str))) {
+ fail("Number(" + str + ") is not NaN");
+ }
+}
+
+checkHexLiteral("0x0.0");
+checkHexLiteral("0x0.0p");
+checkHexLiteral("0x12tu");
+checkHexLiteral("0x12.2e22");
+checkHexLiteral("0xtu");
diff --git a/test/script/basic/JDK-8019488.js b/test/script/basic/JDK-8019488.js
new file mode 100644
index 00000000..0cb58e90
--- /dev/null
+++ b/test/script/basic/JDK-8019488.js
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019488: switch on literals result in NoSuchMethodError or VerifyError
+ *
+ * @test
+ * @run
+ */
+
+switch("") {
+ case 0:
+ break
+}
+
+switch(true) {
+ case 0:
+ print("0"); break;
+ case 1:
+ print("1"); break;
+}
+
+switch(false) {
+ case 0:
+ print("0"); break;
+ case 1:
+ print("1"); break;
+}
+
+switch([]) {
+ case 1:
+ print("1");
+}
+
+switch (undefined) {
+ case 0:
+ print("0");
+}
+
+switch (null) {
+ case 0:
+ print("0");
+}
+
+switch({}) {
+ case 1:
+ print("1");
+}
diff --git a/test/script/basic/JDK-8019508.js b/test/script/basic/JDK-8019508.js
new file mode 100644
index 00000000..d23035c6
--- /dev/null
+++ b/test/script/basic/JDK-8019508.js
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019508: Comma handling in object literal parsing is wrong
+ *
+ * @test
+ * @run
+ */
+
+function checkObjLiteral(str) {
+ try {
+ eval(str);
+ fail("SyntaxError expected for: " + str);
+ } catch (e) {
+ if (! (e instanceof SyntaxError)) {
+ fail("expected SyntaxError, got " + e);
+ }
+ print(e.message.replace(/\\/g, '/'));
+ }
+}
+
+// only comma
+checkObjLiteral("({,})");
+
+// starting with comma
+checkObjLiteral("({, a:2 })");
+
+// consecutive commas
+checkObjLiteral("({a:3,,})");
+
+// missing comma
+checkObjLiteral("({a:3 b:2}");
+
+// single trailing comma is okay!
+var obj = { a: 3, };
diff --git a/test/script/basic/JDK-8019508.js.EXPECTED b/test/script/basic/JDK-8019508.js.EXPECTED
new file mode 100644
index 00000000..d5f81409
--- /dev/null
+++ b/test/script/basic/JDK-8019508.js.EXPECTED
@@ -0,0 +1,12 @@
+test/script/basic/JDK-8019508.js#33<eval>:1:2 Expected property id but found ,
+({,})
+ ^
+test/script/basic/JDK-8019508.js#33<eval>:1:2 Expected property id but found ,
+({, a:2 })
+ ^
+test/script/basic/JDK-8019508.js#33<eval>:1:6 Expected property id but found ,
+({a:3,,})
+ ^
+test/script/basic/JDK-8019508.js#33<eval>:1:6 Expected comma but found ident
+({a:3 b:2}
+ ^
diff --git a/test/script/basic/JDK-8019553.js b/test/script/basic/JDK-8019553.js
new file mode 100644
index 00000000..d7546187
--- /dev/null
+++ b/test/script/basic/JDK-8019553.js
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010, 2013, 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-8019553: NPE on illegal l-value for increment and decrement
+ *
+ * @test
+ * @run
+ */
+
+function check(str) {
+ try {
+ eval(str);
+ fail("SyntaxError expected for: " + str);
+ } catch (e) {
+ print(e.toString().replace(/\\/g, '/'));
+ }
+}
+
+check("++ +3");
+check("++ -7");
+check("-- +2");
+check("-- -8");
diff --git a/test/script/basic/JDK-8019553.js.EXPECTED b/test/script/basic/JDK-8019553.js.EXPECTED
new file mode 100644
index 00000000..78d22bea
--- /dev/null
+++ b/test/script/basic/JDK-8019553.js.EXPECTED
@@ -0,0 +1,12 @@
+SyntaxError: test/script/basic/JDK-8019553.js#33<eval>:1:3 Expected l-value but found +
+++ +3
+ ^
+SyntaxError: test/script/basic/JDK-8019553.js#33<eval>:1:3 Expected l-value but found -
+++ -7
+ ^
+SyntaxError: test/script/basic/JDK-8019553.js#33<eval>:1:3 Expected l-value but found +
+-- +2
+ ^
+SyntaxError: test/script/basic/JDK-8019553.js#33<eval>:1:3 Expected l-value but found -
+-- -8
+ ^
diff --git a/test/script/basic/NASHORN-51.js b/test/script/basic/NASHORN-51.js
index 044bce94..bc41d79b 100644
--- a/test/script/basic/NASHORN-51.js
+++ b/test/script/basic/NASHORN-51.js
@@ -35,28 +35,28 @@ for (i in literals) {
eval(literals[i] + "++");
print("ERROR!! post increment : " + literals[i]);
} catch (e) {
- print(e);
+ print(e.toString().replace(/\\/g, '/'));
}
try {
eval(literals[i] + "--");
print("ERROR!! post decrement : " + literals[i]);
} catch (e) {
- print(e);
+ print(e.toString().replace(/\\/g, '/'));
}
try {
eval("++" + literals[i]);
print("ERROR!! pre increment : " + literals[i]);
} catch (e) {
- print(e);
+ print(e.toString().replace(/\\/g, '/'));
}
try {
eval("--" + literals[i]);
print("ERROR!! pre decrement : " + literals[i]);
} catch (e) {
- print(e);
+ print(e.toString().replace(/\\/g, '/'));
}
}
diff --git a/test/script/basic/NASHORN-51.js.EXPECTED b/test/script/basic/NASHORN-51.js.EXPECTED
index 9fc05c3f..9479f7e1 100644
--- a/test/script/basic/NASHORN-51.js.EXPECTED
+++ b/test/script/basic/NASHORN-51.js.EXPECTED
@@ -1,24 +1,72 @@
-ReferenceError: "1" can not be used as the left-hand side of assignment
-ReferenceError: "1" can not be used as the left-hand side of assignment
-ReferenceError: "1" can not be used as the left-hand side of assignment
-ReferenceError: "1" can not be used as the left-hand side of assignment
-ReferenceError: "0" can not be used as the left-hand side of assignment
-ReferenceError: "0" can not be used as the left-hand side of assignment
-ReferenceError: "0" can not be used as the left-hand side of assignment
-ReferenceError: "0" can not be used as the left-hand side of assignment
-ReferenceError: "3.14" can not be used as the left-hand side of assignment
-ReferenceError: "3.14" can not be used as the left-hand side of assignment
-ReferenceError: "3.14" can not be used as the left-hand side of assignment
-ReferenceError: "3.14" can not be used as the left-hand side of assignment
-ReferenceError: "true" can not be used as the left-hand side of assignment
-ReferenceError: "true" can not be used as the left-hand side of assignment
-ReferenceError: "true" can not be used as the left-hand side of assignment
-ReferenceError: "true" can not be used as the left-hand side of assignment
-ReferenceError: "false" can not be used as the left-hand side of assignment
-ReferenceError: "false" can not be used as the left-hand side of assignment
-ReferenceError: "false" can not be used as the left-hand side of assignment
-ReferenceError: "false" can not be used as the left-hand side of assignment
-ReferenceError: "null" can not be used as the left-hand side of assignment
-ReferenceError: "null" can not be used as the left-hand side of assignment
-ReferenceError: "null" can not be used as the left-hand side of assignment
-ReferenceError: "null" can not be used as the left-hand side of assignment
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+1++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+1--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++1
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--1
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+0++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+0--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++0
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--0
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+3.14++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+3.14--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++3.14
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--3.14
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+true++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+true--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++true
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--true
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+false++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+false--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++false
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--false
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#35<eval>:1:0 Invalid left hand side for assignment
+null++
+^
+ReferenceError: test/script/basic/NASHORN-51.js#42<eval>:1:0 Invalid left hand side for assignment
+null--
+^
+ReferenceError: test/script/basic/NASHORN-51.js#49<eval>:1:2 Invalid left hand side for assignment
+++null
+ ^
+ReferenceError: test/script/basic/NASHORN-51.js#56<eval>:1:2 Invalid left hand side for assignment
+--null
+ ^
diff --git a/test/script/error/NASHORN-57.js.EXPECTED b/test/script/error/NASHORN-57.js.EXPECTED
index 5a93b597..c9c51de1 100644
--- a/test/script/error/NASHORN-57.js.EXPECTED
+++ b/test/script/error/NASHORN-57.js.EXPECTED
@@ -1,3 +1,3 @@
-test/script/error/NASHORN-57.js:35:2 Expected statement but found ;
+test/script/error/NASHORN-57.js:35:2 Expected l-value but found ;
++;
^