diff --git a/test/language/expressions/postfix-decrement/arguments-nostrict.js b/test/language/expressions/postfix-decrement/arguments-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..e851a7c8fb0b72bbd604ac1d9c23e8c4eb7ea39e --- /dev/null +++ b/test/language/expressions/postfix-decrement/arguments-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions-static-semantics-early-errors +description: > + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : LeftHandSideExpression -- + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression : LeftHandSideExpression -- + + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +arguments--; diff --git a/test/language/expressions/postfix-decrement/arguments.js b/test/language/expressions/postfix-decrement/arguments.js index f7188c760a70611ce5fd2812e291ee907096d98a..6e6bc0c89db2cbaebe3e3c1f05a1a3e11529ac88 100644 --- a/test/language/expressions/postfix-decrement/arguments.js +++ b/test/language/expressions/postfix-decrement/arguments.js @@ -2,11 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.3.2-2-1-s -esid: sec-postfix-decrement-operator +esid: sec-update-expressions description: > - Strict Mode - SyntaxError is thrown if the identifier 'arguments' - appear as a PostfixExpression(arguments--) + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. (arguments) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: LeftHandSideExpression -- + + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/postfix-decrement/eval-nostrict.js b/test/language/expressions/postfix-decrement/eval-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..8e7131b6e132544afb8eca260accbb3975bdb43b --- /dev/null +++ b/test/language/expressions/postfix-decrement/eval-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : LeftHandSideExpression -- + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression : LeftHandSideExpression -- + + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +eval--; diff --git a/test/language/expressions/postfix-decrement/eval.js b/test/language/expressions/postfix-decrement/eval.js index 4a7a2639100ac3aec686fd2c7d4e15f8fcf650cd..fb6d18c47a7fda83a9856999cdf6279b00d8e358 100644 --- a/test/language/expressions/postfix-decrement/eval.js +++ b/test/language/expressions/postfix-decrement/eval.js @@ -2,11 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.3.2-2-2-s -esid: sec-postfix-decrement-operator +esid: sec-update-expressions description: > - Strict Mode - SyntaxError is thrown if the identifier 'eval' - appear as a PostfixExpression(eval--) + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. (eval) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: LeftHandSideExpression -- + + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/postfix-decrement/non-simple.js b/test/language/expressions/postfix-decrement/non-simple.js deleted file mode 100644 index cc323d7d71c3f32ce8ca5516a44e592950ca449f..0000000000000000000000000000000000000000 --- a/test/language/expressions/postfix-decrement/non-simple.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - It is an early Reference Error if IsValidSimpleAssignmentTarget of - LeftHandSideExpression is false. -es6id: 12.4.1 -description: Applied to a non-simple assignment target -negative: - phase: parse - type: ReferenceError ----*/ - -$DONOTEVALUATE(); - -1--; diff --git a/test/language/expressions/postfix-increment/arguments-nostrict.js b/test/language/expressions/postfix-increment/arguments-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..bdc6a559a5180673fa9a47da0f47640b6c6d90a4 --- /dev/null +++ b/test/language/expressions/postfix-increment/arguments-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions-static-semantics-early-errors +description: > + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : LeftHandSideExpression ++ + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression : LeftHandSideExpression ++ + + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +arguments++; diff --git a/test/language/expressions/postfix-increment/arguments.js b/test/language/expressions/postfix-increment/arguments.js index b2bfce27c4ddaa90fbd8b94ef11cb44b19d8dd17..50110ba660b8daa3cc2df5f6a1d9fdbdef1a78a5 100644 --- a/test/language/expressions/postfix-increment/arguments.js +++ b/test/language/expressions/postfix-increment/arguments.js @@ -2,11 +2,17 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.3.1-2-1-s -esid: postfix-increment-operator +esid: sec-identifiers-static-semantics-assignmenttargettype description: > - Strict Mode - SyntaxError is thrown if the identifier 'arguments' - appear as a PostfixExpression(arguments++) + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. +info: | + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: LeftHandSideExpression ++ + + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/postfix-increment/eval-nostrict.js b/test/language/expressions/postfix-increment/eval-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..10135e5d0bd87c905ce7aa96e05318162aab9efb --- /dev/null +++ b/test/language/expressions/postfix-increment/eval-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : LeftHandSideExpression ++ + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression : LeftHandSideExpression ++ + + It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +eval++; diff --git a/test/language/expressions/postfix-increment/eval.js b/test/language/expressions/postfix-increment/eval.js index 329dae9e1c147faac78736eaaccf0340982a4d64..503d485aa9da3112ae938bee9510c185cf54f415 100644 --- a/test/language/expressions/postfix-increment/eval.js +++ b/test/language/expressions/postfix-increment/eval.js @@ -2,11 +2,17 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.3.1-2-2-s -esid: postfix-increment-operator +esid: sec-identifiers-static-semantics-assignmenttargettype description: > - Strict Mode - SyntaxError is thrown if the identifier 'eval' - appear as a PostfixExpression(eval++) + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. +info: | + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: LeftHandSideExpression ++ + + It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/postfix-increment/non-simple.js b/test/language/expressions/postfix-increment/non-simple.js deleted file mode 100644 index 5494f1be5bf6d9db18694ba573bf52679ba4d122..0000000000000000000000000000000000000000 --- a/test/language/expressions/postfix-increment/non-simple.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - It is an early Reference Error if IsValidSimpleAssignmentTarget of - LeftHandSideExpression is false. -es6id: 12.4.1 -description: Applied to a non-simple assignment target -negative: - phase: parse - type: ReferenceError ----*/ - -$DONOTEVALUATE(); - -1++; diff --git a/test/language/expressions/prefix-decrement/arguments-nostrict.js b/test/language/expressions/prefix-decrement/arguments-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..0d3aeb831e7dccd6fedfc2ff1378dffeb3c0b8e9 --- /dev/null +++ b/test/language/expressions/prefix-decrement/arguments-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : -- UnaryExpression + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression -- UnaryExpression + + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +--arguments; diff --git a/test/language/expressions/prefix-decrement/arguments.js b/test/language/expressions/prefix-decrement/arguments.js index a74055705670a415fcd72a81e7f9e20ce7c99b04..1bb3f7c3e31e833cfd9ea0b1bc064312644ec5f7 100644 --- a/test/language/expressions/prefix-decrement/arguments.js +++ b/test/language/expressions/prefix-decrement/arguments.js @@ -2,9 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.4.5-2-2-s -esid: sec-prefix-decrement-operator -description: Strict Mode - SyntaxError is thrown for --arguments +esid: sec-update-expressions +description: > + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (arguments) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: -- UnaryExpression + + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/prefix-decrement/eval-nostrict.js b/test/language/expressions/prefix-decrement/eval-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..0716961449eab7e71232e7eb1b02c2af0b001612 --- /dev/null +++ b/test/language/expressions/prefix-decrement/eval-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : -- UnaryExpression + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression -- UnaryExpression + + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +--eval; diff --git a/test/language/expressions/prefix-decrement/eval.js b/test/language/expressions/prefix-decrement/eval.js index cd5737c98ad56722b7e81f08203eabb812a3b30e..5650117b47d0c9d15d2ade6d87aa6e784be3e1b5 100644 --- a/test/language/expressions/prefix-decrement/eval.js +++ b/test/language/expressions/prefix-decrement/eval.js @@ -2,9 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.4.5-2-1-s -esid: sec-prefix-decrement-operator -description: Strict Mode - SyntaxError is thrown for --eval +esid: sec-update-expressions +description: > + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (eval) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: -- UnaryExpression + + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/prefix-decrement/non-simple.js b/test/language/expressions/prefix-decrement/non-simple.js deleted file mode 100644 index e11e1e6966efde26c8c44072f58882a92ec2cf30..0000000000000000000000000000000000000000 --- a/test/language/expressions/prefix-decrement/non-simple.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - It is an early Reference Error if IsValidSimpleAssignmentTarget of - UnaryExpression is false. -es5id: 12.5.1 -description: Applied to a non-simple assignment target -negative: - phase: parse - type: ReferenceError ----*/ - -$DONOTEVALUATE(); - ---1; diff --git a/test/language/expressions/prefix-increment/arguments-nostrict.js b/test/language/expressions/prefix-increment/arguments-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..469292acbdeaeb74ec53425f19b157de396e7232 --- /dev/null +++ b/test/language/expressions/prefix-increment/arguments-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : ++ UnaryExpression + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression ++ UnaryExpression + + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +++arguments; diff --git a/test/language/expressions/prefix-increment/arguments.js b/test/language/expressions/prefix-increment/arguments.js index c8e0c2e0398f6ea1bbb430e335cf39d3beaf6993..1c88097c365f170867e3fed8a11179c0f75e1e0d 100644 --- a/test/language/expressions/prefix-increment/arguments.js +++ b/test/language/expressions/prefix-increment/arguments.js @@ -2,9 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.4.4-2-2-s -esid: sec-prefix-increment-operator -description: Strict Mode - SyntaxError is thrown for ++arguments +esid: sec-update-expressions +description: > + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (arguments) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: ++ UnaryExpression + + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/prefix-increment/eval-nostrict.js b/test/language/expressions/prefix-increment/eval-nostrict.js new file mode 100644 index 0000000000000000000000000000000000000000..9f6258bcd98320508f63f1e0bda79ade85054c20 --- /dev/null +++ b/test/language/expressions/prefix-increment/eval-nostrict.js @@ -0,0 +1,30 @@ +// Copyright (c) 2018 Rick Waldron. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-update-expressions +description: > + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval) +info: | + + sec-update-expressions-static-semantics-assignmenttargettype + + UpdateExpression : ++ UnaryExpression + + Return invalid. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression ++ UnaryExpression + + It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. + +flags: [noStrict] +negative: + phase: parse + type: ReferenceError +---*/ + +$DONOTEVALUATE(); + +++eval; diff --git a/test/language/expressions/prefix-increment/eval.js b/test/language/expressions/prefix-increment/eval.js index c8477cef8b30e0b5669e12d198d2387bed5fd3e8..bca64aee012f60e0ad4500b134fadc9eadfc4a55 100644 --- a/test/language/expressions/prefix-increment/eval.js +++ b/test/language/expressions/prefix-increment/eval.js @@ -2,9 +2,21 @@ // This code is governed by the BSD license found in the LICENSE file. /*--- -es5id: 11.4.4-2-1-s -esid: sec-prefix-increment-operator -description: Strict Mode - SyntaxError is thrown for ++eval +esid: sec-update-expressions +description: > + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. (eval) +info: | + + sec-identifiers-static-semantics-assignmenttargettype + + If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict. + + sec-update-expressions-static-semantics-early-errors + + UpdateExpression: ++ UnaryExpression + + It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict. + flags: [onlyStrict] negative: phase: parse diff --git a/test/language/expressions/prefix-increment/non-simple.js b/test/language/expressions/prefix-increment/non-simple.js deleted file mode 100644 index 300ecf4849a5d218c41689ab32d1d37c4dee0cfe..0000000000000000000000000000000000000000 --- a/test/language/expressions/prefix-increment/non-simple.js +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: | - It is an early Reference Error if IsValidSimpleAssignmentTarget of - UnaryExpression is false. -es6id: 12.5.1 -description: Applied to a non-simple assignment target -negative: - phase: parse - type: ReferenceError ----*/ - -$DONOTEVALUATE(); - -++1;