WebKit Bugzilla
Attachment 369147 Details for
Bug 197603
: [JSC] Invalid AssignmentTargetType should be an early error.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197603-20190506113241.patch (text/plain), 106.05 KB, created by
Ross Kirsling
on 2019-05-06 11:32:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ross Kirsling
Created:
2019-05-06 11:32:45 PDT
Size:
106.05 KB
patch
obsolete
>Subversion Revision: 244962 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 7d960395584de6aa830c033c9f0c21d4162c62f6..a03fe1c1e8210101c1539bc89faab01f695a9177 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,44 @@ >+2019-05-06 Ross Kirsling <ross.kirsling@sony.com> >+ >+ [JSC] Invalid AssignmentTargetType should be an early error. >+ https://bugs.webkit.org/show_bug.cgi?id=197603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Since ES6, expressions like 0++, ++0, 0 = 0, and 0 += 0 are all specified as early errors: >+ https://tc39.github.io/ecma262/#sec-update-expressions-static-semantics-early-errors >+ https://tc39.github.io/ecma262/#sec-assignment-operators-static-semantics-early-errors >+ >+ We currently throw late ReferenceErrors for these; let's turn them into early SyntaxErrors. >+ (This is based on the expectation that https://github.com/tc39/ecma262/pull/1527 will be accepted; >+ if that doesn't come to pass, we can subsequently introduce early ReferenceError and revise these.) >+ >+ * bytecompiler/NodesCodegen.cpp: >+ (JSC::PostfixNode::emitBytecode): Add an assert for "function call LHS" case. >+ (JSC::PrefixNode::emitBytecode): Add an assert for "function call LHS" case. >+ >+ * parser/ASTBuilder.h: >+ (JSC::ASTBuilder::isLocation): Added. >+ (JSC::ASTBuilder::isAssignmentLocation): Fix strange parameter name. >+ (JSC::ASTBuilder::isFunctionCall): Added. >+ (JSC::ASTBuilder::makeAssignNode): Add an assert for "function call LHS" case. >+ * parser/SyntaxChecker.h: >+ (JSC::SyntaxChecker::isLocation): Added. >+ (JSC::SyntaxChecker::isAssignmentLocation): Fix incorrect definition to align with ASTBuilder. >+ (JSC::SyntaxChecker::isFunctionCall): Added. >+ * parser/Nodes.h: >+ (JSC::ExpressionNode::isFunctionCall const): Added. >+ Ensure that we can check whether an expression node is a function call from the parser. >+ >+ * parser/Parser.cpp: >+ (JSC::Parser<LexerType>::isSimpleAssignmentTarget): Added. >+ (JSC::Parser<LexerType>::parseAssignmentExpression): >+ (JSC::Parser<LexerType>::parseUnaryExpression): >+ * parser/Parser.h: >+ Throw SyntaxError when an assignment or update expression's target is invalid. >+ Unfortunately, web compatibility seems to oblige us to exempt the "function call LHS" case. >+ (https://github.com/tc39/ecma262/issues/257#issuecomment-195106880) >+ > 2019-05-04 Tadeu Zagallo <tzagallo@apple.com> > > TypedArrays should not store properties that are canonical numeric indices >diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >index 21301da24ea2559d516d27703086bc4facef4a20..629d416bf94a32348462408395808ddb40c7c87f 100644 >--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp >@@ -1666,6 +1666,7 @@ RegisterID* PostfixNode::emitBytecode(BytecodeGenerator& generator, RegisterID* > if (m_expr->isDotAccessorNode()) > return emitDot(generator, dst); > >+ ASSERT(m_expr->isFunctionCall()); > return emitThrowReferenceError(generator, m_operator == OpPlusPlus > ? "Postfix ++ operator applied to value that is not a reference."_s > : "Postfix -- operator applied to value that is not a reference."_s); >@@ -1879,6 +1880,7 @@ RegisterID* PrefixNode::emitBytecode(BytecodeGenerator& generator, RegisterID* d > if (m_expr->isDotAccessorNode()) > return emitDot(generator, dst); > >+ ASSERT(m_expr->isFunctionCall()); > return emitThrowReferenceError(generator, m_operator == OpPlusPlus > ? "Prefix ++ operator applied to value that is not a reference."_s > : "Prefix -- operator applied to value that is not a reference."_s); >diff --git a/Source/JavaScriptCore/parser/ASTBuilder.h b/Source/JavaScriptCore/parser/ASTBuilder.h >index 5f98503e78addef24aaa40032fb80cfd5ca9d6d4..8502d6d8185c80eb74d494d60b1357ec4b6e5627 100644 >--- a/Source/JavaScriptCore/parser/ASTBuilder.h >+++ b/Source/JavaScriptCore/parser/ASTBuilder.h >@@ -629,9 +629,14 @@ public: > return pattern->isBindingNode(); > } > >- bool isAssignmentLocation(const Expression& pattern) >+ bool isLocation(const Expression& node) > { >- return pattern->isAssignmentLocation(); >+ return node->isLocation(); >+ } >+ >+ bool isAssignmentLocation(const Expression& node) >+ { >+ return node->isAssignmentLocation(); > } > > bool isObjectLiteral(const Expression& node) >@@ -649,6 +654,11 @@ public: > return isObjectLiteral(node) || isArrayLiteral(node); > } > >+ bool isFunctionCall(const Expression& node) >+ { >+ return node->isFunctionCall(); >+ } >+ > bool shouldSkipPauseLocation(StatementNode* statement) const > { > return !statement || statement->isLabel(); >@@ -1470,8 +1480,10 @@ ExpressionNode* ASTBuilder::makeBinaryNode(const JSTokenLocation& location, int > > ExpressionNode* ASTBuilder::makeAssignNode(const JSTokenLocation& location, ExpressionNode* loc, Operator op, ExpressionNode* expr, bool locHasAssignments, bool exprHasAssignments, const JSTextPosition& start, const JSTextPosition& divot, const JSTextPosition& end) > { >- if (!loc->isLocation()) >+ if (!loc->isLocation()) { >+ ASSERT(loc->isFunctionCall()); > return new (m_parserArena) AssignErrorNode(location, divot, start, end); >+ } > > if (loc->isResolveNode()) { > ResolveNode* resolve = static_cast<ResolveNode*>(loc); >diff --git a/Source/JavaScriptCore/parser/Nodes.h b/Source/JavaScriptCore/parser/Nodes.h >index 15ffc14df1e7062b466234a798228e072f005413..b75b4348de99794a3ad5f0b7a7b6674e5f9ef53e 100644 >--- a/Source/JavaScriptCore/parser/Nodes.h >+++ b/Source/JavaScriptCore/parser/Nodes.h >@@ -204,6 +204,7 @@ namespace JSC { > virtual bool isImportMeta() const { return false; } > virtual bool isBytecodeIntrinsicNode() const { return false; } > virtual bool isBinaryOpNode() const { return false; } >+ virtual bool isFunctionCall() const { return false; } > > virtual void emitBytecodeInConditionContext(BytecodeGenerator&, Label&, Label&, FallThroughMode); > >@@ -869,6 +870,8 @@ namespace JSC { > private: > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > >+ bool isFunctionCall() const override { return true; } >+ > ArgumentsNode* m_args; > }; > >@@ -879,6 +882,8 @@ namespace JSC { > private: > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > >+ bool isFunctionCall() const override { return true; } >+ > ExpressionNode* m_expr; > ArgumentsNode* m_args; > }; >@@ -890,6 +895,8 @@ namespace JSC { > private: > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > >+ bool isFunctionCall() const override { return true; } >+ > const Identifier& m_ident; > ArgumentsNode* m_args; > }; >@@ -901,6 +908,8 @@ namespace JSC { > private: > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > >+ bool isFunctionCall() const override { return true; } >+ > ExpressionNode* m_base; > ExpressionNode* m_subscript; > ArgumentsNode* m_args; >@@ -915,6 +924,8 @@ namespace JSC { > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > > protected: >+ bool isFunctionCall() const override { return true; } >+ > ExpressionNode* m_base; > const Identifier& m_ident; > ArgumentsNode* m_args; >@@ -945,6 +956,8 @@ namespace JSC { > private: > RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override; > >+ bool isFunctionCall() const override { return m_type == Type::Function; } >+ > EmitterType m_emitter; > const Identifier& m_ident; > ArgumentsNode* m_args; >diff --git a/Source/JavaScriptCore/parser/Parser.cpp b/Source/JavaScriptCore/parser/Parser.cpp >index dce455159fd9f2637ac015773586abceaa5fca8b..34c081d9a2ddf022882d9a7df3f087a1a704305d 100644 >--- a/Source/JavaScriptCore/parser/Parser.cpp >+++ b/Source/JavaScriptCore/parser/Parser.cpp >@@ -3630,6 +3630,14 @@ template <typename TreeBuilder> NEVER_INLINE const char* Parser<LexerType>::meta > RELEASE_ASSERT_NOT_REACHED(); > return "error"; > } >+ >+template <typename LexerType> >+template <typename TreeBuilder> bool Parser<LexerType>::isSimpleAssignmentTarget(TreeBuilder& context, TreeExpression expr) >+{ >+ // Web compatibility concerns prevent us from handling a function call LHS as an early error (at least in loose mode). >+ // This behavior is currently unspecified, but see: https://github.com/tc39/ecma262/issues/257#issuecomment-195106880 >+ return context.isLocation(expr) || (!strictMode() && context.isFunctionCall(expr)); >+} > > template <typename LexerType> > template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmentExpression(TreeBuilder& context, ExpressionErrorClassifier& classifier) >@@ -3738,6 +3746,7 @@ template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmen > hadAssignment = true; > if (UNLIKELY(context.isMetaProperty(lhs))) > internalFailWithMessage(false, metaPropertyName(context, lhs), " can't be the left hand side of an assignment expression"); >+ semanticFailIfFalse(isSimpleAssignmentTarget(context, lhs), "Left side of assignment is not a reference"); > context.assignmentStackAppend(assignmentStack, lhs, start, tokenStartPosition(), m_parserState.assignmentCount, op); > start = tokenStartPosition(); > m_parserState.assignmentCount++; >@@ -4938,20 +4947,18 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > JSTokenLocation location(tokenLocation()); > > while (isUnaryOp(m_token.m_type)) { >- if (strictMode()) { >- switch (m_token.m_type) { >- case PLUSPLUS: >- case MINUSMINUS: >- case AUTOPLUSPLUS: >- case AUTOMINUSMINUS: >- semanticFailIfTrue(requiresLExpr, "The ", operatorString(true, lastOperator), " operator requires a reference expression"); >- modifiesExpr = true; >- requiresLExpr = true; >- break; >- default: >- semanticFailIfTrue(requiresLExpr, "The ", operatorString(true, lastOperator), " operator requires a reference expression"); >- break; >- } >+ switch (m_token.m_type) { >+ case PLUSPLUS: >+ case MINUSMINUS: >+ case AUTOPLUSPLUS: >+ case AUTOMINUSMINUS: >+ semanticFailIfTrue(requiresLExpr, "The ", operatorString(true, lastOperator), " operator requires a reference expression"); >+ modifiesExpr = true; >+ requiresLExpr = true; >+ break; >+ default: >+ semanticFailIfTrue(requiresLExpr, "The ", operatorString(true, lastOperator), " operator requires a reference expression"); >+ break; > } > lastOperator = m_token.m_type; > m_parserState.nonLHSCount++; >@@ -4967,8 +4974,11 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > failWithMessage("Cannot parse subexpression of ", operatorString(true, lastOperator), "operator"); > failWithMessage("Cannot parse member expression"); > } >- if (UNLIKELY(isUpdateOp(static_cast<JSTokenType>(lastOperator)) && context.isMetaProperty(expr))) >- internalFailWithMessage(false, metaPropertyName(context, expr), " can't come after a prefix operator"); >+ if (isUpdateOp(static_cast<JSTokenType>(lastOperator))) { >+ if (UNLIKELY(context.isMetaProperty(expr))) >+ internalFailWithMessage(false, metaPropertyName(context, expr), " can't come after a prefix operator"); >+ semanticFailIfFalse(isSimpleAssignmentTarget(context, expr), "Prefix ", lastOperator == PLUSPLUS ? "++" : "--", " operator applied to value that is not a reference"); >+ } > bool isEvalOrArguments = false; > if (strictMode()) { > if (context.isResolve(expr)) >@@ -4979,6 +4989,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > case PLUSPLUS: > if (UNLIKELY(context.isMetaProperty(expr))) > internalFailWithMessage(false, metaPropertyName(context, expr), " can't come before a postfix operator"); >+ semanticFailIfFalse(isSimpleAssignmentTarget(context, expr), "Postfix ++ operator applied to value that is not a reference"); > m_parserState.nonTrivialExpressionCount++; > m_parserState.nonLHSCount++; > expr = context.makePostfixNode(location, expr, OpPlusPlus, subExprStart, lastTokenEndPosition(), tokenEndPosition()); >@@ -4991,6 +5002,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > case MINUSMINUS: > if (UNLIKELY(context.isMetaProperty(expr))) > internalFailWithMessage(false, metaPropertyName(context, expr), " can't come before a postfix operator"); >+ semanticFailIfFalse(isSimpleAssignmentTarget(context, expr), "Postfix -- operator applied to value that is not a reference"); > m_parserState.nonTrivialExpressionCount++; > m_parserState.nonLHSCount++; > expr = context.makePostfixNode(location, expr, OpMinusMinus, subExprStart, lastTokenEndPosition(), tokenEndPosition()); >@@ -5005,10 +5017,6 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseUnaryExpress > } > > JSTextPosition end = lastTokenEndPosition(); >- >- if (!TreeBuilder::CreatesAST && (!strictMode())) >- return expr; >- > while (tokenStackDepth) { > switch (context.unaryTokenStackLastType(tokenStackDepth)) { > case EXCLAMATION: >diff --git a/Source/JavaScriptCore/parser/Parser.h b/Source/JavaScriptCore/parser/Parser.h >index 8158993e6b10a74ee881cd6b1c4fb428449b1341..10a312112ff4c02753c0489e7ad614f9ab4da519 100644 >--- a/Source/JavaScriptCore/parser/Parser.h >+++ b/Source/JavaScriptCore/parser/Parser.h >@@ -1665,6 +1665,8 @@ private: > > template <class TreeBuilder> NEVER_INLINE const char* metaPropertyName(TreeBuilder&, TreeExpression); > >+ template <class TreeBuilder> ALWAYS_INLINE bool isSimpleAssignmentTarget(TreeBuilder&, TreeExpression); >+ > ALWAYS_INLINE int isBinaryOperator(JSTokenType); > bool allowAutomaticSemicolon(); > >diff --git a/Source/JavaScriptCore/parser/SyntaxChecker.h b/Source/JavaScriptCore/parser/SyntaxChecker.h >index 97cfadb302f7656e324cdbb07fd4af4465443f12..419958bedb42811b1628401cd4a4298a5a5cf376 100644 >--- a/Source/JavaScriptCore/parser/SyntaxChecker.h >+++ b/Source/JavaScriptCore/parser/SyntaxChecker.h >@@ -393,11 +393,16 @@ public: > return pattern == BindingDestructuring; > } > >- bool isAssignmentLocation(ExpressionType type) >+ bool isLocation(ExpressionType type) > { > return type == ResolveExpr || type == DotExpr || type == BracketExpr; > } > >+ bool isAssignmentLocation(ExpressionType type) >+ { >+ return isLocation(type) || type == DestructuringAssignment; >+ } >+ > bool isObjectLiteral(ExpressionType type) > { > return type == ObjectLiteralExpr; >@@ -413,6 +418,11 @@ public: > return isObjectLiteral(type) || isArrayLiteral(type); > } > >+ bool isFunctionCall(ExpressionType type) >+ { >+ return type == CallExpr; >+ } >+ > bool shouldSkipPauseLocation(int) const { return true; } > > void setEndOffset(int, int) { } >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 2b0003f4396dfee64e5c9170332cebb205a4f9f4..b22ddb54b776196db5f66820a448c9a594cb0c97 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,34 @@ >+2019-05-06 Ross Kirsling <ross.kirsling@sony.com> >+ >+ [JSC] Invalid AssignmentTargetType should be an early error. >+ https://bugs.webkit.org/show_bug.cgi?id=197603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * fast/events/window-onerror4-expected.txt: >+ * ietestcenter/Javascript/11.13.1-1-1-expected.txt: >+ * ietestcenter/Javascript/11.13.1-1-2-expected.txt: >+ * ietestcenter/Javascript/11.13.1-1-3-expected.txt: >+ * ietestcenter/Javascript/11.13.1-1-4-expected.txt: >+ * js/basic-strict-mode-expected.txt: >+ * js/dom/assign-expected.txt: >+ * js/dom/line-column-numbers-expected.txt: >+ * js/dom/line-column-numbers.html: >+ * js/dom/postfix-syntax-expected.txt: >+ * js/dom/prefix-syntax-expected.txt: >+ * js/dom/script-tests/line-column-numbers.js: >+ * js/function-toString-parentheses-expected.txt: >+ * js/parser-syntax-check-expected.txt: >+ * js/parser-xml-close-comment-expected.txt: >+ * js/script-tests/function-toString-parentheses.js: >+ * js/script-tests/parser-syntax-check.js: >+ Update tests & expectations to reflect new SyntaxErrors. >+ >+ * js/script-tests/toString-prefix-postfix-preserve-parens.js: >+ * js/toString-prefix-postfix-preserve-parens-expected.txt: >+ None of the prefix/postfix tests make sense here now that they're all SyntaxErrors; >+ remove them and just leave the typeof tests. >+ > 2019-05-06 Truitt Savell <tsavell@apple.com> > > mark media/track/track-cue-rendering-vertical.html as failing for Mojave after r244891 unmarked it. >diff --git a/LayoutTests/fast/events/window-onerror4-expected.txt b/LayoutTests/fast/events/window-onerror4-expected.txt >index 0a49a2651fb0d78f571a49e353e71764eca850df..a35b58e405b275b90e14ddce531eaaee79de5ccf 100644 >--- a/LayoutTests/fast/events/window-onerror4-expected.txt >+++ b/LayoutTests/fast/events/window-onerror4-expected.txt >@@ -1,4 +1,4 @@ > You should see a log record if window.onerror is working properly for this test.Bug 8519. > >-Error caught successfully: ReferenceError: Left side of assignment is not a reference. File: undefined Line: 1 Column: 3 Error: ReferenceError: Left side of assignment is not a reference. >+Error caught successfully: SyntaxError: Left side of assignment is not a reference. File: window-onerror4.html Line: 16 Column: 9 Error: SyntaxError: Left side of assignment is not a reference. > >diff --git a/LayoutTests/ietestcenter/Javascript/11.13.1-1-1-expected.txt b/LayoutTests/ietestcenter/Javascript/11.13.1-1-1-expected.txt >index a37ae34c7a2161a0caceb4a538d46313049e69a6..95b2737a80c6c853b811c090e064a94db6f7d2f6 100644 >--- a/LayoutTests/ietestcenter/Javascript/11.13.1-1-1-expected.txt >+++ b/LayoutTests/ietestcenter/Javascript/11.13.1-1-1-expected.txt >@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS ES5Harness.preconditionPassed is true >-PASS ES5Harness.testPassed is true >+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined). > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/ietestcenter/Javascript/11.13.1-1-2-expected.txt b/LayoutTests/ietestcenter/Javascript/11.13.1-1-2-expected.txt >index eb825b8137063893c7812d7ce47535047b1081f8..be22e41929db5ba89e259c271fe58a62654c01af 100644 >--- a/LayoutTests/ietestcenter/Javascript/11.13.1-1-2-expected.txt >+++ b/LayoutTests/ietestcenter/Javascript/11.13.1-1-2-expected.txt >@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS ES5Harness.preconditionPassed is true >-PASS ES5Harness.testPassed is true >+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined). > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/ietestcenter/Javascript/11.13.1-1-3-expected.txt b/LayoutTests/ietestcenter/Javascript/11.13.1-1-3-expected.txt >index e1e02a5543f693cdc8814fde31eb40d46fcad1f6..64fbb02d5cda72dc8de2cd14d6ef1de25f5f1c5d 100644 >--- a/LayoutTests/ietestcenter/Javascript/11.13.1-1-3-expected.txt >+++ b/LayoutTests/ietestcenter/Javascript/11.13.1-1-3-expected.txt >@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS ES5Harness.preconditionPassed is true >-PASS ES5Harness.testPassed is true >+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined). > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/ietestcenter/Javascript/11.13.1-1-4-expected.txt b/LayoutTests/ietestcenter/Javascript/11.13.1-1-4-expected.txt >index 272f992f6591b840a60a004cd3b1672c329b4ef9..7305ee9cd55b3ac8dd7d983f2e54819076345b14 100644 >--- a/LayoutTests/ietestcenter/Javascript/11.13.1-1-4-expected.txt >+++ b/LayoutTests/ietestcenter/Javascript/11.13.1-1-4-expected.txt >@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > > > PASS ES5Harness.preconditionPassed is true >-PASS ES5Harness.testPassed is true >+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined). > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/js/basic-strict-mode-expected.txt b/LayoutTests/js/basic-strict-mode-expected.txt >index 7316ad4f8e7e889a45d9463ea9c7c208a70124a4..fc33b85eb1627d2d21266afaf03ffd7799265c32 100644 >--- a/LayoutTests/js/basic-strict-mode-expected.txt >+++ b/LayoutTests/js/basic-strict-mode-expected.txt >@@ -133,17 +133,17 @@ PASS (function(){'use strict'; function f() { --arguments }}) threw exception Sy > PASS 'use strict'; function f() { arguments-- } threw exception SyntaxError: 'arguments' cannot be modified in strict mode.. > PASS (function(){'use strict'; function f() { arguments-- }}) threw exception SyntaxError: 'arguments' cannot be modified in strict mode.. > PASS global.eval('"use strict"; if (0) ++arguments; true;') threw exception SyntaxError: Cannot modify 'arguments' in strict mode.. >-PASS 'use strict'; ++(1, eval) threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >+PASS 'use strict'; ++(1, eval) threw exception SyntaxError: Prefix ++ operator applied to value that is not a reference.. > PASS (function(){'use strict'; ++(1, eval)}) threw exception SyntaxError: Cannot modify 'eval' in strict mode.. >-PASS 'use strict'; ++(1, 2, 3, eval) threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >+PASS 'use strict'; ++(1, 2, 3, eval) threw exception SyntaxError: Prefix ++ operator applied to value that is not a reference.. > PASS (function(){'use strict'; ++(1, 2, 3, eval)}) threw exception SyntaxError: Cannot modify 'eval' in strict mode.. >-PASS 'use strict'; (1, eval)++ threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >+PASS 'use strict'; (1, eval)++ threw exception SyntaxError: Postfix ++ operator applied to value that is not a reference.. > PASS (function(){'use strict'; (1, eval)++}) threw exception SyntaxError: Cannot modify 'eval' in strict mode.. >-PASS 'use strict'; --(1, eval) threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >+PASS 'use strict'; --(1, eval) threw exception SyntaxError: Prefix -- operator applied to value that is not a reference.. > PASS (function(){'use strict'; --(1, eval)}) threw exception SyntaxError: Cannot modify 'eval' in strict mode.. >-PASS 'use strict'; (1, eval)-- threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >+PASS 'use strict'; (1, eval)-- threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. > PASS (function(){'use strict'; (1, eval)--}) threw exception SyntaxError: 'eval' cannot be modified in strict mode.. >-PASS 'use strict'; (1, 2, 3, eval)-- threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >+PASS 'use strict'; (1, 2, 3, eval)-- threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. > PASS (function(){'use strict'; (1, 2, 3, eval)--}) threw exception SyntaxError: 'eval' cannot be modified in strict mode.. > PASS 'use strict'; function f() { ++(1, arguments) } threw exception SyntaxError: Cannot modify 'arguments' in strict mode.. > PASS (function(){'use strict'; function f() { ++(1, arguments) }}) threw exception SyntaxError: Cannot modify 'arguments' in strict mode.. >diff --git a/LayoutTests/js/dom/assign-expected.txt b/LayoutTests/js/dom/assign-expected.txt >index 27ab2874c1f24270cd39661e79a75e25c3b123ab..a2159056f3025e4bfcc9c968d4c64e829899a89b 100644 >--- a/LayoutTests/js/dom/assign-expected.txt >+++ b/LayoutTests/js/dom/assign-expected.txt >@@ -13,8 +13,8 @@ PASS y, x = 7; x is 7 > PASS ((x)) = 8; x is 8 > PASS ((window.x)) = 9; x is 9 > PASS ((window["x"])) = 10; x is 10 >-PASS (y, x) = "FAIL"; threw exception ReferenceError: Left side of assignment is not a reference.. >-PASS (true ? x : y) = "FAIL"; threw exception ReferenceError: Left side of assignment is not a reference.. >+PASS (y, x) = "FAIL"; threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS (true ? x : y) = "FAIL"; threw exception SyntaxError: Left side of assignment is not a reference.. > PASS x++ = "FAIL"; threw exception SyntaxError: Left hand side of operator '=' must be a reference.. > PASS successfullyParsed is true > >diff --git a/LayoutTests/js/dom/line-column-numbers-expected.txt b/LayoutTests/js/dom/line-column-numbers-expected.txt >index 7fbd84ec4e52641044e4b6dde04801506bf25992..86d065ce49b4cb51911693c118bb4a8348df3ea0 100644 >--- a/LayoutTests/js/dom/line-column-numbers-expected.txt >+++ b/LayoutTests/js/dom/line-column-numbers-expected.txt >@@ -138,12 +138,12 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > 19 g at line-column-numbers.html:190:30 > > --> Case 21 Stack Trace: >- 0 toFuzz21 at line-column-numbers.html:206:26 >- 1 global code at line-column-numbers.html:209:13 >+ 0 eval at [native code] >+ 1 global code at line-column-numbers.html:205:9 > > --> Case 22 Stack Trace: >- 0 toFuzz22 at line-column-numbers.html:220:36 >- 1 global code at line-column-numbers.html:224:13 >+ 0 toFuzz22 at line-column-numbers.html:221:36 >+ 1 global code at line-column-numbers.html:225:13 > > --> Case 1 Stack Trace: > 0 global code at line-column-numbers.js:3:26 >@@ -280,12 +280,12 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE > 19 g at line-column-numbers.js:127:30 > > --> Case 21 Stack Trace: >- 0 toFuzz21b at line-column-numbers.js:141:26 >- 1 global code at line-column-numbers.js:144:14 >+ 0 eval at [native code] >+ 1 global code at line-column-numbers.js:140:9 > > --> Case 22 Stack Trace: >- 0 toFuzz22b at line-column-numbers.js:153:36 >- 1 global code at line-column-numbers.js:157:14 >+ 0 toFuzz22b at line-column-numbers.js:154:36 >+ 1 global code at line-column-numbers.js:158:14 > > PASS successfullyParsed is true > >diff --git a/LayoutTests/js/dom/line-column-numbers.html b/LayoutTests/js/dom/line-column-numbers.html >index 094a927c7e88d36b9899076aad08a541e53655ba..f81605323e4321f004bbac286bc6ad7c63ab4681 100644 >--- a/LayoutTests/js/dom/line-column-numbers.html >+++ b/LayoutTests/js/dom/line-column-numbers.html >@@ -202,11 +202,12 @@ try { > <script>testId++;</script> > <script> > try { >- function toFuzz21() { >- if (PriorityQueue.prototype.doSort() instanceof (this ^= function() { >- })) return 2; >- } >- toFuzz21(); >+ eval( >+ "function toFuzz21() {\n" + >+ " if (PriorityQueue.prototype.doSort() instanceof (this ^= function () {})) return 2;\n" + >+ "}\n" + >+ "toFuzz21();" >+ ); > } catch(e) { > printStack(e.stack); > } >diff --git a/LayoutTests/js/dom/postfix-syntax-expected.txt b/LayoutTests/js/dom/postfix-syntax-expected.txt >index 891c4e502cb7692c7e84ea2c5060fe9ccc492171..2562f30413a1fd82ffbd16a0a1ab6962235bf8e0 100644 >--- a/LayoutTests/js/dom/postfix-syntax-expected.txt >+++ b/LayoutTests/js/dom/postfix-syntax-expected.txt >@@ -13,8 +13,8 @@ PASS (y, x++) is 6 > PASS ((x))++ is 7 > PASS ((window.x))++ is 8 > PASS ((window["x"]))++ is 9 >-PASS (y, x)++ threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >-PASS (true ? x : y)++ threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >+PASS (y, x)++ threw exception SyntaxError: Postfix ++ operator applied to value that is not a reference.. >+PASS (true ? x : y)++ threw exception SyntaxError: Postfix ++ operator applied to value that is not a reference.. > PASS x++++ threw exception SyntaxError: Unexpected token '++'. > PASS x is 0 > PASS y is 0 >diff --git a/LayoutTests/js/dom/prefix-syntax-expected.txt b/LayoutTests/js/dom/prefix-syntax-expected.txt >index a65672a396add6ff3452e8cdffad18b60b41572c..837e10af119aa5c7e45e6109756eeaa25f7f9265 100644 >--- a/LayoutTests/js/dom/prefix-syntax-expected.txt >+++ b/LayoutTests/js/dom/prefix-syntax-expected.txt >@@ -13,9 +13,9 @@ PASS (y, ++x) is 7 > PASS ++((x)) is 8 > PASS ++((window.x)) is 9 > PASS ++((window["x"])) is 10 >-PASS ++(y, x) threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS ++(true ? x : y) threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS ++++x threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >+PASS ++(y, x) threw exception SyntaxError: Prefix ++ operator applied to value that is not a reference.. >+PASS ++(true ? x : y) threw exception SyntaxError: Prefix ++ operator applied to value that is not a reference.. >+PASS ++++x threw exception SyntaxError: The prefix-increment operator requires a reference expression.. > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/js/dom/script-tests/line-column-numbers.js b/LayoutTests/js/dom/script-tests/line-column-numbers.js >index 88119ed4150aa1fc5005e90fe9e0b07d3b15c986..456f0d722d8a71e3b47d94385087a750208a498f 100644 >--- a/LayoutTests/js/dom/script-tests/line-column-numbers.js >+++ b/LayoutTests/js/dom/script-tests/line-column-numbers.js >@@ -137,11 +137,12 @@ try { > // Case 21: Regression test from https://bugs.webkit.org/show_bug.cgi?id=118662 > testId++; > try { >- function toFuzz21b() { >- if (PriorityQueue.prototype.doSort() instanceof (this ^= function() { >- })) return 2; >- } >- toFuzz21b(); >+ eval( >+ "function toFuzz21() {\n" + >+ " if (PriorityQueue.prototype.doSort() instanceof (this ^= function () {})) return 2;\n" + >+ "}\n" + >+ "toFuzz21();" >+ ); > } catch(e) { > printStack(e.stack); > } >diff --git a/LayoutTests/js/function-toString-parentheses-expected.txt b/LayoutTests/js/function-toString-parentheses-expected.txt >index 9d666401aaa66d1a093af97d7e18b61c8e7d4925..8f4a08804b5d8772ac4f2ec2ae753269a0e554a5 100644 >--- a/LayoutTests/js/function-toString-parentheses-expected.txt >+++ b/LayoutTests/js/function-toString-parentheses-expected.txt >@@ -217,7 +217,7 @@ PASS compileAndSerialize('a = b + c') is 'a = b + c' > PASS compileAndSerialize('(a = b) + c') is '(a = b) + c' > PASS compileAndSerialize('a = (b + c)') is 'a = (b + c)' > PASS compileAndSerialize('a + b = c') threw exception SyntaxError: Left hand side of operator '=' must be a reference.. >-PASS compileAndSerialize('(a + b) = c') is '(a + b) = c' >+PASS compileAndSerialize('(a + b) = c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b = c)') is 'a + (b = c)' > PASS compileAndSerialize('a *= b *= c') is 'a *= b *= c' > PASS compileAndSerialize('(a *= b) *= c') is '(a *= b) *= c' >@@ -229,7 +229,7 @@ PASS compileAndSerialize('a *= b + c') is 'a *= b + c' > PASS compileAndSerialize('(a *= b) + c') is '(a *= b) + c' > PASS compileAndSerialize('a *= (b + c)') is 'a *= (b + c)' > PASS compileAndSerialize('a + b *= c') threw exception SyntaxError: Left hand side of operator '*=' must be a reference.. >-PASS compileAndSerialize('(a + b) *= c') is '(a + b) *= c' >+PASS compileAndSerialize('(a + b) *= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b *= c)') is 'a + (b *= c)' > PASS compileAndSerialize('a /= b /= c') is 'a /= b /= c' > PASS compileAndSerialize('(a /= b) /= c') is '(a /= b) /= c' >@@ -241,7 +241,7 @@ PASS compileAndSerialize('a /= b + c') is 'a /= b + c' > PASS compileAndSerialize('(a /= b) + c') is '(a /= b) + c' > PASS compileAndSerialize('a /= (b + c)') is 'a /= (b + c)' > PASS compileAndSerialize('a + b /= c') threw exception SyntaxError: Left hand side of operator '/=' must be a reference.. >-PASS compileAndSerialize('(a + b) /= c') is '(a + b) /= c' >+PASS compileAndSerialize('(a + b) /= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b /= c)') is 'a + (b /= c)' > PASS compileAndSerialize('a %= b %= c') is 'a %= b %= c' > PASS compileAndSerialize('(a %= b) %= c') is '(a %= b) %= c' >@@ -253,7 +253,7 @@ PASS compileAndSerialize('a %= b + c') is 'a %= b + c' > PASS compileAndSerialize('(a %= b) + c') is '(a %= b) + c' > PASS compileAndSerialize('a %= (b + c)') is 'a %= (b + c)' > PASS compileAndSerialize('a + b %= c') threw exception SyntaxError: Left hand side of operator '%=' must be a reference.. >-PASS compileAndSerialize('(a + b) %= c') is '(a + b) %= c' >+PASS compileAndSerialize('(a + b) %= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b %= c)') is 'a + (b %= c)' > PASS compileAndSerialize('a += b += c') is 'a += b += c' > PASS compileAndSerialize('(a += b) += c') is '(a += b) += c' >@@ -265,7 +265,7 @@ PASS compileAndSerialize('a += b + c') is 'a += b + c' > PASS compileAndSerialize('(a += b) + c') is '(a += b) + c' > PASS compileAndSerialize('a += (b + c)') is 'a += (b + c)' > PASS compileAndSerialize('a + b += c') threw exception SyntaxError: Left hand side of operator '+=' must be a reference.. >-PASS compileAndSerialize('(a + b) += c') is '(a + b) += c' >+PASS compileAndSerialize('(a + b) += c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b += c)') is 'a + (b += c)' > PASS compileAndSerialize('a -= b -= c') is 'a -= b -= c' > PASS compileAndSerialize('(a -= b) -= c') is '(a -= b) -= c' >@@ -277,7 +277,7 @@ PASS compileAndSerialize('a -= b + c') is 'a -= b + c' > PASS compileAndSerialize('(a -= b) + c') is '(a -= b) + c' > PASS compileAndSerialize('a -= (b + c)') is 'a -= (b + c)' > PASS compileAndSerialize('a + b -= c') threw exception SyntaxError: Left hand side of operator '-=' must be a reference.. >-PASS compileAndSerialize('(a + b) -= c') is '(a + b) -= c' >+PASS compileAndSerialize('(a + b) -= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b -= c)') is 'a + (b -= c)' > PASS compileAndSerialize('a <<= b <<= c') is 'a <<= b <<= c' > PASS compileAndSerialize('(a <<= b) <<= c') is '(a <<= b) <<= c' >@@ -289,7 +289,7 @@ PASS compileAndSerialize('a <<= b + c') is 'a <<= b + c' > PASS compileAndSerialize('(a <<= b) + c') is '(a <<= b) + c' > PASS compileAndSerialize('a <<= (b + c)') is 'a <<= (b + c)' > PASS compileAndSerialize('a + b <<= c') threw exception SyntaxError: Left hand side of operator '<<=' must be a reference.. >-PASS compileAndSerialize('(a + b) <<= c') is '(a + b) <<= c' >+PASS compileAndSerialize('(a + b) <<= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b <<= c)') is 'a + (b <<= c)' > PASS compileAndSerialize('a >>= b >>= c') is 'a >>= b >>= c' > PASS compileAndSerialize('(a >>= b) >>= c') is '(a >>= b) >>= c' >@@ -301,7 +301,7 @@ PASS compileAndSerialize('a >>= b + c') is 'a >>= b + c' > PASS compileAndSerialize('(a >>= b) + c') is '(a >>= b) + c' > PASS compileAndSerialize('a >>= (b + c)') is 'a >>= (b + c)' > PASS compileAndSerialize('a + b >>= c') threw exception SyntaxError: Left hand side of operator '>>=' must be a reference.. >-PASS compileAndSerialize('(a + b) >>= c') is '(a + b) >>= c' >+PASS compileAndSerialize('(a + b) >>= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b >>= c)') is 'a + (b >>= c)' > PASS compileAndSerialize('a >>>= b >>>= c') is 'a >>>= b >>>= c' > PASS compileAndSerialize('(a >>>= b) >>>= c') is '(a >>>= b) >>>= c' >@@ -313,7 +313,7 @@ PASS compileAndSerialize('a >>>= b + c') is 'a >>>= b + c' > PASS compileAndSerialize('(a >>>= b) + c') is '(a >>>= b) + c' > PASS compileAndSerialize('a >>>= (b + c)') is 'a >>>= (b + c)' > PASS compileAndSerialize('a + b >>>= c') threw exception SyntaxError: Left hand side of operator '>>>=' must be a reference.. >-PASS compileAndSerialize('(a + b) >>>= c') is '(a + b) >>>= c' >+PASS compileAndSerialize('(a + b) >>>= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b >>>= c)') is 'a + (b >>>= c)' > PASS compileAndSerialize('a &= b &= c') is 'a &= b &= c' > PASS compileAndSerialize('(a &= b) &= c') is '(a &= b) &= c' >@@ -325,7 +325,7 @@ PASS compileAndSerialize('a &= b + c') is 'a &= b + c' > PASS compileAndSerialize('(a &= b) + c') is '(a &= b) + c' > PASS compileAndSerialize('a &= (b + c)') is 'a &= (b + c)' > PASS compileAndSerialize('a + b &= c') threw exception SyntaxError: Left hand side of operator '&=' must be a reference.. >-PASS compileAndSerialize('(a + b) &= c') is '(a + b) &= c' >+PASS compileAndSerialize('(a + b) &= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b &= c)') is 'a + (b &= c)' > PASS compileAndSerialize('a ^= b ^= c') is 'a ^= b ^= c' > PASS compileAndSerialize('(a ^= b) ^= c') is '(a ^= b) ^= c' >@@ -337,7 +337,7 @@ PASS compileAndSerialize('a ^= b + c') is 'a ^= b + c' > PASS compileAndSerialize('(a ^= b) + c') is '(a ^= b) + c' > PASS compileAndSerialize('a ^= (b + c)') is 'a ^= (b + c)' > PASS compileAndSerialize('a + b ^= c') threw exception SyntaxError: Left hand side of operator '^=' must be a reference.. >-PASS compileAndSerialize('(a + b) ^= c') is '(a + b) ^= c' >+PASS compileAndSerialize('(a + b) ^= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b ^= c)') is 'a + (b ^= c)' > PASS compileAndSerialize('a |= b |= c') is 'a |= b |= c' > PASS compileAndSerialize('(a |= b) |= c') is '(a |= b) |= c' >@@ -349,7 +349,7 @@ PASS compileAndSerialize('a |= b + c') is 'a |= b + c' > PASS compileAndSerialize('(a |= b) + c') is '(a |= b) + c' > PASS compileAndSerialize('a |= (b + c)') is 'a |= (b + c)' > PASS compileAndSerialize('a + b |= c') threw exception SyntaxError: Left hand side of operator '|=' must be a reference.. >-PASS compileAndSerialize('(a + b) |= c') is '(a + b) |= c' >+PASS compileAndSerialize('(a + b) |= c') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerialize('a + (b |= c)') is 'a + (b |= c)' > PASS compileAndSerialize('delete a + b') is 'delete a + b' > PASS compileAndSerialize('(delete a) + b') is '(delete a) + b' >@@ -368,12 +368,12 @@ PASS compileAndSerialize('!typeof a') is '!typeof a' > PASS compileAndSerialize('!(typeof a)') is '!(typeof a)' > PASS compileAndSerialize('++a + b') is '++a + b' > PASS compileAndSerialize('(++a) + b') is '(++a) + b' >-PASS compileAndSerialize('++(a + b)') is '++(a + b)' >+PASS compileAndSerialize('++(a + b)') threw exception SyntaxError: Prefix ++ operator applied to value that is not a reference.. > PASS compileAndSerialize('!++a') is '!++a' > PASS compileAndSerialize('!(++a)') is '!(++a)' > PASS compileAndSerialize('--a + b') is '--a + b' > PASS compileAndSerialize('(--a) + b') is '(--a) + b' >-PASS compileAndSerialize('--(a + b)') is '--(a + b)' >+PASS compileAndSerialize('--(a + b)') threw exception SyntaxError: Prefix -- operator applied to value that is not a reference.. > PASS compileAndSerialize('!--a') is '!--a' > PASS compileAndSerialize('!(--a)') is '!(--a)' > PASS compileAndSerialize('+ a + b') is '+ a + b' >@@ -398,10 +398,10 @@ PASS compileAndSerialize('!!a') is '!!a' > PASS compileAndSerialize('!(!a)') is '!(!a)' > PASS compileAndSerialize('!a++') is '!a++' > PASS compileAndSerialize('!(a++)') is '!(a++)' >-PASS compileAndSerialize('(!a)++') is '(!a)++' >+PASS compileAndSerialize('(!a)++') threw exception SyntaxError: Postfix ++ operator applied to value that is not a reference.. > PASS compileAndSerialize('!a--') is '!a--' > PASS compileAndSerialize('!(a--)') is '!(a--)' >-PASS compileAndSerialize('(!a)--') is '(!a)--' >+PASS compileAndSerialize('(!a)--') threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. > PASS compileAndSerialize('(-1)[a]') is '(-1)[a]' > PASS compileAndSerialize('(-1)[a] = b') is '(-1)[a] = b' > PASS compileAndSerialize('(-1)[a] += b') is '(-1)[a] += b' >@@ -441,42 +441,42 @@ PASS compileAndSerialize('(1).a += b') is '(1).a += b' > PASS compileAndSerialize('(1).a++') is '(1).a++' > PASS compileAndSerialize('++(1).a') is '++(1).a' > PASS compileAndSerialize('(1).a()') is '(1).a()' >-PASS compileAndSerialize('(-1) = a') is '(-1) = a' >-PASS compileAndSerialize('(- 0) = a') is '(- 0) = a' >-PASS compileAndSerialize('1 = a') is '1 = a' >-PASS compileAndSerialize('(-1) *= a') is '(-1) *= a' >-PASS compileAndSerialize('(- 0) *= a') is '(- 0) *= a' >-PASS compileAndSerialize('1 *= a') is '1 *= a' >-PASS compileAndSerialize('(-1) /= a') is '(-1) /= a' >-PASS compileAndSerialize('(- 0) /= a') is '(- 0) /= a' >-PASS compileAndSerialize('1 /= a') is '1 /= a' >-PASS compileAndSerialize('(-1) %= a') is '(-1) %= a' >-PASS compileAndSerialize('(- 0) %= a') is '(- 0) %= a' >-PASS compileAndSerialize('1 %= a') is '1 %= a' >-PASS compileAndSerialize('(-1) += a') is '(-1) += a' >-PASS compileAndSerialize('(- 0) += a') is '(- 0) += a' >-PASS compileAndSerialize('1 += a') is '1 += a' >-PASS compileAndSerialize('(-1) -= a') is '(-1) -= a' >-PASS compileAndSerialize('(- 0) -= a') is '(- 0) -= a' >-PASS compileAndSerialize('1 -= a') is '1 -= a' >-PASS compileAndSerialize('(-1) <<= a') is '(-1) <<= a' >-PASS compileAndSerialize('(- 0) <<= a') is '(- 0) <<= a' >-PASS compileAndSerialize('1 <<= a') is '1 <<= a' >-PASS compileAndSerialize('(-1) >>= a') is '(-1) >>= a' >-PASS compileAndSerialize('(- 0) >>= a') is '(- 0) >>= a' >-PASS compileAndSerialize('1 >>= a') is '1 >>= a' >-PASS compileAndSerialize('(-1) >>>= a') is '(-1) >>>= a' >-PASS compileAndSerialize('(- 0) >>>= a') is '(- 0) >>>= a' >-PASS compileAndSerialize('1 >>>= a') is '1 >>>= a' >-PASS compileAndSerialize('(-1) &= a') is '(-1) &= a' >-PASS compileAndSerialize('(- 0) &= a') is '(- 0) &= a' >-PASS compileAndSerialize('1 &= a') is '1 &= a' >-PASS compileAndSerialize('(-1) ^= a') is '(-1) ^= a' >-PASS compileAndSerialize('(- 0) ^= a') is '(- 0) ^= a' >-PASS compileAndSerialize('1 ^= a') is '1 ^= a' >-PASS compileAndSerialize('(-1) |= a') is '(-1) |= a' >-PASS compileAndSerialize('(- 0) |= a') is '(- 0) |= a' >-PASS compileAndSerialize('1 |= a') is '1 |= a' >+PASS compileAndSerialize('(-1) = a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) = a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 = a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) *= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) *= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 *= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) /= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) /= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 /= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) %= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) %= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 %= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) += a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) += a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 += a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) -= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) -= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 -= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) <<= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) <<= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 <<= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) >>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) >>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 >>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) >>>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) >>>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 >>>= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) &= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) &= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 &= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) ^= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) ^= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 ^= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(-1) |= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('(- 0) |= a') threw exception SyntaxError: Left side of assignment is not a reference.. >+PASS compileAndSerialize('1 |= a') threw exception SyntaxError: Left side of assignment is not a reference.. > PASS compileAndSerializeLeftmostTest('({ }).x') is '({ }).x' > PASS compileAndSerializeLeftmostTest('x = { }') is 'x = { }' > PASS compileAndSerializeLeftmostTest('(function () { })()') is '(function () { })()' >diff --git a/LayoutTests/js/parser-syntax-check-expected.txt b/LayoutTests/js/parser-syntax-check-expected.txt >index 12f08f51b6a11e15d3a95f82a096def579e1192d..d1a44c5939d8f1d50c79e68298f69f98f25edd0d 100644 >--- a/LayoutTests/js/parser-syntax-check-expected.txt >+++ b/LayoutTests/js/parser-syntax-check-expected.txt >@@ -24,32 +24,32 @@ PASS Invalid: "new -a". Produced the following syntax error: "SyntaxError: Unexp > PASS Invalid: "function f() { new -a }". Produced the following syntax error: "SyntaxError: Unexpected token '-'" > PASS Valid: "new (-1)" with TypeError > PASS Valid: "function f() { new (-1) }" >-PASS Valid: "a: b: c: new f(x++)++" with ReferenceError >-PASS Valid: "function f() { a: b: c: new f(x++)++ }" >+PASS Invalid: "a: b: c: new f(x++)++". Produced the following syntax error: "SyntaxError: Postfix ++ operator applied to value that is not a reference." >+PASS Invalid: "function f() { a: b: c: new f(x++)++ }". Produced the following syntax error: "SyntaxError: Postfix ++ operator applied to value that is not a reference." > PASS Valid: "(a)++" with ReferenceError > PASS Valid: "function f() { (a)++ }" >-PASS Valid: "(1--).x" with ReferenceError >-PASS Valid: "function f() { (1--).x }" >+PASS Invalid: "(1--).x". Produced the following syntax error: "SyntaxError: Postfix -- operator applied to value that is not a reference." >+PASS Invalid: "function f() { (1--).x }". Produced the following syntax error: "SyntaxError: Postfix -- operator applied to value that is not a reference." > PASS Invalid: "a-- ++". Produced the following syntax error: "SyntaxError: Unexpected token '++'" > PASS Invalid: "function f() { a-- ++ }". Produced the following syntax error: "SyntaxError: Unexpected token '++'" > PASS Invalid: "(a:) --b". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ')' to end a compound expression." > PASS Invalid: "function f() { (a:) --b }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Expected ')' to end a compound expression." >-PASS Valid: "++ -- ++ a" with ReferenceError >-PASS Valid: "function f() { ++ -- ++ a }" >-PASS Valid: "++ new new a ++" with ReferenceError >-PASS Valid: "function f() { ++ new new a ++ }" >+PASS Invalid: "++ -- ++ a". Produced the following syntax error: "SyntaxError: The prefix-increment operator requires a reference expression." >+PASS Invalid: "function f() { ++ -- ++ a }". Produced the following syntax error: "SyntaxError: The prefix-increment operator requires a reference expression." >+PASS Invalid: "++ new new a ++". Produced the following syntax error: "SyntaxError: Prefix ++ operator applied to value that is not a reference." >+PASS Invalid: "function f() { ++ new new a ++ }". Produced the following syntax error: "SyntaxError: Prefix ++ operator applied to value that is not a reference." > PASS Valid: "delete void 0" > PASS Valid: "function f() { delete void 0 }" > PASS Invalid: "delete the void". Produced the following syntax error: "SyntaxError: Unexpected keyword 'void'. Parse error." > PASS Invalid: "function f() { delete the void }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'void'. Parse error." > PASS Invalid: "(a++". Produced the following syntax error: "SyntaxError: Unexpected end of script" > PASS Invalid: "function f() { (a++ }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected ')' to end a compound expression." >-PASS Valid: "++a--" with ReferenceError >-PASS Valid: "function f() { ++a-- }" >-PASS Valid: "++((a))--" with ReferenceError >-PASS Valid: "function f() { ++((a))-- }" >-PASS Valid: "(a.x++)++" with ReferenceError >-PASS Valid: "function f() { (a.x++)++ }" >+PASS Invalid: "++a--". Produced the following syntax error: "SyntaxError: The increment operator requires a reference expression." >+PASS Invalid: "function f() { ++a-- }". Produced the following syntax error: "SyntaxError: The increment operator requires a reference expression." >+PASS Invalid: "++((a))--". Produced the following syntax error: "SyntaxError: The increment operator requires a reference expression." >+PASS Invalid: "function f() { ++((a))-- }". Produced the following syntax error: "SyntaxError: The increment operator requires a reference expression." >+PASS Invalid: "(a.x++)++". Produced the following syntax error: "SyntaxError: Postfix ++ operator applied to value that is not a reference." >+PASS Invalid: "function f() { (a.x++)++ }". Produced the following syntax error: "SyntaxError: Postfix ++ operator applied to value that is not a reference." > PASS Invalid: "1: null". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Parse error." > PASS Invalid: "function f() { 1: null }". Produced the following syntax error: "SyntaxError: Unexpected token ':'. Parse error." > PASS Invalid: "+-!~". Produced the following syntax error: "SyntaxError: Unexpected end of script" >@@ -110,16 +110,16 @@ PASS Valid: "- - true % 5" > PASS Valid: "function f() { - - true % 5 }" > PASS Invalid: "- false = 3". Produced the following syntax error: "SyntaxError: Left hand side of operator '=' must be a reference." > PASS Invalid: "function f() { - false = 3 }". Produced the following syntax error: "SyntaxError: Left hand side of operator '=' must be a reference." >-PASS Valid: "a: b: c: (1 + null) = 3" with ReferenceError >-PASS Valid: "function f() { a: b: c: (1 + null) = 3 }" >+PASS Invalid: "a: b: c: (1 + null) = 3". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { a: b: c: (1 + null) = 3 }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Valid: "a[2] = b.l += c /= 4 * 7 ^ !6" with ReferenceError > PASS Valid: "function f() { a[2] = b.l += c /= 4 * 7 ^ !6 }" > PASS Invalid: "a + typeof b += c in d". Produced the following syntax error: "SyntaxError: Left hand side of operator '+=' must be a reference." > PASS Invalid: "function f() { a + typeof b += c in d }". Produced the following syntax error: "SyntaxError: Left hand side of operator '+=' must be a reference." > PASS Invalid: "typeof a &= typeof b". Produced the following syntax error: "SyntaxError: Left hand side of operator '&=' must be a reference." > PASS Invalid: "function f() { typeof a &= typeof b }". Produced the following syntax error: "SyntaxError: Left hand side of operator '&=' must be a reference." >-PASS Valid: "a: ((typeof (a))) >>>= a || b.l && c" with ReferenceError >-PASS Valid: "function f() { a: ((typeof (a))) >>>= a || b.l && c }" >+PASS Invalid: "a: ((typeof (a))) >>>= a || b.l && c". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { a: ((typeof (a))) >>>= a || b.l && c }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Valid: "a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g" with ReferenceError > PASS Valid: "function f() { a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g }" > PASS Valid: "-void+x['y'].l == x.l != 5 - f[7]" with ReferenceError >@@ -127,8 +127,8 @@ PASS Valid: "function f() { -void+x['y'].l == x.l != 5 - f[7] }" > Function calls (and new with arguments) > PASS Valid: "a()()()" with ReferenceError > PASS Valid: "function f() { a()()() }" >-PASS Valid: "s: l: a[2](4 == 6, 5 = 6)(f[4], 6)" with ReferenceError >-PASS Valid: "function f() { s: l: a[2](4 == 6, 5 = 6)(f[4], 6) }" >+PASS Invalid: "s: l: a[2](4 == 6, 5 = 6)(f[4], 6)". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { s: l: a[2](4 == 6, 5 = 6)(f[4], 6) }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Valid: "s: eval(a.apply(), b.call(c[5] - f[7]))" with ReferenceError > PASS Valid: "function f() { s: eval(a.apply(), b.call(c[5] - f[7])) }" > PASS Invalid: "a(". Produced the following syntax error: "SyntaxError: Unexpected end of script" >@@ -357,8 +357,8 @@ PASS Valid: "const a = void 7 - typeof 8, b = 8" > PASS Valid: "function f() { const a = void 7 - typeof 8, b = 8 }" > PASS Invalid: "const a, a, a = void 7 - typeof 8, a = 8". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'a' must have an initializer." > PASS Invalid: "function f() { const a, a, a = void 7 - typeof 8, a = 8 }". Produced the following syntax error: "SyntaxError: Unexpected token ','. const declared variable 'a' must have an initializer." >-PASS Valid: "const x_x = 6 /= 7 ? e : f" with ReferenceError >-PASS Valid: "function f() { const x_x = 6 /= 7 ? e : f }" >+PASS Invalid: "const x_x = 6 /= 7 ? e : f". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { const x_x = 6 /= 7 ? e : f }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Invalid: "var a = ?". Produced the following syntax error: "SyntaxError: Unexpected token '?'" > PASS Invalid: "function f() { var a = ? }". Produced the following syntax error: "SyntaxError: Unexpected token '?'" > PASS Invalid: "const a = *7". Produced the following syntax error: "SyntaxError: Unexpected token '*'" >@@ -504,8 +504,8 @@ PASS Valid: "for ((a ? b : c) in c) break" with ReferenceError > PASS Valid: "function f() { for ((a ? b : c) in c) break }" > PASS Valid: "for (var a in b in c) break" with ReferenceError > PASS Valid: "function f() { for (var a in b in c) break }" >-PASS Valid: "for (var a = 5 += 6 in b) break" with ReferenceError >-PASS Valid: "function f() { for (var a = 5 += 6 in b) break }" >+PASS Invalid: "for (var a = 5 += 6 in b) break". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { for (var a = 5 += 6 in b) break }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Valid: "for (var a = foo('should be hit') in b) break" with ReferenceError > PASS Valid: "function f() { for (var a = foo('should be hit') in b) break }" > PASS Invalid: "for (var a += 5 in b) break". Produced the following syntax error: "SyntaxError: Unexpected token '+='. Expected either 'in' or 'of' in enumeration syntax." >@@ -524,8 +524,8 @@ PASS Invalid: "for (var a = (b in c in d) break". Produced the following syntax > PASS Invalid: "function f() { for (var a = (b in c in d) break }". Produced the following syntax error: "SyntaxError: Unexpected keyword 'break'. Expected either 'in' or 'of' in enumeration syntax." > PASS Invalid: "for (var (a) in b) { }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list." > PASS Invalid: "function f() { for (var (a) in b) { } }". Produced the following syntax error: "SyntaxError: Unexpected token '('. Expected a parameter pattern or a ')' in parameter list." >-PASS Valid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}" with ReferenceError >-PASS Valid: "function f() { for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {} }" >+PASS Invalid: "for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}". Produced the following syntax error: "SyntaxError: The decrement operator requires a reference expression." >+PASS Invalid: "function f() { for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {} }". Produced the following syntax error: "SyntaxError: The decrement operator requires a reference expression." > PASS Invalid: "for (var {a} = 20 in b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header." > PASS Invalid: "function f() { for (var {a} = 20 in b) { } }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-in loop header." > PASS Invalid: "for (var {a} = 20 of b) { }". Produced the following syntax error: "SyntaxError: Cannot assign to the loop variable inside a for-of loop header." >@@ -878,8 +878,8 @@ PASS Valid: "if (0) obj.foo\u03bb; " > PASS Valid: "function f() { if (0) obj.foo\u03bb; }" > PASS Valid: "if (0) new a(b+c).d = 5" > PASS Valid: "function f() { if (0) new a(b+c).d = 5 }" >-PASS Valid: "if (0) new a(b+c) = 5" >-PASS Valid: "function f() { if (0) new a(b+c) = 5 }" >+PASS Invalid: "if (0) new a(b+c) = 5". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { if (0) new a(b+c) = 5 }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Valid: "([1 || 1].a = 1)" > PASS Valid: "function f() { ([1 || 1].a = 1) }" > PASS Valid: "({a: 1 || 1}.a = 1)" >@@ -1043,14 +1043,14 @@ PASS Valid: "({a}=1)()" with TypeError > PASS Valid: "function f() { ({a}=1)() }" > PASS Valid: "({a:a}=1)()" with TypeError > PASS Valid: "function f() { ({a:a}=1)() }" >-PASS Valid: "({a}=1)=1" with ReferenceError >-PASS Valid: "function f() { ({a}=1)=1 }" >-PASS Valid: "({a:a}=1)=1" with ReferenceError >-PASS Valid: "function f() { ({a:a}=1)=1 }" >-PASS Valid: "({a}=1=1)" with ReferenceError >-PASS Valid: "function f() { ({a}=1=1) }" >-PASS Valid: "({a:a}=1=1)" with ReferenceError >-PASS Valid: "function f() { ({a:a}=1=1) }" >+PASS Invalid: "({a}=1)=1". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { ({a}=1)=1 }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "({a:a}=1)=1". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { ({a:a}=1)=1 }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "({a}=1=1)". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { ({a}=1=1) }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "({a:a}=1=1)". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." >+PASS Invalid: "function f() { ({a:a}=1=1) }". Produced the following syntax error: "SyntaxError: Left side of assignment is not a reference." > PASS Invalid: "var {x}". Produced the following syntax error: "SyntaxError: Unexpected end of script" > PASS Invalid: "function f() { var {x} }". Produced the following syntax error: "SyntaxError: Unexpected token '}'. Expected an initializer in destructuring variable declaration." > PASS Invalid: "var {x, y}". Produced the following syntax error: "SyntaxError: Unexpected end of script" >diff --git a/LayoutTests/js/parser-xml-close-comment-expected.txt b/LayoutTests/js/parser-xml-close-comment-expected.txt >index 06dfd6c1b70bf6acf3d7c37c7556a5da6ff9de2f..8ecf14c2b2d481604832cebdc2472dc34f67c12d 100644 >--- a/LayoutTests/js/parser-xml-close-comment-expected.txt >+++ b/LayoutTests/js/parser-xml-close-comment-expected.txt >@@ -3,11 +3,11 @@ Test to ensure correct handling of --> as a single line comment when at the begi > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS 'should be a syntax error' --> threw exception SyntaxError: Unexpected end of script. >-PASS /**/ 1--> threw exception SyntaxError: Unexpected end of script. >-PASS /**/ 1 --> threw exception SyntaxError: Unexpected end of script. >-PASS 1 /**/--> threw exception SyntaxError: Unexpected end of script. >-PASS 1 /**/ --> threw exception SyntaxError: Unexpected end of script. >+PASS 'should be a syntax error' --> threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. >+PASS /**/ 1--> threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. >+PASS /**/ 1 --> threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. >+PASS 1 /**/--> threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. >+PASS 1 /**/ --> threw exception SyntaxError: Postfix -- operator applied to value that is not a reference.. > PASS 1/* > */--> is 1 > PASS 1/* >diff --git a/LayoutTests/js/script-tests/function-toString-parentheses.js b/LayoutTests/js/script-tests/function-toString-parentheses.js >index d648b4e2a9b17279acbae7c73954476df1b03541..81ce13f16bcdaa07a44dda423ef3e99c3d1b9c07 100644 >--- a/LayoutTests/js/script-tests/function-toString-parentheses.js >+++ b/LayoutTests/js/script-tests/function-toString-parentheses.js >@@ -104,7 +104,7 @@ for (i = 0; i < assignmentOperators.length; ++i) { > testRightAssociativeSame("=", op); > testLowerFirst(op, "+"); > shouldThrow("compileAndSerialize('a + b " + op + " c')"); >- testKeepParentheses("(a + b) " + op + " c"); >+ shouldThrow("compileAndSerialize('(a + b) " + op + " c')"); > testKeepParentheses("a + (b " + op + " c)"); > } > >@@ -115,7 +115,10 @@ for (i = 0; i < prefixOperators.length; ++i) { > var op = prefixOperators[i] + prefixOperatorSpace[i]; > testKeepParentheses("" + op + "a + b"); > testOptionalParentheses("(" + op + "a) + b"); >- testKeepParentheses("" + op + "(a + b)"); >+ if (prefixOperators[i] !== "++" && prefixOperators[i] !== "--") >+ testKeepParentheses("" + op + "(a + b)"); >+ else >+ shouldThrow("compileAndSerialize('" + op + "(a + b)')"); > testKeepParentheses("!" + op + "a"); > testOptionalParentheses("!(" + op + "a)"); > } >@@ -123,11 +126,11 @@ for (i = 0; i < prefixOperators.length; ++i) { > > testKeepParentheses("!a++"); > testOptionalParentheses("!(a++)"); >-testKeepParentheses("(!a)++"); >+shouldThrow("compileAndSerialize('(!a)++')"); > > testKeepParentheses("!a--"); > testOptionalParentheses("!(a--)"); >-testKeepParentheses("(!a)--"); >+shouldThrow("compileAndSerialize('(!a)--')"); > > testKeepParentheses("(-1)[a]"); > testKeepParentheses("(-1)[a] = b"); >@@ -182,9 +185,9 @@ testKeepParentheses("(1).a()"); > > for (i = 0; i < assignmentOperators.length; ++i) { > var op = assignmentOperators[i]; >- testKeepParentheses("(-1) " + op + " a"); >- testKeepParentheses("(- 0) " + op + " a"); >- testKeepParentheses("1 " + op + " a"); >+ shouldThrow("compileAndSerialize('(-1) " + op + " a')"); >+ shouldThrow("compileAndSerialize('(- 0) " + op + " a')"); >+ shouldThrow("compileAndSerialize('1 " + op + " a')"); > } > > shouldBe("compileAndSerializeLeftmostTest('({ }).x')", "'({ }).x'"); >diff --git a/LayoutTests/js/script-tests/parser-syntax-check.js b/LayoutTests/js/script-tests/parser-syntax-check.js >index 26a0d135f1ab4fdfbb43bbbf1d1dba6aba5bee2d..c49c90b581d87302bbd07ec8d282a579b08759da 100644 >--- a/LayoutTests/js/script-tests/parser-syntax-check.js >+++ b/LayoutTests/js/script-tests/parser-syntax-check.js >@@ -83,19 +83,19 @@ invalid("a.'l'"); > valid ("a: +~!new a"); > invalid("new -a"); > valid ("new (-1)") >-valid ("a: b: c: new f(x++)++") >+invalid("a: b: c: new f(x++)++") > valid ("(a)++"); >-valid ("(1--).x"); >+invalid("(1--).x"); > invalid("a-- ++"); > invalid("(a:) --b"); >-valid ("++ -- ++ a"); >-valid ("++ new new a ++"); >+invalid("++ -- ++ a"); >+invalid("++ new new a ++"); > valid ("delete void 0"); > invalid("delete the void"); > invalid("(a++"); >-valid ("++a--"); >-valid ("++((a))--"); >-valid ("(a.x++)++"); >+invalid("++a--"); >+invalid("++((a))--"); >+invalid("(a.x++)++"); > invalid("1: null"); > invalid("+-!~"); > invalid("+-!~(("); >@@ -131,18 +131,18 @@ valid ("a in b instanceof delete -c"); > invalid("a in instanceof b.l"); > valid ("- - true % 5"); > invalid("- false = 3"); >-valid ("a: b: c: (1 + null) = 3"); >+invalid("a: b: c: (1 + null) = 3"); > valid ("a[2] = b.l += c /= 4 * 7 ^ !6"); > invalid("a + typeof b += c in d"); > invalid("typeof a &= typeof b"); >-valid ("a: ((typeof (a))) >>>= a || b.l && c"); >+invalid("a: ((typeof (a))) >>>= a || b.l && c"); > valid ("a: b: c[a /= f[a %= b]].l[c[x] = 7] -= a ? b <<= f : g"); > valid ("-void+x['y'].l == x.l != 5 - f[7]"); > > debug ("Function calls (and new with arguments)"); > > valid ("a()()()"); >-valid ("s: l: a[2](4 == 6, 5 = 6)(f[4], 6)"); >+invalid("s: l: a[2](4 == 6, 5 = 6)(f[4], 6)"); > valid ("s: eval(a.apply(), b.call(c[5] - f[7]))"); > invalid("a("); > invalid("a(5"); >@@ -268,7 +268,7 @@ invalid("var var = 3"); > valid ("var varr = 3 in 1"); > valid ("const a = void 7 - typeof 8, b = 8"); > invalid("const a, a, a = void 7 - typeof 8, a = 8"); >-valid ("const x_x = 6 /= 7 ? e : f"); >+invalid("const x_x = 6 /= 7 ? e : f"); > invalid("var a = ?"); > invalid("const a = *7"); > invalid("var a = :)"); >@@ -345,7 +345,7 @@ valid ("for ((a, b) in c) break"); > invalid("for (a ? b : c in c) break"); > valid ("for ((a ? b : c) in c) break"); > valid ("for (var a in b in c) break"); >-valid("for (var a = 5 += 6 in b) break"); >+invalid("for (var a = 5 += 6 in b) break"); > valid("for (var a = foo('should be hit') in b) break"); > invalid("for (var a += 5 in b) break"); > invalid("for (var a = in b) break"); >@@ -355,7 +355,7 @@ invalid("for (var a, b = 8 in b) break"); > valid("for (var a = (b in c) in d) break"); > invalid("for (var a = (b in c in d) break"); > invalid("for (var (a) in b) { }"); >-valid ("for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}"); >+invalid("for (var a = 7, b = c < d >= d ; f()[6]++ ; --i()[1]++ ) {}"); > invalid("for (var {a} = 20 in b) { }"); > invalid("for (var {a} = 20 of b) { }"); > invalid("for (var {a} = 20 in b) { }"); >@@ -543,7 +543,7 @@ valid("if (0) obj.foo$; ") > valid("if (0) obj.foo_; ") > valid("if (0) obj.foo\\u03bb; ") > valid("if (0) new a(b+c).d = 5"); >-valid("if (0) new a(b+c) = 5"); >+invalid("if (0) new a(b+c) = 5"); > valid("([1 || 1].a = 1)"); > valid("({a: 1 || 1}.a = 1)"); > >@@ -631,10 +631,10 @@ valid("delete ({a}=1)") > valid("delete ({a:a}=1)") > valid("({a}=1)()") > valid("({a:a}=1)()") >-valid("({a}=1)=1") >-valid("({a:a}=1)=1") >-valid("({a}=1=1)") >-valid("({a:a}=1=1)") >+invalid("({a}=1)=1") >+invalid("({a:a}=1)=1") >+invalid("({a}=1=1)") >+invalid("({a:a}=1=1)") > invalid("var {x}") > invalid("var {x, y}") > invalid("var {x} = 20, {x, y}") >diff --git a/LayoutTests/js/script-tests/toString-prefix-postfix-preserve-parens.js b/LayoutTests/js/script-tests/toString-prefix-postfix-preserve-parens.js >index c923e7d524ab57a0d020c49feeb11a71207af64c..d2945585d7d3bf9b1bbd1ab3fce874b42473a267 100644 >--- a/LayoutTests/js/script-tests/toString-prefix-postfix-preserve-parens.js >+++ b/LayoutTests/js/script-tests/toString-prefix-postfix-preserve-parens.js >@@ -1,61 +1,7 @@ > description( >-"This test checks that toString() round-trip on a function that has prefix, postfix and typeof operators applied to group expression will not remove the grouping. Also checks that evaluation of such a expression produces run-time exception" >+"This test checks that toString() round-trip on a function that has a typeof operator applied to a group expression will not remove the grouping." > ); > >-function postfix_should_preserve_parens(x, y, z) { >- (x, y)++; >- return y; >-} >- >-function prefix_should_preserve_parens(x, y, z) { >- ++(x, y); >- return x; >- >-} >- >-function both_should_preserve_parens(x, y, z) { >- ++(x, y)--; >- return x; >- >-} >- >-function postfix_should_preserve_parens_multi(x, y, z) { >- (((x, y)))--; >- return x; >-} >- >-function prefix_should_preserve_parens_multi(x, y, z) { >- --(((x, y))); >- return x; >-} >- >-function both_should_preserve_parens_multi(x, y, z) { >- ++(((x, y)))--; >- return x; >-} >- >-function postfix_should_preserve_parens_multi1(x, y, z) { >- (((x)), y)--; >- return x; >-} >- >-function prefix_should_preserve_parens_multi1(x, y, z) { >- --(((x)), y); >- return x; >-} >- >-function prefix_should_preserve_parens_multi2(x, y, z) { >- var z = 0; >- --(((x), y), z); >- return x; >-} >- >-function postfix_should_preserve_parens_multi2(x, y, z) { >- var z = 0; >- (((x), y) ,z)++; >- return x; >-} >- > // if these return a variable (such as y) instead of > // the result of typeof, this means that the parenthesis > // got lost somewhere. >@@ -91,17 +37,6 @@ function testToString(fn) { > > } > >-function testToStringAndRTFailure(fn) >-{ >- testToString(fn); >- >- // check that function call produces run-time exception >- shouldThrow(""+fn+ "(1, 2, 3);"); >- >- // check that function call produces run-time exception after eval(unevalf) >- shouldThrow("eval(unevalf("+fn+ "))(1, 2, 3);"); >-} >- > function testToStringAndReturn(fn, p1, p2, retval) > { > >@@ -114,17 +49,6 @@ function testToStringAndReturn(fn, p1, p2, retval) > shouldBe("eval(unevalf("+fn+ "))" + "(" + p1 + ", " + p2 +");", retval); > } > >- >-testToStringAndRTFailure("prefix_should_preserve_parens"); >-testToStringAndRTFailure("postfix_should_preserve_parens"); >-testToStringAndRTFailure("both_should_preserve_parens"); >-testToStringAndRTFailure("prefix_should_preserve_parens_multi"); >-testToStringAndRTFailure("postfix_should_preserve_parens_multi"); >-testToStringAndRTFailure("prefix_should_preserve_parens_multi1"); >-testToStringAndRTFailure("postfix_should_preserve_parens_multi1"); >-testToStringAndRTFailure("prefix_should_preserve_parens_multi2"); >-testToStringAndRTFailure("postfix_should_preserve_parens_multi2"); >- > testToStringAndReturn("typeof_should_preserve_parens", "'a'", 1, "'number'"); > testToStringAndReturn("typeof_should_preserve_parens1", "'a'", 1, "'number'"); > testToStringAndReturn("typeof_should_preserve_parens2", "'a'", 1, "'number'"); >diff --git a/LayoutTests/js/toString-prefix-postfix-preserve-parens-expected.txt b/LayoutTests/js/toString-prefix-postfix-preserve-parens-expected.txt >index 036fedb6e08d325757ddbd22f3a453fcc314b8b9..b7e3aa19db427f0b9815307d001adef634e4b410 100644 >--- a/LayoutTests/js/toString-prefix-postfix-preserve-parens-expected.txt >+++ b/LayoutTests/js/toString-prefix-postfix-preserve-parens-expected.txt >@@ -1,44 +1,8 @@ >-This test checks that toString() round-trip on a function that has prefix, postfix and typeof operators applied to group expression will not remove the grouping. Also checks that evaluation of such a expression produces run-time exception >+This test checks that toString() round-trip on a function that has a typeof operator applied to a group expression will not remove the grouping. > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > > >-PASS unevalf(eval(unevalf(prefix_should_preserve_parens))) is unevalf(prefix_should_preserve_parens) >-PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens)) is true >-PASS prefix_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS eval(unevalf(prefix_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(postfix_should_preserve_parens))) is unevalf(postfix_should_preserve_parens) >-PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens)) is true >-PASS postfix_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >-PASS eval(unevalf(postfix_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(both_should_preserve_parens))) is unevalf(both_should_preserve_parens) >-PASS /.*\(+x\)*, y\)/.test(unevalf(both_should_preserve_parens)) is true >-PASS both_should_preserve_parens(1, 2, 3); threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS eval(unevalf(both_should_preserve_parens))(1, 2, 3); threw exception ReferenceError: Prefix ++ operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi))) is unevalf(prefix_should_preserve_parens_multi) >-PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi)) is true >-PASS prefix_should_preserve_parens_multi(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS eval(unevalf(prefix_should_preserve_parens_multi))(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi))) is unevalf(postfix_should_preserve_parens_multi) >-PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi)) is true >-PASS postfix_should_preserve_parens_multi(1, 2, 3); threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >-PASS eval(unevalf(postfix_should_preserve_parens_multi))(1, 2, 3); threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi1))) is unevalf(prefix_should_preserve_parens_multi1) >-PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi1)) is true >-PASS prefix_should_preserve_parens_multi1(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS eval(unevalf(prefix_should_preserve_parens_multi1))(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi1))) is unevalf(postfix_should_preserve_parens_multi1) >-PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi1)) is true >-PASS postfix_should_preserve_parens_multi1(1, 2, 3); threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >-PASS eval(unevalf(postfix_should_preserve_parens_multi1))(1, 2, 3); threw exception ReferenceError: Postfix -- operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(prefix_should_preserve_parens_multi2))) is unevalf(prefix_should_preserve_parens_multi2) >-PASS /.*\(+x\)*, y\)/.test(unevalf(prefix_should_preserve_parens_multi2)) is true >-PASS prefix_should_preserve_parens_multi2(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS eval(unevalf(prefix_should_preserve_parens_multi2))(1, 2, 3); threw exception ReferenceError: Prefix -- operator applied to value that is not a reference.. >-PASS unevalf(eval(unevalf(postfix_should_preserve_parens_multi2))) is unevalf(postfix_should_preserve_parens_multi2) >-PASS /.*\(+x\)*, y\)/.test(unevalf(postfix_should_preserve_parens_multi2)) is true >-PASS postfix_should_preserve_parens_multi2(1, 2, 3); threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. >-PASS eval(unevalf(postfix_should_preserve_parens_multi2))(1, 2, 3); threw exception ReferenceError: Postfix ++ operator applied to value that is not a reference.. > PASS unevalf(eval(unevalf(typeof_should_preserve_parens))) is unevalf(typeof_should_preserve_parens) > PASS /.*\(+x\)*, y\)/.test(unevalf(typeof_should_preserve_parens)) is true > PASS typeof_should_preserve_parens('a', 1); is 'number' >diff --git a/JSTests/ChakraCore.yaml b/JSTests/ChakraCore.yaml >index cb0ca11801a6a79a275e71aed85a59e00179cea0..f4c8006b4324fd1acabe135e6c905fdd2556cf9d 100644 >--- a/JSTests/ChakraCore.yaml >+++ b/JSTests/ChakraCore.yaml >@@ -551,7 +551,7 @@ > - path: ChakraCore/test/Error/CallNonFunction.js > cmd: runChakra :baseline, "NoException", "CallNonFunction_3.baseline-jsc", [] > - path: ChakraCore/test/Error/variousErrors.js >- cmd: runChakra :baseline, "NoException", "variousErrors3.baseline", [] >+ cmd: runChakra :baseline, "NoException", "variousErrors3.baseline-jsc", [] > - path: ChakraCore/test/Error/bug560940.js > cmd: runChakra :pass, "NoException", "", [] > - path: ChakraCore/test/Error/inlineSameFunc.js >diff --git a/JSTests/ChakraCore/test/EH/try6.baseline-jsc b/JSTests/ChakraCore/test/EH/try6.baseline-jsc >index 8896d1f851b1fba3348ef8840653faa64e0cbf67..83510b7c1b8b4a610f7344f2d016bdc2622407e0 100644 >--- a/JSTests/ChakraCore/test/EH/try6.baseline-jsc >+++ b/JSTests/ChakraCore/test/EH/try6.baseline-jsc >@@ -16,4 +16,4 @@ Inner foobaz 2 > Finally bar 2 > Except foobaz 2 thrown > english (passed) >-ReferenceError: Postfix ++ operator applied to value that is not a reference. >+SyntaxError: Postfix ++ operator applied to value that is not a reference. >diff --git a/JSTests/ChakraCore/test/Error/variousErrors3.baseline-jsc b/JSTests/ChakraCore/test/Error/variousErrors3.baseline-jsc >new file mode 100644 >index 0000000000000000000000000000000000000000..e1dc4e0b8d36d0ec05e20b9d5dff1305d22380f8 >--- /dev/null >+++ b/JSTests/ChakraCore/test/Error/variousErrors3.baseline-jsc >@@ -0,0 +1,8 @@ >+42 = 42 :: SyntaxError >+'x' = 42 :: SyntaxError >+true = 42 :: SyntaxError >+null = 42 :: SyntaxError >+delete this .. true >+delete true .. true >+delete 10 .. true >+delete null .. true >diff --git a/JSTests/ChangeLog b/JSTests/ChangeLog >index 5e28d100b6b7a15b8c867da224017ef23848b0e0..f2eadb279f94a54f7e2c32659dba8a4c4b7f71fd 100644 >--- a/JSTests/ChangeLog >+++ b/JSTests/ChangeLog >@@ -1,3 +1,23 @@ >+2019-05-05 Ross Kirsling <ross.kirsling@sony.com> >+ >+ [JSC] Invalid AssignmentTargetType should be an early error. >+ https://bugs.webkit.org/show_bug.cgi?id=197603 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * test262/expectations.yaml: >+ Update expectations to reflect new SyntaxErrors. >+ (Ideally, these should all be viewed as passing in the near future.) >+ >+ * stress/async-await-basic.js: >+ * stress/big-int-literals.js: >+ Update tests to reflect new SyntaxErrors. >+ >+ * ChakraCore.yaml: >+ * ChakraCore/test/EH/try6.baseline-jsc: >+ * ChakraCore/test/Error/variousErrors3.baseline-jsc: Added. >+ Update baselines to reflect new SyntaxErrors. >+ > 2019-05-06 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Add more tests for DFG SetLocal emission for adhoc SetterCall frame >diff --git a/JSTests/stress/async-await-basic.js b/JSTests/stress/async-await-basic.js >index dfeefefb3ce5623b7be11b09dd81321cbc3c9f6a..0eb23b00ec439a196234aaae2dc53366d0dec008 100644 >--- a/JSTests/stress/async-await-basic.js >+++ b/JSTests/stress/async-await-basic.js >@@ -270,28 +270,15 @@ var awaitEpression = async (value) => { > var t3 = !!!!!await Promise.resolve(true); > log.push('step 5 ' + t3); > >- try { >- var t4 = ++await 1; >- } catch(e) { >- if (e instanceof ReferenceError) { >- log.push('step 6 '); >- } >- } >- >- try { >- var t5 = --await 1; >- } catch(e) { >- if (e instanceof ReferenceError) { >- log.push('step 7'); >- } >- } >+ shouldThrowSyntaxError("var t4 = ++await 1;"); >+ shouldThrowSyntaxError("var t5 = --await 1;"); > > return void await 'test'; > }; > log = []; > > shouldBeAsync(undefined, () => awaitEpression(5)); >-shouldBe("start:5 step 1 step 2 -2 step 3 12345 step 4 -54321 step 5 false step 6 step 7", log.join(" ")); >+shouldBe("start:5 step 1 step 2 -2 step 3 12345 step 4 -54321 step 5 false", log.join(" ")); > > // MethoodDefinition SyntaxErrors > shouldThrowSyntaxError("var obj = { async foo : true };", "Unexpected token ':'. Expected a parenthesis for argument list."); >diff --git a/JSTests/stress/big-int-literals.js b/JSTests/stress/big-int-literals.js >index 6c48090beccd97cdb47e494e2a2aaa49cde3a418..54957e8f9889c3d00647fe87e321ba1cc619c8ec 100644 >--- a/JSTests/stress/big-int-literals.js >+++ b/JSTests/stress/big-int-literals.js >@@ -104,10 +104,4 @@ assertThrowSyntaxError("0xfnn"); > assertThrowSyntaxError("100nn"); > assertThrowSyntaxError("1a0nn"); > assertThrowSyntaxError("10E20n"); >- >-try { >- eval("--10n"); >- assert(false); >-} catch(e) { >- assert(e instanceof ReferenceError); >-} >+assertThrowSyntaxError("--10n"); >diff --git a/JSTests/test262/expectations.yaml b/JSTests/test262/expectations.yaml >index 691ec669623a382bf5fb625c2f5947d8c806c72f..b41be2ba60ee306f82e68483b2c42216a209959d 100644 >--- a/JSTests/test262/expectations.yaml >+++ b/JSTests/test262/expectations.yaml >@@ -1504,7 +1504,7 @@ test/language/arguments-object/mapped/nonconfigurable-nonwritable-descriptors-se > test/language/arguments-object/mapped/nonconfigurable-nonwritable-descriptors-set-by-param.js: > default: 'Test262Error: Expected obj[0] to have configurable:false.' > test/language/asi/S7.9_A5.7_T1.js: >- default: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: The prefix-increment operator requires a reference expression.' > strict mode: 'SyntaxError: The prefix-increment operator requires a reference expression.' > test/language/block-scope/syntax/redeclaration/async-function-name-redeclaration-attempt-with-async-function.js: > default: 'Test262: This statement should not be evaluated.' >@@ -1748,29 +1748,29 @@ test/language/expressions/assignment/fn-name-lhs-member.js: > default: 'Test262Error: Expected SameValue(ëtrueû, ëfalseû) to be true' > strict mode: 'Test262Error: Expected SameValue(ëtrueû, ëfalseû) to be true' > test/language/expressions/assignment/non-simple-target.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/assignment/target-boolean.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/assignment/target-cover-newtarget.js: > default: "SyntaxError: new.target can't be the left hand side of an assignment expression." > strict mode: "SyntaxError: new.target can't be the left hand side of an assignment expression." > test/language/expressions/assignment/target-cover-yieldexpr.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/assignment/target-newtarget.js: > default: "SyntaxError: new.target can't be the left hand side of an assignment expression." > strict mode: "SyntaxError: new.target can't be the left hand side of an assignment expression." > test/language/expressions/assignment/target-null.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/assignment/target-number.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/assignment/target-string.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/async-arrow-function/await-as-param-ident-nested-arrow-parameter-position.js: > default: 'Test262: This statement should not be evaluated.' > strict mode: 'Test262: This statement should not be evaluated.' >@@ -1778,11 +1778,11 @@ test/language/expressions/async-arrow-function/await-as-param-nested-arrow-body- > default: 'Test262: This statement should not be evaluated.' > strict mode: 'Test262: This statement should not be evaluated.' > test/language/expressions/async-function/early-errors-expression-not-simple-assignment-target.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/await/early-errors-await-not-simple-assignment-target.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/call/eval-realm-indirect.js: > default: 'Test262Error: Expected SameValue(ëinsideû, ëoutsideû) to be true' > test/language/expressions/call/eval-spread-empty-leading.js: >@@ -1988,92 +1988,92 @@ test/language/expressions/compound-assignment/S11.13.2_A7.9_T4.js: > default: 'Test262Error: Expected true but got false' > strict mode: 'Test262Error: Expected true but got false' > test/language/expressions/compound-assignment/add-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/btws-and-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/btws-or-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/btws-xor-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/div-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/left-shift-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/mod-div-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/mult-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/right-shift-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/subtract-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/compound-assignment/u-right-shift-non-simple.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/conditional/in-branch-1.js: > default: "SyntaxError: Unexpected keyword 'in'. Expected ':' in ternary operator." > strict mode: "SyntaxError: Unexpected keyword 'in'. Expected ':' in ternary operator." > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-1-update-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-10-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-11-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-12-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-13-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-14-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-15-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-16-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-17-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-2-update-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Postfix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Postfix -- operator applied to value that is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-3-update-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-4-update-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-5-lhs-equals-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-6-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-7-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-8-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/dynamic-import/syntax/invalid/invalid-asssignmenttargettype-reference-error-9-lhs-assignment-operator-assignment-expression.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/function/name.js: > default: 'Test262Error: Expected SameValue(ëtrueû, ëfalseû) to be true' > strict mode: 'Test262Error: Expected SameValue(ëtrueû, ëfalseû) to be true' >@@ -2165,8 +2165,8 @@ test/language/expressions/postfix-decrement/target-cover-newtarget.js: > default: "SyntaxError: new.target can't come before a postfix operator." > strict mode: "SyntaxError: new.target can't come before a postfix operator." > test/language/expressions/postfix-decrement/target-cover-yieldexpr.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Postfix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Postfix -- operator applied to value that is not a reference.' > test/language/expressions/postfix-decrement/target-newtarget.js: > default: "SyntaxError: new.target can't come before a postfix operator." > strict mode: "SyntaxError: new.target can't come before a postfix operator." >@@ -2188,8 +2188,8 @@ test/language/expressions/postfix-increment/target-cover-newtarget.js: > default: "SyntaxError: new.target can't come before a postfix operator." > strict mode: "SyntaxError: new.target can't come before a postfix operator." > test/language/expressions/postfix-increment/target-cover-yieldexpr.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' > test/language/expressions/postfix-increment/target-newtarget.js: > default: "SyntaxError: new.target can't come before a postfix operator." > strict mode: "SyntaxError: new.target can't come before a postfix operator." >@@ -2211,8 +2211,8 @@ test/language/expressions/prefix-decrement/target-cover-newtarget.js: > default: "SyntaxError: new.target can't come after a prefix operator." > strict mode: "SyntaxError: new.target can't come after a prefix operator." > test/language/expressions/prefix-decrement/target-cover-yieldexpr.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' > test/language/expressions/prefix-decrement/target-newtarget.js: > default: "SyntaxError: new.target can't come after a prefix operator." > strict mode: "SyntaxError: new.target can't come after a prefix operator." >@@ -2234,8 +2234,8 @@ test/language/expressions/prefix-increment/target-cover-newtarget.js: > default: "SyntaxError: new.target can't come after a prefix operator." > strict mode: "SyntaxError: new.target can't come after a prefix operator." > test/language/expressions/prefix-increment/target-cover-yieldexpr.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' >+ strict mode: 'SyntaxError: Prefix -- operator applied to value that is not a reference.' > test/language/expressions/prefix-increment/target-newtarget.js: > default: "SyntaxError: new.target can't come after a prefix operator." > strict mode: "SyntaxError: new.target can't come after a prefix operator." >@@ -2243,8 +2243,8 @@ test/language/expressions/super/call-proto-not-ctor.js: > default: 'Test262Error: did not perform ArgumentsListEvaluation Expected SameValue(ëtrueû, ëfalseû) to be true' > strict mode: 'Test262Error: did not perform ArgumentsListEvaluation Expected SameValue(ëtrueû, ëfalseû) to be true' > test/language/expressions/this/S11.1.1_A1.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/expressions/yield/star-iterable.js: > default: 'Test262Error: First result `done` flag Expected SameValue(ëfalseû, ëundefinedû) to be true' > strict mode: 'Test262Error: First result `done` flag Expected SameValue(ëfalseû, ëundefinedû) to be true' >@@ -2465,10 +2465,16 @@ test/language/module-code/eval-self-once.js: > module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name." > test/language/module-code/instn-once.js: > module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name." >+test/language/module-code/instn-resolve-empty-export.js: >+ module: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' >+test/language/module-code/instn-resolve-empty-import.js: >+ module: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' >+test/language/module-code/instn-resolve-err-reference.js: >+ module: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' > test/language/module-code/instn-resolve-order-depth.js: > module: "SyntaxError: 'break' is only valid inside a switch or loop statement." > test/language/module-code/instn-resolve-order-src.js: >- module: "SyntaxError: 'break' is only valid inside a switch or loop statement." >+ module: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' > test/language/module-code/instn-star-as-props-dflt-skip.js: > module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name." > test/language/module-code/instn-star-props-nrml.js: >@@ -2488,7 +2494,7 @@ test/language/module-code/parse-err-hoist-lex-fun.js: > test/language/module-code/parse-err-hoist-lex-gen.js: > module: 'Test262: This statement should not be evaluated.' > test/language/module-code/parse-err-reference.js: >- module: 'Test262: This statement should not be evaluated.' >+ module: 'SyntaxError: Postfix ++ operator applied to value that is not a reference.' > test/language/statements/class/class-name-ident-await-escaped.js: > default: "SyntaxError: Unexpected escaped characters in keyword token: 'aw\\u0061it'" > strict mode: "SyntaxError: Unexpected escaped characters in keyword token: 'aw\\u0061it'" >@@ -2862,17 +2868,17 @@ test/language/statements/while/let-array-with-newline.js: > test/language/statements/with/let-array-with-newline.js: > default: 'Test262: This statement should not be evaluated.' > test/language/types/boolean/S8.3_A2.1.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/types/boolean/S8.3_A2.2.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/types/reference/S8.7.2_A1_T1.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/types/reference/S8.7.2_A1_T2.js: >- default: 'Test262: This statement should not be evaluated.' >- strict mode: 'Test262: This statement should not be evaluated.' >+ default: 'SyntaxError: Left side of assignment is not a reference.' >+ strict mode: 'SyntaxError: Left side of assignment is not a reference.' > test/language/types/reference/put-value-prop-base-primitive-realm.js: > default: 'Test262Error: number Expected SameValue(ë0û, ë1û) to be true' > strict mode: 'Test262Error: number Expected SameValue(ë0û, ë1û) to be true'
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197603
:
369099
|
369103
|
369106
|
369110
|
369112
|
369113
|
369140
|
369147
|
369224
|
369350