browser.js |
|
0 |
ctorExpr-fn-ref-before-args-eval-fn-wrapup.js |
---
esid: sec-new-operator
description: >
The constructExpr is referenced before arguments in the same EvaluateNew evaluation.
Function wrap-up to use the same function level binding ref.
info: |
NewExpression : new NewExpression
1. Return ? EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
1. Return ? EvaluateNew(MemberExpression, Arguments).
Runtime Semantics: EvaluateNew
3. Let ref be the result of evaluating constructExpr.
4. Let constructor be ? GetValue(ref).
5. If arguments is empty, let argList be a new empty List.
6. Else,
a. Let argList be ? ArgumentListEvaluation of arguments.
7. If IsConstructor(constructor) is false, throw a TypeError exception.
8. Return ? Construct(constructor, argList).
--- |
1107 |
ctorExpr-fn-ref-before-args-eval.js |
---
esid: sec-new-operator
description: >
The constructExpr is referenced before arguments in the same EvaluateNew evaluation.
info: |
NewExpression : new NewExpression
1. Return ? EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
1. Return ? EvaluateNew(MemberExpression, Arguments).
Runtime Semantics: EvaluateNew
3. Let ref be the result of evaluating constructExpr.
4. Let constructor be ? GetValue(ref).
5. If arguments is empty, let argList be a new empty List.
6. Else,
a. Let argList be ? ArgumentListEvaluation of arguments.
7. If IsConstructor(constructor) is false, throw a TypeError exception.
8. Return ? Construct(constructor, argList).
--- |
1007 |
ctorExpr-isCtor-after-args-eval-fn-wrapup.js |
---
esid: sec-new-operator
description: >
The IsConstructor(ctor) happens after evaluating the arguments, use the correct ctor.
Function wrap-up to use the same function level binding ref
info: |
NewExpression : new NewExpression
1. Return ? EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
1. Return ? EvaluateNew(MemberExpression, Arguments).
Runtime Semantics: EvaluateNew
3. Let ref be the result of evaluating constructExpr.
4. Let constructor be ? GetValue(ref).
5. If arguments is empty, let argList be a new empty List.
6. Else,
a. Let argList be ? ArgumentListEvaluation of arguments.
7. If IsConstructor(constructor) is false, throw a TypeError exception.
8. Return ? Construct(constructor, argList).
--- |
1174 |
ctorExpr-isCtor-after-args-eval.js |
---
esid: sec-new-operator
description: >
The IsConstructor(ctor) happens after evaluating the arguments, use the correct ctor
info: |
NewExpression : new NewExpression
1. Return ? EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
1. Return ? EvaluateNew(MemberExpression, Arguments).
Runtime Semantics: EvaluateNew
3. Let ref be the result of evaluating constructExpr.
4. Let constructor be ? GetValue(ref).
5. If arguments is empty, let argList be a new empty List.
6. Else,
a. Let argList be ? ArgumentListEvaluation of arguments.
7. If IsConstructor(constructor) is false, throw a TypeError exception.
8. Return ? Construct(constructor, argList).
--- |
982 |
non-ctor-err-realm.js |
---
esid: sec-new-operator
es6id: 12.3.3
description: Realm of error object produced when operand is not a constructor
info: |
NewExpression : new NewExpression
1. Return ? EvaluateNew(NewExpression, empty).
MemberExpression : new MemberExpression Arguments
1. Return ? EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
7. If IsConstructor(constructor) is false, throw a TypeError exception.
features: [cross-realm]
--- |
942 |
S11.2.2_A1.1.js |
---
info: |
White Space and Line Terminator between "new" and NewExpression are
allowed
es5id: 11.2.2_A1.1
description: Checking by using eval
--- |
1464 |
S11.2.2_A1.2.js |
---
info: |
White Space and Line Terminator between "new" and MemberExpression are
allowed
es5id: 11.2.2_A1.2
description: Checking by using eval
--- |
1487 |
S11.2.2_A2.js |
---
info: Operator "new" uses GetValue
es5id: 11.2.2_A2
description: >
If GetBase(NewExpression) or GetBase(MemberExpression) is null,
throw ReferenceError
--- |
811 |
S11.2.2_A3_T1.js |
---
info: |
If Type(NewExpression) or Type(MemberExpression) is not Object, throw
TypeError
es5id: 11.2.2_A3_T1
description: Checking boolean primitive case
--- |
1042 |
S11.2.2_A3_T2.js |
---
info: |
If Type(NewExpression) or Type(MemberExpression) is not Object, throw
TypeError
es5id: 11.2.2_A3_T2
description: Checking "number primitive" case
--- |
1014 |
S11.2.2_A3_T3.js |
---
info: |
If Type(NewExpression) or Type(MemberExpression) is not Object, throw
TypeError
es5id: 11.2.2_A3_T3
description: Checking "string primitive" case
--- |
1030 |
S11.2.2_A3_T4.js |
---
info: |
If Type(NewExpression) or Type(MemberExpression) is not Object, throw
TypeError
es5id: 11.2.2_A3_T4
description: Checking "undefined" case
--- |
1079 |
S11.2.2_A3_T5.js |
---
info: |
If Type(NewExpression) or Type(MemberExpression) is not Object, throw
TypeError
es5id: 11.2.2_A3_T5
description: Checking "null primitive" case
--- |
1039 |
S11.2.2_A4_T1.js |
---
info: |
If NewExpression or MemberExpression does not implement internal
[[Construct]] method, throw TypeError
es5id: 11.2.2_A4_T1
description: Checking Boolean object case
--- |
1179 |
S11.2.2_A4_T2.js |
---
info: |
If NewExpression or MemberExpression does not implement internal
[[Construct]] method, throw TypeError
es5id: 11.2.2_A4_T2
description: Checking Number object case
--- |
1134 |
S11.2.2_A4_T3.js |
---
info: |
If NewExpression or MemberExpression does not implement internal
[[Construct]] method, throw TypeError
es5id: 11.2.2_A4_T3
description: Checking String object case
--- |
1160 |
S11.2.2_A4_T4.js |
---
info: |
If NewExpression or MemberExpression does not implement internal
[[Construct]] method, throw TypeError
es5id: 11.2.2_A4_T4
description: Checking Global object case
--- |
777 |
S11.2.2_A4_T5.js |
---
info: |
If NewExpression or MemberExpression does not implement internal
[[Construct]] method, throw TypeError
es5id: 11.2.2_A4_T5
description: Checking Math object case
--- |
1058 |
shell.js |
|
0 |
spread-err-mult-err-expr-throws.js |
---
description: Spread operator following other arguments when evaluation throws (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [generators]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
--- |
1156 |
spread-err-mult-err-iter-get-value.js |
---
description: Spread operator following other arguments when GetIterator fails (@@iterator function return value) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
[...]
2. Let iterator be ? Call(method, obj).
3. If Type(iterator) is not Object, throw a TypeError exception.
--- |
1426 |
spread-err-mult-err-itr-get-call.js |
---
description: Spread operator following other arguments when GetIterator fails (@@iterator function invocation) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
[...]
3. Let iterator be Call(method,obj).
4. ReturnIfAbrupt(iterator).
--- |
1362 |
spread-err-mult-err-itr-get-get.js |
---
description: Spread operator following other arguments when GetIterator fails (@@iterator property access) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
1. If method was not passed, then
a. Let method be ? GetMethod(obj, @@iterator).
--- |
1402 |
spread-err-mult-err-itr-step.js |
---
description: Spread operator following other arguments when IteratorStep fails (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
7.4.5 IteratorStep ( iterator )
1. Let result be IteratorNext(iterator).
2. ReturnIfAbrupt(result).
7.4.2 IteratorNext ( iterator, value )
1. If value was not passed, then
a. Let result be Invoke(iterator, "next", « »).
[...]
3. ReturnIfAbrupt(result).
--- |
1545 |
spread-err-mult-err-itr-value.js |
---
description: Spread operator following other arguments when IteratorValue fails (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
7.4.4 IteratorValue ( iterResult )
1. Assert: Type(iterResult) is Object.
2. Return Get(iterResult, "value").
7.3.1 Get (O, P)
[...]
3. Return O.[[Get]](P, O).
--- |
1552 |
spread-err-mult-err-obj-unresolvable.js |
---
description: Object Spread operator results in error when using an unresolvable reference (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1189 |
spread-err-mult-err-unresolvable.js |
---
description: Spread operator following other arguments when reference is unresolvable (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
6.2.3.1 GetValue (V)
1. ReturnIfAbrupt(V).
2. If Type(V) is not Reference, return V.
3. Let base be GetBase(V).
4. If IsUnresolvableReference(V), throw a ReferenceError exception.
--- |
1323 |
spread-err-sngl-err-expr-throws.js |
---
description: Spread operator applied to the only argument when evaluation throws (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [generators]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
--- |
1141 |
spread-err-sngl-err-itr-get-call.js |
---
description: Spread operator applied to the only argument when GetIterator fails (@@iterator function invocation) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
[...]
3. Let iterator be Call(method,obj).
4. ReturnIfAbrupt(iterator).
--- |
1348 |
spread-err-sngl-err-itr-get-get.js |
---
description: Spread operator applied to the only argument when GetIterator fails (@@iterator property access) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
1. If method was not passed, then
a. Let method be ? GetMethod(obj, @@iterator).
--- |
1388 |
spread-err-sngl-err-itr-get-value.js |
---
description: Spread operator applied to the only argument when GetIterator fails (@@iterator function return value) (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
7.4.1 GetIterator ( obj, method )
[...]
2. Let iterator be ? Call(method, obj).
3. If Type(iterator) is not Object, throw a TypeError exception.
--- |
1374 |
spread-err-sngl-err-itr-step.js |
---
description: Spread operator applied to the only argument when IteratorStep fails (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
7.4.5 IteratorStep ( iterator )
1. Let result be IteratorNext(iterator).
2. ReturnIfAbrupt(result).
7.4.2 IteratorNext ( iterator, value )
1. If value was not passed, then
a. Let result be Invoke(iterator, "next", « »).
[...]
3. ReturnIfAbrupt(result).
--- |
1623 |
spread-err-sngl-err-itr-value.js |
---
description: Spread operator applied to the only argument when IteratorValue fails (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
d. Let nextArg be IteratorValue(next).
e. ReturnIfAbrupt(nextArg).
7.4.4 IteratorValue ( iterResult )
1. Assert: Type(iterResult) is Object.
2. Return Get(iterResult, "value").
7.3.1 Get (O, P)
[...]
3. Return O.[[Get]](P, O).
--- |
1752 |
spread-err-sngl-err-obj-unresolvable.js |
---
description: Object Spread operator results in error when using an unresolvable reference (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1183 |
spread-err-sngl-err-unresolvable.js |
---
description: Spread operator applied to the only argument when reference is unresolvable (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6.2.3.1 GetValue (V)
1. ReturnIfAbrupt(V).
2. If Type(V) is not Reference, return V.
3. Let base be GetBase(V).
4. If IsUnresolvableReference(V), throw a ReferenceError exception.
--- |
1309 |
spread-mult-empty.js |
---
description: Spread operator following other arguments when no iteration occurs (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
5. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return precedingArgs.
--- |
1410 |
spread-mult-expr.js |
---
description: Spread operator applied to AssignmentExpression following other elements (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
5. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return precedingArgs.
--- |
1571 |
spread-mult-iter.js |
---
description: Spread operator following other arguments with a valid iterator (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
d. Let nextArg be IteratorValue(next).
e. ReturnIfAbrupt(nextArg).
f. Append nextArg as the last element of list.
--- |
1823 |
spread-mult-literal.js |
---
description: Spread operator applied to AssignmentExpression following other elements (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ArgumentList , ... AssignmentExpression
1. Let precedingArgs be the result of evaluating ArgumentList.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let iterator be GetIterator(GetValue(spreadRef) ).
4. ReturnIfAbrupt(iterator).
5. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return precedingArgs.
--- |
1496 |
spread-mult-obj-ident.js |
---
description: Object Spread operator following other properties (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
includes: [propertyHelper.js]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1726 |
spread-mult-obj-null.js |
---
description: Object Spread operator following other arguments with null value (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1290 |
spread-mult-obj-undefined.js |
---
description: Object Spread operator following other arguments with undefined (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1299 |
spread-obj-getter-descriptor.js |
---
description: Spread operation with getter results in data property descriptor (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
includes: [propertyHelper.js]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1494 |
spread-obj-getter-init.js |
---
description: Getter in object literal is not evaluated (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
--- |
1009 |
spread-obj-manipulate-outter-obj-in-getter.js |
---
description: Getter manipulates outter object before it's spread operation (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1491 |
spread-obj-mult-spread-getter.js |
---
description: Multiple Object Spread usage calls getter multiple times (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1424 |
spread-obj-mult-spread.js |
---
description: Multiple Object Spread operation (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1359 |
spread-obj-null.js |
---
description: Null Object Spread is ignored (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1178 |
spread-obj-override-immutable.js |
---
description: Object Spread overriding immutable properties (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
includes: [propertyHelper.js]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
--- |
1223 |
spread-obj-overrides-prev-properties.js |
---
description: Object Spread properties overrides previous definitions (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1373 |
spread-obj-skip-non-enumerable.js |
---
description: Object Spread doesn't copy non-enumerable properties (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
--- |
965 |
spread-obj-spread-order.js |
---
description: Spread operation follows [[OwnPropertyKeys]] order (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol, object-spread]
flags: [generated]
includes: [compareArray.js]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1573 |
spread-obj-symbol-property.js |
---
description: Spread operation where source object contains Symbol properties (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol, object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1482 |
spread-obj-undefined.js |
---
description: Undefined Object Spread is ignored (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1193 |
spread-obj-with-overrides.js |
---
description: Object Spread properties being overriden (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol, object-spread]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1653 |
spread-sngl-empty.js |
---
description: Spread operator applied to the only argument when no iteration occurs (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
[...]
--- |
1283 |
spread-sngl-expr.js |
---
description: Spread operator applied to AssignmentExpression as only element (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
d. Let nextArg be IteratorValue(next).
e. ReturnIfAbrupt(nextArg).
f. Append nextArg as the last element of list.
--- |
1594 |
spread-sngl-iter.js |
---
description: Spread operator applied to the only argument with a valid iterator (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [Symbol.iterator]
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
d. Let nextArg be IteratorValue(next).
e. ReturnIfAbrupt(nextArg).
f. Append nextArg as the last element of list.
--- |
1706 |
spread-sngl-literal.js |
---
description: Spread operator applied to array literal as only element (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
flags: [generated]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
12.3.6.1 Runtime Semantics: ArgumentListEvaluation
ArgumentList : ... AssignmentExpression
1. Let list be an empty List.
2. Let spreadRef be the result of evaluating AssignmentExpression.
3. Let spreadObj be GetValue(spreadRef).
4. Let iterator be GetIterator(spreadObj).
5. ReturnIfAbrupt(iterator).
6. Repeat
a. Let next be IteratorStep(iterator).
b. ReturnIfAbrupt(next).
c. If next is false, return list.
d. Let nextArg be IteratorValue(next).
e. ReturnIfAbrupt(nextArg).
f. Append nextArg as the last element of list.
--- |
1512 |
spread-sngl-obj-ident.js |
---
description: Object Spread operator without other arguments (`new` operator)
esid: sec-new-operator-runtime-semantics-evaluation
features: [object-spread]
flags: [generated]
includes: [propertyHelper.js]
info: |
MemberExpression : new MemberExpression Arguments
1. Return EvaluateNew(MemberExpression, Arguments).
12.3.3.1.1 Runtime Semantics: EvaluateNew
6. If arguments is empty, let argList be an empty List.
7. Else,
a. Let argList be ArgumentListEvaluation of arguments.
[...]
Pending Runtime Semantics: PropertyDefinitionEvaluation
PropertyDefinition:...AssignmentExpression
1. Let exprValue be the result of evaluating AssignmentExpression.
2. Let fromValue be GetValue(exprValue).
3. ReturnIfAbrupt(fromValue).
4. Let excludedNames be a new empty List.
5. Return CopyDataProperties(object, fromValue, excludedNames).
--- |
1481 |