<!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>[184324] 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/184324">184324</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-05-13 18:32:25 -0700 (Wed, 13 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>ES6: Allow duplicate property names
https://bugs.webkit.org/show_bug.cgi?id=142895
Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-05-13
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
Introduce new `op_put_getter_by_id` and `op_put_setter_by_id` opcodes
that will define a single getter or setter property on an object.
The existing `op_put_getter_setter` opcode is still preferred for
putting both a getter and setter at the same time but cannot be used
for putting an individual getter or setter which is needed in
some cases.
Add a new slow path when generating bytecodes for a property list
with computed properties, as computed properties are the only time
the list of properties cannot be determined statically.
* bytecompiler/NodesCodegen.cpp:
(JSC::PropertyListNode::emitBytecode):
- fast path for all constant properties
- slow but paired getter/setter path if there are no computed properties
- slow path, individual put operation for every property, if there are computed properties
* parser/Nodes.h:
Distinguish a Computed property from a Constant property.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePropertyMethod):
Distingish Computed and Constant properties.
(JSC::Parser<LexerType>::parseObjectLiteral):
When we drop into strict mode it is because we saw a getter
or setter, so be more explicit.
(JSC::Parser<LexerType>::parseStrictObjectLiteral):
Eliminate duplicate property syntax error exception.
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::getName):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::getName): Deleted.
No longer used.
* runtime/JSObject.h:
(JSC::JSObject::putDirectInternal):
When updating a property. If the Accessor attribute changed
update the Structure.
* runtime/JSObject.cpp:
(JSC::JSObject::putGetter):
(JSC::JSObject::putSetter):
Called by the opcodes, just perform the same operation that
__defineGetter__ or __defineSetter__ would do.
(JSC::JSObject::putDirectNonIndexAccessor):
This transition is now handled in putDirectInternal.
* runtime/Structure.h:
Add needed export.
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitPutGetterById):
(JSC::BytecodeGenerator::emitPutSetterById):
* bytecompiler/BytecodeGenerator.h:
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITInlines.h:
(JSC::JIT::callOperation):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
* jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
New bytecodes. Modelled after existing op_put_getter_setter.
LayoutTests:
* js/object-literal-duplicate-properties-expected.txt: Added.
* js/object-literal-duplicate-properties.html: Added.
* js/script-tests/object-literal-duplicate-properties.js: Added.
Include a new test all about testing duplicate property names
and their expected cascading results.
* ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt:
* ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt:
ES5 behavior for duplciate properties has changed.
* js/mozilla/strict/11.1.5-expected.txt:
* js/object-literal-syntax-expected.txt:
* js/script-tests/object-literal-syntax.js:
Update other tests and values now that duplicate properties
are allowed, and their cascade order behaves correctly.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44b1expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44b2expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44c1expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44c2expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44d1expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44d2expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44d3expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1115_44d4expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsmozillastrict1115expectedtxt">trunk/LayoutTests/js/mozilla/strict/11.1.5-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsobjectliteralsyntaxexpectedtxt">trunk/LayoutTests/js/object-literal-syntax-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsobjectliteralsyntaxjs">trunk/LayoutTests/js/script-tests/object-literal-syntax.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeListjson">trunk/Source/JavaScriptCore/bytecode/BytecodeList.json</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeBytecodeUseDefh">trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitCCallHelpersh">trunk/Source/JavaScriptCore/jit/CCallHelpers.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITh">trunk/Source/JavaScriptCore/jit/JIT.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITInlinesh">trunk/Source/JavaScriptCore/jit/JITInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationscpp">trunk/Source/JavaScriptCore/jit/JITOperations.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITOperationsh">trunk/Source/JavaScriptCore/jit/JITOperations.h</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITPropertyAccesscpp">trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITPropertyAccess32_64cpp">trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathscpp">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLLIntSlowPathsh">trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h</a></li>
<li><a href="#trunkSourceJavaScriptCorellintLowLevelInterpreterasm">trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm</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="#trunkSourceJavaScriptCoreruntimeJSObjectcpp">trunk/Source/JavaScriptCore/runtime/JSObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSObjecth">trunk/Source/JavaScriptCore/runtime/JSObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStructureh">trunk/Source/JavaScriptCore/runtime/Structure.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsobjectliteralduplicatepropertiesexpectedtxt">trunk/LayoutTests/js/object-literal-duplicate-properties-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsobjectliteralduplicatepropertieshtml">trunk/LayoutTests/js/object-literal-duplicate-properties.html</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsobjectliteralduplicatepropertiesjs">trunk/LayoutTests/js/script-tests/object-literal-duplicate-properties.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ChangeLog        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ ES6: Allow duplicate property names
+ https://bugs.webkit.org/show_bug.cgi?id=142895
+
+ Reviewed by Geoffrey Garen.
+
+ * js/object-literal-duplicate-properties-expected.txt: Added.
+ * js/object-literal-duplicate-properties.html: Added.
+ * js/script-tests/object-literal-duplicate-properties.js: Added.
+ Include a new test all about testing duplicate property names
+ and their expected cascading results.
+
+ * ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt:
+ * ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt:
+ ES5 behavior for duplciate properties has changed.
+
+ * js/mozilla/strict/11.1.5-expected.txt:
+ * js/object-literal-syntax-expected.txt:
+ * js/script-tests/object-literal-syntax.js:
+ Update other tests and values now that duplicate properties
+ are allowed, and their cascade order behaves correctly.
+
</ins><span class="cx"> 2015-05-13 Antti Koivisto <antti@apple.com>
</span><span class="cx">
</span><span class="cx"> Cached CSS image resources don't show up after reloading <http://nightly.webkit.org/start/>
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44b1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-1-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44b2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-b-2-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44c1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-1-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44c2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-c-2-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44d1expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-1-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44d2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-2-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44d3expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-3-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1115_44d4expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/ietestcenter/Javascript/11.1.5_4-4-d-4-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> PASS ES5Harness.preconditionPassed is true
</span><del>-PASS ES5Harness.testPassed is true
</del><ins>+FAIL ES5Harness.testPassed should be true (of type boolean). Was undefined (of type undefined).
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjsmozillastrict1115expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/mozilla/strict/11.1.5-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/mozilla/strict/11.1.5-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/js/mozilla/strict/11.1.5-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1,74 +1,74 @@
</span><del>-PASS Function("'use strict'; ({x:1, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({x:1, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({x:1, x:1})") is true
</span><span class="cx"> PASS true === true
</span><span class="cx"> PASS !!Function("'use strict'; ({x:1, y:1})") is true
</span><span class="cx"> PASS !!Function("({x:1, y:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({x:1, y:1, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({x:1, y:1, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({x:1, y:1, x:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({x:1, \"x\":1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({x:1, \"x\":1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({x:1, \"x\":1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({\"x\":1, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({\"x\":1, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({\"x\":1, x:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({\"x\":1, \"x\":1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({\"x\":1, \"x\":1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({\"x\":1, \"x\":1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({1.5:1, 1.5:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({1.5:1, 1.5:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({1.5:1, 1.5:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({1.5:1, 15e-1:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({1.5:1, 15e-1:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({1.5:1, 15e-1:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({6.02214179e23:1, 6.02214179e23:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({6.02214179e23:1, 6.02214179e23:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({6.02214179e23:1, 6.02214179e23:1})") is true
</span><span class="cx"> PASS true === true
</span><span class="cx"> PASS !!Function("'use strict'; ({6.02214179e23:1, 3.1415926535:1})") is true
</span><span class="cx"> PASS !!Function("({6.02214179e23:1, 3.1415926535:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({ 1: 1, \"1\": 2 })") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({ 1: 1, \"1\": 2 })") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({ 1: 1, \"1\": 2 })") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({ \"1\": 1, 1: 2 })") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({ \"1\": 1, 1: 2 })") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({ \"1\": 1, 1: 2 })") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({ 2.5: 1, \"2.5\": 2 })") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({ 2.5: 1, \"2.5\": 2 })") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({ 2.5: 1, \"2.5\": 2 })") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({ \"2.5\": 1, 2.5: 2 })") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({ \"2.5\": 1, 2.5: 2 })") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({ \"2.5\": 1, 2.5: 2 })") is true
</span><span class="cx"> PASS true === true
</span><span class="cx"> PASS !!Function("'use strict'; ({a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1, q:1, r:1, s:1, t:1, u:1, v:1, w:1, x:1, y:1, z:1})") is true
</span><span class="cx"> PASS !!Function("({a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1, q:1, r:1, s:1, t:1, u:1, v:1, w:1, x:1, y:1, z:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1, q:1, r:1, s:1, t:1, u:1, v:1, w:1, x:1, y:1, a:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1, q:1, r:1, s:1, t:1, u:1, v:1, w:1, x:1, y:1, a:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS !!Function("({a:1, b:1, c:1, d:1, e:1, f:1, g:1, h:1, i:1, j:1, k:1, l:1, m:1, n:1, o:1, p:1, q:1, r:1, s:1, t:1, u:1, v:1, w:1, x:1, y:1, a:1})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({get x() {}, x:1})") threw exception of type SyntaxError.
-PASS Function("({get x() {}, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({get x() {}, x:1})") should throw an instance of SyntaxError
+FAIL Function("({get x() {}, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({x:1, get x() {}})") threw exception of type SyntaxError.
-PASS Function("({x:1, get x() {}})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({x:1, get x() {}})") should throw an instance of SyntaxError
+FAIL Function("({x:1, get x() {}})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({set x(q) {}, x:1})") threw exception of type SyntaxError.
-PASS Function("({set x(q) {}, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({set x(q) {}, x:1})") should throw an instance of SyntaxError
+FAIL Function("({set x(q) {}, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({x:1, set x(q) {}})") threw exception of type SyntaxError.
-PASS Function("({x:1, set x(q) {}})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({x:1, set x(q) {}})") should throw an instance of SyntaxError
+FAIL Function("({x:1, set x(q) {}})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({1:1, set 1(q) {}})") threw exception of type SyntaxError.
-PASS Function("({1:1, set 1(q) {}})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({1:1, set 1(q) {}})") should throw an instance of SyntaxError
+FAIL Function("({1:1, set 1(q) {}})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({set 1(q) {}, 1:1})") threw exception of type SyntaxError.
-PASS Function("({set 1(q) {}, 1:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({set 1(q) {}, 1:1})") should throw an instance of SyntaxError
+FAIL Function("({set 1(q) {}, 1:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({\"1\":1, set 1(q) {}})") threw exception of type SyntaxError.
-PASS Function("({\"1\":1, set 1(q) {}})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({\"1\":1, set 1(q) {}})") should throw an instance of SyntaxError
+FAIL Function("({\"1\":1, set 1(q) {}})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({set 1(q) {}, \"1\":1})") threw exception of type SyntaxError.
-PASS Function("({set 1(q) {}, \"1\":1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({set 1(q) {}, \"1\":1})") should throw an instance of SyntaxError
+FAIL Function("({set 1(q) {}, \"1\":1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><span class="cx"> PASS !!Function("'use strict'; ({get x() {}, set x(q) {}})") is true
</span><span class="cx"> PASS !!Function("({get x() {}, set x(q) {}})") is true
</span><span class="lines">@@ -76,14 +76,14 @@
</span><span class="cx"> PASS !!Function("'use strict'; ({set x(q) {}, get x() {}})") is true
</span><span class="cx"> PASS !!Function("({set x(q) {}, get x() {}})") is true
</span><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({get x() {}, set x(q) {}, x:1})") threw exception of type SyntaxError.
-PASS Function("({get x() {}, set x(q) {}, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({get x() {}, set x(q) {}, x:1})") should throw an instance of SyntaxError
+FAIL Function("({get x() {}, set x(q) {}, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({set x(q) {}, get x() {}, x:1})") threw exception of type SyntaxError.
-PASS Function("({set x(q) {}, get x() {}, x:1})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({set x(q) {}, get x() {}, x:1})") should throw an instance of SyntaxError
+FAIL Function("({set x(q) {}, get x() {}, x:1})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><del>-PASS Function("'use strict'; ({get x() {}, get x() {}})") threw exception of type SyntaxError.
-PASS Function("({get x() {}, get x() {}})") threw exception of type SyntaxError.
</del><ins>+FAIL Function("'use strict'; ({get x() {}, get x() {}})") should throw an instance of SyntaxError
+FAIL Function("({get x() {}, get x() {}})") should throw an instance of SyntaxError
</ins><span class="cx"> PASS true === true
</span><span class="cx"> PASS Function("'use strict'; ({set x() {}, set x() {}})") threw exception of type SyntaxError.
</span><span class="cx"> PASS Function("({set x() {}, set x() {}})") threw exception of type SyntaxError.
</span></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralduplicatepropertiesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/object-literal-duplicate-properties-expected.txt (0 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-duplicate-properties-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/object-literal-duplicate-properties-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -0,0 +1,211 @@
</span><ins>+basic tests for object literal duplicate properties
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS x is 1
+PASS o.foo is 'getter'
+PASS x is 1
+PASS o.foo is 0
+PASS x is 1
+PASS o.foo is 'getter'
+PASS x is 1
+PASS o.foo is 0
+PASS x is 4
+PASS o.foo is 3
+PASS o.bar is undefined
+FAIL Object.keys(o).join() should be foo,test1,bar,test2,test3,nest. Was test1,test2,test3,foo,bar,nest.
+
+Basic
+PASS o = {foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1}; o.foo = 2; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1}; o.foo = 2; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1}; o.foo = 2; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, foo:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, fooo:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:2 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, fooo:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:2 [ECW][Extensible]'
+PASS (function(){o = {foo:1, fooo:2, foo:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, fooo:2, foo:3}; o.foo = 4; descriptionString(o, 'foo'); is 'value:4 keys:2 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, fooo:2, foo:3}; o.foo = 4; descriptionString(o, 'foo'); is 'value:4 keys:2 [ECW][Extensible]'
+PASS (function(){o = {foo:1, fooo:2, foo:3}; o.foo = 4; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, fooo:2, foo:3, bar: 9}; descriptionString(o, 'foo'); is 'value:3 keys:3 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, fooo:2, foo:3, bar: 9}; descriptionString(o, 'foo'); is 'value:3 keys:3 [ECW][Extensible]'
+PASS (function(){o = {foo:1, fooo:2, foo:3, bar: 9}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, foo:3}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, foo:3}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.seal(o);; descriptionString(o, 'foo'); is 'value:3 keys:1 [EW][Sealed]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.seal(o);; descriptionString(o, 'foo'); is 'value:3 keys:1 [EW][Sealed]'
+PASS (function(){o = {foo:1, foo:3}; Object.seal(o);; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo'); is 'value:5 keys:1 [EW][Sealed]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo'); is 'value:5 keys:1 [EW][Sealed]'
+PASS (function(){o = {foo:1, foo:3}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [EW][Sealed]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [EW][Sealed]'
+PASS (function(){o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS 'use strict';o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS (function(){o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo');})() threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS o = {foo:1, foo:3}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'value:3 keys:1 [EW][Sealed]'
+PASS 'use strict';o = {foo:1, foo:3}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'value:3 keys:1 [EW][Sealed]'
+PASS (function(){o = {foo:1, foo:3}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo');})() did not throw exception.
+
+Basic + Computed
+PASS o = {['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, ['foo']:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, foo:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, foo:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, foo:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, ['foo']:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, ['foo']:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, ['foo']:2, foo:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, foo:2, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, foo:2, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, foo:2, ['foo']:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, ['foo']:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, ['foo']:2}; o.foo = 3; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, ['foo']:2}; o.foo = 3; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, ['foo']:2}; o.foo = 3; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, ['bar']:2}; descriptionString(o, 'foo'); is 'value:1 keys:2 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, ['bar']:2}; descriptionString(o, 'foo'); is 'value:1 keys:2 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, ['bar']:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, ['bar']:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:2 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, ['bar']:2, foo:3}; descriptionString(o, 'foo'); is 'value:3 keys:2 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, ['bar']:2, foo:3}; descriptionString(o, 'foo');})() did not throw exception.
+
+Basic + Accessor
+PASS o = {get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {get foo(){return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {set foo(x){}}; descriptionString(o, 'foo'); is 'setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {set foo(x){}}; descriptionString(o, 'foo'); is 'setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {set foo(x){}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 1}, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {get foo(){return 1}, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {get foo(){return 1}, get foo(){return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, set foo(x){}, get foo(){return 3}}; descriptionString(o, 'foo'); is 'getter:function value:(3) setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, set foo(x){}, get foo(){return 3}}; descriptionString(o, 'foo'); is 'getter:function value:(3) setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {get foo(){return 2}, set foo(x){}, get foo(){return 3}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {bar:1, get foo(){return 2}, set foo(x){}, baz:1}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:3 [EC][Extensible]'
+PASS 'use strict';o = {bar:1, get foo(){return 2}, set foo(x){}, baz:1}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:3 [EC][Extensible]'
+PASS (function(){o = {bar:1, get foo(){return 2}, set foo(x){}, baz:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, set foo(x){}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, set foo(x){}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, set foo(x){}, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return -1}, foo:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return -1}, foo:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return -1}, foo:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 2}, bar:3}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:2 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 2}, bar:3}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:2 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 2}, bar:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return -1}, foo:-1, get foo() {return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return -1}, foo:-1, get foo() {return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return -1}, foo:-1, get foo() {return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); is 'value:5 keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(5) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 3}}; o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}, set foo(x){}}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo'); is 'getter:function value:(3) setter:function keys:1 [E][Sealed][Frozen]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}, set foo(x){}}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo'); is 'getter:function value:(3) setter:function keys:1 [E][Sealed][Frozen]'
+PASS (function(){o = {foo:1, get foo(){return 3}, set foo(x){}}; Object.seal(o); o.foo = 5; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}}; Object.seal(o);; descriptionString(o, 'foo'); is 'getter:function value:(3) keys:1 [E][Sealed][Frozen]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.seal(o);; descriptionString(o, 'foo'); is 'getter:function value:(3) keys:1 [E][Sealed][Frozen]'
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.seal(o);; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change the getter of an unconfigurable property..
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change the getter of an unconfigurable property..
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}}); descriptionString(o, 'foo');})() threw exception TypeError: Attempting to change the getter of an unconfigurable property..
+PASS o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo'); threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5}); descriptionString(o, 'foo');})() threw exception TypeError: Attempting to change access mechanism for an unconfigurable property..
+PASS o = {foo:1, get foo(){return 3}}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(3) keys:1 [E][Sealed][Frozen]'
+PASS 'use strict';o = {foo:1, get foo(){return 3}}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo'); is 'getter:function value:(3) keys:1 [E][Sealed][Frozen]'
+PASS (function(){o = {foo:1, get foo(){return 3}}; Object.seal(o); o.__defineGetter__('foo', function(){return 5}); descriptionString(o, 'foo');})() did not throw exception.
+
+Computed + Accessor
+PASS o = {['foo']:1, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {['foo']:1, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {['foo']:1, get foo(){return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {['foo']:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {['foo']:1, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, ['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, ['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, ['foo']:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, set foo(x){}, ['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, set foo(x){}, ['foo']:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, set foo(x){}, ['foo']:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, get foo(){return -1}, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:1, get foo(){return -1}, ['foo']:2}; descriptionString(o, 'foo'); is 'value:2 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:1, get foo(){return -1}, ['foo']:2}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, get foo(){return 2}, ['bar']:3}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:2 [EC][Extensible]'
+PASS 'use strict';o = {['foo']:1, get foo(){return 2}, ['bar']:3}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:2 [EC][Extensible]'
+PASS (function(){o = {['foo']:1, get foo(){return 2}, ['bar']:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:1, get foo(){return -1}, ['foo']:-1, get foo() {return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {['foo']:1, get foo(){return -1}, ['foo']:-1, get foo() {return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {['foo']:1, get foo(){return -1}, ['foo']:-1, get foo() {return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+
+Basic + Computed + Accessor
+PASS o = {foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, ['foo']:3, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, ['foo']:3, get foo(){return 2}}; descriptionString(o, 'foo'); is 'getter:function value:(2) keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, ['foo']:3, get foo(){return 2}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {foo:1, ['foo']:3, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS 'use strict';o = {foo:1, ['foo']:3, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo'); is 'getter:function value:(2) setter:function keys:1 [EC][Extensible]'
+PASS (function(){o = {foo:1, ['foo']:3, get foo(){return 2}, set foo(x){}}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, ['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, ['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, ['foo']:3, get foo(){return 2}, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {set foo(x){}, ['foo']:3, set foo(x){}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {set foo(x){}, ['foo']:3, set foo(x){}, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {set foo(x){}, ['foo']:3, set foo(x){}, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {set foo(x){}, foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {set foo(x){}, foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo'); is 'value:3 keys:1 [ECW][Extensible]'
+PASS (function(){o = {set foo(x){}, foo:1, get foo(){return 2}, ['foo']:3}; descriptionString(o, 'foo');})() did not throw exception.
+PASS o = {get foo(){return 2}, get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS 'use strict';o = {get foo(){return 2}, get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo'); is 'value:1 keys:1 [ECW][Extensible]'
+PASS (function(){o = {get foo(){return 2}, get foo(){return 2}, ['foo']:3, foo:1}; descriptionString(o, 'foo');})() did not throw exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralduplicatepropertieshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/object-literal-duplicate-properties.html (0 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-duplicate-properties.html         (rev 0)
+++ trunk/LayoutTests/js/object-literal-duplicate-properties.html        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="script-tests/object-literal-duplicate-properties.js"></script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsobjectliteralsyntaxexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/object-literal-syntax-expected.txt (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/object-literal-syntax-expected.txt        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/js/object-literal-syntax-expected.txt        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -3,20 +3,20 @@
</span><span class="cx"> On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx">
</span><span class="cx">
</span><del>-PASS ({a:1, get a(){}}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({a:1, set a(x){}}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({get a(){}, a:1}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({set a(x){}, a:1}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({get a(){}, get a(){}}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({set a(x){}, set a(x){}}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS ({set a(x){}, get a(){}, set a(x){}}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({a:1, get a(){}})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({a:1, set a(x){}})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({get a(){}, a:1})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({set a(x){}, a:1})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({get a(){}, get a(){}})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({set a(x){}, set a(x){}})}) threw exception SyntaxError: Attempted to redefine property 'a'..
-PASS (function(){({set a(x){}, get a(){}, set a(x){}})}) threw exception SyntaxError: Attempted to redefine property 'a'..
</del><ins>+PASS ({a:1, get a(){}}) did not throw exception.
+PASS ({a:1, set a(x){}}) did not throw exception.
+PASS ({get a(){}, a:1}) did not throw exception.
+PASS ({set a(x){}, a:1}) did not throw exception.
+PASS ({get a(){}, get a(){}}) did not throw exception.
+PASS ({set a(x){}, set a(x){}}) did not throw exception.
+PASS ({set a(x){}, get a(){}, set a(x){}}) did not throw exception.
+PASS (function(){({a:1, get a(){}})}) did not throw exception.
+PASS (function(){({a:1, set a(x){}})}) did not throw exception.
+PASS (function(){({get a(){}, a:1})}) did not throw exception.
+PASS (function(){({set a(x){}, a:1})}) did not throw exception.
+PASS (function(){({get a(){}, get a(){}})}) did not throw exception.
+PASS (function(){({set a(x){}, set a(x){}})}) did not throw exception.
+PASS (function(){({set a(x){}, get a(){}, set a(x){}})}) did not throw exception.
</ins><span class="cx"> PASS ({a:1, a:1, a:1}), true is true
</span><span class="cx"> PASS ({get a(){}, set a(x){}}), true is true
</span><span class="cx"> PASS ({set a(x){}, get a(){}}), true is true
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsobjectliteralduplicatepropertiesjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/object-literal-duplicate-properties.js (0 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/object-literal-duplicate-properties.js         (rev 0)
+++ trunk/LayoutTests/js/script-tests/object-literal-duplicate-properties.js        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -0,0 +1,184 @@
</span><ins>+description("basic tests for object literal duplicate properties");
+
+// Ensure basic properties get eliminated by getters.
+x = 0;
+o = {
+ foo: x++,
+ get foo() {return "getter"},
+};
+shouldBe("x", "1");
+shouldBe("o.foo", "'getter'");
+
+// Ensure getters/setters get eliminated by computed properties.
+x = 0;
+o = {
+ get foo() {return "getter"},
+ foo: x++,
+};
+shouldBe("x", "1");
+shouldBe("o.foo", "0");
+
+// Ensure computed properties are eliminated by getters/setters.
+x = 0;
+o = {
+ ['foo']: x++,
+ get foo() {return "getter"},
+};
+shouldBe("x", "1");
+shouldBe("o.foo", "'getter'");
+
+// Ensure getters/setters properties are eliminated by computed properties.
+x = 0;
+o = {
+ get foo() {return "getter"},
+ set foo(x) {},
+ ['foo']: x++,
+};
+shouldBe("x", "1");
+shouldBe("o.foo", "0");
+
+// Multiple types and multiple properties.
+x = 0;
+o = {
+ get foo() { return "NO"; },
+ foo: x++,
+ set test1(x) {},
+ bar: x++,
+ get test2() {},
+ ['test3']: x++,
+ get foo() {return "getter"},
+ ['foo']: x++,
+ set bar(x) {},
+ nest: {foo:1, get foo(){}, bar:1, set foo(x){}},
+};
+shouldBe("x", "4");
+shouldBe("o.foo", "3");
+shouldBe("o.bar", "undefined");
+// FIXME: <https://webkit.org/b/142933> Redefining a property should not change its insertion index (Object.keys order)
+shouldBe("Object.keys(o).join()", "'foo,test1,bar,test2,test3,nest'");
+
+
+
+function descriptionString(o, property) {
+ var descriptor = Object.getOwnPropertyDescriptor(o, property);
+ if (!descriptor)
+ return "PROPERTY NOT FOUND";
+
+ var string = "";
+ if (descriptor.value)
+ string += "value:" + String(descriptor.value) + " ";
+ if (descriptor.get)
+ string += "getter:" + typeof descriptor.get + " value:(" + o[property] + ") ";
+ if (descriptor.set)
+ string += "setter:" + typeof descriptor.set + " ";
+
+ string += "keys:" + Object.keys(o).length + " ";
+
+ string += "[";
+ if (descriptor.enumerable)
+ string += "E";
+ if (descriptor.configurable)
+ string += "C";
+ if (descriptor.writable)
+ string += "W";
+ string += "]";
+
+ if (Object.isSealed(o))
+ string += "[Sealed]";
+ if (Object.isFrozen(o))
+ string += "[Frozen]";
+ if (Object.isExtensible(o))
+ string += "[Extensible]";
+
+ return string;
+}
+
+function runTest(test, expected) {
+ test = test + "; descriptionString(o, 'foo');";
+ if (expected) {
+ shouldBe(test, expected);
+ shouldBe("'use strict';" + test, expected);
+ shouldNotThrow("(function(){" + test + "})()");
+ } else {
+ shouldThrow(test);
+ shouldThrow("'use strict';" + test);
+ shouldThrow("(function(){" + test + "})()");
+ }
+}
+
+// Basic properties.
+debug(""); debug("Basic");
+runTest("o = {foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1}; o.foo = 2", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, foo:3}", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, fooo:2, foo:3}", "'value:3 keys:2 [ECW][Extensible]'");
+runTest("o = {foo:1, fooo:2, foo:3}; o.foo = 4", "'value:4 keys:2 [ECW][Extensible]'");
+runTest("o = {foo:1, fooo:2, foo:3, bar: 9}", "'value:3 keys:3 [ECW][Extensible]'");
+runTest("o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {value:5})", "'value:5 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, foo:3}; Object.defineProperty(o, 'foo', {get(){return 5}})", "'getter:function value:(5) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, foo:3}; o.__defineGetter__('foo', function(){return 5})", "'getter:function value:(5) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, foo:3}; Object.seal(o);", "'value:3 keys:1 [EW][Sealed]'");
+runTest("o = {foo:1, foo:3}; Object.seal(o); o.foo = 5", "'value:5 keys:1 [EW][Sealed]'");
+runTest("o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5})", "'value:5 keys:1 [EW][Sealed]'");
+runTest("o = {foo:1, foo:3}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}})", null);
+// FIXME: <https://webkit.org/b/142934> __defineGetter__/__defineSetter__ should throw exceptions
+runTest("o = {foo:1, foo:3}; Object.seal(o); o.__defineGetter__('foo', function(){return 5})", "'value:3 keys:1 [EW][Sealed]'");
+
+// Basic properties with Computed properties.
+debug(""); debug("Basic + Computed");
+runTest("o = {['foo']:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, ['foo']:2}", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, foo:2}", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, ['foo']:2, foo:3}", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, foo:2, ['foo']:3}", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, ['foo']:2}", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, ['foo']:2}; o.foo = 3", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, ['bar']:2}", "'value:1 keys:2 [ECW][Extensible]'");
+runTest("o = {['foo']:1, ['bar']:2, foo:3}", "'value:3 keys:2 [ECW][Extensible]'");
+
+// Basic properties with Accessor properties.
+debug(""); debug("Basic + Accessor");
+runTest("o = {get foo(){return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {set foo(x){}}", "'setter:function keys:1 [EC][Extensible]'");
+runTest("o = {get foo(){return 1}, get foo(){return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {get foo(){return 2}, set foo(x){}}", "'getter:function value:(2) setter:function keys:1 [EC][Extensible]'");
+runTest("o = {get foo(){return 2}, set foo(x){}, get foo(){return 3}}", "'getter:function value:(3) setter:function keys:1 [EC][Extensible]'");
+runTest("o = {bar:1, get foo(){return 2}, set foo(x){}, baz:1}", "'getter:function value:(2) setter:function keys:3 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 2}, set foo(x){}}", "'getter:function value:(2) setter:function keys:1 [EC][Extensible]'");
+runTest("o = {get foo(){return 2}, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {get foo(){return 2}, set foo(x){}, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, get foo(){return -1}, foo:2}", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, get foo(){return 2}, bar:3}", "'getter:function value:(2) keys:2 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return -1}, foo:-1, get foo() {return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {value:5})", "'value:5 keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 3}}; Object.defineProperty(o, 'foo', {get(){return 5}})", "'getter:function value:(5) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 3}}; o.__defineGetter__('foo', function(){return 5})", "'getter:function value:(5) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, get foo(){return 3}, set foo(x){}}; Object.seal(o); o.foo = 5", "'getter:function value:(3) setter:function keys:1 [E][Sealed][Frozen]'");
+runTest("o = {foo:1, get foo(){return 3}}; Object.seal(o);", "'getter:function value:(3) keys:1 [E][Sealed][Frozen]'");
+runTest("o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {get(){return 5}})", null);
+runTest("o = {foo:1, get foo(){return 3}}; Object.seal(o); Object.defineProperty(o, 'foo', {value:5})", null);
+// FIXME: <https://webkit.org/b/142934> __defineGetter__/__defineSetter__ should throw exceptions
+runTest("o = {foo:1, get foo(){return 3}}; Object.seal(o); o.__defineGetter__('foo', function(){return 5})", "'getter:function value:(3) keys:1 [E][Sealed][Frozen]'");
+
+// Computed properties with Accessor properties.
+debug(""); debug("Computed + Accessor");
+runTest("o = {['foo']:1, get foo(){return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {['foo']:1, get foo(){return 2}, set foo(x){}}", "'getter:function value:(2) setter:function keys:1 [EC][Extensible]'");
+runTest("o = {get foo(){return 2}, ['foo']:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {get foo(){return 2}, set foo(x){}, ['foo']:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, get foo(){return -1}, ['foo']:2}", "'value:2 keys:1 [ECW][Extensible]'");
+runTest("o = {['foo']:1, get foo(){return 2}, ['bar']:3}", "'getter:function value:(2) keys:2 [EC][Extensible]'");
+runTest("o = {['foo']:1, get foo(){return -1}, ['foo']:-1, get foo() {return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+
+// Basic properties, Computed properties, and Accessor properties.
+debug(""); debug("Basic + Computed + Accessor");
+runTest("o = {foo:1, get foo(){return 2}, ['foo']:3}", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {foo:1, ['foo']:3, get foo(){return 2}}", "'getter:function value:(2) keys:1 [EC][Extensible]'");
+runTest("o = {foo:1, ['foo']:3, get foo(){return 2}, set foo(x){}}", "'getter:function value:(2) setter:function keys:1 [EC][Extensible]'");
+runTest("o = {['foo']:3, get foo(){return 2}, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {get foo(){return 2}, ['foo']:3, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {get foo(){return 2}, ['foo']:3, get foo(){return 2}, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {set foo(x){}, ['foo']:3, set foo(x){}, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
+runTest("o = {set foo(x){}, foo:1, get foo(){return 2}, ['foo']:3}", "'value:3 keys:1 [ECW][Extensible]'");
+runTest("o = {get foo(){return 2}, get foo(){return 2}, ['foo']:3, foo:1}", "'value:1 keys:1 [ECW][Extensible]'");
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsobjectliteralsyntaxjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/object-literal-syntax.js (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/object-literal-syntax.js        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/LayoutTests/js/script-tests/object-literal-syntax.js        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1,19 +1,20 @@
</span><span class="cx"> description("Make sure that we correctly identify parse errors in object literals");
</span><span class="cx">
</span><del>-shouldThrow("({a:1, get a(){}})");
-shouldThrow("({a:1, set a(x){}})");
-shouldThrow("({get a(){}, a:1})");
-shouldThrow("({set a(x){}, a:1})");
-shouldThrow("({get a(){}, get a(){}})");
-shouldThrow("({set a(x){}, set a(x){}})");
-shouldThrow("({set a(x){}, get a(){}, set a(x){}})");
-shouldThrow("(function(){({a:1, get a(){}})})");
-shouldThrow("(function(){({a:1, set a(x){}})})");
-shouldThrow("(function(){({get a(){}, a:1})})");
-shouldThrow("(function(){({set a(x){}, a:1})})");
-shouldThrow("(function(){({get a(){}, get a(){}})})");
-shouldThrow("(function(){({set a(x){}, set a(x){}})})");
-shouldThrow("(function(){({set a(x){}, get a(){}, set a(x){}})})");
</del><ins>+shouldNotThrow("({a:1, get a(){}})");
+shouldNotThrow("({a:1, set a(x){}})");
+shouldNotThrow("({get a(){}, a:1})");
+shouldNotThrow("({set a(x){}, a:1})");
+shouldNotThrow("({get a(){}, get a(){}})");
+shouldNotThrow("({set a(x){}, set a(x){}})");
+shouldNotThrow("({set a(x){}, get a(){}, set a(x){}})");
+shouldNotThrow("(function(){({a:1, get a(){}})})");
+shouldNotThrow("(function(){({a:1, set a(x){}})})");
+shouldNotThrow("(function(){({get a(){}, a:1})})");
+shouldNotThrow("(function(){({set a(x){}, a:1})})");
+shouldNotThrow("(function(){({get a(){}, get a(){}})})");
+shouldNotThrow("(function(){({set a(x){}, set a(x){}})})");
+shouldNotThrow("(function(){({set a(x){}, get a(){}, set a(x){}})})");
+
</ins><span class="cx"> shouldBeTrue("({a:1, a:1, a:1}), true");
</span><span class="cx"> shouldBeTrue("({get a(){}, set a(x){}}), true");
</span><span class="cx"> shouldBeTrue("({set a(x){}, get a(){}}), true");
</span><span class="lines">@@ -25,6 +26,7 @@
</span><span class="cx"> shouldNotThrow("({set a(x){}})");
</span><span class="cx"> shouldNotThrow("({set a([x, y]){}})");
</span><span class="cx"> shouldNotThrow("({set a({x, y}){}})");
</span><ins>+
</ins><span class="cx"> shouldThrow("({get a(x){}})");
</span><span class="cx"> shouldThrow("({b:1, get a(x){}})");
</span><span class="cx"> shouldThrow("({get a([x]){}})");
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1,3 +1,95 @@
</span><ins>+2015-05-13 Joseph Pecoraro <pecoraro@apple.com>
+
+ ES6: Allow duplicate property names
+ https://bugs.webkit.org/show_bug.cgi?id=142895
+
+ Reviewed by Geoffrey Garen.
+
+ Introduce new `op_put_getter_by_id` and `op_put_setter_by_id` opcodes
+ that will define a single getter or setter property on an object.
+
+ The existing `op_put_getter_setter` opcode is still preferred for
+ putting both a getter and setter at the same time but cannot be used
+ for putting an individual getter or setter which is needed in
+ some cases.
+
+ Add a new slow path when generating bytecodes for a property list
+ with computed properties, as computed properties are the only time
+ the list of properties cannot be determined statically.
+
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::PropertyListNode::emitBytecode):
+ - fast path for all constant properties
+ - slow but paired getter/setter path if there are no computed properties
+ - slow path, individual put operation for every property, if there are computed properties
+
+ * parser/Nodes.h:
+ Distinguish a Computed property from a Constant property.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::parseProperty):
+ (JSC::Parser<LexerType>::parsePropertyMethod):
+ Distingish Computed and Constant properties.
+
+ (JSC::Parser<LexerType>::parseObjectLiteral):
+ When we drop into strict mode it is because we saw a getter
+ or setter, so be more explicit.
+
+ (JSC::Parser<LexerType>::parseStrictObjectLiteral):
+ Eliminate duplicate property syntax error exception.
+
+ * parser/SyntaxChecker.h:
+ (JSC::SyntaxChecker::getName):
+ * parser/ASTBuilder.h:
+ (JSC::ASTBuilder::getName): Deleted.
+ No longer used.
+
+ * runtime/JSObject.h:
+ (JSC::JSObject::putDirectInternal):
+ When updating a property. If the Accessor attribute changed
+ update the Structure.
+
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::putGetter):
+ (JSC::JSObject::putSetter):
+ Called by the opcodes, just perform the same operation that
+ __defineGetter__ or __defineSetter__ would do.
+
+ (JSC::JSObject::putDirectNonIndexAccessor):
+ This transition is now handled in putDirectInternal.
+
+ * runtime/Structure.h:
+ Add needed export.
+
+ * bytecode/BytecodeList.json:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitPutGetterById):
+ (JSC::BytecodeGenerator::emitPutSetterById):
+ * bytecompiler/BytecodeGenerator.h:
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ * jit/JIT.h:
+ * jit/JITInlines.h:
+ (JSC::JIT::callOperation):
+ * jit/JITOperations.cpp:
+ * jit/JITOperations.h:
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_put_getter_by_id):
+ (JSC::JIT::emit_op_put_setter_by_id):
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_put_getter_by_id):
+ (JSC::JIT::emit_op_put_setter_by_id):
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LLIntSlowPaths.h:
+ * llint/LowLevelInterpreter.asm:
+ New bytecodes. Modelled after existing op_put_getter_setter.
+
</ins><span class="cx"> 2015-05-13 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> Creating a new blank document in icloud pages causes an AI error: Abstract value (CellBytecodedoubleBoolOther, TOP, TOP) for double node has type outside SpecFullDouble.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeListjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeList.json (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeList.json        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -74,6 +74,8 @@
</span><span class="cx"> { "name" : "op_put_by_val_direct", "length" : 5 },
</span><span class="cx"> { "name" : "op_del_by_val", "length" : 4 },
</span><span class="cx"> { "name" : "op_put_by_index", "length" : 4 },
</span><ins>+ { "name" : "op_put_getter_by_id", "length" : 4 },
+ { "name" : "op_put_setter_by_id", "length" : 4 },
</ins><span class="cx"> { "name" : "op_put_getter_setter", "length" : 5 },
</span><span class="cx"> { "name" : "op_jmp", "length" : 2 },
</span><span class="cx"> { "name" : "op_jtrue", "length" : 3 },
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeBytecodeUseDefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecode/BytecodeUseDef.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -99,6 +99,8 @@
</span><span class="cx"> case op_put_by_id_transition_normal_out_of_line:
</span><span class="cx"> case op_put_by_id_out_of_line:
</span><span class="cx"> case op_put_by_id:
</span><ins>+ case op_put_getter_by_id:
+ case op_put_setter_by_id:
</ins><span class="cx"> case op_put_to_scope:
</span><span class="cx"> case op_put_to_arguments: {
</span><span class="cx"> functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
</span><span class="lines">@@ -272,6 +274,8 @@
</span><span class="cx"> case op_put_by_id_transition_direct_out_of_line:
</span><span class="cx"> case op_put_by_id_transition_normal:
</span><span class="cx"> case op_put_by_id_transition_normal_out_of_line:
</span><ins>+ case op_put_getter_by_id:
+ case op_put_setter_by_id:
</ins><span class="cx"> case op_put_getter_setter:
</span><span class="cx"> case op_put_by_val:
</span><span class="cx"> case op_put_by_val_direct:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1110,6 +1110,22 @@
</span><span class="cx"> printPutByIdCacheStatus(out, exec, location, stubInfos);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><ins>+ case op_put_getter_by_id: {
+ int r0 = (++it)->u.operand;
+ int id0 = (++it)->u.operand;
+ int r1 = (++it)->u.operand;
+ printLocationAndOp(out, exec, location, it, "put_getter_by_id");
+ out.printf("%s, %s, %s", registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data());
+ break;
+ }
+ case op_put_setter_by_id: {
+ int r0 = (++it)->u.operand;
+ int id0 = (++it)->u.operand;
+ int r1 = (++it)->u.operand;
+ printLocationAndOp(out, exec, location, it, "put_setter_by_id");
+ out.printf("%s, %s, %s", registerName(r0).data(), idName(id0, identifier(id0)).data(), registerName(r1).data());
+ break;
+ }
</ins><span class="cx"> case op_put_getter_setter: {
</span><span class="cx"> int r0 = (++it)->u.operand;
</span><span class="cx"> int id0 = (++it)->u.operand;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1548,6 +1548,28 @@
</span><span class="cx"> return value;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void BytecodeGenerator::emitPutGetterById(RegisterID* base, const Identifier& property, RegisterID* getter)
+{
+ unsigned propertyIndex = addConstant(property);
+ m_staticPropertyAnalyzer.putById(base->index(), propertyIndex);
+
+ emitOpcode(op_put_getter_by_id);
+ instructions().append(base->index());
+ instructions().append(propertyIndex);
+ instructions().append(getter->index());
+}
+
+void BytecodeGenerator::emitPutSetterById(RegisterID* base, const Identifier& property, RegisterID* setter)
+{
+ unsigned propertyIndex = addConstant(property);
+ m_staticPropertyAnalyzer.putById(base->index(), propertyIndex);
+
+ emitOpcode(op_put_setter_by_id);
+ instructions().append(base->index());
+ instructions().append(propertyIndex);
+ instructions().append(setter->index());
+}
+
</ins><span class="cx"> void BytecodeGenerator::emitPutGetterSetter(RegisterID* base, const Identifier& property, RegisterID* getter, RegisterID* setter)
</span><span class="cx"> {
</span><span class="cx"> unsigned propertyIndex = addConstant(property);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -482,6 +482,9 @@
</span><span class="cx"> RegisterID* emitDirectPutByVal(RegisterID* base, RegisterID* property, RegisterID* value);
</span><span class="cx"> RegisterID* emitDeleteByVal(RegisterID* dst, RegisterID* base, RegisterID* property);
</span><span class="cx"> RegisterID* emitPutByIndex(RegisterID* base, unsigned index, RegisterID* value);
</span><ins>+
+ void emitPutGetterById(RegisterID* base, const Identifier& property, RegisterID* getter);
+ void emitPutSetterById(RegisterID* base, const Identifier& property, RegisterID* setter);
</ins><span class="cx"> void emitPutGetterSetter(RegisterID* base, const Identifier& property, RegisterID* getter, RegisterID* setter);
</span><span class="cx">
</span><span class="cx"> ExpectedFunction expectedFunctionForIdentifier(const Identifier&);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -377,11 +377,15 @@
</span><span class="cx"> {
</span><span class="cx"> // Fast case: this loop just handles regular value properties.
</span><span class="cx"> PropertyListNode* p = this;
</span><del>- for (; p && p->m_node->m_type == PropertyNode::Constant; p = p->m_next)
</del><ins>+ for (; p && (p->m_node->m_type & PropertyNode::Constant); p = p->m_next)
</ins><span class="cx"> emitPutConstantProperty(generator, dst, *p->m_node);
</span><span class="cx">
</span><span class="cx"> // Were there any get/set properties?
</span><span class="cx"> if (p) {
</span><ins>+ // Build a list of getter/setter pairs to try to put them at the same time. If we encounter
+ // a computed property, just emit everything as that may override previous values.
+ bool hasComputedProperty = false;
+
</ins><span class="cx"> typedef std::pair<PropertyNode*, PropertyNode*> GetterSetterPair;
</span><span class="cx"> typedef HashMap<StringImpl*, GetterSetterPair> GetterSetterMap;
</span><span class="cx"> GetterSetterMap map;
</span><span class="lines">@@ -389,13 +393,22 @@
</span><span class="cx"> // Build a map, pairing get/set values together.
</span><span class="cx"> for (PropertyListNode* q = p; q; q = q->m_next) {
</span><span class="cx"> PropertyNode* node = q->m_node;
</span><del>- if (node->m_type == PropertyNode::Constant)
</del><ins>+ if (node->m_type & PropertyNode::Computed) {
+ hasComputedProperty = true;
+ break;
+ }
+ if (node->m_type & PropertyNode::Constant)
</ins><span class="cx"> continue;
</span><span class="cx">
</span><del>- GetterSetterPair pair(node, static_cast<PropertyNode*>(0));
</del><ins>+ // Duplicates are possible.
+ GetterSetterPair pair(node, static_cast<PropertyNode*>(nullptr));
</ins><span class="cx"> GetterSetterMap::AddResult result = map.add(node->name()->impl(), pair);
</span><del>- if (!result.isNewEntry)
- result.iterator->value.second = node;
</del><ins>+ if (!result.isNewEntry) {
+ if (result.iterator->value.first->m_type == node->m_type)
+ result.iterator->value.first = node;
+ else
+ result.iterator->value.second = node;
+ }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Iterate over the remaining properties in the list.
</span><span class="lines">@@ -403,7 +416,7 @@
</span><span class="cx"> PropertyNode* node = p->m_node;
</span><span class="cx">
</span><span class="cx"> // Handle regular values.
</span><del>- if (node->m_type == PropertyNode::Constant) {
</del><ins>+ if (node->m_type & PropertyNode::Constant) {
</ins><span class="cx"> emitPutConstantProperty(generator, dst, *node);
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="lines">@@ -413,8 +426,18 @@
</span><span class="cx"> if (isClassProperty)
</span><span class="cx"> emitPutHomeObject(generator, value, dst);
</span><span class="cx">
</span><del>- // This is a get/set property, find its entry in the map.
- ASSERT(node->m_type == PropertyNode::Getter || node->m_type == PropertyNode::Setter);
</del><ins>+ ASSERT(node->m_type & (PropertyNode::Getter | PropertyNode::Setter));
+
+ // This is a get/set property which may be overridden by a computed property later.
+ if (hasComputedProperty) {
+ if (node->m_type & PropertyNode::Getter)
+ generator.emitPutGetterById(dst, *node->name(), value);
+ else
+ generator.emitPutSetterById(dst, *node->name(), value);
+ continue;
+ }
+
+ // This is a get/set property pair.
</ins><span class="cx"> GetterSetterMap::iterator it = map.find(node->name()->impl());
</span><span class="cx"> ASSERT(it != map.end());
</span><span class="cx"> GetterSetterPair& pair = it->value;
</span><span class="lines">@@ -422,16 +445,16 @@
</span><span class="cx"> // Was this already generated as a part of its partner?
</span><span class="cx"> if (pair.second == node)
</span><span class="cx"> continue;
</span><del>-
</del><ins>+
</ins><span class="cx"> // Generate the paired node now.
</span><span class="cx"> RefPtr<RegisterID> getterReg;
</span><span class="cx"> RefPtr<RegisterID> setterReg;
</span><span class="cx"> RegisterID* secondReg = nullptr;
</span><span class="cx">
</span><del>- if (node->m_type == PropertyNode::Getter) {
</del><ins>+ if (node->m_type & PropertyNode::Getter) {
</ins><span class="cx"> getterReg = value;
</span><span class="cx"> if (pair.second) {
</span><del>- ASSERT(pair.second->m_type == PropertyNode::Setter);
</del><ins>+ ASSERT(pair.second->m_type & PropertyNode::Setter);
</ins><span class="cx"> setterReg = generator.emitNode(pair.second->m_assign);
</span><span class="cx"> secondReg = setterReg.get();
</span><span class="cx"> } else {
</span><span class="lines">@@ -439,10 +462,10 @@
</span><span class="cx"> generator.emitLoad(setterReg.get(), jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> } else {
</span><del>- ASSERT(node->m_type == PropertyNode::Setter);
</del><ins>+ ASSERT(node->m_type & PropertyNode::Setter);
</ins><span class="cx"> setterReg = value;
</span><span class="cx"> if (pair.second) {
</span><del>- ASSERT(pair.second->m_type == PropertyNode::Getter);
</del><ins>+ ASSERT(pair.second->m_type & PropertyNode::Getter);
</ins><span class="cx"> getterReg = generator.emitNode(pair.second->m_assign);
</span><span class="cx"> secondReg = getterReg.get();
</span><span class="cx"> } else {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitCCallHelpersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/CCallHelpers.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/CCallHelpers.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/CCallHelpers.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -302,6 +302,15 @@
</span><span class="cx"> addCallArgument(arg3);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, GPRReg arg3)
+ {
+ resetCallArguments();
+ addCallArgument(GPRInfo::callFrameRegister);
+ addCallArgument(arg1);
+ addCallArgument(arg2);
+ addCallArgument(arg3);
+ }
+
</ins><span class="cx"> ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImm32 arg2, TrustedImmPtr arg3)
</span><span class="cx"> {
</span><span class="cx"> resetCallArguments();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -282,6 +282,8 @@
</span><span class="cx"> DEFINE_OP(op_put_by_index)
</span><span class="cx"> case op_put_by_val_direct:
</span><span class="cx"> DEFINE_OP(op_put_by_val)
</span><ins>+ DEFINE_OP(op_put_getter_by_id)
+ DEFINE_OP(op_put_setter_by_id)
</ins><span class="cx"> DEFINE_OP(op_put_getter_setter)
</span><span class="cx"> case op_init_global_const_nop:
</span><span class="cx"> NEXT_OPCODE(op_init_global_const_nop);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JIT.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -537,6 +537,8 @@
</span><span class="cx"> void emit_op_put_by_id(Instruction*);
</span><span class="cx"> void emit_op_put_by_index(Instruction*);
</span><span class="cx"> void emit_op_put_by_val(Instruction*);
</span><ins>+ void emit_op_put_getter_by_id(Instruction*);
+ void emit_op_put_setter_by_id(Instruction*);
</ins><span class="cx"> void emit_op_put_getter_setter(Instruction*);
</span><span class="cx"> void emit_op_init_global_const(Instruction*);
</span><span class="cx"> void emit_op_ret(Instruction*);
</span><span class="lines">@@ -722,6 +724,7 @@
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_E);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EC, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_ECC, RegisterID, RegisterID);
</span><ins>+ MacroAssembler::Call callOperation(V_JITOperation_ECIC, RegisterID, const Identifier*, RegisterID);
</ins><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_ECICC, RegisterID, const Identifier*, RegisterID, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(J_JITOperation_EE, RegisterID);
</span><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EZSymtabJ, int, SymbolTable*, RegisterID);
</span><span class="lines">@@ -731,6 +734,7 @@
</span><span class="cx"> #else
</span><span class="cx"> MacroAssembler::Call callOperationNoExceptionCheck(V_JITOperation_EJ, RegisterID, RegisterID);
</span><span class="cx"> #endif
</span><ins>+ MacroAssembler::Call callOperation(V_JITOperation_EJIdJ, RegisterID, const Identifier*, RegisterID);
</ins><span class="cx"> MacroAssembler::Call callOperation(V_JITOperation_EJIdJJ, RegisterID, const Identifier*, RegisterID, RegisterID);
</span><span class="cx"> #if USE(JSVALUE64)
</span><span class="cx"> MacroAssembler::Call callOperation(F_JITOperation_EFJZZ, RegisterID, RegisterID, int32_t, RegisterID);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITInlines.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITInlines.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JITInlines.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -478,6 +478,12 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJIdJ operation, RegisterID regOp1, const Identifier* identOp2, RegisterID regOp3)
+{
+ setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), regOp3);
+ return appendCallWithExceptionCheck(operation);
+}
+
</ins><span class="cx"> ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_EJIdJJ operation, RegisterID regOp1, const Identifier* identOp2, RegisterID regOp3, RegisterID regOp4)
</span><span class="cx"> {
</span><span class="cx"> setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), regOp3, regOp4);
</span><span class="lines">@@ -588,6 +594,12 @@
</span><span class="cx"> return appendCallWithExceptionCheck(operation);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_ECIC operation, RegisterID regOp1, const Identifier* identOp2, RegisterID regOp3)
+{
+ setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), regOp3);
+ return appendCallWithExceptionCheck(operation);
+}
+
</ins><span class="cx"> ALWAYS_INLINE MacroAssembler::Call JIT::callOperation(V_JITOperation_ECICC operation, RegisterID regOp1, const Identifier* identOp2, RegisterID regOp3, RegisterID regOp4)
</span><span class="cx"> {
</span><span class="cx"> setupArgumentsWithExecState(regOp1, TrustedImmPtr(identOp2), regOp3, regOp4);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1279,6 +1279,32 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if USE(JSVALUE64)
</span><ins>+void JIT_OPERATION operationPutGetterById(ExecState* exec, EncodedJSValue encodedObjectValue, Identifier* identifier, EncodedJSValue encodedGetterValue)
+{
+ VM& vm = exec->vm();
+ NativeCallFrameTracer tracer(&vm, exec);
+
+ ASSERT(JSValue::decode(encodedObjectValue).isObject());
+ JSObject* baseObj = asObject(JSValue::decode(encodedObjectValue));
+
+ JSValue getter = JSValue::decode(encodedGetterValue);
+ ASSERT(getter.isObject());
+ baseObj->putGetter(exec, *identifier, asObject(getter));
+}
+
+void JIT_OPERATION operationPutSetterById(ExecState* exec, EncodedJSValue encodedObjectValue, Identifier* identifier, EncodedJSValue encodedSetterValue)
+{
+ VM& vm = exec->vm();
+ NativeCallFrameTracer tracer(&vm, exec);
+
+ ASSERT(JSValue::decode(encodedObjectValue).isObject());
+ JSObject* baseObj = asObject(JSValue::decode(encodedObjectValue));
+
+ JSValue setter = JSValue::decode(encodedSetterValue);
+ ASSERT(setter.isObject());
+ baseObj->putSetter(exec, *identifier, asObject(setter));
+}
+
</ins><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState* exec, EncodedJSValue encodedObjectValue, Identifier* identifier, EncodedJSValue encodedGetterValue, EncodedJSValue encodedSetterValue)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span><span class="lines">@@ -1302,6 +1328,30 @@
</span><span class="cx"> baseObj->putDirectAccessor(exec, *identifier, accessor, Accessor);
</span><span class="cx"> }
</span><span class="cx"> #else
</span><ins>+void JIT_OPERATION operationPutGetterById(ExecState* exec, JSCell* object, Identifier* identifier, JSCell* getter)
+{
+ VM& vm = exec->vm();
+ NativeCallFrameTracer tracer(&vm, exec);
+
+ ASSERT(object && object->isObject());
+ JSObject* baseObj = object->getObject();
+
+ ASSERT(getter->isObject());
+ baseObj->putGetter(exec, *identifier, getter);
+}
+
+void JIT_OPERATION operationPutSetterById(ExecState* exec, JSCell* object, Identifier* identifier, JSCell* setter)
+{
+ VM& vm = exec->vm();
+ NativeCallFrameTracer tracer(&vm, exec);
+
+ ASSERT(object && object->isObject());
+ JSObject* baseObj = object->getObject();
+
+ ASSERT(setter->isObject());
+ baseObj->putSetter(exec, *identifier, setter);
+}
+
</ins><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState* exec, JSCell* object, Identifier* identifier, JSCell* getter, JSCell* setter)
</span><span class="cx"> {
</span><span class="cx"> VM& vm = exec->vm();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -176,6 +176,7 @@
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECb)(ExecState*, CodeBlock*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECC)(ExecState*, JSCell*, JSCell*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECIcf)(ExecState*, JSCell*, InlineCallFrame*);
</span><ins>+typedef void JIT_OPERATION (*V_JITOperation_ECIC)(ExecState*, JSCell*, Identifier*, JSCell*);
</ins><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECICC)(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECCIcf)(ExecState*, JSCell*, JSCell*, InlineCallFrame*);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_ECJJ)(ExecState*, JSCell*, EncodedJSValue, EncodedJSValue);
</span><span class="lines">@@ -185,6 +186,7 @@
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EZSymtabJ)(ExecState*, int32_t, SymbolTable*, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJ)(ExecState*, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*);
</span><ins>+typedef void JIT_OPERATION (*V_JITOperation_EJIdJ)(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue);
</ins><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJIdJJ)(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJJJ)(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue);
</span><span class="cx"> typedef void JIT_OPERATION (*V_JITOperation_EJPP)(ExecState*, EncodedJSValue, void*, void*);
</span><span class="lines">@@ -294,8 +296,12 @@
</span><span class="cx"> #endif
</span><span class="cx"> void JIT_OPERATION operationPutByIndex(ExecState*, EncodedJSValue, int32_t, EncodedJSValue);
</span><span class="cx"> #if USE(JSVALUE64)
</span><ins>+void JIT_OPERATION operationPutGetterById(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue) WTF_INTERNAL;
+void JIT_OPERATION operationPutSetterById(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue) WTF_INTERNAL;
</ins><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState*, EncodedJSValue, Identifier*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
</span><span class="cx"> #else
</span><ins>+void JIT_OPERATION operationPutGetterById(ExecState*, JSCell*, Identifier*, JSCell*) WTF_INTERNAL;
+void JIT_OPERATION operationPutSetterById(ExecState*, JSCell*, Identifier*, JSCell*) WTF_INTERNAL;
</ins><span class="cx"> void JIT_OPERATION operationPutGetterSetter(ExecState*, JSCell*, Identifier*, JSCell*, JSCell*) WTF_INTERNAL;
</span><span class="cx"> #endif
</span><span class="cx"> void JIT_OPERATION operationPushCatchScope(ExecState*, int32_t, SymbolTable*, EncodedJSValue) WTF_INTERNAL;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITPropertyAccesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -444,6 +444,20 @@
</span><span class="cx"> callOperation(operationPutByIndex, regT0, currentInstruction[2].u.operand, regT1);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JIT::emit_op_put_getter_by_id(Instruction* currentInstruction)
+{
+ emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
+ emitGetVirtualRegister(currentInstruction[3].u.operand, regT1);
+ callOperation(operationPutGetterById, regT0, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1);
+}
+
+void JIT::emit_op_put_setter_by_id(Instruction* currentInstruction)
+{
+ emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
+ emitGetVirtualRegister(currentInstruction[3].u.operand, regT1);
+ callOperation(operationPutSetterById, regT0, &m_codeBlock->identifier(currentInstruction[2].u.operand), regT1);
+}
+
</ins><span class="cx"> void JIT::emit_op_put_getter_setter(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx"> emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITPropertyAccess32_64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -57,6 +57,28 @@
</span><span class="cx"> callOperation(operationPutByIndex, regT1, regT0, property, regT3, regT2);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JIT::emit_op_put_getter_by_id(Instruction* currentInstruction)
+{
+ int base = currentInstruction[1].u.operand;
+ int property = currentInstruction[2].u.operand;
+ int getter = currentInstruction[3].u.operand;
+
+ emitLoadPayload(base, regT1);
+ emitLoadPayload(getter, regT3);
+ callOperation(operationPutGetterById, regT1, &m_codeBlock->identifier(property), regT3);
+}
+
+void JIT::emit_op_put_setter_by_id(Instruction* currentInstruction)
+{
+ int base = currentInstruction[1].u.operand;
+ int property = currentInstruction[2].u.operand;
+ int setter = currentInstruction[3].u.operand;
+
+ emitLoadPayload(base, regT1);
+ emitLoadPayload(setter, regT3);
+ callOperation(operationPutSetterById, regT1, &m_codeBlock->identifier(property), regT3);
+}
+
</ins><span class="cx"> void JIT::emit_op_put_getter_setter(Instruction* currentInstruction)
</span><span class="cx"> {
</span><span class="cx"> int base = currentInstruction[1].u.operand;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -862,6 +862,32 @@
</span><span class="cx"> LLINT_END();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+LLINT_SLOW_PATH_DECL(slow_path_put_getter_by_id)
+{
+ LLINT_BEGIN();
+ ASSERT(LLINT_OP(1).jsValue().isObject());
+ JSObject* baseObj = asObject(LLINT_OP(1).jsValue());
+
+ JSValue getter = LLINT_OP(3).jsValue();
+ ASSERT(getter.isObject());
+
+ baseObj->putGetter(exec, exec->codeBlock()->identifier(pc[2].u.operand), asObject(getter));
+ LLINT_END();
+}
+
+LLINT_SLOW_PATH_DECL(slow_path_put_setter_by_id)
+{
+ LLINT_BEGIN();
+ ASSERT(LLINT_OP(1).jsValue().isObject());
+ JSObject* baseObj = asObject(LLINT_OP(1).jsValue());
+
+ JSValue setter = LLINT_OP(3).jsValue();
+ ASSERT(setter.isObject());
+
+ baseObj->putSetter(exec, exec->codeBlock()->identifier(pc[2].u.operand), asObject(setter));
+ LLINT_END();
+}
+
</ins><span class="cx"> LLINT_SLOW_PATH_DECL(slow_path_put_getter_setter)
</span><span class="cx"> {
</span><span class="cx"> LLINT_BEGIN();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLLIntSlowPathsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -80,6 +80,8 @@
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_direct);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_val);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_index);
</span><ins>+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_by_id);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_setter_by_id);
</ins><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_getter_setter);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jtrue);
</span><span class="cx"> LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_jfalse);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorellintLowLevelInterpreterasm"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1057,6 +1057,18 @@
</span><span class="cx"> dispatch(4)
</span><span class="cx">
</span><span class="cx">
</span><ins>+_llint_op_put_getter_by_id:
+ traceExecution()
+ callSlowPath(_llint_slow_path_put_getter_by_id)
+ dispatch(4)
+
+
+_llint_op_put_setter_by_id:
+ traceExecution()
+ callSlowPath(_llint_slow_path_put_setter_by_id)
+ dispatch(4)
+
+
</ins><span class="cx"> _llint_op_put_getter_setter:
</span><span class="cx"> traceExecution()
</span><span class="cx"> callSlowPath(_llint_slow_path_put_getter_setter)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserASTBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ASTBuilder.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -713,7 +713,6 @@
</span><span class="cx"> return result;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- const Identifier* getName(Property property) const { return property->name(); }
</del><span class="cx"> PropertyNode::Type getType(Property property) const { return property->type(); }
</span><span class="cx">
</span><span class="cx"> bool isResolve(ExpressionNode* expr) const { return expr->isResolveNode(); }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserNodesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Nodes.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Nodes.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/parser/Nodes.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -564,7 +564,7 @@
</span><span class="cx">
</span><span class="cx"> class PropertyNode : public ParserArenaFreeable {
</span><span class="cx"> public:
</span><del>- enum Type { Constant = 1, Getter = 2, Setter = 4 };
</del><ins>+ enum Type { Constant = 1, Getter = 2, Setter = 4, Computed = 8 };
</ins><span class="cx"> enum PutType { Unknown, KnownDirect };
</span><span class="cx">
</span><span class="cx"> PropertyNode(const Identifier&, ExpressionNode*, Type, PutType, SuperBinding);
</span><span class="lines">@@ -582,7 +582,7 @@
</span><span class="cx"> const Identifier* m_name;
</span><span class="cx"> ExpressionNode* m_expression;
</span><span class="cx"> ExpressionNode* m_assign;
</span><del>- unsigned m_type : 3;
</del><ins>+ unsigned m_type : 4;
</ins><span class="cx"> unsigned m_needsSuperBinding : 1;
</span><span class="cx"> unsigned m_putType : 1;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -2066,14 +2066,14 @@
</span><span class="cx"> if (match(OPENPAREN)) {
</span><span class="cx"> auto method = parsePropertyMethod(context, &m_vm->propertyNames->nullIdentifier);
</span><span class="cx"> propagateError();
</span><del>- return context.createProperty(propertyName, method, PropertyNode::Constant, PropertyNode::KnownDirect, complete);
</del><ins>+ return context.createProperty(propertyName, method, static_cast<PropertyNode::Type>(PropertyNode::Constant | PropertyNode::Computed), PropertyNode::KnownDirect, complete);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> consumeOrFail(COLON, "Expected ':' after property name");
</span><span class="cx"> TreeExpression node = parseAssignmentExpression(context);
</span><span class="cx"> failIfFalse(node, "Cannot parse expression for property declaration");
</span><span class="cx"> context.setEndOffset(node, m_lexer->currentOffset());
</span><del>- return context.createProperty(propertyName, node, PropertyNode::Constant, PropertyNode::Unknown, complete);
</del><ins>+ return context.createProperty(propertyName, node, static_cast<PropertyNode::Type>(PropertyNode::Constant | PropertyNode::Computed), PropertyNode::Unknown, complete);
</ins><span class="cx"> }
</span><span class="cx"> default:
</span><span class="cx"> failIfFalse(m_token.m_type & KeywordTokenFlag, "Expected a property name");
</span><span class="lines">@@ -2112,7 +2112,7 @@
</span><span class="cx"> JSTokenLocation location(tokenLocation());
</span><span class="cx"> next();
</span><span class="cx"> ParserFunctionInfo<TreeBuilder> info;
</span><del>- if (type == PropertyNode::Getter) {
</del><ins>+ if (type & PropertyNode::Getter) {
</ins><span class="cx"> failIfFalse(match(OPENPAREN), "Expected a parameter list for getter definition");
</span><span class="cx"> failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, GetterMode, false, constructorKind, superBinding,
</span><span class="cx"> getterOrSetterStartOffset, info)), "Cannot parse getter definition");
</span><span class="lines">@@ -2142,7 +2142,7 @@
</span><span class="cx">
</span><span class="cx"> TreeProperty property = parseProperty(context, false);
</span><span class="cx"> failIfFalse(property, "Cannot parse object literal property");
</span><del>- if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) {
</del><ins>+ if (!m_syntaxAlreadyValidated && context.getType(property) & (PropertyNode::Getter | PropertyNode::Setter)) {
</ins><span class="cx"> restoreSavePoint(savePoint);
</span><span class="cx"> return parseStrictObjectLiteral(context);
</span><span class="cx"> }
</span><span class="lines">@@ -2150,13 +2150,12 @@
</span><span class="cx"> TreePropertyList tail = propertyList;
</span><span class="cx"> while (match(COMMA)) {
</span><span class="cx"> next(TreeBuilder::DontBuildStrings);
</span><del>- // allow extra comma, see http://bugs.webkit.org/show_bug.cgi?id=5939
</del><span class="cx"> if (match(CLOSEBRACE))
</span><span class="cx"> break;
</span><span class="cx"> JSTokenLocation propertyLocation(tokenLocation());
</span><span class="cx"> property = parseProperty(context, false);
</span><span class="cx"> failIfFalse(property, "Cannot parse object literal property");
</span><del>- if (!m_syntaxAlreadyValidated && context.getType(property) != PropertyNode::Constant) {
</del><ins>+ if (!m_syntaxAlreadyValidated && context.getType(property) & (PropertyNode::Getter | PropertyNode::Setter)) {
</ins><span class="cx"> restoreSavePoint(savePoint);
</span><span class="cx"> return parseStrictObjectLiteral(context);
</span><span class="cx"> }
</span><span class="lines">@@ -2187,31 +2186,15 @@
</span><span class="cx"> TreeProperty property = parseProperty(context, true);
</span><span class="cx"> failIfFalse(property, "Cannot parse object literal property");
</span><span class="cx">
</span><del>- typedef HashMap<RefPtr<StringImpl>, unsigned, IdentifierRepHash> ObjectValidationMap;
- ObjectValidationMap objectValidator;
- // Add the first property
- if (!m_syntaxAlreadyValidated && context.getName(property))
- objectValidator.add(context.getName(property)->impl(), context.getType(property));
-
</del><span class="cx"> TreePropertyList propertyList = context.createPropertyList(location, property);
</span><span class="cx"> TreePropertyList tail = propertyList;
</span><span class="cx"> while (match(COMMA)) {
</span><span class="cx"> next();
</span><del>- // allow extra comma, see http://bugs.webkit.org/show_bug.cgi?id=5939
</del><span class="cx"> if (match(CLOSEBRACE))
</span><span class="cx"> break;
</span><span class="cx"> JSTokenLocation propertyLocation(tokenLocation());
</span><span class="cx"> property = parseProperty(context, true);
</span><span class="cx"> failIfFalse(property, "Cannot parse object literal property");
</span><del>- if (!m_syntaxAlreadyValidated && context.getName(property)) {
- ObjectValidationMap::AddResult propertyEntry = objectValidator.add(context.getName(property)->impl(), context.getType(property));
- if (!propertyEntry.isNewEntry) {
- semanticFailIfTrue(propertyEntry.iterator->value == PropertyNode::Constant, "Attempted to redefine property '", propertyEntry.iterator->key.get(), "'");
- semanticFailIfTrue(context.getType(property) == PropertyNode::Constant, "Attempted to redefine property '", propertyEntry.iterator->key.get(), "'");
- semanticFailIfTrue(context.getType(property) & propertyEntry.iterator->value, "Attempted to redefine property '", propertyEntry.iterator->key.get(), "'");
- propertyEntry.iterator->value |= context.getType(property);
- }
- }
</del><span class="cx"> tail = context.createPropertyList(propertyLocation, property, tail);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserSyntaxCheckerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/SyntaxChecker.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/SyntaxChecker.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/parser/SyntaxChecker.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -290,7 +290,6 @@
</span><span class="cx">
</span><span class="cx"> void assignmentStackAppend(int, int, int, int, int, Operator) { }
</span><span class="cx"> int createAssignment(const JSTokenLocation&, int, int, int, int, int) { RELEASE_ASSERT_NOT_REACHED(); return AssignmentExpr; }
</span><del>- const Identifier* getName(const Property& property) const { return property.name; }
</del><span class="cx"> PropertyNode::Type getType(const Property& property) const { return property.type; }
</span><span class="cx"> bool isResolve(ExpressionType expr) const { return expr == ResolveExpr || expr == ResolveEvalExpr; }
</span><span class="cx"> ExpressionType createDeconstructingAssignment(const JSTokenLocation&, int, ExpressionType)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.cpp (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.cpp        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -1197,6 +1197,24 @@
</span><span class="cx"> return globalObject->globalObjectMethodTable()->allowsAccessFrom(globalObject, exec);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void JSObject::putGetter(ExecState* exec, PropertyName propertyName, JSValue getter)
+{
+ PropertyDescriptor descriptor;
+ descriptor.setGetter(getter);
+ descriptor.setEnumerable(true);
+ descriptor.setConfigurable(true);
+ defineOwnProperty(this, exec, propertyName, descriptor, false);
+}
+
+void JSObject::putSetter(ExecState* exec, PropertyName propertyName, JSValue setter)
+{
+ PropertyDescriptor descriptor;
+ descriptor.setSetter(setter);
+ descriptor.setEnumerable(true);
+ descriptor.setConfigurable(true);
+ defineOwnProperty(this, exec, propertyName, descriptor, false);
+}
+
</ins><span class="cx"> void JSObject::putDirectAccessor(ExecState* exec, PropertyName propertyName, JSValue value, unsigned attributes)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(value.isGetterSetter() && (attributes & Accessor));
</span><span class="lines">@@ -1229,12 +1247,6 @@
</span><span class="cx"> PutPropertySlot slot(this);
</span><span class="cx"> putDirectInternal<PutModeDefineOwnProperty>(vm, propertyName, value, attributes, slot);
</span><span class="cx">
</span><del>- // putDirect will change our Structure if we add a new property. For
- // getters and setters, though, we also need to change our Structure
- // if we override an existing non-getter or non-setter.
- if (slot.type() != PutPropertySlot::NewProperty)
- setStructure(vm, Structure::attributeChangeTransition(vm, structure(vm), propertyName, attributes));
-
</del><span class="cx"> Structure* structure = this->structure(vm);
</span><span class="cx"> if (attributes & ReadOnly)
</span><span class="cx"> structure->setContainsReadOnlyProperties();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSObject.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSObject.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/runtime/JSObject.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -467,6 +467,9 @@
</span><span class="cx"> void putDirectAccessor(ExecState*, PropertyName, JSValue, unsigned attributes);
</span><span class="cx"> JS_EXPORT_PRIVATE void putDirectCustomAccessor(VM&, PropertyName, JSValue, unsigned attributes);
</span><span class="cx">
</span><ins>+ void putGetter(ExecState*, PropertyName, JSValue);
+ void putSetter(ExecState*, PropertyName, JSValue);
+
</ins><span class="cx"> JS_EXPORT_PRIVATE bool hasProperty(ExecState*, PropertyName) const;
</span><span class="cx"> JS_EXPORT_PRIVATE bool hasProperty(ExecState*, unsigned propertyName) const;
</span><span class="cx"> bool hasOwnProperty(ExecState*, PropertyName) const;
</span><span class="lines">@@ -1318,8 +1321,12 @@
</span><span class="cx">
</span><span class="cx"> putDirect(vm, offset, value);
</span><span class="cx"> structure->didReplaceProperty(offset);
</span><del>-
</del><span class="cx"> slot.setExistingProperty(this, offset);
</span><ins>+
+ if ((attributes & Accessor) != (currentAttributes & Accessor)) {
+ ASSERT(!(attributes & ReadOnly));
+ setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes));
+ }
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1369,6 +1376,11 @@
</span><span class="cx"> structure->didReplaceProperty(offset);
</span><span class="cx"> slot.setExistingProperty(this, offset);
</span><span class="cx"> putDirect(vm, offset, value);
</span><ins>+
+ if ((attributes & Accessor) != (currentAttributes & Accessor)) {
+ ASSERT(!(attributes & ReadOnly));
+ setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes));
+ }
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStructureh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Structure.h (184323 => 184324)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Structure.h        2015-05-14 01:21:03 UTC (rev 184323)
+++ trunk/Source/JavaScriptCore/runtime/Structure.h        2015-05-14 01:32:25 UTC (rev 184324)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> JS_EXPORT_PRIVATE static Structure* addPropertyTransitionToExistingStructure(Structure*, PropertyName, unsigned attributes, PropertyOffset&);
</span><span class="cx"> static Structure* removePropertyTransition(VM&, Structure*, PropertyName, PropertyOffset&);
</span><span class="cx"> JS_EXPORT_PRIVATE static Structure* changePrototypeTransition(VM&, Structure*, JSValue prototype);
</span><del>- static Structure* attributeChangeTransition(VM&, Structure*, PropertyName, unsigned attributes);
</del><ins>+ JS_EXPORT_PRIVATE static Structure* attributeChangeTransition(VM&, Structure*, PropertyName, unsigned attributes);
</ins><span class="cx"> JS_EXPORT_PRIVATE static Structure* toCacheableDictionaryTransition(VM&, Structure*);
</span><span class="cx"> static Structure* toUncacheableDictionaryTransition(VM&, Structure*);
</span><span class="cx"> JS_EXPORT_PRIVATE static Structure* sealTransition(VM&, Structure*);
</span></span></pre>
</div>
</div>
</body>
</html>