<!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>[185160] 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/185160">185160</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-06-03 13:04:00 -0700 (Wed, 03 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>GetById and PutById profiling should be more precise about it takes slow path
https://bugs.webkit.org/show_bug.cgi?id=145590
Reviewed by Geoffrey Garen.
Source/JavaScriptCore:
If a ById access ever takes slow path, we want the DFG and FTL to know this. Previously we
were relying on slow path counts, which conflate slow paths taken due to a megamorphic
access and slow paths taken due to IC building.
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfo):
* bytecode/PutByIdStatus.cpp:
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::computeForStubInfo):
* bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::StructureStubInfo):
* ftl/FTLIntrinsicRepository.h:
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileGetById):
* jit/JITOperations.cpp:
* jit/JITOperations.h:
LayoutTests:
Added just two more tests for getters and setters. I needed more microbenchmarks to track
down a regression in an earlier version of this patch.
* js/regress/getter-prototype-expected.txt: Added.
* js/regress/getter-prototype.html: Added.
* js/regress/script-tests/getter-prototype.js: Added.
* js/regress/script-tests/setter-prototype.js: Added.
* js/regress/setter-prototype-expected.txt: Added.
* js/regress/setter-prototype.html: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeGetByIdStatuscpp">trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodePutByIdStatuscpp">trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeStructureStubInfoh">trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLIntrinsicRepositoryh">trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</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>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsregressgetterprototypeexpectedtxt">trunk/LayoutTests/js/regress/getter-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregressgetterprototypehtml">trunk/LayoutTests/js/regress/getter-prototype.html</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestsgetterprototypejs">trunk/LayoutTests/js/regress/script-tests/getter-prototype.js</a></li>
<li><a href="#trunkLayoutTestsjsregressscripttestssetterprototypejs">trunk/LayoutTests/js/regress/script-tests/setter-prototype.js</a></li>
<li><a href="#trunkLayoutTestsjsregresssetterprototypeexpectedtxt">trunk/LayoutTests/js/regress/setter-prototype-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregresssetterprototypehtml">trunk/LayoutTests/js/regress/setter-prototype.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/LayoutTests/ChangeLog        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-06-02 Filip Pizlo <fpizlo@apple.com>
+
+ GetById and PutById profiling should be more precise about it takes slow path
+ https://bugs.webkit.org/show_bug.cgi?id=145590
+
+ Reviewed by Geoffrey Garen.
+
+ Added just two more tests for getters and setters. I needed more microbenchmarks to track
+ down a regression in an earlier version of this patch.
+
+ * js/regress/getter-prototype-expected.txt: Added.
+ * js/regress/getter-prototype.html: Added.
+ * js/regress/script-tests/getter-prototype.js: Added.
+ * js/regress/script-tests/setter-prototype.js: Added.
+ * js/regress/setter-prototype-expected.txt: Added.
+ * js/regress/setter-prototype.html: Added.
+
</ins><span class="cx"> 2015-06-03 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS] Rebaseline expected results for <br>
</span></span></pre></div>
<a id="trunkLayoutTestsjsregressgetterprototypeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/getter-prototype-expected.txt (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/getter-prototype-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/getter-prototype-expected.txt        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/getter-prototype
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressgetterprototypehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/getter-prototype.html (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/getter-prototype.html         (rev 0)
+++ trunk/LayoutTests/js/regress/getter-prototype.html        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/getter-prototype.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestsgetterprototypejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/getter-prototype.js (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/getter-prototype.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/getter-prototype.js        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+function Foo() {
+ this._f = 42;
+}
+
+Foo.prototype.__defineGetter__("f", function() { return this._f; });
+
+function foo(o) {
+ var result = 0;
+ for (var i = 0; i < 1000; ++i)
+ result += o.f;
+ return result;
+}
+
+noInline(foo);
+
+for (var i = 0; i < 10000; ++i) {
+ var result = foo(new Foo());
+ if (result != 1000 * 42)
+ throw "Error: bad result: " + result;
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregressscripttestssetterprototypejs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/script-tests/setter-prototype.js (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/script-tests/setter-prototype.js         (rev 0)
+++ trunk/LayoutTests/js/regress/script-tests/setter-prototype.js        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+function Foo() {
+ this._f = 42;
+}
+
+Foo.prototype.__defineGetter__("f", function() { return this._f; });
+Foo.prototype.__defineSetter__("f", function(value) { this._f = value; });
+
+function foo(o, value) {
+ for (var i = 0; i < 1000; ++i)
+ o.f = value;
+ return o.f;
+}
+
+noInline(foo);
+
+for (var i = 0; i < 10000; ++i) {
+ var result = foo(new Foo(), 42);
+ if (result != 42)
+ throw "Error: bad result: " + result;
+}
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregresssetterprototypeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/setter-prototype-expected.txt (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/setter-prototype-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regress/setter-prototype-expected.txt        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+JSRegress/setter-prototype
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS no exception thrown
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregresssetterprototypehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regress/setter-prototype.html (0 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regress/setter-prototype.html         (rev 0)
+++ trunk/LayoutTests/js/regress/setter-prototype.html        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="../../resources/regress-pre.js"></script>
+<script src="script-tests/setter-prototype.js"></script>
+<script src="../../resources/regress-post.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2015-06-02 Filip Pizlo <fpizlo@apple.com>
+
+ GetById and PutById profiling should be more precise about it takes slow path
+ https://bugs.webkit.org/show_bug.cgi?id=145590
+
+ Reviewed by Geoffrey Garen.
+
+ If a ById access ever takes slow path, we want the DFG and FTL to know this. Previously we
+ were relying on slow path counts, which conflate slow paths taken due to a megamorphic
+ access and slow paths taken due to IC building.
+
+ * bytecode/GetByIdStatus.cpp:
+ (JSC::GetByIdStatus::computeFor):
+ (JSC::GetByIdStatus::computeForStubInfo):
+ * bytecode/PutByIdStatus.cpp:
+ (JSC::PutByIdStatus::computeFor):
+ (JSC::PutByIdStatus::computeForStubInfo):
+ * bytecode/StructureStubInfo.h:
+ (JSC::StructureStubInfo::StructureStubInfo):
+ * ftl/FTLIntrinsicRepository.h:
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::LowerDFGToLLVM::compileGetById):
+ * jit/JITOperations.cpp:
+ * jit/JITOperations.h:
+
</ins><span class="cx"> 2015-06-03 Michael Saboff <msaboff@apple.com>
</span><span class="cx">
</span><span class="cx"> Improve test coverage for changes made in 145527
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeGetByIdStatuscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -103,8 +103,7 @@
</span><span class="cx"> CallLinkStatus::computeExitSiteData(locker, profiledBlock, bytecodeIndex));
</span><span class="cx">
</span><span class="cx"> if (!result.takesSlowPath()
</span><del>- && (hasExitSite(locker, profiledBlock, bytecodeIndex)
- || profiledBlock->likelyToTakeSlowCase(bytecodeIndex)))
</del><ins>+ && hasExitSite(locker, profiledBlock, bytecodeIndex))
</ins><span class="cx"> return GetByIdStatus(result.makesCalls() ? MakesCalls : TakesSlowPath, true);
</span><span class="cx"> #else
</span><span class="cx"> UNUSED_PARAM(map);
</span><span class="lines">@@ -121,9 +120,12 @@
</span><span class="cx"> const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, UniquedStringImpl* uid,
</span><span class="cx"> CallLinkStatus::ExitSiteData callExitSiteData)
</span><span class="cx"> {
</span><del>- if (!stubInfo || !stubInfo->seen)
</del><ins>+ if (!stubInfo)
</ins><span class="cx"> return GetByIdStatus(NoInformation);
</span><span class="cx">
</span><ins>+ if (!stubInfo->seen)
+ return GetByIdStatus(NoInformation);
+
</ins><span class="cx"> PolymorphicGetByIdList* list = 0;
</span><span class="cx"> State slowPathState = TakesSlowPath;
</span><span class="cx"> if (stubInfo->accessType == access_get_by_id_list) {
</span><span class="lines">@@ -135,6 +137,9 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ if (stubInfo->tookSlowPath)
+ return GetByIdStatus(slowPathState);
+
</ins><span class="cx"> // Finally figure out if we can derive an access strategy.
</span><span class="cx"> GetByIdStatus result;
</span><span class="cx"> result.m_state = Simple;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodePutByIdStatuscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -113,8 +113,7 @@
</span><span class="cx"> UNUSED_PARAM(bytecodeIndex);
</span><span class="cx"> UNUSED_PARAM(uid);
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><del>- if (profiledBlock->likelyToTakeSlowCase(bytecodeIndex)
- || hasExitSite(locker, profiledBlock, bytecodeIndex))
</del><ins>+ if (hasExitSite(locker, profiledBlock, bytecodeIndex))
</ins><span class="cx"> return PutByIdStatus(TakesSlowPath);
</span><span class="cx">
</span><span class="cx"> StructureStubInfo* stubInfo = map.get(CodeOrigin(bytecodeIndex));
</span><span class="lines">@@ -136,9 +135,15 @@
</span><span class="cx"> const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo,
</span><span class="cx"> UniquedStringImpl* uid, CallLinkStatus::ExitSiteData callExitSiteData)
</span><span class="cx"> {
</span><del>- if (!stubInfo || !stubInfo->seen)
</del><ins>+ if (!stubInfo)
</ins><span class="cx"> return PutByIdStatus();
</span><span class="cx">
</span><ins>+ if (stubInfo->tookSlowPath)
+ return PutByIdStatus(TakesSlowPath);
+
+ if (!stubInfo->seen)
+ return PutByIdStatus();
+
</ins><span class="cx"> switch (stubInfo->accessType) {
</span><span class="cx"> case access_unset:
</span><span class="cx"> // If the JIT saw it but didn't optimize it, then assume that this takes slow path.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeStructureStubInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2008, 2012, 2013, 2014 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2008, 2012-2015 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -94,6 +94,7 @@
</span><span class="cx"> : accessType(access_unset)
</span><span class="cx"> , seen(false)
</span><span class="cx"> , resetByGC(false)
</span><ins>+ , tookSlowPath(false)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -183,6 +184,7 @@
</span><span class="cx"> int8_t accessType;
</span><span class="cx"> bool seen : 1;
</span><span class="cx"> bool resetByGC : 1;
</span><ins>+ bool tookSlowPath : 1;
</ins><span class="cx">
</span><span class="cx"> CodeOrigin codeOrigin;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLIntrinsicRepositoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> macro(J_JITOperation_EJ, functionType(int64, intPtr, int64)) \
</span><span class="cx"> macro(J_JITOperation_EJA, functionType(int64, intPtr, int64, intPtr)) \
</span><span class="cx"> macro(J_JITOperation_EJC, functionType(int64, intPtr, int64, intPtr)) \
</span><ins>+ macro(J_JITOperation_EJI, functionType(int64, intPtr, int64, intPtr)) \
</ins><span class="cx"> macro(J_JITOperation_EJJ, functionType(int64, intPtr, int64, int64)) \
</span><span class="cx"> macro(J_JITOperation_EJscC, functionType(intPtr, intPtr, intPtr, intPtr)) \
</span><span class="cx"> macro(J_JITOperation_EJssZ, functionType(int64, intPtr, intPtr, int32)) \
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -2069,8 +2069,8 @@
</span><span class="cx">
</span><span class="cx"> m_out.appendTo(notCellCase, continuation);
</span><span class="cx"> ValueFromBlock notCellResult = m_out.anchor(vmCall(
</span><del>- m_out.operation(operationGetById),
- m_callFrame, getUndef(m_out.intPtr), value,
</del><ins>+ m_out.operation(operationGetByIdGeneric),
+ m_callFrame, value,
</ins><span class="cx"> m_out.constIntPtr(m_graph.identifiers()[m_node->identifierNumber()])));
</span><span class="cx"> m_out.jump(continuation);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.cpp (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.cpp        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -147,17 +147,30 @@
</span><span class="cx"> return missingArgCount;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-EncodedJSValue JIT_OPERATION operationGetById(ExecState* exec, StructureStubInfo*, EncodedJSValue base, UniquedStringImpl* uid)
</del><ins>+EncodedJSValue JIT_OPERATION operationGetById(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><span class="cx">
</span><ins>+ stubInfo->tookSlowPath = true;
+
</ins><span class="cx"> JSValue baseValue = JSValue::decode(base);
</span><span class="cx"> PropertySlot slot(baseValue);
</span><span class="cx"> Identifier ident = Identifier::fromUid(vm, uid);
</span><span class="cx"> return JSValue::encode(baseValue.get(exec, ident, slot));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+EncodedJSValue JIT_OPERATION operationGetByIdGeneric(ExecState* exec, EncodedJSValue base, UniquedStringImpl* uid)
+{
+ VM* vm = &exec->vm();
+ NativeCallFrameTracer tracer(vm, exec);
+
+ JSValue baseValue = JSValue::decode(base);
+ PropertySlot slot(baseValue);
+ Identifier ident = Identifier::fromUid(vm, uid);
+ return JSValue::encode(baseValue.get(exec, ident, slot));
+}
+
</ins><span class="cx"> EncodedJSValue JIT_OPERATION operationGetByIdBuildList(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)
</span><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="lines">@@ -221,10 +234,12 @@
</span><span class="cx"> return JSValue::encode(jsBoolean(result));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-EncodedJSValue JIT_OPERATION operationIn(ExecState* exec, StructureStubInfo*, JSCell* base, UniquedStringImpl* key)
</del><ins>+EncodedJSValue JIT_OPERATION operationIn(ExecState* exec, StructureStubInfo* stubInfo, JSCell* base, UniquedStringImpl* key)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><ins>+
+ stubInfo->tookSlowPath = true;
</ins><span class="cx">
</span><span class="cx"> if (!base->isObject()) {
</span><span class="cx"> vm->throwException(exec, createInvalidInParameterError(exec, base));
</span><span class="lines">@@ -243,41 +258,49 @@
</span><span class="cx"> return JSValue::encode(jsBoolean(CommonSlowPaths::opIn(exec, JSValue::decode(key), base)));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPutByIdStrict(ExecState* exec, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</del><ins>+void JIT_OPERATION operationPutByIdStrict(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><span class="cx">
</span><ins>+ stubInfo->tookSlowPath = true;
+
</ins><span class="cx"> Identifier ident = Identifier::fromUid(vm, uid);
</span><span class="cx"> PutPropertySlot slot(JSValue::decode(encodedBase), true, exec->codeBlock()->putByIdContext());
</span><span class="cx"> JSValue::decode(encodedBase).put(exec, ident, JSValue::decode(encodedValue), slot);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPutByIdNonStrict(ExecState* exec, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</del><ins>+void JIT_OPERATION operationPutByIdNonStrict(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><span class="cx">
</span><ins>+ stubInfo->tookSlowPath = true;
+
</ins><span class="cx"> Identifier ident = Identifier::fromUid(vm, uid);
</span><span class="cx"> PutPropertySlot slot(JSValue::decode(encodedBase), false, exec->codeBlock()->putByIdContext());
</span><span class="cx"> JSValue::decode(encodedBase).put(exec, ident, JSValue::decode(encodedValue), slot);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPutByIdDirectStrict(ExecState* exec, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</del><ins>+void JIT_OPERATION operationPutByIdDirectStrict(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><span class="cx">
</span><ins>+ stubInfo->tookSlowPath = true;
+
</ins><span class="cx"> Identifier ident = Identifier::fromUid(vm, uid);
</span><span class="cx"> PutPropertySlot slot(JSValue::decode(encodedBase), true, exec->codeBlock()->putByIdContext());
</span><span class="cx"> asObject(JSValue::decode(encodedBase))->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState* exec, StructureStubInfo*, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</del><ins>+void JIT_OPERATION operationPutByIdDirectNonStrict(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue encodedValue, EncodedJSValue encodedBase, UniquedStringImpl* uid)
</ins><span class="cx"> {
</span><span class="cx"> VM* vm = &exec->vm();
</span><span class="cx"> NativeCallFrameTracer tracer(vm, exec);
</span><span class="cx">
</span><ins>+ stubInfo->tookSlowPath = true;
+
</ins><span class="cx"> Identifier ident = Identifier::fromUid(vm, uid);
</span><span class="cx"> PutPropertySlot slot(JSValue::decode(encodedBase), false, exec->codeBlock()->putByIdContext());
</span><span class="cx"> asObject(JSValue::decode(encodedBase))->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITOperationsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JITOperations.h (185159 => 185160)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-06-03 19:46:18 UTC (rev 185159)
+++ trunk/Source/JavaScriptCore/jit/JITOperations.h        2015-06-03 20:04:00 UTC (rev 185160)
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJZ)(ExecState*, EncodedJSValue, int32_t);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJC)(ExecState*, EncodedJSValue, JSCell*);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJA)(ExecState*, EncodedJSValue, JSArray*);
</span><ins>+typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJI)(ExecState*, EncodedJSValue, UniquedStringImpl*);
</ins><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJIdc)(ExecState*, EncodedJSValue, const Identifier*);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue);
</span><span class="cx"> typedef EncodedJSValue JIT_OPERATION (*J_JITOperation_EJssZ)(ExecState*, JSString*, int32_t);
</span><span class="lines">@@ -235,6 +236,7 @@
</span><span class="cx"> int32_t JIT_OPERATION operationCallArityCheck(ExecState*) WTF_INTERNAL;
</span><span class="cx"> int32_t JIT_OPERATION operationConstructArityCheck(ExecState*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationGetById(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
</span><ins>+EncodedJSValue JIT_OPERATION operationGetByIdGeneric(ExecState*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
</ins><span class="cx"> EncodedJSValue JIT_OPERATION operationGetByIdBuildList(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationGetByIdOptimize(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;
</span><span class="cx"> EncodedJSValue JIT_OPERATION operationInOptimize(ExecState*, StructureStubInfo*, JSCell*, UniquedStringImpl*) WTF_INTERNAL;
</span></span></pre>
</div>
</div>
</body>
</html>