diff --git a/features.txt b/features.txt index fb090b4a56952b9ad6e2471172bbd570d078a428..328fa2312df3de0c68fe7bef88631ed568dc6527 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 4e063574c1186361fcfb55bdb0e93f5a107e3bdf..8612a5aebcc129f7bc4abd33665b40edd1531626 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 0bb9007c7d6c8ce3f3bef1a54948401a5991b4a3..839cf24a302e0e9852ee5eca3cc7e49bf1885443 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 dd339e7e02071097ecfe185a50224c988a259b6b..68045df5170ba6e18240fd1a5cf5732cfad8d6df 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;