Generate tests

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
This commit is contained in:
Rick Waldron 2017-05-22 16:03:23 -04:00
parent f6dd54eb19
commit 0a66e9b9de
978 changed files with 4200 additions and 3703 deletions

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-close.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-init-iter-close.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Iterator is closed when not exhausted by pattern evaluation (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -49,10 +49,10 @@ var doneCallCount = 0;
var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
next() {
return { value: null, done: false };
},
return: function() {
return() {
doneCallCount += 1;
return {};
}

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-get-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-init-iter-get-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Abrupt completion returned by GetIterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -39,8 +39,7 @@ info: |
BindingPattern : ArrayBindingPattern
1. Let iterator be GetIterator(value).
2. ReturnIfAbrupt(iterator).
1. Let iterator be ? GetIterator(value).
---*/
var iter = {};
@ -55,6 +54,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-no-close.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-init-iter-no-close.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Iterator is not closed when exhausted by pattern evaluation (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -49,10 +49,10 @@ var doneCallCount = 0;
var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
next() {
return { value: null, done: true };
},
return: function() {
return() {
doneCallCount += 1;
return {};
}

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-name-iter-val.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-name-iter-val.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding with normal value iteration (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,23 +37,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elem-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elem-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elem-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elem-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elision-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elision-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elision-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elision-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-empty-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-empty-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-empty-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-empty-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-rest-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-rest-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-rest-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-rest-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-val-null.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-val-null.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Nested array destructuring with a null value (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPattern Initializeropt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
[...]
@ -51,8 +51,7 @@ info: |
BindingPattern : ArrayBindingPattern
1. Let iterator be GetIterator(value).
2. ReturnIfAbrupt(iterator).
1. Let iterator be ? GetIterator(value).
---*/
async function fn() {
@ -62,6 +61,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, TypeError))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, TypeError);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Destructuring initializer with an exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,16 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
6. If Initializer is present and v is undefined, then
4. If iteratorRecord.[[done]] is true, let v be undefined.
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-arrow.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-arrow.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding does assign name to arrow functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-class.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-class.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding assigns `name` to "anonymous" classes (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-cover.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-cover.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding does assign name to "anonymous" functions "through" cover grammar (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-fn.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-fn.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding assigns name to "anonymous" functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-gen.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-gen.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding assigns name to "anonymous" generator functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-hole.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-hole.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Destructuring initializer with a "hole" (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -36,12 +36,12 @@ info: |
[...]
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
[...] 6. If Initializer is present and v is undefined, then
SingleNameBinding : BindingIdentifier Initializer_opt
[...] 5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v). 8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v). 7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-skipped.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-skipped.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Destructuring initializer is not evaluated when value is not `undefined` (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,13 +37,13 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var initCount = 0;
function counter() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-throws.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-throws.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Destructuring initializer returns an abrupt completion (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,13 +37,12 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
b. Set v to ? GetValue(defaultValue).
---*/
async function fn() {
@ -53,6 +52,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-undef.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-undef.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Destructuring initializer with an undefined value (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,15 +37,15 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-unresolvable.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-unresolvable.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Destructuring initializer is an unresolvable reference (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,15 +37,14 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
b. Set v to ? GetValue(defaultValue).
6.2.3.1 GetValue (V)
6.2.4.1 GetValue ( V )
1. ReturnIfAbrupt(V).
2. If Type(V) is not Reference, return V.
@ -60,6 +59,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, ReferenceError))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, ReferenceError);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-complete.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-complete.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding when value iteration completes (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,19 +37,19 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-done.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-done.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding when value iteration was completed previously (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,14 +37,14 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-step-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-step-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Error forwarding when IteratorStep returns an abrupt completion (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,10 +37,10 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
@ -48,7 +48,7 @@ info: |
var g = {};
g[Symbol.iterator] = function() {
return {
next: function() {
next() {
throw new Test262Error();
}
};
@ -61,6 +61,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-val-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-val-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Error forwarding when IteratorValue returns an abrupt completion (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,10 +37,10 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
@ -59,7 +59,7 @@ var poisonedValue = Object.defineProperty({}, 'value', {
var g = {};
g[Symbol.iterator] = function() {
return {
next: function() {
next() {
return poisonedValue;
}
};
@ -72,6 +72,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-val.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-val.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: SingleNameBinding when value iteration was completed previously (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,23 +37,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-id-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-id-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with object binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with object binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-prop-id-init.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-prop-id-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with object binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-prop-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-prop-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: BindingElement with object binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-val-null.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-val-null.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Nested object destructuring with a null value (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPattern Initializeropt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
[...]
@ -62,6 +62,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, TypeError))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, TypeError);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-val-undef.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-val-undef.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Nested object destructuring with a value of `undefined` (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPattern Initializeropt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
[...]
@ -62,6 +62,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, TypeError))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, TypeError);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elision-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Elision accepts exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision-iter-close.case
// - src/dstr-binding/iter-close/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elision-iter-close.case
// - src/dstr-binding-for-await/iter-close/for-await-of-async-func-const.template
/*---
description: The iterator is properly consumed by the destructuring pattern (for-await-of statement in an async function)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision-step-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elision-step-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Elision advances iterator and forwards abrupt completions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -54,7 +54,7 @@ info: |
---*/
var following = 0;
var iter =function* () {
var iter = function* () {
throw new Test262Error();
following += 1;
}();
@ -66,9 +66,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
assert.sameValue(following, 0, "iterator is properly closed");
})
.then($DONE, $DONE);
iter.next();
assert.sameValue(following, 0, 'Iterator was properly closed.');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Elision advances iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-empty.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-empty.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: No iteration occurs for an "empty" array binding pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-elem.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-elem.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing an array BindingElementList pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -50,23 +50,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing an elision (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-empty.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-empty.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing an "empty" array pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-rest.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-rest.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing a rest element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-elision-next-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-elision-next-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Rest element following elision elements (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -55,6 +55,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element following elision elements (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: RestElement applied to an exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-iter-close.case
// - src/dstr-binding/iter-close/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-iter-close.case
// - src/dstr-binding-for-await/iter-close/for-await-of-async-func-const.template
/*---
description: The iterator is properly consumed by the destructuring pattern (for-await-of statement in an async function)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-iter-step-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-iter-step-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Error forwarding when IteratorStep returns an abrupt completion (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -62,10 +62,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);
iter.next();
assert.sameValue(first, 1);
assert.sameValue(second, 0, 'Iterator is closed following abrupt completion.');

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-iter-val-err.case
// - src/dstr-binding/error/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-iter-val-err.case
// - src/dstr-binding-for-await/error/for-await-of-async-func-const.template
/*---
description: Error forwarding when IteratorValue returns an abrupt completion (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -55,7 +55,7 @@ var poisonedValue = Object.defineProperty({}, 'value', {
var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
next() {
return poisonedValue;
}
};
@ -68,6 +68,11 @@ async function fn() {
}
fn()
.then(_ => { throw new Test262Error("Expected async function to reject, but resolved."); }, ({ constructor }) => assert.sameValue(constructor, Test262Error))
.then(_ => {
throw new Test262Error("Expected async function to reject, but resolved.");
}, ({ constructor }) => {
assert.sameValue(constructor, Test262Error);
})
.then($DONE, $DONE);

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Lone rest element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-ary.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-ary.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Reset element (nested array pattern) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Reset element (identifier) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-obj.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-obj.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Reset element (nested object pattern) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-not-final-ary.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-not-final-ary.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element (array binding pattern) may not be followed by any element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-not-final-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-not-final-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element (identifier) may not be followed by any element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-not-final-obj.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-not-final-obj.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element (object binding pattern) may not be followed by any element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-obj-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-obj-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing an object binding pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-obj-prop-id.case
// - src/dstr-binding/default/for-await-of-async-func-const.template
// - src/dstr-binding-for-await/ary-ptrn-rest-obj-prop-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template
/*---
description: Rest element containing an object binding pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-close.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-init-iter-close.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Iterator is closed when not exhausted by pattern evaluation (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -49,10 +49,10 @@ var doneCallCount = 0;
var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
next() {
return { value: null, done: false };
},
return: function() {
return() {
doneCallCount += 1;
return {};
}

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-init-iter-no-close.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-init-iter-no-close.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Iterator is not closed when exhausted by pattern evaluation (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -49,10 +49,10 @@ var doneCallCount = 0;
var iter = {};
iter[Symbol.iterator] = function() {
return {
next: function() {
next() {
return { value: null, done: true };
},
return: function() {
return() {
doneCallCount += 1;
return {};
}

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-name-iter-val.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-name-iter-val.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding with normal value iteration (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,23 +37,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elem-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elem-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elem-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elem-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elision-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elision-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-elision-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-elision-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-empty-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-empty-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-empty-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-empty-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-rest-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-rest-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-ary-rest-iter.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-ary-rest-iter.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with array binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
1. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Destructuring initializer with an exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,16 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
6. If Initializer is present and v is undefined, then
4. If iteratorRecord.[[done]] is true, let v be undefined.
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-arrow.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-arrow.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding does assign name to arrow functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-class.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-class.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding assigns `name` to "anonymous" classes (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-cover.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-cover.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding does assign name to "anonymous" functions "through" cover grammar (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-fn.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-fn.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding assigns name to "anonymous" functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-fn-name-gen.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-fn-name-gen.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding assigns name to "anonymous" generator functions (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,17 +37,16 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
c. ReturnIfAbrupt(v).
d. If IsAnonymousFunctionDefinition(Initializer) is true, then
b. Set v to ? GetValue(defaultValue).
c. If IsAnonymousFunctionDefinition(Initializer) is true, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-hole.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-hole.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Destructuring initializer with a "hole" (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -36,12 +36,12 @@ info: |
[...]
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
[...] 6. If Initializer is present and v is undefined, then
SingleNameBinding : BindingIdentifier Initializer_opt
[...] 5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v). 8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v). 7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-skipped.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-skipped.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Destructuring initializer is not evaluated when value is not `undefined` (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,13 +37,13 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var initCount = 0;
function counter() {

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-init-undef.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-init-undef.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Destructuring initializer with an undefined value (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,15 +37,15 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
6. If Initializer is present and v is undefined, then
5. If Initializer is present and v is undefined, then
a. Let defaultValue be the result of evaluating Initializer.
b. Let v be GetValue(defaultValue).
[...]
7. If environment is undefined, return PutValue(lhs, v).
8. Return InitializeReferencedBinding(lhs, v).
6. If environment is undefined, return PutValue(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-complete.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-complete.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding when value iteration completes (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,19 +37,19 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-done.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-done.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding when value iteration was completed previously (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,14 +37,14 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
[...]
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-id-iter-val.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-id-iter-val.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: SingleNameBinding when value iteration was completed previously (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,23 +37,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-id-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-id-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with object binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-id.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with object binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-prop-id-init.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-prop-id-init.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with object binding pattern and initializer is used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elem-obj-prop-id.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elem-obj-prop-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: BindingElement with object binding pattern and initializer is not used (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -37,7 +37,7 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
BindingElement : BindingPatternInitializer opt
BindingElement : BindingPattern Initializer_opt
[...]
2. If iteratorRecord.[[done]] is true, let v be undefined.

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elision-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Elision accepts exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Elision advances iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-empty.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-empty.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: No iteration occurs for an "empty" array binding pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-elem.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-elem.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element containing an array BindingElementList pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation
@ -50,23 +50,22 @@ info: |
13.3.3.6 Runtime Semantics: IteratorBindingInitialization
SingleNameBinding : BindingIdentifier Initializeropt
SingleNameBinding : BindingIdentifier Initializer_opt
[...]
4. If iteratorRecord.[[done]] is false, then
3. If iteratorRecord.[[done]] is false, then
a. Let next be IteratorStep(iteratorRecord.[[iterator]]).
b. If next is an abrupt completion, set iteratorRecord.[[done]] to true.
c. ReturnIfAbrupt(next).
d. If next is false, set iteratorRecord.[[done]] to true.
e. Else,
[...]
i. Let v be IteratorValue(next).
ii. If v is an abrupt completion, set
iteratorRecord.[[done]] to true.
iii. ReturnIfAbrupt(v).
5. If iteratorRecord.[[done]] is true, let v be undefined.
4. If iteratorRecord.[[done]] is true, let v be undefined.
[...]
8. Return InitializeReferencedBinding(lhs, v).
7. Return InitializeReferencedBinding(lhs, v).
---*/
var iterCount = 0;

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element containing an elision (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-empty.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-empty.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element containing an "empty" array pattern (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-ary-rest.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-ary-rest.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element containing a rest element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-elision.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-elision.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element following elision elements (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id-exhausted.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id-exhausted.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: RestElement applied to an exhausted iterator (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-id.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Lone rest element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-ary.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-ary.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Reset element (nested array pattern) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-id.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-id.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Reset element (identifier) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-init-obj.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-init-obj.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Reset element (nested object pattern) does not support initializer (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

View File

@ -1,6 +1,6 @@
// This file was procedurally generated from the following sources:
// - src/dstr-binding/ary-ptrn-rest-not-final-ary.case
// - src/dstr-binding/default/for-await-of-async-func-const-async.template
// - src/dstr-binding-for-await/ary-ptrn-rest-not-final-ary.case
// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template
/*---
description: Rest element (array binding pattern) may not be followed by any element (for-await-of statement)
esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation

Some files were not shown because too many files have changed in this diff Show More