<!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>[181121] trunk</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/181121">181121</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-03-05 17:16:25 -0800 (Thu, 05 Mar 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Source/JavaScriptCore:
ES6: Object Literal Extensions - Shorthand Properties (Identifiers)
https://bugs.webkit.org/show_bug.cgi?id=142353

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-03-05
Reviewed by Geoffrey Garen.

* parser/Parser.cpp:
(JSC::Parser&lt;LexerType&gt;::parseProperty):
Parsing an identifier property followed by a comma or end brace treat
as a shorthand property and create a property that has the same
property name as the identifier name and value of a variable with that
identifier. Otherwise, fall through to getter/setter parsing.

LayoutTests:
Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
https://bugs.webkit.org/show_bug.cgi?id=142367

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-03-05
Reviewed by Geoffrey Garen.

* js/object-literal-shorthand-construction-expected.txt: Added.
* js/object-literal-shorthand-construction.html: Added.
* js/script-tests/object-literal-shorthand-construction.js: Added.
(equivalent):
(testShorthandConstructionEquivalent):
(testShorthandConstructionNotEquivalent):
Tests specifically for new literal construction with shorthands.

* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
* sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
* sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
These tests use object literal shorthand construction syntax and expected
failures. The tests now fail differently, so just rebase their results.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestssputnikConformance12_Statement121_BlockS121_A4_T1expectedtxt">trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance12_Statement121_BlockS121_A4_T2expectedtxt">trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance12_Statement126_Iteration_Statements1264_The_for_in_StatementS1264_A15expectedtxt">trunk/LayoutTests/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsobjectliteralshorthandconstructionexpectedtxt">trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsobjectliteralshorthandconstructionhtml">trunk/LayoutTests/js/object-literal-shorthand-construction.html</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsobjectliteralshorthandconstructionjs">trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/LayoutTests/ChangeLog        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2015-03-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Follow-up fixes to ObjectTreeBaseTreeElement
+        https://bugs.webkit.org/show_bug.cgi?id=142367
+
+        Reviewed by Geoffrey Garen.
+
+        * js/object-literal-shorthand-construction-expected.txt: Added.
+        * js/object-literal-shorthand-construction.html: Added.
+        * js/script-tests/object-literal-shorthand-construction.js: Added.
+        (equivalent):
+        (testShorthandConstructionEquivalent):
+        (testShorthandConstructionNotEquivalent):
+        Tests specifically for new literal construction with shorthands.
+
+        * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt:
+        * sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt:
+        * sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt:
+        These tests use object literal shorthand construction syntax and expected
+        failures. The tests now fail differently, so just rebase their results.
+
</ins><span class="cx"> 2015-03-05  Timothy Horton  &lt;timothy_horton@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;attachment&gt; should allow the title property to override its title
</span></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralshorthandconstructionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt (0 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt                                (rev 0)
+++ trunk/LayoutTests/js/object-literal-shorthand-construction-expected.txt        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+basic tests for object literal shorthand construction
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS !!{a} is true
+PASS ({a}).a === 1 is true
+PASS ({a}).a === a is true
+PASS ({foo})['foo'] === foo is true
+PASS Object.getOwnPropertyDescriptor({a}, 'a').enumerable is true
+PASS Object.getOwnPropertyDescriptor({a}, 'a').configurable is true
+PASS Object.getOwnPropertyDescriptor({a}, 'a').writable is true
+PASS Object.keys({a,b}).join() is &quot;a,b&quot;
+PASS Object.keys({b,a}).join() is &quot;b,a&quot;
+PASS equivalent({a}, {a:a}) is true
+PASS equivalent({a}, {a:a}) is true
+PASS equivalent({a,}, {a:a}) is true
+PASS equivalent({a,a}, {a:a}) is true
+PASS equivalent({a,b}, {a:a, b:b}) is true
+PASS equivalent({ a , b }, {a:a, b:b}) is true
+PASS equivalent({a,b,}, {a:a, b:b}) is true
+PASS equivalent({a,b,a}, {a:a, b:b}) is true
+PASS equivalent({b,a,a}, {b:b, a:a}) is true
+PASS !equivalent({a}, {b:a}) is true
+PASS !equivalent({b}, {a:b}) is true
+PASS !equivalent({a,b}, {a:b, b:a}) is true
+PASS equivalent({foo}, {foo:foo}) is true
+PASS equivalent({foo}, {foo:foo}) is true
+PASS equivalent({foo,}, {foo:foo}) is true
+PASS equivalent({foo,foo}, {foo:foo}) is true
+PASS equivalent({foo,bar}, {foo:foo, bar:bar}) is true
+PASS equivalent({ foo , bar }, {foo:foo, bar:bar}) is true
+PASS equivalent({foo,bar,}, {foo:foo, bar:bar}) is true
+PASS equivalent({foo,bar,foo}, {foo:foo, bar:bar}) is true
+PASS equivalent({bar,foo,foo}, {bar:bar, foo:foo}) is true
+PASS equivalent({foo,bar,foo}, {foo:foo, bar:bar}) is true
+PASS equivalent({bar,foo,foo}, {bar:bar, foo:foo}) is true
+PASS !equivalent({foo}, {bar:foo}) is true
+PASS !equivalent({bar}, {foo:bar}) is true
+PASS !equivalent({foo,bar}, {foo:bar, bar:foo}) is true
+PASS equivalent({a, b:b, c}, {a, b, c}) is true
+PASS equivalent({a:a, b, c:c}, {a, b, c}) is true
+PASS equivalent({a, b, c:c}, {a, b, c}) is true
+PASS equivalent({'a':a, b, c:c}, {a, b, c}) is true
+PASS equivalent({nest:{a}}.nest, {nest: {a:a}}.nest) is true
+PASS equivalent({nest:[{a}]}.nest[0], {nest: [{a:a}]}.nest[0]) is true
+PASS equivalent([{nest:[{a}]}][0].nest[0], [{nest: [{a:a}]}][0].nest[0]) is true
+PASS equivalent({a,b,t,x,f,nul,un,fun,foo,bar}, {a:a, b:b, t:t, x:x, f:f, nul:null, un:un, fun:fun, foo:foo, bar:bar}) is true
+PASS equivalent({eval}, {eval: window.eval}) is true
+PASS ({noSuchIdentifier}) threw exception ReferenceError: Can't find variable: noSuchIdentifier.
+PASS ({a,noSuchIdentifier}) threw exception ReferenceError: Can't find variable: noSuchIdentifier.
+PASS ({noSuchIdentifier,a}) threw exception ReferenceError: Can't find variable: noSuchIdentifier.
+PASS ({a,b,noSuchIdentifier}) threw exception ReferenceError: Can't find variable: noSuchIdentifier.
+PASS ({get}) threw exception ReferenceError: Can't find variable: get.
+PASS ({set}) threw exception ReferenceError: Can't find variable: set.
+PASS equivalent({get}, {get: 1}) is true
+PASS equivalent({set}, {set: 2}) is true
+PASS ({get x(){ return true; }}).x is true
+PASS ({get 'x'(){ return true; }}).x is true
+PASS ({get 42(){ return true; }})['42'] is true
+PASS !!Object.getOwnPropertyDescriptor({set x(value){}}, 'x').set is true
+PASS !!Object.getOwnPropertyDescriptor({set 'x'(value){}}, 'x').set is true
+PASS !!Object.getOwnPropertyDescriptor({set 42(value){}}, '42').set is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralshorthandconstructionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/object-literal-shorthand-construction.html (0 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-shorthand-construction.html                                (rev 0)
+++ trunk/LayoutTests/js/object-literal-shorthand-construction.html        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;script src=&quot;script-tests/object-literal-shorthand-construction.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsobjectliteralshorthandconstructionjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js (0 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js                                (rev 0)
+++ trunk/LayoutTests/js/script-tests/object-literal-shorthand-construction.js        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -0,0 +1,110 @@
</span><ins>+description(&quot;basic tests for object literal shorthand construction&quot;);
+
+function equivalent(o1, o2) {
+    var keys1 = Object.keys(o1);
+    var keys2 = Object.keys(o2);
+    if (keys1.length !== keys2.length)
+        return false;
+
+    for (var i = 0; i &lt; keys1.length; ++i) {
+        if (keys1[i] !== keys2[i])
+            return false;
+    }
+
+    for (var p in o1) {
+        if (o1[p] !== o2[p])
+            return false;
+    }
+
+    return true;
+}
+
+function testShorthandConstructionEquivalent(expr1, expr2) {
+    shouldBeTrue(&quot;equivalent(&quot; + expr1 + &quot;, &quot; + expr2 + &quot;)&quot;);
+}
+
+function testShorthandConstructionNotEquivalent(expr1, expr2) {
+    shouldBeTrue(&quot;!equivalent(&quot; + expr1 + &quot;, &quot; + expr2 + &quot;)&quot;);
+}
+
+a = 1;
+b = 2;
+c = 3;
+t = true;
+x = -0;
+f = 123.456;
+nul = null;
+un = undefined;
+fun = function myFunction() {}
+foo = {property: &quot;value&quot;};
+bar = [1, 2, 3];
+
+shouldBeTrue(&quot;!!{a}&quot;);
+shouldBeTrue(&quot;({a}).a === 1&quot;);
+shouldBeTrue(&quot;({a}).a === a&quot;);
+shouldBeTrue(&quot;({foo})['foo'] === foo&quot;);
+shouldBeTrue(&quot;Object.getOwnPropertyDescriptor({a}, 'a').enumerable&quot;);
+shouldBeTrue(&quot;Object.getOwnPropertyDescriptor({a}, 'a').configurable&quot;);
+shouldBeTrue(&quot;Object.getOwnPropertyDescriptor({a}, 'a').writable&quot;);
+shouldBe(&quot;Object.keys({a,b}).join()&quot;, '&quot;a,b&quot;');
+shouldBe(&quot;Object.keys({b,a}).join()&quot;, '&quot;b,a&quot;');
+
+testShorthandConstructionEquivalent(&quot;{a}&quot;, &quot;{a:a}&quot;);
+testShorthandConstructionEquivalent(&quot;{a}&quot;, &quot;{a:a}&quot;);
+testShorthandConstructionEquivalent(&quot;{a,}&quot;, &quot;{a:a}&quot;);
+testShorthandConstructionEquivalent(&quot;{a,a}&quot;, &quot;{a:a}&quot;);
+testShorthandConstructionEquivalent(&quot;{a,b}&quot;, &quot;{a:a, b:b}&quot;);
+testShorthandConstructionEquivalent(&quot;{ a , b }&quot;, &quot;{a:a, b:b}&quot;);
+testShorthandConstructionEquivalent(&quot;{a,b,}&quot;, &quot;{a:a, b:b}&quot;);
+testShorthandConstructionEquivalent(&quot;{a,b,a}&quot;, &quot;{a:a, b:b}&quot;);
+testShorthandConstructionEquivalent(&quot;{b,a,a}&quot;, &quot;{b:b, a:a}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{a}&quot;, &quot;{b:a}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{b}&quot;, &quot;{a:b}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{a,b}&quot;, &quot;{a:b, b:a}&quot;);
+
+testShorthandConstructionEquivalent(&quot;{foo}&quot;, &quot;{foo:foo}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo}&quot;, &quot;{foo:foo}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,}&quot;, &quot;{foo:foo}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,foo}&quot;, &quot;{foo:foo}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,bar}&quot;, &quot;{foo:foo, bar:bar}&quot;);
+testShorthandConstructionEquivalent(&quot;{ foo , bar }&quot;, &quot;{foo:foo, bar:bar}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,bar,}&quot;, &quot;{foo:foo, bar:bar}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,bar,foo}&quot;, &quot;{foo:foo, bar:bar}&quot;);
+testShorthandConstructionEquivalent(&quot;{bar,foo,foo}&quot;, &quot;{bar:bar, foo:foo}&quot;);
+testShorthandConstructionEquivalent(&quot;{foo,bar,foo}&quot;, &quot;{foo:foo, bar:bar}&quot;);
+testShorthandConstructionEquivalent(&quot;{bar,foo,foo}&quot;, &quot;{bar:bar, foo:foo}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{foo}&quot;, &quot;{bar:foo}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{bar}&quot;, &quot;{foo:bar}&quot;);
+testShorthandConstructionNotEquivalent(&quot;{foo,bar}&quot;, &quot;{foo:bar, bar:foo}&quot;);
+
+testShorthandConstructionEquivalent(&quot;{a, b:b, c}&quot;, &quot;{a, b, c}&quot;);
+testShorthandConstructionEquivalent(&quot;{a:a, b, c:c}&quot;, &quot;{a, b, c}&quot;);
+testShorthandConstructionEquivalent(&quot;{a, b, c:c}&quot;, &quot;{a, b, c}&quot;);
+testShorthandConstructionEquivalent(&quot;{'a':a, b, c:c}&quot;, &quot;{a, b, c}&quot;);
+
+testShorthandConstructionEquivalent(&quot;{nest:{a}}.nest&quot;, &quot;{nest: {a:a}}.nest&quot;);
+testShorthandConstructionEquivalent(&quot;{nest:[{a}]}.nest[0]&quot;, &quot;{nest: [{a:a}]}.nest[0]&quot;);
+testShorthandConstructionEquivalent(&quot;[{nest:[{a}]}][0].nest[0]&quot;, &quot;[{nest: [{a:a}]}][0].nest[0]&quot;);
+testShorthandConstructionEquivalent(&quot;{a,b,t,x,f,nul,un,fun,foo,bar}&quot;, &quot;{a:a, b:b, t:t, x:x, f:f, nul:null, un:un, fun:fun, foo:foo, bar:bar}&quot;);
+
+testShorthandConstructionEquivalent(&quot;{eval}&quot;, &quot;{eval: window.eval}&quot;);
+
+shouldThrow(&quot;({noSuchIdentifier})&quot;);
+shouldThrow(&quot;({a,noSuchIdentifier})&quot;);
+shouldThrow(&quot;({noSuchIdentifier,a})&quot;);
+shouldThrow(&quot;({a,b,noSuchIdentifier})&quot;);
+
+shouldThrow(&quot;({get})&quot;); // Shorthand, not a getter, but ReferenceError.
+shouldThrow(&quot;({set})&quot;); // Shorthand, not a setter, but ReferenceError.
+get = 1;
+set = 2;
+testShorthandConstructionEquivalent(&quot;{get}&quot;, &quot;{get: 1}&quot;);
+testShorthandConstructionEquivalent(&quot;{set}&quot;, &quot;{set: 2}&quot;);
+
+// Getter/Setter syntax still works.
+shouldBeTrue(&quot;({get x(){ return true; }}).x&quot;);
+shouldBeTrue(&quot;({get 'x'(){ return true; }}).x&quot;);
+shouldBeTrue(&quot;({get 42(){ return true; }})['42']&quot;);
+shouldBeTrue(&quot;!!Object.getOwnPropertyDescriptor({set x(value){}}, 'x').set&quot;);
+shouldBeTrue(&quot;!!Object.getOwnPropertyDescriptor({set 'x'(value){}}, 'x').set&quot;);
+shouldBeTrue(&quot;!!Object.getOwnPropertyDescriptor({set 42(value){}}, '42').set&quot;);
</ins></span></pre></div>
<a id="trunkLayoutTestssputnikConformance12_Statement121_BlockS121_A4_T1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T1-expected.txt        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1,7 +1,6 @@
</span><del>-CONSOLE MESSAGE: line 80: SyntaxError: Unexpected token '}'. Expected a ':' following the property name '__func'.
</del><span class="cx"> S12.1_A4_T1
</span><span class="cx"> 
</span><del>-PASS Expected parsing failure
</del><ins>+PASS TypeError: Object is not a function (evaluating '{__func}()')
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance12_Statement121_BlockS121_A4_T2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/LayoutTests/sputnik/Conformance/12_Statement/12.1_Block/S12.1_A4_T2-expected.txt        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1,7 +1,6 @@
</span><del>-CONSOLE MESSAGE: line 80: SyntaxError: Unexpected token '}'. Expected a ':' following the property name 'x'.
</del><span class="cx"> S12.1_A4_T2
</span><span class="cx"> 
</span><del>-PASS Expected parsing failure
</del><ins>+FAIL No error detected
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance12_Statement126_Iteration_Statements1264_The_for_in_StatementS1264_A15expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/LayoutTests/sputnik/Conformance/12_Statement/12.6_Iteration_Statements/12.6.4_The_for_in_Statement/S12.6.4_A15-expected.txt        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1,7 +1,6 @@
</span><del>-CONSOLE MESSAGE: line 79: SyntaxError: Unexpected token '}'. Expected a ':' following the property name '__arr'.
</del><span class="cx"> S12.6.4_A15
</span><span class="cx"> 
</span><del>-PASS Expected parsing failure
</del><ins>+FAIL No error detected
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-03-05  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        ES6: Object Literal Extensions - Shorthand Properties (Identifiers)
+        https://bugs.webkit.org/show_bug.cgi?id=142353
+
+        Reviewed by Geoffrey Garen.
+
+        * parser/Parser.cpp:
+        (JSC::Parser&lt;LexerType&gt;::parseProperty):
+        Parsing an identifier property followed by a comma or end brace treat
+        as a shorthand property and create a property that has the same
+        property name as the identifier name and value of a variable with that
+        identifier. Otherwise, fall through to getter/setter parsing.
+
</ins><span class="cx"> 2015-03-05  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Unreviewed gardening.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (181120 => 181121)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-06 00:52:55 UTC (rev 181120)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-03-06 01:16:25 UTC (rev 181121)
</span><span class="lines">@@ -1869,7 +1869,6 @@
</span><span class="cx"> template &lt;typename LexerType&gt;
</span><span class="cx"> template &lt;class TreeBuilder&gt; TreeExpression Parser&lt;LexerType&gt;::parseBinaryExpression(TreeBuilder&amp; context)
</span><span class="cx"> {
</span><del>-    
</del><span class="cx">     int operandStackDepth = 0;
</span><span class="cx">     int operatorStackDepth = 0;
</span><span class="cx">     typename TreeBuilder::BinaryExprContext binaryExprContext(context);
</span><span class="lines">@@ -1928,7 +1927,7 @@
</span><span class="cx">             nextExpectIdentifier(LexerFlagsIgnoreReservedWords);
</span><span class="cx">         else
</span><span class="cx">             nextExpectIdentifier(LexerFlagsIgnoreReservedWords | TreeBuilder::DontBuildKeywords);
</span><del>-        
</del><ins>+
</ins><span class="cx">         if (match(COLON)) {
</span><span class="cx">             next();
</span><span class="cx">             TreeExpression node = parseAssignmentExpression(context);
</span><span class="lines">@@ -1936,7 +1935,17 @@
</span><span class="cx">             context.setEndOffset(node, m_lexer-&gt;currentOffset());
</span><span class="cx">             return context.createProperty(ident, node, PropertyNode::Constant, complete);
</span><span class="cx">         }
</span><ins>+
</ins><span class="cx">         failIfFalse(wasIdent, &quot;Expected an identifier as property name&quot;);
</span><ins>+
+        if (match(COMMA) || match(CLOSEBRACE)) {
+            JSTextPosition start = tokenStartPosition();
+            JSTokenLocation location(tokenLocation());
+            currentScope()-&gt;useVariable(ident, m_vm-&gt;propertyNames-&gt;eval == *ident);
+            TreeExpression node = context.createResolve(location, ident, start);
+            return context.createProperty(ident, node, PropertyNode::Constant, complete);
+        }
+
</ins><span class="cx">         PropertyNode::Type type;
</span><span class="cx">         if (*ident == m_vm-&gt;propertyNames-&gt;get)
</span><span class="cx">             type = PropertyNode::Getter;
</span></span></pre>
</div>
</div>

</body>
</html>