<!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>[193985] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/193985">193985</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2015-12-11 15:01:57 -0800 (Fri, 11 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Refactoring to reduce potential cut-paste errors with the FTL ICs.
https://bugs.webkit.org/show_bug.cgi?id=152185
Reviewed by Saam Barati.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* ftl/FTLCompile.cpp:
- ICs now have their own names. GetById and PutByID fast path ICs no longer just
say "inline cache fast path".
* ftl/FTLCompileBinaryOp.cpp:
(JSC::FTL::generateBinaryArithOpFastPath):
- Fixed an indentation.
* ftl/FTLInlineCacheDescriptor.h:
(JSC::FTL::InlineCacheDescriptor::InlineCacheDescriptor):
(JSC::FTL::InlineCacheDescriptor::name):
(JSC::FTL::GetByIdDescriptor::GetByIdDescriptor):
(JSC::FTL::PutByIdDescriptor::PutByIdDescriptor):
(JSC::FTL::CheckInDescriptor::CheckInDescriptor):
(JSC::FTL::BinaryOpDescriptor::nodeType):
(JSC::FTL::BinaryOpDescriptor::size):
(JSC::FTL::BinaryOpDescriptor::slowPathFunction):
(JSC::FTL::BinaryOpDescriptor::leftOperand):
(JSC::FTL::BinaryOpDescriptor::BinaryOpDescriptor):
(JSC::FTL::ArithDivDescriptor::ArithDivDescriptor):
(JSC::FTL::ArithDivDescriptor::icSize):
(JSC::FTL::ArithDivDescriptor::nodeType):
(JSC::FTL::ArithDivDescriptor::opName):
(JSC::FTL::ArithDivDescriptor::slowPathFunction):
(JSC::FTL::ArithDivDescriptor::nonNumberSlowPathFunction):
(JSC::FTL::ArithMulDescriptor::ArithMulDescriptor):
(JSC::FTL::ArithMulDescriptor::icSize):
(JSC::FTL::ArithMulDescriptor::nodeType):
(JSC::FTL::ArithMulDescriptor::opName):
(JSC::FTL::ArithMulDescriptor::slowPathFunction):
(JSC::FTL::ArithMulDescriptor::nonNumberSlowPathFunction):
(JSC::FTL::ArithSubDescriptor::ArithSubDescriptor):
(JSC::FTL::ArithSubDescriptor::icSize):
(JSC::FTL::ArithSubDescriptor::nodeType):
(JSC::FTL::ArithSubDescriptor::opName):
(JSC::FTL::ArithSubDescriptor::slowPathFunction):
(JSC::FTL::ArithSubDescriptor::nonNumberSlowPathFunction):
(JSC::FTL::ValueAddDescriptor::ValueAddDescriptor):
(JSC::FTL::ValueAddDescriptor::icSize):
(JSC::FTL::ValueAddDescriptor::nodeType):
(JSC::FTL::ValueAddDescriptor::opName):
(JSC::FTL::ValueAddDescriptor::slowPathFunction):
(JSC::FTL::ValueAddDescriptor::nonNumberSlowPathFunction):
(JSC::FTL::LazySlowPathDescriptor::LazySlowPathDescriptor):
(JSC::FTL::ProbeDescriptor::ProbeDescriptor):
(JSC::FTL::BinaryOpDescriptor::name): Deleted.
(JSC::FTL::BinaryOpDescriptor::fastPathICName): Deleted.
* ftl/FTLInlineCacheDescriptorInlines.h: Removed.
- Consolidate the number of places where we have to fill in a data about new
snippet ICs. It is all done in FTLInlineCacheDescriptor.h now.
* ftl/FTLJITFinalizer.cpp:
(JSC::FTL::JITFinalizer::finalizeFunction):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::DFG::LowerDFGToLLVM::compileUntypedBinaryOp):
(JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
(JSC::FTL::DFG::LowerDFGToLLVM::compileArithDiv):
- Introduced a compileUntypedBinaryOp() template and use that at all the FTL
places that need to use a snippet. This reduces the amount of cut and paste
code.
* ftl/FTLState.h:
- Removed a bad #include.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters">trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCompilecpp">trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLCompileBinaryOpcpp">trunk/Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorh">trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLJITFinalizercpp">trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLStateh">trunk/Source/JavaScriptCore/ftl/FTLState.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorInlinesh">trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -1,3 +1,81 @@
</span><ins>+2015-12-11 Mark Lam <mark.lam@apple.com>
+
+ Refactoring to reduce potential cut-paste errors with the FTL ICs.
+ https://bugs.webkit.org/show_bug.cgi?id=152185
+
+ Reviewed by Saam Barati.
+
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+
+ * ftl/FTLCompile.cpp:
+ - ICs now have their own names. GetById and PutByID fast path ICs no longer just
+ say "inline cache fast path".
+
+ * ftl/FTLCompileBinaryOp.cpp:
+ (JSC::FTL::generateBinaryArithOpFastPath):
+ - Fixed an indentation.
+
+ * ftl/FTLInlineCacheDescriptor.h:
+ (JSC::FTL::InlineCacheDescriptor::InlineCacheDescriptor):
+ (JSC::FTL::InlineCacheDescriptor::name):
+ (JSC::FTL::GetByIdDescriptor::GetByIdDescriptor):
+ (JSC::FTL::PutByIdDescriptor::PutByIdDescriptor):
+ (JSC::FTL::CheckInDescriptor::CheckInDescriptor):
+ (JSC::FTL::BinaryOpDescriptor::nodeType):
+ (JSC::FTL::BinaryOpDescriptor::size):
+ (JSC::FTL::BinaryOpDescriptor::slowPathFunction):
+ (JSC::FTL::BinaryOpDescriptor::leftOperand):
+ (JSC::FTL::BinaryOpDescriptor::BinaryOpDescriptor):
+ (JSC::FTL::ArithDivDescriptor::ArithDivDescriptor):
+ (JSC::FTL::ArithDivDescriptor::icSize):
+ (JSC::FTL::ArithDivDescriptor::nodeType):
+ (JSC::FTL::ArithDivDescriptor::opName):
+ (JSC::FTL::ArithDivDescriptor::slowPathFunction):
+ (JSC::FTL::ArithDivDescriptor::nonNumberSlowPathFunction):
+ (JSC::FTL::ArithMulDescriptor::ArithMulDescriptor):
+ (JSC::FTL::ArithMulDescriptor::icSize):
+ (JSC::FTL::ArithMulDescriptor::nodeType):
+ (JSC::FTL::ArithMulDescriptor::opName):
+ (JSC::FTL::ArithMulDescriptor::slowPathFunction):
+ (JSC::FTL::ArithMulDescriptor::nonNumberSlowPathFunction):
+ (JSC::FTL::ArithSubDescriptor::ArithSubDescriptor):
+ (JSC::FTL::ArithSubDescriptor::icSize):
+ (JSC::FTL::ArithSubDescriptor::nodeType):
+ (JSC::FTL::ArithSubDescriptor::opName):
+ (JSC::FTL::ArithSubDescriptor::slowPathFunction):
+ (JSC::FTL::ArithSubDescriptor::nonNumberSlowPathFunction):
+ (JSC::FTL::ValueAddDescriptor::ValueAddDescriptor):
+ (JSC::FTL::ValueAddDescriptor::icSize):
+ (JSC::FTL::ValueAddDescriptor::nodeType):
+ (JSC::FTL::ValueAddDescriptor::opName):
+ (JSC::FTL::ValueAddDescriptor::slowPathFunction):
+ (JSC::FTL::ValueAddDescriptor::nonNumberSlowPathFunction):
+ (JSC::FTL::LazySlowPathDescriptor::LazySlowPathDescriptor):
+ (JSC::FTL::ProbeDescriptor::ProbeDescriptor):
+ (JSC::FTL::BinaryOpDescriptor::name): Deleted.
+ (JSC::FTL::BinaryOpDescriptor::fastPathICName): Deleted.
+ * ftl/FTLInlineCacheDescriptorInlines.h: Removed.
+ - Consolidate the number of places where we have to fill in a data about new
+ snippet ICs. It is all done in FTLInlineCacheDescriptor.h now.
+
+ * ftl/FTLJITFinalizer.cpp:
+ (JSC::FTL::JITFinalizer::finalizeFunction):
+
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileUntypedBinaryOp):
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileValueAdd):
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileArithMul):
+ (JSC::FTL::DFG::LowerDFGToLLVM::compileArithDiv):
+ - Introduced a compileUntypedBinaryOp() template and use that at all the FTL
+ places that need to use a snippet. This reduces the amount of cut and paste
+ code.
+
+ * ftl/FTLState.h:
+ - Removed a bad #include.
+
</ins><span class="cx"> 2015-12-11 Keith Miller <keith_miller@apple.com>
</span><span class="cx">
</span><span class="cx"> Overrides has instance should not move ValueFalse to a register then immediately to the stack in the LLInt.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -1319,7 +1319,6 @@
</span><span class="cx"> <ClInclude Include="..\ftl\FTLForOSREntryJITCode.h" />
</span><span class="cx"> <ClInclude Include="..\ftl\FTLGeneratedFunction.h" />
</span><span class="cx"> <ClInclude Include="..\ftl\FTLInlineCacheDescriptor.h" />
</span><del>- <ClInclude Include="..\ftl\FTLInlineCacheDescriptorInlines.h" />
</del><span class="cx"> <ClInclude Include="..\ftl\FTLInlineCacheSize.h" />
</span><span class="cx"> <ClInclude Include="..\ftl\FTLIntrinsicRepository.h" />
</span><span class="cx"> <ClInclude Include="..\ftl\FTLJITCode.h" />
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorevcxprojJavaScriptCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -4252,9 +4252,6 @@
</span><span class="cx"> <ClInclude Include="..\ftl\FTLInlineCacheDescriptor.h">
</span><span class="cx"> <Filter>ftl</Filter>
</span><span class="cx"> </ClInclude>
</span><del>- <ClInclude Include="..\ftl\FTLInlineCacheDescriptorInlines.h">
- <Filter>ftl</Filter>
- </ClInclude>
</del><span class="cx"> <ClInclude Include="..\ftl\FTLInlineCacheSize.h">
</span><span class="cx"> <Filter>ftl</Filter>
</span><span class="cx"> </ClInclude>
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -2002,7 +2002,6 @@
</span><span class="cx">                 FE187A0D1C030D5C0038BBCA /* JITDivGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = FE187A0B1C0229230038BBCA /* JITDivGenerator.h */; };
</span><span class="cx">                 FE187A0E1C030D640038BBCA /* JITDivGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE187A0A1C0229230038BBCA /* JITDivGenerator.cpp */; };
</span><span class="cx">                 FE187A0F1C030D6C0038BBCA /* SnippetOperand.h in Headers */ = {isa = PBXBuildFile; fileRef = FE187A0C1C02EBA70038BBCA /* SnippetOperand.h */; };
</span><del>-                FE187A181C0E13DD0038BBCA /* FTLInlineCacheDescriptorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = FE187A171C0E13C60038BBCA /* FTLInlineCacheDescriptorInlines.h */; };
</del><span class="cx">                 FE187A191C0E13E30038BBCA /* FTLCompileBinaryOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE187A151C0E13C60038BBCA /* FTLCompileBinaryOp.cpp */; };
</span><span class="cx">                 FE187A1A1C0E13E60038BBCA /* FTLCompileBinaryOp.h in Headers */ = {isa = PBXBuildFile; fileRef = FE187A161C0E13C60038BBCA /* FTLCompileBinaryOp.h */; };
</span><span class="cx">                 FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1C0FFC1B193E9800B53FCA /* Exception.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -4190,7 +4189,6 @@
</span><span class="cx">                 FE187A0C1C02EBA70038BBCA /* SnippetOperand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SnippetOperand.h; sourceTree = "<group>"; };
</span><span class="cx">                 FE187A151C0E13C60038BBCA /* FTLCompileBinaryOp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLCompileBinaryOp.cpp; path = ftl/FTLCompileBinaryOp.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 FE187A161C0E13C60038BBCA /* FTLCompileBinaryOp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLCompileBinaryOp.h; path = ftl/FTLCompileBinaryOp.h; sourceTree = "<group>"; };
</span><del>-                FE187A171C0E13C60038BBCA /* FTLInlineCacheDescriptorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLInlineCacheDescriptorInlines.h; path = ftl/FTLInlineCacheDescriptorInlines.h; sourceTree = "<group>"; };
</del><span class="cx">                 FE1C0FFC1B193E9800B53FCA /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = "<group>"; };
</span><span class="cx">                 FE1C0FFE1B194FD100B53FCA /* Exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Exception.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntCLoop.cpp; path = llint/LLIntCLoop.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -4508,7 +4506,6 @@
</span><span class="cx">                                 0FD8A31617D51F2200CA2C40 /* FTLForOSREntryJITCode.h */,
</span><span class="cx">                                 A78A977C179738D5009DF744 /* FTLGeneratedFunction.h */,
</span><span class="cx">                                 0F25F1A7181635F300522F39 /* FTLInlineCacheDescriptor.h */,
</span><del>-                                FE187A171C0E13C60038BBCA /* FTLInlineCacheDescriptorInlines.h */,
</del><span class="cx">                                 0F25F1A8181635F300522F39 /* FTLInlineCacheSize.cpp */,
</span><span class="cx">                                 0F25F1A9181635F300522F39 /* FTLInlineCacheSize.h */,
</span><span class="cx">                                 0FEA0A261709623B00BB722C /* FTLIntrinsicRepository.cpp */,
</span><span class="lines">@@ -6983,7 +6980,6 @@
</span><span class="cx">                                 C2C8D02D14A3C6E000578E65 /* CopiedSpaceInlines.h in Headers */,
</span><span class="cx">                                 0F7C11AD1BC3862C00C74CDB /* CopyBarrier.h in Headers */,
</span><span class="cx">                                 0F5A52D017ADD717008ECB2D /* CopyToken.h in Headers */,
</span><del>-                                FE187A181C0E13DD0038BBCA /* FTLInlineCacheDescriptorInlines.h in Headers */,
</del><span class="cx">                                 C2239D1816262BDD005AC5FD /* CopyVisitor.h in Headers */,
</span><span class="cx">                                 C2239D1916262BDD005AC5FD /* CopyVisitorInlines.h in Headers */,
</span><span class="cx">                                 C218D1401655CFD50062BB81 /* CopyWorkList.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCompilecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> #include "FTLCompileBinaryOp.h"
</span><span class="cx"> #include "FTLExceptionHandlerManager.h"
</span><span class="cx"> #include "FTLExitThunkGenerator.h"
</span><del>-#include "FTLInlineCacheDescriptorInlines.h"
</del><ins>+#include "FTLInlineCacheDescriptor.h"
</ins><span class="cx"> #include "FTLInlineCacheSize.h"
</span><span class="cx"> #include "FTLJITCode.h"
</span><span class="cx"> #include "FTLThunks.h"
</span><span class="lines">@@ -215,7 +215,7 @@
</span><span class="cx"> template<typename DescriptorType>
</span><span class="cx"> void generateICFastPath(
</span><span class="cx"> State& state, CodeBlock* codeBlock, GeneratedFunction generatedFunction,
</span><del>- StackMaps::RecordMap& recordMap, DescriptorType& ic, size_t sizeOfIC)
</del><ins>+ StackMaps::RecordMap& recordMap, DescriptorType& ic, size_t sizeOfIC, const char* icName)
</ins><span class="cx"> {
</span><span class="cx"> VM& vm = state.graph.m_vm;
</span><span class="cx">
</span><span class="lines">@@ -239,7 +239,7 @@
</span><span class="cx"> char* startOfIC =
</span><span class="cx"> bitwise_cast<char*>(generatedFunction) + record.instructionOffset;
</span><span class="cx">
</span><del>- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "inline cache fast path", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, icName, [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</ins><span class="cx"> state.finalizer->sideCodeLinkBuffer->link(ic.m_slowPathDone[i],
</span><span class="cx"> CodeLocationLabel(startOfIC + sizeOfIC));
</span><span class="cx">
</span><span class="lines">@@ -304,7 +304,7 @@
</span><span class="cx"> callReturnLocation, slowPathBeginLoc);
</span><span class="cx"> };
</span><span class="cx">
</span><del>- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "CheckIn inline cache", postLink);
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "CheckIn", postLink);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -339,8 +339,7 @@
</span><span class="cx"> generateBinaryOpFastPath(ic, fastPathJIT, result, left, right, usedRegisters, done, slowPathStart);
</span><span class="cx">
</span><span class="cx"> char* startOfIC = bitwise_cast<char*>(generatedFunction) + record.instructionOffset;
</span><del>- const char* fastPathICName = ic.fastPathICName();
- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, fastPathICName, [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, ic.name(), [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</ins><span class="cx"> linkBuffer.link(done, CodeLocationLabel(startOfIC + sizeOfIC));
</span><span class="cx"> state.finalizer->sideCodeLinkBuffer->link(ic.m_slowPathDone[i], CodeLocationLabel(startOfIC + sizeOfIC));
</span><span class="cx">
</span><span class="lines">@@ -877,12 +876,12 @@
</span><span class="cx"> for (unsigned i = state.getByIds.size(); i--;) {
</span><span class="cx"> generateICFastPath(
</span><span class="cx"> state, codeBlock, generatedFunction, recordMap, state.getByIds[i],
</span><del>- sizeOfGetById());
</del><ins>+ sizeOfGetById(), "GetById");
</ins><span class="cx"> }
</span><span class="cx"> for (unsigned i = state.putByIds.size(); i--;) {
</span><span class="cx"> generateICFastPath(
</span><span class="cx"> state, codeBlock, generatedFunction, recordMap, state.putByIds[i],
</span><del>- sizeOfPutById());
</del><ins>+ sizeOfPutById(), "PutById");
</ins><span class="cx"> }
</span><span class="cx"> for (unsigned i = state.checkIns.size(); i--;) {
</span><span class="cx"> generateCheckInICFastPath(
</span><span class="lines">@@ -921,7 +920,7 @@
</span><span class="cx">
</span><span class="cx"> char* startOfIC = bitwise_cast<char*>(generatedFunction) + call.m_instructionOffset;
</span><span class="cx">
</span><del>- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfCall(), "JSCall inline cache", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfCall(), "JSCall", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</ins><span class="cx"> call.link(vm, linkBuffer);
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="lines">@@ -937,7 +936,7 @@
</span><span class="cx"> char* startOfIC = bitwise_cast<char*>(generatedFunction) + call.m_instructionOffset;
</span><span class="cx"> size_t sizeOfIC = sizeOfICFor(call.node());
</span><span class="cx">
</span><del>- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "varargs call inline cache", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "varargs call", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</ins><span class="cx"> call.link(vm, linkBuffer, state.finalizer->handleExceptionsLinkBuffer->entrypoint());
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="lines">@@ -953,7 +952,7 @@
</span><span class="cx"> char* startOfIC = bitwise_cast<char*>(generatedFunction) + call.m_instructionOffset;
</span><span class="cx"> size_t sizeOfIC = call.estimatedSize();
</span><span class="cx">
</span><del>- generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "tail call inline cache", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</del><ins>+ generateInlineIfPossibleOutOfLineIfNot(state, vm, codeBlock, fastPathJIT, startOfIC, sizeOfIC, "tail call", [&] (LinkBuffer& linkBuffer, CCallHelpers&, bool) {
</ins><span class="cx"> call.link(vm, linkBuffer);
</span><span class="cx"> });
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLCompileBinaryOpcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLCompileBinaryOp.cpp        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx"> JSValueRegs(left), JSValueRegs(right), leftFPR, rightFPR, scratchGPR, scratchFPR);
</span><span class="cx">
</span><span class="cx"> auto numberOfBytesUsedToPreserveReusedRegisters =
</span><del>- allocator.preserveReusedRegistersByPushing(jit, ScratchRegisterAllocator::ExtraStackSpace::NoExtraSpace);
</del><ins>+ allocator.preserveReusedRegistersByPushing(jit, ScratchRegisterAllocator::ExtraStackSpace::NoExtraSpace);
</ins><span class="cx">
</span><span class="cx"> context.initializeRegisters(jit);
</span><span class="cx"> gen.generateFastPath(jit);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptor.h        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -30,6 +30,8 @@
</span><span class="cx">
</span><span class="cx"> #include "CodeOrigin.h"
</span><span class="cx"> #include "DFGAbstractValue.h"
</span><ins>+#include "DFGOperations.h"
+#include "FTLInlineCacheSize.h"
</ins><span class="cx"> #include "FTLLazySlowPath.h"
</span><span class="cx"> #include "JITInlineCacheGenerator.h"
</span><span class="cx"> #include "MacroAssembler.h"
</span><span class="lines">@@ -132,7 +134,6 @@
</span><span class="cx"> unsigned nodeType() const { return m_nodeType; }
</span><span class="cx"> size_t size() const { return m_size; }
</span><span class="cx"> const char* name() const { return m_name; }
</span><del>- const char* fastPathICName() const { return m_fastPathICName; }
</del><span class="cx"> SlowPathFunction slowPathFunction() const { return m_slowPathFunction; }
</span><span class="cx">
</span><span class="cx"> SnippetOperand leftOperand() { return m_leftOperand; }
</span><span class="lines">@@ -142,13 +143,12 @@
</span><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> BinaryOpDescriptor(unsigned nodeType, unsigned stackmapID, CodeOrigin codeOrigin,
</span><del>- size_t size, const char* name, const char* fastPathICName,
- SlowPathFunction slowPathFunction, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
</del><ins>+ size_t size, const char* name, SlowPathFunction slowPathFunction,
+ const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
</ins><span class="cx"> : InlineCacheDescriptor(stackmapID, codeOrigin, nullptr)
</span><span class="cx"> , m_nodeType(nodeType)
</span><span class="cx"> , m_size(size)
</span><span class="cx"> , m_name(name)
</span><del>- , m_fastPathICName(fastPathICName)
</del><span class="cx"> , m_slowPathFunction(slowPathFunction)
</span><span class="cx"> , m_leftOperand(leftOperand)
</span><span class="cx"> , m_rightOperand(rightOperand)
</span><span class="lines">@@ -158,7 +158,6 @@
</span><span class="cx"> unsigned m_nodeType;
</span><span class="cx"> size_t m_size;
</span><span class="cx"> const char* m_name;
</span><del>- const char* m_fastPathICName;
</del><span class="cx"> SlowPathFunction m_slowPathFunction;
</span><span class="cx">
</span><span class="cx"> SnippetOperand m_leftOperand;
</span><span class="lines">@@ -167,26 +166,54 @@
</span><span class="cx">
</span><span class="cx"> class ArithDivDescriptor : public BinaryOpDescriptor {
</span><span class="cx"> public:
</span><del>- ArithDivDescriptor(unsigned stackmapID, CodeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand);
- static size_t icSize();
</del><ins>+ ArithDivDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
+ : BinaryOpDescriptor(nodeType(), stackmapID, codeOrigin, icSize(), opName(), slowPathFunction(), leftOperand, rightOperand)
+ { }
+
+ static size_t icSize() { return sizeOfArithDiv(); }
+ static unsigned nodeType() { return DFG::ArithDiv; }
+ static const char* opName() { return "ArithDiv"; }
+ static J_JITOperation_EJJ slowPathFunction() { return DFG::operationValueDiv; }
+ static J_JITOperation_EJJ nonNumberSlowPathFunction() { return slowPathFunction(); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ArithMulDescriptor : public BinaryOpDescriptor {
</span><span class="cx"> public:
</span><del>- ArithMulDescriptor(unsigned stackmapID, CodeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand);
- static size_t icSize();
</del><ins>+ ArithMulDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
+ : BinaryOpDescriptor(nodeType(), stackmapID, codeOrigin, icSize(), opName(), slowPathFunction(), leftOperand, rightOperand)
+ { }
+
+ static size_t icSize() { return sizeOfArithMul(); }
+ static unsigned nodeType() { return DFG::ArithMul; }
+ static const char* opName() { return "ArithMul"; }
+ static J_JITOperation_EJJ slowPathFunction() { return DFG::operationValueMul; }
+ static J_JITOperation_EJJ nonNumberSlowPathFunction() { return slowPathFunction(); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ArithSubDescriptor : public BinaryOpDescriptor {
</span><span class="cx"> public:
</span><del>- ArithSubDescriptor(unsigned stackmapID, CodeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand);
- static size_t icSize();
</del><ins>+ ArithSubDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
+ : BinaryOpDescriptor(nodeType(), stackmapID, codeOrigin, icSize(), opName(), slowPathFunction(), leftOperand, rightOperand)
+ { }
+
+ static size_t icSize() { return sizeOfArithSub(); }
+ static unsigned nodeType() { return DFG::ArithSub; }
+ static const char* opName() { return "ArithSub"; }
+ static J_JITOperation_EJJ slowPathFunction() { return DFG::operationValueSub; }
+ static J_JITOperation_EJJ nonNumberSlowPathFunction() { return slowPathFunction(); }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> class ValueAddDescriptor : public BinaryOpDescriptor {
</span><span class="cx"> public:
</span><del>- ValueAddDescriptor(unsigned stackmapID, CodeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand);
- static size_t icSize();
</del><ins>+ ValueAddDescriptor(unsigned stackmapID, CodeOrigin codeOrigin, const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
+ : BinaryOpDescriptor(nodeType(), stackmapID, codeOrigin, icSize(), opName(), slowPathFunction(), leftOperand, rightOperand)
+ { }
+
+ static size_t icSize() { return sizeOfValueAdd(); }
+ static unsigned nodeType() { return DFG::ValueAdd; }
+ static const char* opName() { return "ValueAdd"; }
+ static J_JITOperation_EJJ slowPathFunction() { return DFG::operationValueAdd; }
+ static J_JITOperation_EJJ nonNumberSlowPathFunction() { return DFG::operationValueAddNotNumber; }
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> // You can create a lazy slow path call in lowerDFGToLLVM by doing:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLInlineCacheDescriptorInlinesh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLInlineCacheDescriptorInlines.h        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -1,90 +0,0 @@
</span><del>-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FTLInlineCacheDescriptorInlines_h
-#define FTLInlineCacheDescriptorInlines_h
-
-#if ENABLE(FTL_JIT)
-
-#include "DFGNodeType.h"
-#include "DFGOperations.h"
-#include "FTLInlineCacheDescriptor.h"
-#include "FTLInlineCacheSize.h"
-
-namespace JSC { namespace FTL {
-
-ArithDivDescriptor::ArithDivDescriptor(unsigned stackmapID, CodeOrigin codeOrigin,
- const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
- : BinaryOpDescriptor(DFG::ArithDiv, stackmapID, codeOrigin, icSize(),
- "ArithDiv", "ArithDiv IC fast path", DFG::operationValueDiv, leftOperand, rightOperand)
-{
-}
-
-size_t ArithDivDescriptor::icSize()
-{
- return sizeOfArithDiv();
-}
-
-ArithMulDescriptor::ArithMulDescriptor(unsigned stackmapID, CodeOrigin codeOrigin,
- const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
- : BinaryOpDescriptor(DFG::ArithMul, stackmapID, codeOrigin, icSize(),
- "ArithMul", "ArithMul IC fast path", DFG::operationValueMul, leftOperand, rightOperand)
-{
-}
-
-size_t ArithMulDescriptor::icSize()
-{
- return sizeOfArithMul();
-}
-
-ArithSubDescriptor::ArithSubDescriptor(unsigned stackmapID, CodeOrigin codeOrigin,
- const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
- : BinaryOpDescriptor(DFG::ArithSub, stackmapID, codeOrigin, icSize(),
- "ArithSub", "ArithSub IC fast path", DFG::operationValueSub, leftOperand, rightOperand)
-{
-}
-
-size_t ArithSubDescriptor::icSize()
-{
- return sizeOfArithSub();
-}
-
-ValueAddDescriptor::ValueAddDescriptor(unsigned stackmapID, CodeOrigin codeOrigin,
- const SnippetOperand& leftOperand, const SnippetOperand& rightOperand)
- : BinaryOpDescriptor(DFG::ValueAdd, stackmapID, codeOrigin, icSize(),
- "ValueAdd", "ValueAdd IC fast path", DFG::operationValueAdd, leftOperand, rightOperand)
-{
-}
-
-size_t ValueAddDescriptor::icSize()
-{
- return sizeOfValueAdd();
-}
-
-} } // namespace JSC::FTL
-
-#endif // ENABLE(FTL_JIT)
-
-#endif // FTLInlineCacheDescriptorInlines_h
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLJITFinalizercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.cpp        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> for (unsigned i = 0; i < outOfLineCodeInfos.size(); ++i) {
</span><span class="cx"> jitCode->addHandle(FINALIZE_CODE_IF(
</span><span class="cx"> dumpDisassembly, *outOfLineCodeInfos[i].m_linkBuffer,
</span><del>- ("FTL out of line code for %s", outOfLineCodeInfos[i].m_codeDescription)).executableMemory());
</del><ins>+ ("FTL out of line code for %s inline cache", outOfLineCodeInfos[i].m_codeDescription)).executableMemory());
</ins><span class="cx"> }
</span><span class="cx"> #endif // FTL_USES_B3
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -1038,6 +1038,84 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ enum ConstInt32OperandOptimizationSupport {
+ HasConstInt32OperandOptimization,
+ DoesNotHaveConstInt32OperandOptimization,
+ };
+
+ enum ConstDoubleOperandOptimizationSupport {
+ HasConstDoubleOperandOptimization,
+ DoesNotHaveConstDoubleOperandOptimization,
+ };
+
+ template <typename SnippetICDescriptor,
+ ConstInt32OperandOptimizationSupport constInt32Opt = HasConstInt32OperandOptimization,
+ ConstDoubleOperandOptimizationSupport constDoubleOpt = DoesNotHaveConstDoubleOperandOptimization>
+ void compileUntypedBinaryOp()
+ {
+ Edge& leftChild = m_node->child1();
+ Edge& rightChild = m_node->child2();
+
+ if (!(provenType(leftChild) & SpecFullNumber) || !(provenType(rightChild) & SpecFullNumber)) {
+ setJSValue(vmCall(m_out.int64, m_out.operation(SnippetICDescriptor::nonNumberSlowPathFunction()), m_callFrame,
+ lowJSValue(leftChild), lowJSValue(rightChild)));
+ return;
+ }
+
+ unsigned stackmapID = m_stackmapIDs++;
+
+ if (Options::verboseCompilation())
+ dataLog(" Emitting ", SnippetICDescriptor::opName(), " patchpoint with stackmap #", stackmapID, "\n");
+
+#if FTL_USES_B3
+ CRASH();
+#else
+ LValue left = lowJSValue(leftChild);
+ LValue right = lowJSValue(rightChild);
+
+ SnippetOperand leftOperand(abstractValue(leftChild).resultType());
+ SnippetOperand rightOperand(abstractValue(rightChild).resultType());
+
+ if (constInt32Opt == HasConstInt32OperandOptimization && leftChild->isInt32Constant())
+ leftOperand.setConstInt32(leftChild->asInt32());
+#if USE(JSVALUE64)
+ else if (constDoubleOpt == HasConstDoubleOperandOptimization && leftChild->isDoubleConstant())
+ leftOperand.setConstDouble(leftChild->asNumber());
+#endif
+
+ if (leftOperand.isConst()) {
+ // Because the snippet does not support both operands being constant, if the left
+ // operand is already a constant, we'll just pretend the right operand is not.
+ } else if (constInt32Opt == HasConstInt32OperandOptimization && rightChild->isInt32Constant())
+ rightOperand.setConstInt32(rightChild->asInt32());
+#if USE(JSVALUE64)
+ else if (constDoubleOpt == HasConstDoubleOperandOptimization && rightChild->isDoubleConstant())
+ rightOperand.setConstDouble(rightChild->asNumber());
+#endif
+
+ RELEASE_ASSERT(!leftOperand.isConst() || !rightOperand.isConst());
+
+ // Arguments: id, bytes, target, numArgs, args...
+ StackmapArgumentList arguments;
+ arguments.append(m_out.constInt64(stackmapID));
+ arguments.append(m_out.constInt32(SnippetICDescriptor::icSize()));
+ arguments.append(constNull(m_out.ref8));
+ arguments.append(m_out.constInt32(2));
+ arguments.append(left);
+ arguments.append(right);
+
+ appendOSRExitArgumentsForPatchpointIfWillCatchException(arguments,
+ ExceptionType::BinaryOpGenerator, 3); // left, right, and result show up in the stackmap locations.
+
+ LValue call = m_out.call(m_out.int64, m_out.patchpointInt64Intrinsic(), arguments);
+ setInstructionCallingConvention(call, LLVMAnyRegCallConv);
+
+ m_ftlState.binaryOps.append(SnippetICDescriptor(stackmapID, m_node->origin.semantic, leftOperand, rightOperand));
+
+ setJSValue(call);
+#endif
+ }
+
</ins><span class="cx"> void compileUpsilon()
</span><span class="cx"> {
</span><span class="cx"> LValue upsilonValue = nullptr;
</span><span class="lines">@@ -1512,55 +1590,7 @@
</span><span class="cx">
</span><span class="cx"> void compileValueAdd()
</span><span class="cx"> {
</span><del>- Edge& leftChild = m_node->child1();
- Edge& rightChild = m_node->child2();
-
- if (!(provenType(leftChild) & SpecFullNumber) || !(provenType(rightChild) & SpecFullNumber)) {
- setJSValue(vmCall(m_out.int64, m_out.operation(operationValueAddNotNumber), m_callFrame,
- lowJSValue(leftChild), lowJSValue(rightChild)));
- return;
- }
-
- unsigned stackmapID = m_stackmapIDs++;
-
- if (Options::verboseCompilation())
- dataLog(" Emitting ValueAdd patchpoint with stackmap #", stackmapID, "\n");
-
-#if FTL_USES_B3
- CRASH();
-#else
- LValue left = lowJSValue(leftChild);
- LValue right = lowJSValue(rightChild);
-
- SnippetOperand leftOperand(abstractValue(leftChild).resultType());
- SnippetOperand rightOperand(abstractValue(rightChild).resultType());
-
- // Because the snippet does not support both operands being constant, if the left
- // operand is already a constant, we'll just pretend the right operand is not.
- if (leftChild->isInt32Constant())
- leftOperand.setConstInt32(leftChild->asInt32());
- else if (rightChild->isInt32Constant())
- rightOperand.setConstInt32(rightChild->asInt32());
-
- // Arguments: id, bytes, target, numArgs, args...
- StackmapArgumentList arguments;
- arguments.append(m_out.constInt64(stackmapID));
- arguments.append(m_out.constInt32(ValueAddDescriptor::icSize()));
- arguments.append(constNull(m_out.ref8));
- arguments.append(m_out.constInt32(2));
- arguments.append(left);
- arguments.append(right);
-
- appendOSRExitArgumentsForPatchpointIfWillCatchException(arguments,
- ExceptionType::BinaryOpGenerator, 3); // left, right, and result show up in the stackmap locations.
-
- LValue call = m_out.call(m_out.int64, m_out.patchpointInt64Intrinsic(), arguments);
- setInstructionCallingConvention(call, LLVMAnyRegCallConv);
-
- m_ftlState.binaryOps.append(ValueAddDescriptor(stackmapID, m_node->origin.semantic, leftOperand, rightOperand));
-
- setJSValue(call);
-#endif
</del><ins>+ compileUntypedBinaryOp<ValueAddDescriptor>();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void compileStrCat()
</span><span class="lines">@@ -1709,38 +1739,7 @@
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- unsigned stackmapID = m_stackmapIDs++;
-
- if (Options::verboseCompilation())
- dataLog(" Emitting ArithSub patchpoint with stackmap #", stackmapID, "\n");
-
-#if FTL_USES_B3
- CRASH();
-#else
- LValue left = lowJSValue(m_node->child1());
- LValue right = lowJSValue(m_node->child2());
-
- // Arguments: id, bytes, target, numArgs, args...
- StackmapArgumentList arguments;
- arguments.append(m_out.constInt64(stackmapID));
- arguments.append(m_out.constInt32(ArithSubDescriptor::icSize()));
- arguments.append(constNull(m_out.ref8));
- arguments.append(m_out.constInt32(2));
- arguments.append(left);
- arguments.append(right);
-
- appendOSRExitArgumentsForPatchpointIfWillCatchException(arguments,
- ExceptionType::BinaryOpGenerator, 3); // left, right, and result show up in the stackmap locations.
-
- LValue call = m_out.call(m_out.int64, m_out.patchpointInt64Intrinsic(), arguments);
- setInstructionCallingConvention(call, LLVMAnyRegCallConv);
-
- SnippetOperand leftOperand(abstractValue(m_node->child1()).resultType());
- SnippetOperand rightOperand(abstractValue(m_node->child2()).resultType());
- m_ftlState.binaryOps.append(ArithSubDescriptor(stackmapID, m_node->origin.semantic, leftOperand, rightOperand));
-
- setJSValue(call);
-#endif
</del><ins>+ compileUntypedBinaryOp<ArithSubDescriptor, DoesNotHaveConstInt32OperandOptimization, DoesNotHaveConstDoubleOperandOptimization>();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1836,57 +1835,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> case UntypedUse: {
</span><del>- Edge& leftChild = m_node->child1();
- Edge& rightChild = m_node->child2();
-
- if (!(provenType(leftChild) & SpecFullNumber) || !(provenType(rightChild) & SpecFullNumber)) {
- setJSValue(vmCall(m_out.int64, m_out.operation(operationValueMul), m_callFrame,
- lowJSValue(leftChild), lowJSValue(rightChild)));
- return;
- }
-
- unsigned stackmapID = m_stackmapIDs++;
-
- if (Options::verboseCompilation())
- dataLog(" Emitting ArithMul patchpoint with stackmap #", stackmapID, "\n");
-
-#if FTL_USES_B3
- CRASH();
-#else
- LValue left = lowJSValue(leftChild);
- LValue right = lowJSValue(rightChild);
-
- SnippetOperand leftOperand(abstractValue(leftChild).resultType());
- SnippetOperand rightOperand(abstractValue(rightChild).resultType());
-
- // Because the snippet does not support both operands being constant, if the left
- // operand is already a constant, we'll just pretend the right operand is not.
- if (leftChild->isInt32Constant())
- leftOperand.setConstInt32(leftChild->asInt32());
- else if (rightChild->isInt32Constant())
- rightOperand.setConstInt32(rightChild->asInt32());
-
- RELEASE_ASSERT(!leftOperand.isConst() || !rightOperand.isConst());
-
- // Arguments: id, bytes, target, numArgs, args...
- StackmapArgumentList arguments;
- arguments.append(m_out.constInt64(stackmapID));
- arguments.append(m_out.constInt32(ArithMulDescriptor::icSize()));
- arguments.append(constNull(m_out.ref8));
- arguments.append(m_out.constInt32(2));
- arguments.append(left);
- arguments.append(right);
-
- appendOSRExitArgumentsForPatchpointIfWillCatchException(arguments,
- ExceptionType::BinaryOpGenerator, 3); // left, right, and result show up in the stackmap locations.
-
- LValue call = m_out.call(m_out.int64, m_out.patchpointInt64Intrinsic(), arguments);
- setInstructionCallingConvention(call, LLVMAnyRegCallConv);
-
- m_ftlState.binaryOps.append(ArithMulDescriptor(stackmapID, m_node->origin.semantic, leftOperand, rightOperand));
-
- setJSValue(call);
-#endif
</del><ins>+ compileUntypedBinaryOp<ArithMulDescriptor>();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1955,67 +1904,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> case UntypedUse: {
</span><del>- Edge& leftChild = m_node->child1();
- Edge& rightChild = m_node->child2();
-
- if (!(provenType(leftChild) & SpecFullNumber) || !(provenType(rightChild) & SpecFullNumber)) {
- setJSValue(vmCall(m_out.int64, m_out.operation(operationValueDiv), m_callFrame,
- lowJSValue(leftChild), lowJSValue(rightChild)));
- return;
- }
-
- unsigned stackmapID = m_stackmapIDs++;
-
- if (Options::verboseCompilation())
- dataLog(" Emitting ArithDiv patchpoint with stackmap #", stackmapID, "\n");
-
-#if FTL_USES_B3
- CRASH();
-#else
- LValue left = lowJSValue(leftChild);
- LValue right = lowJSValue(rightChild);
-
- SnippetOperand leftOperand(abstractValue(leftChild).resultType());
- SnippetOperand rightOperand(abstractValue(rightChild).resultType());
-
- if (leftChild->isInt32Constant())
- leftOperand.setConstInt32(leftChild->asInt32());
-#if USE(JSVALUE64)
- else if (leftChild->isDoubleConstant())
- leftOperand.setConstDouble(leftChild->asNumber());
-#endif
-
- if (leftOperand.isConst()) {
- // The snippet generator only supports 1 argument as a constant.
- // Ignore the rightChild's const-ness.
- } else if (rightChild->isInt32Constant())
- rightOperand.setConstInt32(rightChild->asInt32());
-#if USE(JSVALUE64)
- else if (rightChild->isDoubleConstant())
- rightOperand.setConstDouble(rightChild->asNumber());
-#endif
-
- RELEASE_ASSERT(!leftOperand.isConst() || !rightOperand.isConst());
-
- // Arguments: id, bytes, target, numArgs, args...
- StackmapArgumentList arguments;
- arguments.append(m_out.constInt64(stackmapID));
- arguments.append(m_out.constInt32(ArithDivDescriptor::icSize()));
- arguments.append(constNull(m_out.ref8));
- arguments.append(m_out.constInt32(2));
- arguments.append(left);
- arguments.append(right);
-
- appendOSRExitArgumentsForPatchpointIfWillCatchException(arguments,
- ExceptionType::BinaryOpGenerator, 3); // left, right, and result show up in the stackmap locations.
-
- LValue call = m_out.call(m_out.int64, m_out.patchpointInt64Intrinsic(), arguments);
- setInstructionCallingConvention(call, LLVMAnyRegCallConv);
-
- m_ftlState.binaryOps.append(ArithDivDescriptor(stackmapID, m_node->origin.semantic, leftOperand, rightOperand));
-
- setJSValue(call);
-#endif // FTL_USES_B3
</del><ins>+ compileUntypedBinaryOp<ArithDivDescriptor, HasConstInt32OperandOptimization, HasConstDoubleOperandOptimization>();
</ins><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLState.h (193984 => 193985)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLState.h        2015-12-11 22:43:49 UTC (rev 193984)
+++ trunk/Source/JavaScriptCore/ftl/FTLState.h        2015-12-11 23:01:57 UTC (rev 193985)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> #include "FTLJSCallVarargs.h"
</span><span class="cx"> #include "FTLJSTailCall.h"
</span><span class="cx"> #include "FTLStackMaps.h"
</span><del>-#include "FTLState.h"
</del><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx">
</span><span class="cx"> namespace JSC { namespace FTL {
</span></span></pre>
</div>
</div>
</body>
</html>