<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[192768] trunk/Source/JavaScriptCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/192768">192768</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-11-24 17:43:14 -0800 (Tue, 24 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[JSC] support Computed Property Names in destructuring Patterns
https://bugs.webkit.org/show_bug.cgi?id=151494

Patch by Caitlin Potter &lt;caitp@igalia.com&gt; on 2015-11-24
Reviewed by Saam Barati.

Add support for computed property names in destructuring BindingPatterns
and AssignmentPatterns.

Productions BindingProperty(1) and AssignmentProperty(2) allow for any valid
PropertName(3), including ComputedPropertyName(4)

1: http://tc39.github.io/ecma262/#prod-BindingProperty
2: http://tc39.github.io/ecma262/#prod-AssignmentProperty
3: http://tc39.github.io/ecma262/#prod-PropertyName
4: http://tc39.github.io/ecma262/#prod-ComputedPropertyName

* bytecompiler/NodesCodegen.cpp:
(JSC::ObjectPatternNode::bindValue):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::appendObjectPatternEntry):
* parser/Nodes.h:
(JSC::ObjectPatternNode::appendEntry):
* parser/Parser.cpp:
(JSC::Parser&lt;LexerType&gt;::parseDestructuringPattern):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::operatorStackPop):
* tests/es6.yaml:
* tests/es6/destructuring_assignment_computed_properties.js: Added.
(test):
(test.computeName):
(test.loadValue):
(test.out.get a):
(test.out.set a):
(test.out.get b):
(test.out.set b):
(test.out.get c):
(test.out.set c):
(test.get var):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserASTBuilderh">trunk/Source/JavaScriptCore/parser/ASTBuilder.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserNodesh">trunk/Source/JavaScriptCore/parser/Nodes.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserSyntaxCheckerh">trunk/Source/JavaScriptCore/parser/SyntaxChecker.h</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6yaml">trunk/Source/JavaScriptCore/tests/es6.yaml</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_propertiesjs">trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_properties.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_property_defaultjs">trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_default.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_property_simplejs">trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_simple.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -1,3 +1,44 @@
</span><ins>+2015-11-24  Caitlin Potter  &lt;caitp@igalia.com&gt;
+
+        [JSC] support Computed Property Names in destructuring Patterns
+        https://bugs.webkit.org/show_bug.cgi?id=151494
+
+        Reviewed by Saam Barati.
+
+        Add support for computed property names in destructuring BindingPatterns
+        and AssignmentPatterns.
+
+        Productions BindingProperty(1) and AssignmentProperty(2) allow for any valid
+        PropertName(3), including ComputedPropertyName(4)
+
+        1: http://tc39.github.io/ecma262/#prod-BindingProperty
+        2: http://tc39.github.io/ecma262/#prod-AssignmentProperty
+        3: http://tc39.github.io/ecma262/#prod-PropertyName
+        4: http://tc39.github.io/ecma262/#prod-ComputedPropertyName
+
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::ObjectPatternNode::bindValue):
+        * parser/ASTBuilder.h:
+        (JSC::ASTBuilder::appendObjectPatternEntry):
+        * parser/Nodes.h:
+        (JSC::ObjectPatternNode::appendEntry):
+        * parser/Parser.cpp:
+        (JSC::Parser&lt;LexerType&gt;::parseDestructuringPattern):
+        * parser/SyntaxChecker.h:
+        (JSC::SyntaxChecker::operatorStackPop):
+        * tests/es6.yaml:
+        * tests/es6/destructuring_assignment_computed_properties.js: Added.
+        (test):
+        (test.computeName):
+        (test.loadValue):
+        (test.out.get a):
+        (test.out.set a):
+        (test.out.get b):
+        (test.out.set b):
+        (test.out.get c):
+        (test.out.set c):
+        (test.get var):
+
</ins><span class="cx"> 2015-11-24  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r192536, r192722, and r192743.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -3340,7 +3340,13 @@
</span><span class="cx">     for (size_t i = 0; i &lt; m_targetPatterns.size(); i++) {
</span><span class="cx">         auto&amp; target = m_targetPatterns[i];
</span><span class="cx">         RefPtr&lt;RegisterID&gt; temp = generator.newTemporary();
</span><del>-        generator.emitGetById(temp.get(), rhs, target.propertyName);
</del><ins>+        if (!target.propertyExpression)
+            generator.emitGetById(temp.get(), rhs, target.propertyName);
+        else {
+            RefPtr&lt;RegisterID&gt; propertyName = generator.emitNode(target.propertyExpression);
+            generator.emitGetByVal(temp.get(), rhs, propertyName.get());
+        }
+
</ins><span class="cx">         if (target.defaultValue)
</span><span class="cx">             assignDefaultValueIfUndefined(generator, temp.get(), target.defaultValue);
</span><span class="cx">         target.pattern-&gt;bindValue(generator, temp.get());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserASTBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ASTBuilder.h (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -851,7 +851,12 @@
</span><span class="cx">     {
</span><span class="cx">         node-&gt;appendEntry(location, identifier, wasString, pattern, defaultValue);
</span><span class="cx">     }
</span><del>-    
</del><ins>+
+    void appendObjectPatternEntry(ObjectPattern node, const JSTokenLocation&amp; location, ExpressionNode* propertyExpression, DestructuringPattern pattern, ExpressionNode* defaultValue)
+    {
+        node-&gt;appendEntry(location, propertyExpression, pattern, defaultValue);
+    }
+
</ins><span class="cx">     BindingPattern createBindingLocation(const JSTokenLocation&amp;, const Identifier&amp; boundProperty, const JSTextPosition&amp; start, const JSTextPosition&amp; end, AssignmentContext context)
</span><span class="cx">     {
</span><span class="cx">         return new (m_parserArena) BindingNode(boundProperty, start, end, context);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.h (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.h        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/parser/Nodes.h        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -2017,15 +2017,21 @@
</span><span class="cx">         ObjectPatternNode();
</span><span class="cx">         void appendEntry(const JSTokenLocation&amp;, const Identifier&amp; identifier, bool wasString, DestructuringPatternNode* pattern, ExpressionNode* defaultValue)
</span><span class="cx">         {
</span><del>-            m_targetPatterns.append(Entry{ identifier, wasString, pattern, defaultValue });
</del><ins>+            m_targetPatterns.append(Entry{ identifier, nullptr, wasString, pattern, defaultValue });
</ins><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        void appendEntry(const JSTokenLocation&amp;, ExpressionNode* propertyExpression, DestructuringPatternNode* pattern, ExpressionNode* defaultValue)
+        {
+            m_targetPatterns.append(Entry{ Identifier(), propertyExpression, false, pattern, defaultValue });
+        }
+
</ins><span class="cx">     private:
</span><span class="cx">         virtual void collectBoundIdentifiers(Vector&lt;Identifier&gt;&amp;) const override;
</span><span class="cx">         virtual void bindValue(BytecodeGenerator&amp;, RegisterID*) const override;
</span><span class="cx">         virtual void toString(StringBuilder&amp;) const override;
</span><span class="cx">         struct Entry {
</span><span class="cx">             const Identifier&amp; propertyName;
</span><ins>+            ExpressionNode* propertyExpression;
</ins><span class="cx">             bool wasString;
</span><span class="cx">             DestructuringPatternNode* pattern;
</span><span class="cx">             ExpressionNode* defaultValue;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -861,6 +861,7 @@
</span><span class="cx">                 break;
</span><span class="cx"> 
</span><span class="cx">             const Identifier* propertyName = nullptr;
</span><ins>+            TreeExpression propertyExpression = 0;
</ins><span class="cx">             TreeDestructuringPattern innerPattern = 0;
</span><span class="cx">             JSTokenLocation location = m_token.m_location;
</span><span class="cx">             if (matchSpecIdentifier()) {
</span><span class="lines">@@ -883,6 +884,12 @@
</span><span class="cx">                     propertyName = m_token.m_data.ident;
</span><span class="cx">                     wasString = true;
</span><span class="cx">                     break;
</span><ins>+                case OPENBRACKET:
+                    next();
+                    propertyExpression = parseAssignmentExpression(context);
+                    failIfFalse(propertyExpression, &quot;Cannot parse computed property name&quot;);
+                    matchOrFail(CLOSEBRACKET, &quot;Expected ']' to end end a computed property name&quot;);
+                    break;
</ins><span class="cx">                 default:
</span><span class="cx">                     if (m_token.m_type != RESERVED &amp;&amp; m_token.m_type != RESERVED_IF_STRICT &amp;&amp; !(m_token.m_type &amp; KeywordTokenFlag)) {
</span><span class="cx">                         if (kind == DestructureToExpressions)
</span><span class="lines">@@ -908,8 +915,12 @@
</span><span class="cx">                 return 0;
</span><span class="cx">             failIfFalse(innerPattern, &quot;Cannot parse this destructuring pattern&quot;);
</span><span class="cx">             TreeExpression defaultValue = parseDefaultValueForDestructuringPattern(context);
</span><del>-            ASSERT(propertyName);
-            context.appendObjectPatternEntry(objectPattern, location, wasString, *propertyName, innerPattern, defaultValue);
</del><ins>+            if (propertyExpression)
+                context.appendObjectPatternEntry(objectPattern, location, propertyExpression, innerPattern, defaultValue);
+            else {
+                ASSERT(propertyName);
+                context.appendObjectPatternEntry(objectPattern, location, wasString, *propertyName, innerPattern, defaultValue);
+            }
</ins><span class="cx">         } while (consume(COMMA));
</span><span class="cx"> 
</span><span class="cx">         if (kind == DestructureToExpressions &amp;&amp; !match(CLOSEBRACE))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserSyntaxCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/SyntaxChecker.h (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/SyntaxChecker.h        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/parser/SyntaxChecker.h        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -343,6 +343,10 @@
</span><span class="cx">     void appendObjectPatternEntry(ArrayPattern, const JSTokenLocation&amp;, bool, const Identifier&amp;, DestructuringPattern, int)
</span><span class="cx">     {
</span><span class="cx">     }
</span><ins>+    void appendObjectPatternEntry(ArrayPattern, const JSTokenLocation&amp;, Expression, DestructuringPattern, Expression)
+    {
+    }
+
</ins><span class="cx">     DestructuringPattern createBindingLocation(const JSTokenLocation&amp;, const Identifier&amp;, const JSTextPosition&amp;, const JSTextPosition&amp;, AssignmentContext)
</span><span class="cx">     {
</span><span class="cx">         return BindingDestructuring;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_propertiesjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_properties.js (0 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_properties.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_properties.js        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+function test() {
+    var steps = [];
+    var backingStore = {};
+
+    function storeProperty(name, value) {
+        steps.push(`store: ${name} = ${value}`);
+        backingStore[name] = value;
+    }
+
+    function computeName(name) {
+        steps.push(`compute: ${name}`);
+        return name;
+    }
+
+    function loadValue(name, value) {
+        steps.push(`load: ${name} &gt; ${value}`);
+        return value;
+    }
+
+    var out = {
+        get a() { return backingStore.a; },
+        set a(v) { storeProperty(&quot;a&quot;, v); },
+        get b() { return backingStore.b; },
+        set b(v) { storeProperty(&quot;b&quot;, v); },
+        get c() { return backingStore.c; },
+        set c(v) { storeProperty(&quot;c&quot;, v); },
+        get d() { return backingStore.d; },
+        set d(v) { storeProperty(&quot;d&quot;, v); }
+    };
+    ({
+        [computeName(&quot;propA&quot;)]: out.a,
+        [computeName(&quot;propB&quot;)]: out.b,
+        [computeName(&quot;propC&quot;)]: [...out[&quot;c&quot;]],
+        [computeName(&quot;propD&quot;)]: out.d = &quot;default&quot;
+    } = {
+        get propA() { return loadValue(&quot;propA&quot;, &quot;hello&quot;); },
+        get propB() { return loadValue(&quot;propB&quot;, &quot;world&quot;); },
+        get propC() { return loadValue(&quot;propC&quot;, [1, 2, 3]); },
+        get propD() { return loadValue(&quot;propD&quot;); }
+    });
+
+    var expectedSteps = [
+        &quot;compute: propA&quot;,
+        &quot;load: propA &gt; hello&quot;,
+        &quot;store: a = hello&quot;,
+
+        &quot;compute: propB&quot;,
+        &quot;load: propB &gt; world&quot;,
+        &quot;store: b = world&quot;,
+
+        &quot;compute: propC&quot;,
+        &quot;load: propC &gt; 1,2,3&quot;,
+        &quot;store: c = 1,2,3&quot;,
+
+        &quot;compute: propD&quot;,
+        &quot;load: propD &gt; undefined&quot;,
+        &quot;store: d = default&quot;
+    ];
+
+    if (expectedSteps.length !== steps.length)
+        return false;
+    for (var i = 0; i &lt; expectedSteps.length; ++i)
+        if (expectedSteps[i] !== steps[i])
+            return false;
+    if (`${backingStore.a} ${backingStore.b} ${backingStore.c.join(&quot;:&quot;)}` !== &quot;hello world 1:2:3&quot;)
+        return false;
+
+    return true;
+}
+
+if (!test())
+    throw new Error(&quot;Test failed&quot;);
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_property_defaultjs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_default.js (0 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_default.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_default.js        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+function test() {
+  var result0, result1, i = 0;
+  ({ [i++]: result0 = &quot;hungryByDefault&quot;, [i++]: result1 = &quot;hippoByDefault&quot;} = []);
+  return result0 === &quot;hungryByDefault&quot; &amp;&amp; result1 === &quot;hippoByDefault&quot; &amp;&amp; i === 2;
+}
+
+if (!test())
+  throw new Error(&quot;Test failed&quot;);
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6destructuring_assignment_computed_property_simplejs"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_simple.js (0 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_simple.js                                (rev 0)
+++ trunk/Source/JavaScriptCore/tests/es6/destructuring_assignment_computed_property_simple.js        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -0,0 +1,8 @@
</span><ins>+function test() {
+  var result0, result1, i = 0;
+  ({ [i++]: result0, [i++]: result1 } = [&quot;hungryhungry&quot;, &quot;hippos&quot;]);
+  return result0 === &quot;hungryhungry&quot; &amp;&amp; result1 === &quot;hippos&quot; &amp;&amp; i === 2;
+}
+
+if (!test())
+  throw new Error(&quot;Test failed&quot;);
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6yaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6.yaml (192767 => 192768)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6.yaml        2015-11-25 00:20:42 UTC (rev 192767)
+++ trunk/Source/JavaScriptCore/tests/es6.yaml        2015-11-25 01:43:14 UTC (rev 192768)
</span><span class="lines">@@ -216,6 +216,12 @@
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/destructuring_assignment_non_simple_target.js
</span><span class="cx">   cmd: runES6 :normal
</span><ins>+- path: es6/destructuring_assignment_computed_properties.js
+  cmd: runES6 :normal
+- path: es6/destructuring_assignment_computed_property_simple.js
+  cmd: runES6 :normal
+- path: es6/destructuring_assignment_computed_property_default.js
+  cmd: runES6 :normal
</ins><span class="cx"> - path: es6/destructuring_initializer_scoping.js
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/for..of_loops_with_arrays.js
</span><span class="lines">@@ -745,7 +751,7 @@
</span><span class="cx"> - path: es6/block-level_function_declaration.js
</span><span class="cx">   cmd: runES6 :fail
</span><span class="cx"> - path: es6/destructuring_computed_properties.js
</span><del>-  cmd: runES6 :fail
</del><ins>+  cmd: runES6 :normal
</ins><span class="cx"> - path: es6/destructuring_defaults_in_parameters_separate_scope.js
</span><span class="cx">   cmd: runES6 :fail
</span><span class="cx"> - path: es6/destructuring_iterator_closing.js
</span></span></pre>
</div>
</div>

</body>
</html>