diff --git a/features.txt b/features.txt index fb090b4a56..328fa2312d 100644 --- a/features.txt +++ b/features.txt @@ -87,6 +87,7 @@ DataView.prototype.getUint32 DataView.prototype.setUint8 default-arg default-parameters +destructuring-assignment destructuring-binding for-of Float64Array diff --git a/test/language/statements/for-of/body-dstr-assign-error.js b/test/language/statements/for-of/body-dstr-assign-error.js index 4e063574c1..8612a5aebc 100644 --- a/test/language/statements/for-of/body-dstr-assign-error.js +++ b/test/language/statements/for-of/body-dstr-assign-error.js @@ -1,12 +1,24 @@ // Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 13.6.4.13 S5.i.i +esid: sec-runtime-semantics-forin-div-ofheadevaluation-tdznames-expr-iterationkind description: > If the left-hand side requires a DestructuringAssignment operation and that operation produces an error, the iterator should be closed and the error forwarded to the runtime. -features: [Symbol.iterator] +info: | + ... + Else, + If lhsKind is assignment, then + Let status be the result of performing DestructuringAssignmentEvaluation of + assignmentPattern using nextValue as the argument. + ... + If status is an abrupt completion, then + Set the running execution context's LexicalEnvironment to oldEnv. + If iterationKind is enumerate, then + Return status. + +features: [destructuring-assignment,for-of,Symbol.iterator] ---*/ var callCount = 0; diff --git a/test/language/statements/for-of/body-dstr-assign.js b/test/language/statements/for-of/body-dstr-assign.js index 0bb9007c7d..839cf24a30 100644 --- a/test/language/statements/for-of/body-dstr-assign.js +++ b/test/language/statements/for-of/body-dstr-assign.js @@ -1,9 +1,17 @@ // Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 13.6.4.13 S5.i.i +esid: sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset description: > - The left-hand side may take the form of a DestructuringAssignment. + The left-hand side may take the form of a DestructuringAssignment. +info: | + ... + Else, + If lhsKind is assignment, then + Let status be the result of performing DestructuringAssignmentEvaluation of + assignmentPattern using nextValue as the argument. + +features: [destructuring-assignment,for-of] ---*/ var iterationCount = 0; diff --git a/test/language/statements/for-of/body-put-error.js b/test/language/statements/for-of/body-put-error.js index dd339e7e02..68045df517 100644 --- a/test/language/statements/for-of/body-put-error.js +++ b/test/language/statements/for-of/body-put-error.js @@ -1,12 +1,23 @@ // Copyright (C) 2015 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- -es6id: 13.6.4.13 S5.h.ii +esid: sec-runtime-semantics-forin-div-ofbodyevaluation-lhs-stmt-iterator-lhskind-labelset description: > - If the left-hand side is not a lexical binding and the assignment produces - an error, the iterator should be closed and the error forwarded to the - runtime. -features: [Symbol.iterator] + If the left-hand side is not a lexical binding and the assignment produces + an error, the iterator should be closed and the error forwarded to the + runtime. +info: | + ... + If destructuring is false, then + If lhsRef is an abrupt completion, then + Let status be lhsRef. + Else if lhsKind is lexicalBinding, then + Let status be InitializeReferencedBinding(lhsRef, nextValue). + Else, + Let status be PutValue(lhsRef, nextValue). + ... + +features: [for-of,Symbol.iterator] ---*/ var callCount = 0;