diff --git a/src/dstr-assignment/obj-rest-nested-obj-nested-rest.case b/src/dstr-assignment/obj-rest-nested-obj-nested-rest.case deleted file mode 100644 index f6743cb6f9..0000000000 --- a/src/dstr-assignment/obj-rest-nested-obj-nested-rest.case +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - When DestructuringAssignmentTarget is an object literal, it should be parsed - parsed as a DestructuringAssignmentPattern and evaluated as a destructuring - assignment and object rest desconstruction is allowed in that case. -template: default -esid: pending -includes: [propertyHelper.js] -features: [object-rest] ----*/ - -//- setup -var a, b, c, rest; -//- elems -{a, b, ...{c, ...rest}} -//- vals -{a: 1, b: 2, c: 3, d: 4, e: 5} -//- body -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); - -assert.sameValue(rest.d, 4); -assert.sameValue(rest.e, 5); - -verifyEnumerable(rest, "d"); -verifyWritable(rest, "d"); -verifyConfigurable(rest, "d"); - -verifyEnumerable(rest, "e"); -verifyWritable(rest, "e"); -verifyConfigurable(rest, "e"); - diff --git a/src/dstr-assignment/obj-rest-nested-obj.case b/src/dstr-assignment/obj-rest-nested-obj.case deleted file mode 100644 index 3acb69150d..0000000000 --- a/src/dstr-assignment/obj-rest-nested-obj.case +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - When DestructuringAssignmentTarget is an object literal, it should be parsed - parsed as a DestructuringAssignmentPattern and evaluated as a destructuring - assignment. -template: default -esid: pending -features: [object-rest] ----*/ - -//- setup -var a, b, c, d, e; -//- elems -{a, b, ...{c, e}} -//- vals -{a: 1, b: 2, c: 3, d: 4, e: 5} -//- body -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); -assert.sameValue(e, 5); -assert.sameValue(d, undefined); - diff --git a/src/dstr-assignment/obj-rest-obj-own-property.case b/src/dstr-assignment/obj-rest-obj-own-property.case deleted file mode 100644 index 6c1d109ed1..0000000000 --- a/src/dstr-assignment/obj-rest-obj-own-property.case +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - Rest object contains just source object's own properties -template: default -esid: pending -features: [object-rest] ----*/ - -//- setup -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var x, y, z; -//- elems -{ x, ...{y , z} } -//- vals -o -//- body -assert.sameValue(x, 1); -assert.sameValue(y, undefined); -assert.sameValue(z, 3); - diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case b/src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case deleted file mode 100644 index 8fb0bb2d11..0000000000 --- a/src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - When DestructuringAssignmentTarget is an object literal, it should be parsed - parsed as a DestructuringAssignmentPattern and evaluated as a destructuring - assignment. -template: default -esid: pending -features: [object-rest] ----*/ - -//- setup -var obj = {a: 3, b: 4}; -//- elems -{a, b, ...{c, e}} -//- vals -{a: 1, b: 2, c: 3, d: 4, e: 5} -//- body -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); -assert.sameValue(e, 5); - diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case b/src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case deleted file mode 100644 index a6eb8c024d..0000000000 --- a/src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - When DestructuringAssignmentTarget is an object literal, it should be parsed - parsed as a DestructuringAssignmentPattern and evaluated as a destructuring - assignment and object rest desconstruction is allowed in that case. -template: default -esid: pending -includes: [propertyHelper.js] -features: [object-rest] ----*/ - -//- elems -{a, b, ...{c, ...rest}} -//- vals -{a: 1, b: 2, c: 3, d: 4, e: 5} -//- body -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); - -assert.sameValue(rest.d, 4); -assert.sameValue(rest.e, 5); - -verifyEnumerable(rest, "d"); -verifyWritable(rest, "d"); -verifyConfigurable(rest, "d"); - -verifyEnumerable(rest, "e"); -verifyWritable(rest, "e"); -verifyConfigurable(rest, "e"); - diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case b/src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case deleted file mode 100644 index 71c375adc8..0000000000 --- a/src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -desc: > - Rest object contains just soruce object's own properties -template: default -esid: pending -includes: [propertyHelper.js] -features: [object-rest] ----*/ - -//- setup -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; -//- elems -{ x, ...{y , z} } -//- vals -o -//- body -assert.sameValue(x, 1); -assert.sameValue(y, undefined); -assert.sameValue(z, 3); - diff --git a/src/spread/mult-err-obj-getter-throws.case b/src/spread/mult-err-obj-getter-throws.case deleted file mode 100644 index ff59a858f4..0000000000 --- a/src/spread/mult-err-obj-getter-throws.case +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator results in error when there is an getter that throws an exception -template: error -esid: pending -info: | - 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). -features: [object-spread] ----*/ - -//- error -Test262Error -//- args -{a: 1, ...{ get foo() { throw new Test262Error(); } }} diff --git a/src/spread/mult-obj-base.case b/src/spread/mult-obj-base.case deleted file mode 100644 index 8c0f24439f..0000000000 --- a/src/spread/mult-obj-base.case +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator following other arguments -template: default -esid: pending -includes: [propertyHelper.js] -info: | - 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). -features: [object-spread] ----*/ - -//- args -{a: 1, b: 2, ...{c: 3, d: 4}} -//- params -obj -//- body -assert.sameValue(obj.a, 1); -assert.sameValue(obj.b, 2); -assert.sameValue(obj.c, 3); -assert.sameValue(obj.d, 4); -assert.sameValue(Object.keys(obj).length, 4); - -verifyEnumerable(obj, "c"); -verifyWritable(obj, "c"); -verifyConfigurable(obj, "c"); - -verifyEnumerable(obj, "d"); -verifyWritable(obj, "d"); -verifyConfigurable(obj, "d"); - diff --git a/src/spread/mult-obj-empty.case b/src/spread/mult-obj-empty.case deleted file mode 100644 index d7fff6587f..0000000000 --- a/src/spread/mult-obj-empty.case +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator following other arguments with empty object -template: default -esid: pending -info: | - 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). -features: [object-spread] ----*/ - -//- args -{a: 1, b: 2, ...{}} -//- params -obj -//- body -assert.sameValue(obj.a, 1); -assert.sameValue(obj.b, 2); -assert.sameValue(Object.keys(obj).length, 2); diff --git a/src/spread/mult-obj-null-empty-undefined.case b/src/spread/mult-obj-null-empty-undefined.case deleted file mode 100644 index b8d010139c..0000000000 --- a/src/spread/mult-obj-null-empty-undefined.case +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator following other arguments with null, undefined and empty object -template: default -esid: pending -includes: [compareArray.js] -info: | - 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). -features: [object-spread] ----*/ - -//- args -{a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4} -//- params -obj -//- body -assert.sameValue(obj.a, 1); -assert.sameValue(obj.b, 2); -assert.sameValue(obj.c, 3); -assert.sameValue(obj.d, 4); -assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"])); diff --git a/src/spread/obj-setter-redef.case b/src/spread/obj-setter-redef.case deleted file mode 100644 index 3354d77ca0..0000000000 --- a/src/spread/obj-setter-redef.case +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Setter are not executed when redefined in Object Spread -template: default -esid: pending -features: [object-spread] ----*/ - -//- setup -let executedSetter = false; - -//- args -{set c(v) { executedSetter = true; }, ...{c: 1}} -//- params -obj -//- body -assert.sameValue(obj.c, 1); -assert.sameValue(executedSetter, false); -assert.sameValue(Object.keys(obj).length, 1); diff --git a/src/spread/sngl-err-obj-getter-throws.case b/src/spread/sngl-err-obj-getter-throws.case deleted file mode 100644 index 98b58892bd..0000000000 --- a/src/spread/sngl-err-obj-getter-throws.case +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator results in error when there is an getter that throws an exception -template: error -esid: pending -info: | - 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). - -features: [object-spread] ----*/ - -//- error -Test262Error -//- args -{...{ get foo() { throw new Test262Error(); } }} diff --git a/src/spread/sngl-obj-base.case b/src/spread/sngl-obj-base.case deleted file mode 100644 index b00f328bfd..0000000000 --- a/src/spread/sngl-obj-base.case +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator without other arguments -template: default -esid: pending -includes: [propertyHelper.js] -info: | - 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). -features: [object-spread] ----*/ - -//- args -{...{c: 3, d: 4}} -//- params -obj -//- body -assert.sameValue(obj.c, 3); -assert.sameValue(obj.d, 4); -assert.sameValue(Object.keys(obj).length, 2); - -verifyEnumerable(obj, "c"); -verifyWritable(obj, "c"); -verifyConfigurable(obj, "c"); - -verifyEnumerable(obj, "d"); -verifyWritable(obj, "d"); -verifyConfigurable(obj, "d"); diff --git a/src/spread/sngl-obj-empty.case b/src/spread/sngl-obj-empty.case deleted file mode 100644 index 4fbeaa70ae..0000000000 --- a/src/spread/sngl-obj-empty.case +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (C) 2017 Caio Lima. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -desc: Object Spread operator on a single empty object -template: default -esid: pending -info: | - 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). -features: [object-spread] ----*/ - -//- args -{...{}} -//- params -obj -//- body -assert.sameValue(Object.keys(obj).length, 0); diff --git a/test/language/expressions/array/spread-err-mult-err-obj-getter-throws.js b/test/language/expressions/array/spread-err-mult-err-obj-getter-throws.js deleted file mode 100644 index 7dfdd191dc..0000000000 --- a/test/language/expressions/array/spread-err-mult-err-obj-getter-throws.js +++ /dev/null @@ -1,39 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-err-obj-getter-throws.case -// - src/spread/error/array.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -assert.throws(Test262Error, function() { - [{a: 1, ...{ get foo() { throw new Test262Error(); } }}]; -}); diff --git a/test/language/expressions/array/spread-err-sngl-err-obj-getter-throws.js b/test/language/expressions/array/spread-err-sngl-err-obj-getter-throws.js deleted file mode 100644 index 7842f995cd..0000000000 --- a/test/language/expressions/array/spread-err-sngl-err-obj-getter-throws.js +++ /dev/null @@ -1,39 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-err-obj-getter-throws.case -// - src/spread/error/array.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -assert.throws(Test262Error, function() { - [{...{ get foo() { throw new Test262Error(); } }}]; -}); diff --git a/test/language/expressions/array/spread-mult-obj-base.js b/test/language/expressions/array/spread-mult-obj-base.js deleted file mode 100644 index 37cbe1c462..0000000000 --- a/test/language/expressions/array/spread-mult-obj-base.js +++ /dev/null @@ -1,58 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-base.case -// - src/spread/default/array.template -/*--- -description: Object Spread operator following other arguments (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 4); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - - callCount += 1; -}.apply(null, [{a: 1, b: 2, ...{c: 3, d: 4}}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/array/spread-mult-obj-empty.js b/test/language/expressions/array/spread-mult-obj-empty.js deleted file mode 100644 index 7b7c42682a..0000000000 --- a/test/language/expressions/array/spread-mult-obj-empty.js +++ /dev/null @@ -1,46 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-empty.case -// - src/spread/default/array.template -/*--- -description: Object Spread operator following other arguments with empty object (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(Object.keys(obj).length, 2); - callCount += 1; -}.apply(null, [{a: 1, b: 2, ...{}}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/array/spread-mult-obj-null-empty-undefined.js b/test/language/expressions/array/spread-mult-obj-null-empty-undefined.js deleted file mode 100644 index ec2cc9e48e..0000000000 --- a/test/language/expressions/array/spread-mult-obj-null-empty-undefined.js +++ /dev/null @@ -1,49 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-null-empty-undefined.case -// - src/spread/default/array.template -/*--- -description: Object Spread operator following other arguments with null, undefined and empty object (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -includes: [compareArray.js] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"])); - callCount += 1; -}.apply(null, [{a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/array/spread-obj-setter-redef.js b/test/language/expressions/array/spread-obj-setter-redef.js deleted file mode 100644 index 8bb804dd80..0000000000 --- a/test/language/expressions/array/spread-obj-setter-redef.js +++ /dev/null @@ -1,37 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/obj-setter-redef.case -// - src/spread/default/array.template -/*--- -description: Setter are not executed when redefined in Object Spread (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. ----*/ -let executedSetter = false; - - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.c, 1); - assert.sameValue(executedSetter, false); - assert.sameValue(Object.keys(obj).length, 1); - callCount += 1; -}.apply(null, [{set c(v) { executedSetter = true; }, ...{c: 1}}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/array/spread-sngl-obj-base.js b/test/language/expressions/array/spread-sngl-obj-base.js deleted file mode 100644 index c71094aa2d..0000000000 --- a/test/language/expressions/array/spread-sngl-obj-base.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-base.case -// - src/spread/default/array.template -/*--- -description: Object Spread operator without other arguments (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 2); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - callCount += 1; -}.apply(null, [{...{c: 3, d: 4}}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/array/spread-sngl-obj-empty.js b/test/language/expressions/array/spread-sngl-obj-empty.js deleted file mode 100644 index f44cb8cfbb..0000000000 --- a/test/language/expressions/array/spread-sngl-obj-empty.js +++ /dev/null @@ -1,44 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-empty.case -// - src/spread/default/array.template -/*--- -description: Object Spread operator on a single empty object (Array initializer) -esid: sec-runtime-semantics-arrayaccumulation -es6id: 12.2.5.2 -features: [object-spread] -flags: [generated] -info: | - SpreadElement : ...AssignmentExpression - - 1. Let spreadRef be the result of evaluating AssignmentExpression. - 2. Let spreadObj be ? GetValue(spreadRef). - 3. Let iterator be ? GetIterator(spreadObj). - 4. Repeat - a. Let next be ? IteratorStep(iterator). - b. If next is false, return nextIndex. - c. Let nextValue be ? IteratorValue(next). - d. Let status be CreateDataProperty(array, ToString(ToUint32(nextIndex)), - nextValue). - e. Assert: status is true. - f. Let nextIndex be nextIndex + 1. - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(Object.keys(obj).length, 0); - callCount += 1; -}.apply(null, [{...{}}])); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/assignment/dstr-obj-rest-nested-obj-nested-rest.js b/test/language/expressions/assignment/dstr-obj-rest-nested-obj-nested-rest.js deleted file mode 100644 index af5973000e..0000000000 --- a/test/language/expressions/assignment/dstr-obj-rest-nested-obj-nested-rest.js +++ /dev/null @@ -1,43 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-nested-obj-nested-rest.case -// - src/dstr-assignment/default/assignment-expr.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (AssignmentExpression) -esid: sec-variable-statement-runtime-semantics-evaluation -es6id: 13.3.2.4 -features: [object-rest, destructuring-binding] -flags: [generated] -includes: [propertyHelper.js] -info: | - VariableDeclaration : BindingPattern Initializer - - 1. Let rhs be the result of evaluating Initializer. - 2. Let rval be GetValue(rhs). - 3. ReturnIfAbrupt(rval). - 4. Return the result of performing BindingInitialization for - BindingPattern passing rval and undefined as arguments. ----*/ -var a, b, c, rest; - -var result; -var vals = {a: 1, b: 2, c: 3, d: 4, e: 5}; - -result = {a, b, ...{c, ...rest}} = vals; - -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); - -assert.sameValue(rest.d, 4); -assert.sameValue(rest.e, 5); - -verifyEnumerable(rest, "d"); -verifyWritable(rest, "d"); -verifyConfigurable(rest, "d"); - -verifyEnumerable(rest, "e"); -verifyWritable(rest, "e"); -verifyConfigurable(rest, "e"); - - -assert.sameValue(result, vals); diff --git a/test/language/expressions/assignment/dstr-obj-rest-nested-obj.js b/test/language/expressions/assignment/dstr-obj-rest-nested-obj.js deleted file mode 100644 index 13ab79c17b..0000000000 --- a/test/language/expressions/assignment/dstr-obj-rest-nested-obj.js +++ /dev/null @@ -1,33 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-nested-obj.case -// - src/dstr-assignment/default/assignment-expr.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression) -esid: sec-variable-statement-runtime-semantics-evaluation -es6id: 13.3.2.4 -features: [object-rest, destructuring-binding] -flags: [generated] -info: | - VariableDeclaration : BindingPattern Initializer - - 1. Let rhs be the result of evaluating Initializer. - 2. Let rval be GetValue(rhs). - 3. ReturnIfAbrupt(rval). - 4. Return the result of performing BindingInitialization for - BindingPattern passing rval and undefined as arguments. ----*/ -var a, b, c, d, e; - -var result; -var vals = {a: 1, b: 2, c: 3, d: 4, e: 5}; - -result = {a, b, ...{c, e}} = vals; - -assert.sameValue(a, 1); -assert.sameValue(b, 2); -assert.sameValue(c, 3); -assert.sameValue(e, 5); -assert.sameValue(d, undefined); - - -assert.sameValue(result, vals); diff --git a/test/language/expressions/assignment/dstr-obj-rest-obj-own-property.js b/test/language/expressions/assignment/dstr-obj-rest-obj-own-property.js deleted file mode 100644 index 07bc12b48e..0000000000 --- a/test/language/expressions/assignment/dstr-obj-rest-obj-own-property.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-obj-own-property.case -// - src/dstr-assignment/default/assignment-expr.template -/*--- -description: Rest object contains just source object's own properties (AssignmentExpression) -esid: sec-variable-statement-runtime-semantics-evaluation -es6id: 13.3.2.4 -features: [object-rest, destructuring-binding] -flags: [generated] -info: | - VariableDeclaration : BindingPattern Initializer - - 1. Let rhs be the result of evaluating Initializer. - 2. Let rval be GetValue(rhs). - 3. ReturnIfAbrupt(rval). - 4. Return the result of performing BindingInitialization for - BindingPattern passing rval and undefined as arguments. ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var x, y, z; - -var result; -var vals = o; - -result = { x, ...{y , z} } = vals; - -assert.sameValue(x, 1); -assert.sameValue(y, undefined); -assert.sameValue(z, 3); - - -assert.sameValue(result, vals); diff --git a/test/language/expressions/call/spread-err-mult-err-obj-getter-throws.js b/test/language/expressions/call/spread-err-mult-err-obj-getter-throws.js deleted file mode 100644 index 82e14673ff..0000000000 --- a/test/language/expressions/call/spread-err-mult-err-obj-getter-throws.js +++ /dev/null @@ -1,37 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-err-obj-getter-throws.case -// - src/spread/error/call-expr.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -assert.throws(Test262Error, function() { - (function() {}({a: 1, ...{ get foo() { throw new Test262Error(); } }})); -}); diff --git a/test/language/expressions/call/spread-err-sngl-err-obj-getter-throws.js b/test/language/expressions/call/spread-err-sngl-err-obj-getter-throws.js deleted file mode 100644 index cd8aa24762..0000000000 --- a/test/language/expressions/call/spread-err-sngl-err-obj-getter-throws.js +++ /dev/null @@ -1,37 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-err-obj-getter-throws.case -// - src/spread/error/call-expr.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -assert.throws(Test262Error, function() { - (function() {}({...{ get foo() { throw new Test262Error(); } }})); -}); diff --git a/test/language/expressions/call/spread-mult-obj-base.js b/test/language/expressions/call/spread-mult-obj-base.js deleted file mode 100644 index cb411cb9cf..0000000000 --- a/test/language/expressions/call/spread-mult-obj-base.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-base.case -// - src/spread/default/call-expr.template -/*--- -description: Object Spread operator following other arguments (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 4); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - - callCount += 1; -}({a: 1, b: 2, ...{c: 3, d: 4}})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/call/spread-mult-obj-empty.js b/test/language/expressions/call/spread-mult-obj-empty.js deleted file mode 100644 index 7a3f959896..0000000000 --- a/test/language/expressions/call/spread-mult-obj-empty.js +++ /dev/null @@ -1,44 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-empty.case -// - src/spread/default/call-expr.template -/*--- -description: Object Spread operator following other arguments with empty object (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(Object.keys(obj).length, 2); - callCount += 1; -}({a: 1, b: 2, ...{}})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/call/spread-mult-obj-null-empty-undefined.js b/test/language/expressions/call/spread-mult-obj-null-empty-undefined.js deleted file mode 100644 index e7b18e18eb..0000000000 --- a/test/language/expressions/call/spread-mult-obj-null-empty-undefined.js +++ /dev/null @@ -1,47 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-null-empty-undefined.case -// - src/spread/default/call-expr.template -/*--- -description: Object Spread operator following other arguments with null, undefined and empty object (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -includes: [compareArray.js] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"])); - callCount += 1; -}({a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/call/spread-obj-setter-redef.js b/test/language/expressions/call/spread-obj-setter-redef.js deleted file mode 100644 index a2d37aef4d..0000000000 --- a/test/language/expressions/call/spread-obj-setter-redef.js +++ /dev/null @@ -1,35 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/obj-setter-redef.case -// - src/spread/default/call-expr.template -/*--- -description: Setter are not executed when redefined in Object Spread (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] ----*/ -let executedSetter = false; - - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.c, 1); - assert.sameValue(executedSetter, false); - assert.sameValue(Object.keys(obj).length, 1); - callCount += 1; -}({set c(v) { executedSetter = true; }, ...{c: 1}})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/call/spread-sngl-obj-base.js b/test/language/expressions/call/spread-sngl-obj-base.js deleted file mode 100644 index df3f2a5b38..0000000000 --- a/test/language/expressions/call/spread-sngl-obj-base.js +++ /dev/null @@ -1,53 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-base.case -// - src/spread/default/call-expr.template -/*--- -description: Object Spread operator without other arguments (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 2); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - callCount += 1; -}({...{c: 3, d: 4}})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/call/spread-sngl-obj-empty.js b/test/language/expressions/call/spread-sngl-obj-empty.js deleted file mode 100644 index 976d2d990d..0000000000 --- a/test/language/expressions/call/spread-sngl-obj-empty.js +++ /dev/null @@ -1,42 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-empty.case -// - src/spread/default/call-expr.template -/*--- -description: Object Spread operator on a single empty object (CallExpression) -esid: sec-function-calls-runtime-semantics-evaluation -es6id: 12.3.4.1 -features: [object-spread] -flags: [generated] -info: | - CallExpression : MemberExpression Arguments - - [...] - 9. Return EvaluateDirectCall(func, thisValue, Arguments, tailCall). - - 12.3.4.3 Runtime Semantics: EvaluateDirectCall - - 1. Let argList be ArgumentListEvaluation(arguments). - [...] - 6. Let result be Call(func, thisValue, argList). - [...] - - 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). - ----*/ - -var callCount = 0; - -(function(obj) { - assert.sameValue(Object.keys(obj).length, 0); - callCount += 1; -}({...{}})); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-err-mult-err-obj-getter-throws.js b/test/language/expressions/new/spread-err-mult-err-obj-getter-throws.js deleted file mode 100644 index 08d7fcf705..0000000000 --- a/test/language/expressions/new/spread-err-mult-err-obj-getter-throws.js +++ /dev/null @@ -1,36 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-err-obj-getter-throws.case -// - src/spread/error/member-expr.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -assert.throws(Test262Error, function() { - new function() {}({a: 1, ...{ get foo() { throw new Test262Error(); } }}); -}); diff --git a/test/language/expressions/new/spread-err-sngl-err-obj-getter-throws.js b/test/language/expressions/new/spread-err-sngl-err-obj-getter-throws.js deleted file mode 100644 index b0cbfda6cc..0000000000 --- a/test/language/expressions/new/spread-err-sngl-err-obj-getter-throws.js +++ /dev/null @@ -1,36 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-err-obj-getter-throws.case -// - src/spread/error/member-expr.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -assert.throws(Test262Error, function() { - new function() {}({...{ get foo() { throw new Test262Error(); } }}); -}); diff --git a/test/language/expressions/new/spread-mult-obj-base.js b/test/language/expressions/new/spread-mult-obj-base.js deleted file mode 100644 index c3418a9025..0000000000 --- a/test/language/expressions/new/spread-mult-obj-base.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-base.case -// - src/spread/default/member-expr.template -/*--- -description: Object Spread operator following other arguments (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -var callCount = 0; - -new function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 4); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - - callCount += 1; -}({a: 1, b: 2, ...{c: 3, d: 4}}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-mult-obj-empty.js b/test/language/expressions/new/spread-mult-obj-empty.js deleted file mode 100644 index 08a544960f..0000000000 --- a/test/language/expressions/new/spread-mult-obj-empty.js +++ /dev/null @@ -1,43 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-empty.case -// - src/spread/default/member-expr.template -/*--- -description: Object Spread operator following other arguments with empty object (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -var callCount = 0; - -new function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(Object.keys(obj).length, 2); - callCount += 1; -}({a: 1, b: 2, ...{}}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-mult-obj-null-empty-undefined.js b/test/language/expressions/new/spread-mult-obj-null-empty-undefined.js deleted file mode 100644 index 1be7f5b158..0000000000 --- a/test/language/expressions/new/spread-mult-obj-null-empty-undefined.js +++ /dev/null @@ -1,46 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-null-empty-undefined.case -// - src/spread/default/member-expr.template -/*--- -description: Object Spread operator following other arguments with null, undefined and empty object (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -features: [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). - ----*/ - -var callCount = 0; - -new function(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"])); - callCount += 1; -}({a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-obj-setter-redef.js b/test/language/expressions/new/spread-obj-setter-redef.js deleted file mode 100644 index 105b48ed40..0000000000 --- a/test/language/expressions/new/spread-obj-setter-redef.js +++ /dev/null @@ -1,34 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/obj-setter-redef.case -// - src/spread/default/member-expr.template -/*--- -description: Setter are not executed when redefined in Object Spread (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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. - [...] ----*/ -let executedSetter = false; - - -var callCount = 0; - -new function(obj) { - assert.sameValue(obj.c, 1); - assert.sameValue(executedSetter, false); - assert.sameValue(Object.keys(obj).length, 1); - callCount += 1; -}({set c(v) { executedSetter = true; }, ...{c: 1}}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-sngl-obj-base.js b/test/language/expressions/new/spread-sngl-obj-base.js deleted file mode 100644 index af890534d7..0000000000 --- a/test/language/expressions/new/spread-sngl-obj-base.js +++ /dev/null @@ -1,52 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-base.case -// - src/spread/default/member-expr.template -/*--- -description: Object Spread operator without other arguments (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -var callCount = 0; - -new function(obj) { - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 2); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - callCount += 1; -}({...{c: 3, d: 4}}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/new/spread-sngl-obj-empty.js b/test/language/expressions/new/spread-sngl-obj-empty.js deleted file mode 100644 index abdde8ffc5..0000000000 --- a/test/language/expressions/new/spread-sngl-obj-empty.js +++ /dev/null @@ -1,41 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-empty.case -// - src/spread/default/member-expr.template -/*--- -description: Object Spread operator on a single empty object (`new` operator) -esid: sec-new-operator-runtime-semantics-evaluation -es6id: 12.3.3.1 -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). - ----*/ - -var callCount = 0; - -new function(obj) { - assert.sameValue(Object.keys(obj).length, 0); - callCount += 1; -}({...{}}); - -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-err-mult-err-obj-getter-throws.js b/test/language/expressions/super/call-spread-err-mult-err-obj-getter-throws.js deleted file mode 100644 index 4939371f36..0000000000 --- a/test/language/expressions/super/call-spread-err-mult-err-obj-getter-throws.js +++ /dev/null @@ -1,44 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-err-obj-getter-throws.case -// - src/spread/error/super-call.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -class Test262ParentClass { - constructor() {} -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({a: 1, ...{ get foo() { throw new Test262Error(); } }}); - } -} - -assert.throws(Test262Error, function() { - new Test262ChildClass(); -}); diff --git a/test/language/expressions/super/call-spread-err-sngl-err-obj-getter-throws.js b/test/language/expressions/super/call-spread-err-sngl-err-obj-getter-throws.js deleted file mode 100644 index 2a5e2826aa..0000000000 --- a/test/language/expressions/super/call-spread-err-sngl-err-obj-getter-throws.js +++ /dev/null @@ -1,44 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-err-obj-getter-throws.case -// - src/spread/error/super-call.template -/*--- -description: Object Spread operator results in error when there is an getter that throws an exception (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -class Test262ParentClass { - constructor() {} -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({...{ get foo() { throw new Test262Error(); } }}); - } -} - -assert.throws(Test262Error, function() { - new Test262ChildClass(); -}); diff --git a/test/language/expressions/super/call-spread-mult-obj-base.js b/test/language/expressions/super/call-spread-mult-obj-base.js deleted file mode 100644 index f55057eb0b..0000000000 --- a/test/language/expressions/super/call-spread-mult-obj-base.js +++ /dev/null @@ -1,62 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-base.case -// - src/spread/default/super-call.template -/*--- -description: Object Spread operator following other arguments (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 4); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({a: 1, b: 2, ...{c: 3, d: 4}}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-mult-obj-empty.js b/test/language/expressions/super/call-spread-mult-obj-empty.js deleted file mode 100644 index 43ccc678d1..0000000000 --- a/test/language/expressions/super/call-spread-mult-obj-empty.js +++ /dev/null @@ -1,50 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-empty.case -// - src/spread/default/super-call.template -/*--- -description: Object Spread operator following other arguments with empty object (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(Object.keys(obj).length, 2); - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({a: 1, b: 2, ...{}}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-mult-obj-null-empty-undefined.js b/test/language/expressions/super/call-spread-mult-obj-null-empty-undefined.js deleted file mode 100644 index 34e4866a36..0000000000 --- a/test/language/expressions/super/call-spread-mult-obj-null-empty-undefined.js +++ /dev/null @@ -1,53 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/mult-obj-null-empty-undefined.case -// - src/spread/default/super-call.template -/*--- -description: Object Spread operator following other arguments with null, undefined and empty object (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -includes: [compareArray.js] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(obj.a, 1); - assert.sameValue(obj.b, 2); - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert(compareArray(Object.keys(obj), ["a", "b", "c", "d"])); - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({a: 1, ...null, b: 2, ...undefined, c: 3, ...{}, ...{...{}}, d: 4}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-obj-setter-redef.js b/test/language/expressions/super/call-spread-obj-setter-redef.js deleted file mode 100644 index 69f340129f..0000000000 --- a/test/language/expressions/super/call-spread-obj-setter-redef.js +++ /dev/null @@ -1,41 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/obj-setter-redef.case -// - src/spread/default/super-call.template -/*--- -description: Setter are not executed when redefined in Object Spread (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. Let argList be ArgumentListEvaluation of Arguments. - [...] ----*/ -let executedSetter = false; - - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(obj.c, 1); - assert.sameValue(executedSetter, false); - assert.sameValue(Object.keys(obj).length, 1); - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({set c(v) { executedSetter = true; }, ...{c: 1}}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-sngl-obj-base.js b/test/language/expressions/super/call-spread-sngl-obj-base.js deleted file mode 100644 index f389215420..0000000000 --- a/test/language/expressions/super/call-spread-sngl-obj-base.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-base.case -// - src/spread/default/super-call.template -/*--- -description: Object Spread operator without other arguments (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -includes: [propertyHelper.js] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(obj.c, 3); - assert.sameValue(obj.d, 4); - assert.sameValue(Object.keys(obj).length, 2); - - verifyEnumerable(obj, "c"); - verifyWritable(obj, "c"); - verifyConfigurable(obj, "c"); - - verifyEnumerable(obj, "d"); - verifyWritable(obj, "d"); - verifyConfigurable(obj, "d"); - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({...{c: 3, d: 4}}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/expressions/super/call-spread-sngl-obj-empty.js b/test/language/expressions/super/call-spread-sngl-obj-empty.js deleted file mode 100644 index ab8162c92e..0000000000 --- a/test/language/expressions/super/call-spread-sngl-obj-empty.js +++ /dev/null @@ -1,48 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/spread/sngl-obj-empty.case -// - src/spread/default/super-call.template -/*--- -description: Object Spread operator on a single empty object (SuperCall) -esid: sec-super-keyword-runtime-semantics-evaluation -es6id: 12.3.5.1 -features: [object-spread] -flags: [generated] -info: | - SuperCall : super Arguments - - 1. Let newTarget be GetNewTarget(). - 2. If newTarget is undefined, throw a ReferenceError exception. - 3. Let func be GetSuperConstructor(). - 4. ReturnIfAbrupt(func). - 5. 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). - ----*/ - -var callCount = 0; - -class Test262ParentClass { - constructor(obj) { - assert.sameValue(Object.keys(obj).length, 0); - callCount += 1; - } -} - -class Test262ChildClass extends Test262ParentClass { - constructor() { - super({...{}}); - } -} - -new Test262ChildClass(); -assert.sameValue(callCount, 1); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 5b79371dea..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (const {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index e960685b11..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (const {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 95394838f6..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function fn() { - for await (const { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 39cafc08f5..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function fn() { - for await (const {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 2df7a1847a..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; - -async function fn() { - for await (const {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 404f73be52..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-const-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-const.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function fn() { - for await (const { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 077519e9d3..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (let {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 7906c8d668..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (let {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 1eccbf33dc..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function fn() { - for await (let { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 6bdd1c3f9c..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function fn() { - for await (let {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 5d7dc9bb07..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; - -async function fn() { - for await (let {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 33981973e2..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-let-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,58 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-let.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function fn() { - for await (let { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index da562ea3b1..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (var {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 9b4002a25f..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function fn() { - for await (var {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 68c6c4ad42..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function fn() { - for await (var { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index f7db9989bd..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,54 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function fn() { - for await (var {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 9ff701111d..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,64 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ - -var iterCount = 0; - -async function fn() { - for await (var {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index c90cae8de0..0000000000 --- a/test/language/statements/for-await-of/async-func-dstr-var-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-func-var.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function fn() { - for await (var { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 8bb992f7c0..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (const {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 9282e01d4e..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (const {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index b287d8119e..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function *fn() { - for await (const { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 8f8f338c56..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,56 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function *fn() { - for await (const {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index cefb9ba33c..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,66 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; - -async function *fn() { - for await (const {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index e9ac410a5a..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-const-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-const.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function *fn() { - for await (const { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index d2539313d5..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (let {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index c0f58913f2..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (let {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 0b54ea246b..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function *fn() { - for await (let { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 3689765563..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,57 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function *fn() { - for await (let {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 06b449bd3e..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,67 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; - -async function *fn() { - for await (let {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 8c451fc5a7..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-let-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,58 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-let.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function *fn() { - for await (let { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 4c31804ef7..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,59 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (var {a, b, ...{c, e}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index 02f50138f3..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,69 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var-async.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [{a: 1, b: 2, c: 3, d: 4, e: 5}]; -})(); - -async function *fn() { - for await (var {a, b, ...{c, ...rest}} of asyncIter) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index f80efb1d2c..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-async-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,60 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var-async.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( ForDeclaration of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForDeclaration, Statement, keyResult, - lexicalBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - [...] - iii. Else, - 1. Assert: lhsKind is lexicalBinding. - 2. Assert: lhs is a ForDeclaration. - 3. Let status be the result of performing BindingInitialization - for lhs passing nextValue and iterationEnv as arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; -var asyncIter = (async function*() { - yield* [o]; -})(); - -async function *fn() { - for await (var { x, ...{y , z} } of asyncIter) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-nested-obj.js b/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-nested-obj.js deleted file mode 100644 index 1936e3ffe9..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-nested-obj.js +++ /dev/null @@ -1,54 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-nested-obj.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ -var obj = {a: 3, b: 4}; - -var iterCount = 0; - -async function *fn() { - for await (var {a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-nested-rest.js b/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-nested-rest.js deleted file mode 100644 index a0a0fd71ef..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-nested-rest.js +++ /dev/null @@ -1,64 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-nested-rest.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ - -var iterCount = 0; - -async function *fn() { - for await (var {a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-own-property.js b/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-own-property.js deleted file mode 100644 index 204323c1ab..0000000000 --- a/test/language/statements/for-await-of/async-gen-dstr-var-obj-ptrn-rest-obj-own-property.js +++ /dev/null @@ -1,55 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-binding-for-await/obj-ptrn-rest-obj-own-property.case -// - src/dstr-binding-for-await/default/for-await-of-async-gen-var.template -/*--- -description: Rest object contains just soruce object's own properties (for-await-of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -features: [object-rest, destructuring-binding, async-iteration] -flags: [generated, async] -includes: [propertyHelper.js] -info: | - IterationStatement : - for await ( var ForBinding of AssignmentExpression ) Statement - - [...] - 2. Return ? ForIn/OfBodyEvaluation(ForBinding, Statement, keyResult, - varBinding, labelSet, async). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. Let destructuring be IsDestructuring of lhs. - [...] - 6. Repeat - [...] - j. If destructuring is false, then - [...] - k. Else - i. If lhsKind is assignment, then - [...] - ii. Else if lhsKind is varBinding, then - 1. Assert: lhs is a ForBinding. - 2. Let status be the result of performing BindingInitialization - for lhs passing nextValue and undefined as the arguments. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var iterCount = 0; - -async function *fn() { - for await (var { x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - - iterCount += 1; - } -} - -fn().next() - .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) - .then($DONE, $DONE); - diff --git a/test/language/statements/for-of/dstr-obj-rest-nested-obj-nested-rest.js b/test/language/statements/for-of/dstr-obj-rest-nested-obj-nested-rest.js deleted file mode 100644 index 5870af017f..0000000000 --- a/test/language/statements/for-of/dstr-obj-rest-nested-obj-nested-rest.js +++ /dev/null @@ -1,52 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-nested-obj-nested-rest.case -// - src/dstr-assignment/default/for-of.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment and object rest desconstruction is allowed in that case. (For..of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -es6id: 13.7.5.11 -features: [object-rest, destructuring-binding] -flags: [generated] -includes: [propertyHelper.js] -info: | - IterationStatement : - for ( LeftHandSideExpression of AssignmentExpression ) Statement - - 1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« », - AssignmentExpression, iterate). - 2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement, - keyResult, assignment, labelSet). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. If destructuring is true and if lhsKind is assignment, then - a. Assert: lhs is a LeftHandSideExpression. - b. Let assignmentPattern be the parse of the source text corresponding to - lhs using AssignmentPattern as the goal symbol. - [...] ----*/ -var a, b, c, rest; - -var counter = 0; - -for ({a, b, ...{c, ...rest}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - - assert.sameValue(rest.d, 4); - assert.sameValue(rest.e, 5); - - verifyEnumerable(rest, "d"); - verifyWritable(rest, "d"); - verifyConfigurable(rest, "d"); - - verifyEnumerable(rest, "e"); - verifyWritable(rest, "e"); - verifyConfigurable(rest, "e"); - - counter += 1; -} - -assert.sameValue(counter, 1); diff --git a/test/language/statements/for-of/dstr-obj-rest-nested-obj.js b/test/language/statements/for-of/dstr-obj-rest-nested-obj.js deleted file mode 100644 index 0eba170b8b..0000000000 --- a/test/language/statements/for-of/dstr-obj-rest-nested-obj.js +++ /dev/null @@ -1,42 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-nested-obj.case -// - src/dstr-assignment/default/for-of.template -/*--- -description: When DestructuringAssignmentTarget is an object literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (For..of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -es6id: 13.7.5.11 -features: [object-rest, destructuring-binding] -flags: [generated] -info: | - IterationStatement : - for ( LeftHandSideExpression of AssignmentExpression ) Statement - - 1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« », - AssignmentExpression, iterate). - 2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement, - keyResult, assignment, labelSet). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. If destructuring is true and if lhsKind is assignment, then - a. Assert: lhs is a LeftHandSideExpression. - b. Let assignmentPattern be the parse of the source text corresponding to - lhs using AssignmentPattern as the goal symbol. - [...] ----*/ -var a, b, c, d, e; - -var counter = 0; - -for ({a, b, ...{c, e}} of [{a: 1, b: 2, c: 3, d: 4, e: 5}]) { - assert.sameValue(a, 1); - assert.sameValue(b, 2); - assert.sameValue(c, 3); - assert.sameValue(e, 5); - assert.sameValue(d, undefined); - - counter += 1; -} - -assert.sameValue(counter, 1); diff --git a/test/language/statements/for-of/dstr-obj-rest-obj-own-property.js b/test/language/statements/for-of/dstr-obj-rest-obj-own-property.js deleted file mode 100644 index 4c8c76257a..0000000000 --- a/test/language/statements/for-of/dstr-obj-rest-obj-own-property.js +++ /dev/null @@ -1,43 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dstr-assignment/obj-rest-obj-own-property.case -// - src/dstr-assignment/default/for-of.template -/*--- -description: Rest object contains just source object's own properties (For..of statement) -esid: sec-for-in-and-for-of-statements-runtime-semantics-labelledevaluation -es6id: 13.7.5.11 -features: [object-rest, destructuring-binding] -flags: [generated] -info: | - IterationStatement : - for ( LeftHandSideExpression of AssignmentExpression ) Statement - - 1. Let keyResult be the result of performing ? ForIn/OfHeadEvaluation(« », - AssignmentExpression, iterate). - 2. Return ? ForIn/OfBodyEvaluation(LeftHandSideExpression, Statement, - keyResult, assignment, labelSet). - - 13.7.5.13 Runtime Semantics: ForIn/OfBodyEvaluation - - [...] - 4. If destructuring is true and if lhsKind is assignment, then - a. Assert: lhs is a LeftHandSideExpression. - b. Let assignmentPattern be the parse of the source text corresponding to - lhs using AssignmentPattern as the goal symbol. - [...] ----*/ -var o = Object.create({ x: 1, y: 2 }); -o.z = 3; - -var x, y, z; - -var counter = 0; - -for ({ x, ...{y , z} } of [o]) { - assert.sameValue(x, 1); - assert.sameValue(y, undefined); - assert.sameValue(z, 3); - - counter += 1; -} - -assert.sameValue(counter, 1);