UpdateExpressions: No early error for arguments and eval in non-strict mode

According to sec-identifiers-static-semantics-assignmenttargettype,
`AssignmentTargetType` of `arguments` and `eval` in non-strict mode code is
`simple`.
sec-update-expressions-static-semantics-early-errors mandates early errors for
`UpdateExpression` if `AssignmentTargetType` is `invalid` or `strict`.
This commit is contained in:
Adrian Heine 2019-01-24 10:17:27 +01:00 committed by Rick Waldron
parent 116c95d97c
commit 04a41383b5
8 changed files with 32 additions and 72 deletions

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments) It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : LeftHandSideExpression -- 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression : LeftHandSideExpression -- UpdateExpression : LeftHandSideExpression --
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
arguments--; arguments--;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval) It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : LeftHandSideExpression -- 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression : LeftHandSideExpression -- UpdateExpression : LeftHandSideExpression --
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
eval--; eval--;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments) It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (arguments)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : LeftHandSideExpression ++ 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression : LeftHandSideExpression ++ UpdateExpression : LeftHandSideExpression ++
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
arguments++; arguments++;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval) It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. (eval)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : LeftHandSideExpression ++ 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression : LeftHandSideExpression ++ UpdateExpression : LeftHandSideExpression ++
It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid. It is an early Reference Error if AssignmentTargetType of LeftHandSideExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of LeftHandSideExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
eval++; eval++;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments) It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : -- UnaryExpression 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression -- UnaryExpression UpdateExpression -- UnaryExpression
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
--arguments; --arguments;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval) It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : -- UnaryExpression 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression -- UnaryExpression UpdateExpression -- UnaryExpression
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
--eval; --eval;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments) It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (arguments)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : ++ UnaryExpression 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression ++ UnaryExpression UpdateExpression ++ UnaryExpression
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
++arguments; ++arguments;

View File

@ -7,24 +7,19 @@ description: >
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval) It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. (eval)
info: | info: |
sec-update-expressions-static-semantics-assignmenttargettype sec-identifiers-static-semantics-assignmenttargettype
UpdateExpression : ++ UnaryExpression 1. If this IdentifierReference is contained in strict mode code and StringValue of Identifier is "eval" or "arguments", return strict.
2. Return simple.
Return invalid.
sec-update-expressions-static-semantics-early-errors sec-update-expressions-static-semantics-early-errors
UpdateExpression ++ UnaryExpression UpdateExpression ++ UnaryExpression
It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid. It is an early Reference Error if AssignmentTargetType of UnaryExpression is invalid.
It is an early Syntax Error if AssignmentTargetType of UnaryExpression is strict.
flags: [noStrict] flags: [noStrict]
negative:
phase: parse
type: ReferenceError
---*/ ---*/
$DONOTEVALUATE();
++eval; ++eval;