<!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>[191993] 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/191993">191993</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-11-03 16:13:27 -0800 (Tue, 03 Nov 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>B3::Stackmap should be a superclass of B3::PatchpointValue and B3::CheckValue rather than being one of their members
https://bugs.webkit.org/show_bug.cgi?id=150831
Rubber stamped by Benjamin Poulain.
Previously, Stackmap was a value that PatchpointValue and CheckValue would hold as a field.
We'd have convenient ways of getting this field, like via Value::stackmap(). But this was a
bit ridiculous, since Stackmap is logically just a common supertype for Patchpointvalue and
CheckValue. This patch makes this reality by replacing Stackmap with StackmapValue. This makes
the code a lot more reasonable.
I also needed to make dumping a bit more customizable, so I changed dumpMeta() to take a
CommaPrinter&. This gives subclasses better control over whether or not to emit a comma. Also
it's now possible for subclasses of Value to customize how children are printed. StackmapValue
uses this to print the children and their reps together like:
Int32 @2 = Patchpoint(@0:SomeRegister, @1:SomeRegister, generator = 0x1107ec010, clobbered = [], usedRegisters = [], ExitsSideways|ControlDependent|Writes:Top|Reads:Top)
This has no behavior change, it's just a big refactoring. You can see how much simpler this
makes things by looking at the testSimplePatchpoint() test.
* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3ArgumentRegValue.cpp:
(JSC::B3::ArgumentRegValue::~ArgumentRegValue):
(JSC::B3::ArgumentRegValue::dumpMeta):
* b3/B3ArgumentRegValue.h:
* b3/B3CheckSpecial.cpp:
(JSC::B3::CheckSpecial::generate):
* b3/B3CheckValue.cpp:
(JSC::B3::CheckValue::~CheckValue):
(JSC::B3::CheckValue::CheckValue):
(JSC::B3::CheckValue::dumpMeta): Deleted.
* b3/B3CheckValue.h:
(JSC::B3::CheckValue::accepts):
* b3/B3Const32Value.cpp:
(JSC::B3::Const32Value::notEqualConstant):
(JSC::B3::Const32Value::dumpMeta):
* b3/B3Const32Value.h:
* b3/B3Const64Value.cpp:
(JSC::B3::Const64Value::notEqualConstant):
(JSC::B3::Const64Value::dumpMeta):
* b3/B3Const64Value.h:
* b3/B3ConstDoubleValue.cpp:
(JSC::B3::ConstDoubleValue::notEqualConstant):
(JSC::B3::ConstDoubleValue::dumpMeta):
* b3/B3ConstDoubleValue.h:
* b3/B3ConstrainedValue.cpp: Added.
(JSC::B3::ConstrainedValue::dump):
* b3/B3ConstrainedValue.h: Added.
(JSC::B3::ConstrainedValue::ConstrainedValue):
(JSC::B3::ConstrainedValue::operator bool):
(JSC::B3::ConstrainedValue::value):
(JSC::B3::ConstrainedValue::rep):
* b3/B3ControlValue.cpp:
(JSC::B3::ControlValue::convertToJump):
(JSC::B3::ControlValue::dumpMeta):
* b3/B3ControlValue.h:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::tryPatchpoint):
* b3/B3MemoryValue.cpp:
(JSC::B3::MemoryValue::accessByteSize):
(JSC::B3::MemoryValue::dumpMeta):
* b3/B3MemoryValue.h:
* b3/B3PatchpointSpecial.cpp:
(JSC::B3::PatchpointSpecial::generate):
* b3/B3PatchpointValue.cpp:
(JSC::B3::PatchpointValue::~PatchpointValue):
(JSC::B3::PatchpointValue::PatchpointValue):
(JSC::B3::PatchpointValue::dumpMeta): Deleted.
* b3/B3PatchpointValue.h:
(JSC::B3::PatchpointValue::accepts):
* b3/B3StackSlotValue.cpp:
(JSC::B3::StackSlotValue::~StackSlotValue):
(JSC::B3::StackSlotValue::dumpMeta):
* b3/B3StackSlotValue.h:
* b3/B3Stackmap.cpp: Removed.
* b3/B3Stackmap.h: Removed.
* b3/B3StackmapSpecial.cpp:
(JSC::B3::StackmapSpecial::reportUsedRegisters):
(JSC::B3::StackmapSpecial::extraClobberedRegs):
(JSC::B3::StackmapSpecial::forEachArgImpl):
(JSC::B3::StackmapSpecial::isValidImpl):
(JSC::B3::StackmapSpecial::admitsStackImpl):
* b3/B3StackmapSpecial.h:
* b3/B3StackmapValue.cpp: Added.
(JSC::B3::StackmapValue::~StackmapValue):
(JSC::B3::StackmapValue::append):
(JSC::B3::StackmapValue::setConstrainedChild):
(JSC::B3::StackmapValue::setConstraint):
(JSC::B3::StackmapValue::dumpChildren):
(JSC::B3::StackmapValue::dumpMeta):
(JSC::B3::StackmapValue::StackmapValue):
* b3/B3StackmapValue.h: Added.
* b3/B3SwitchValue.cpp:
(JSC::B3::SwitchValue::appendCase):
(JSC::B3::SwitchValue::dumpMeta):
(JSC::B3::SwitchValue::SwitchValue):
* b3/B3SwitchValue.h:
* b3/B3UpsilonValue.cpp:
(JSC::B3::UpsilonValue::~UpsilonValue):
(JSC::B3::UpsilonValue::dumpMeta):
* b3/B3UpsilonValue.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::dump):
(JSC::B3::Value::dumpChildren):
(JSC::B3::Value::deepDump):
(JSC::B3::Value::performSubstitution):
(JSC::B3::Value::dumpMeta):
* b3/B3Value.h:
* b3/B3ValueInlines.h:
(JSC::B3::Value::asNumber):
(JSC::B3::Value::stackmap): Deleted.
* b3/B3ValueRep.h:
(JSC::B3::ValueRep::kind):
(JSC::B3::ValueRep::operator==):
(JSC::B3::ValueRep::operator!=):
(JSC::B3::ValueRep::operator bool):
(JSC::B3::ValueRep::isAny):
* b3/air/AirInstInlines.h:
* b3/testb3.cpp:
(JSC::B3::testSimplePatchpoint):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreCMakeListstxt">trunk/Source/JavaScriptCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj">trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ArgumentRegValuecpp">trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ArgumentRegValueh">trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3CheckSpecialcpp">trunk/Source/JavaScriptCore/b3/B3CheckSpecial.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3CheckValuecpp">trunk/Source/JavaScriptCore/b3/B3CheckValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3CheckValueh">trunk/Source/JavaScriptCore/b3/B3CheckValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Const32Valuecpp">trunk/Source/JavaScriptCore/b3/B3Const32Value.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Const32Valueh">trunk/Source/JavaScriptCore/b3/B3Const32Value.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Const64Valuecpp">trunk/Source/JavaScriptCore/b3/B3Const64Value.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Const64Valueh">trunk/Source/JavaScriptCore/b3/B3Const64Value.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ConstDoubleValuecpp">trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ConstDoubleValueh">trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ControlValuecpp">trunk/Source/JavaScriptCore/b3/B3ControlValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ControlValueh">trunk/Source/JavaScriptCore/b3/B3ControlValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3LowerToAircpp">trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3MemoryValuecpp">trunk/Source/JavaScriptCore/b3/B3MemoryValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3MemoryValueh">trunk/Source/JavaScriptCore/b3/B3MemoryValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3PatchpointSpecialcpp">trunk/Source/JavaScriptCore/b3/B3PatchpointSpecial.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3PatchpointValuecpp">trunk/Source/JavaScriptCore/b3/B3PatchpointValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3PatchpointValueh">trunk/Source/JavaScriptCore/b3/B3PatchpointValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackSlotValuecpp">trunk/Source/JavaScriptCore/b3/B3StackSlotValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackSlotValueh">trunk/Source/JavaScriptCore/b3/B3StackSlotValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackmapSpecialcpp">trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackmapSpecialh">trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3SwitchValuecpp">trunk/Source/JavaScriptCore/b3/B3SwitchValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3SwitchValueh">trunk/Source/JavaScriptCore/b3/B3SwitchValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3UpsilonValuecpp">trunk/Source/JavaScriptCore/b3/B3UpsilonValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3UpsilonValueh">trunk/Source/JavaScriptCore/b3/B3UpsilonValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Validatecpp">trunk/Source/JavaScriptCore/b3/B3Validate.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Valuecpp">trunk/Source/JavaScriptCore/b3/B3Value.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Valueh">trunk/Source/JavaScriptCore/b3/B3Value.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ValueInlinesh">trunk/Source/JavaScriptCore/b3/B3ValueInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ValueReph">trunk/Source/JavaScriptCore/b3/B3ValueRep.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3airAirInstInlinesh">trunk/Source/JavaScriptCore/b3/air/AirInstInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3testb3cpp">trunk/Source/JavaScriptCore/b3/testb3.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreb3B3ConstrainedValuecpp">trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3ConstrainedValueh">trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackmapValuecpp">trunk/Source/JavaScriptCore/b3/B3StackmapValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3StackmapValueh">trunk/Source/JavaScriptCore/b3/B3StackmapValue.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreb3B3Stackmapcpp">trunk/Source/JavaScriptCore/b3/B3Stackmap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreb3B3Stackmaph">trunk/Source/JavaScriptCore/b3/B3Stackmap.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/CMakeLists.txt (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/CMakeLists.txt        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/CMakeLists.txt        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -92,6 +92,7 @@
</span><span class="cx"> b3/B3BasicBlock.cpp
</span><span class="cx"> b3/B3CheckSpecial.cpp
</span><span class="cx"> b3/B3CheckValue.cpp
</span><ins>+ b3/B3ConstrainedValue.cpp
</ins><span class="cx"> b3/B3Common.cpp
</span><span class="cx"> b3/B3Commutativity.cpp
</span><span class="cx"> b3/B3Const32Value.cpp
</span><span class="lines">@@ -112,8 +113,8 @@
</span><span class="cx"> b3/B3PhaseScope.cpp
</span><span class="cx"> b3/B3Procedure.cpp
</span><span class="cx"> b3/B3ReduceStrength.cpp
</span><del>- b3/B3Stackmap.cpp
</del><span class="cx"> b3/B3StackmapSpecial.cpp
</span><ins>+ b3/B3StackmapValue.cpp
</ins><span class="cx"> b3/B3StackSlotKind.cpp
</span><span class="cx"> b3/B3StackSlotValue.cpp
</span><span class="cx"> b3/B3SwitchCase.cpp
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -1,3 +1,129 @@
</span><ins>+2015-11-03 Filip Pizlo <fpizlo@apple.com>
+
+ B3::Stackmap should be a superclass of B3::PatchpointValue and B3::CheckValue rather than being one of their members
+ https://bugs.webkit.org/show_bug.cgi?id=150831
+
+ Rubber stamped by Benjamin Poulain.
+
+ Previously, Stackmap was a value that PatchpointValue and CheckValue would hold as a field.
+ We'd have convenient ways of getting this field, like via Value::stackmap(). But this was a
+ bit ridiculous, since Stackmap is logically just a common supertype for Patchpointvalue and
+ CheckValue. This patch makes this reality by replacing Stackmap with StackmapValue. This makes
+ the code a lot more reasonable.
+
+ I also needed to make dumping a bit more customizable, so I changed dumpMeta() to take a
+ CommaPrinter&. This gives subclasses better control over whether or not to emit a comma. Also
+ it's now possible for subclasses of Value to customize how children are printed. StackmapValue
+ uses this to print the children and their reps together like:
+
+ Int32 @2 = Patchpoint(@0:SomeRegister, @1:SomeRegister, generator = 0x1107ec010, clobbered = [], usedRegisters = [], ExitsSideways|ControlDependent|Writes:Top|Reads:Top)
+
+ This has no behavior change, it's just a big refactoring. You can see how much simpler this
+ makes things by looking at the testSimplePatchpoint() test.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * b3/B3ArgumentRegValue.cpp:
+ (JSC::B3::ArgumentRegValue::~ArgumentRegValue):
+ (JSC::B3::ArgumentRegValue::dumpMeta):
+ * b3/B3ArgumentRegValue.h:
+ * b3/B3CheckSpecial.cpp:
+ (JSC::B3::CheckSpecial::generate):
+ * b3/B3CheckValue.cpp:
+ (JSC::B3::CheckValue::~CheckValue):
+ (JSC::B3::CheckValue::CheckValue):
+ (JSC::B3::CheckValue::dumpMeta): Deleted.
+ * b3/B3CheckValue.h:
+ (JSC::B3::CheckValue::accepts):
+ * b3/B3Const32Value.cpp:
+ (JSC::B3::Const32Value::notEqualConstant):
+ (JSC::B3::Const32Value::dumpMeta):
+ * b3/B3Const32Value.h:
+ * b3/B3Const64Value.cpp:
+ (JSC::B3::Const64Value::notEqualConstant):
+ (JSC::B3::Const64Value::dumpMeta):
+ * b3/B3Const64Value.h:
+ * b3/B3ConstDoubleValue.cpp:
+ (JSC::B3::ConstDoubleValue::notEqualConstant):
+ (JSC::B3::ConstDoubleValue::dumpMeta):
+ * b3/B3ConstDoubleValue.h:
+ * b3/B3ConstrainedValue.cpp: Added.
+ (JSC::B3::ConstrainedValue::dump):
+ * b3/B3ConstrainedValue.h: Added.
+ (JSC::B3::ConstrainedValue::ConstrainedValue):
+ (JSC::B3::ConstrainedValue::operator bool):
+ (JSC::B3::ConstrainedValue::value):
+ (JSC::B3::ConstrainedValue::rep):
+ * b3/B3ControlValue.cpp:
+ (JSC::B3::ControlValue::convertToJump):
+ (JSC::B3::ControlValue::dumpMeta):
+ * b3/B3ControlValue.h:
+ * b3/B3LowerToAir.cpp:
+ (JSC::B3::Air::LowerToAir::tryPatchpoint):
+ * b3/B3MemoryValue.cpp:
+ (JSC::B3::MemoryValue::accessByteSize):
+ (JSC::B3::MemoryValue::dumpMeta):
+ * b3/B3MemoryValue.h:
+ * b3/B3PatchpointSpecial.cpp:
+ (JSC::B3::PatchpointSpecial::generate):
+ * b3/B3PatchpointValue.cpp:
+ (JSC::B3::PatchpointValue::~PatchpointValue):
+ (JSC::B3::PatchpointValue::PatchpointValue):
+ (JSC::B3::PatchpointValue::dumpMeta): Deleted.
+ * b3/B3PatchpointValue.h:
+ (JSC::B3::PatchpointValue::accepts):
+ * b3/B3StackSlotValue.cpp:
+ (JSC::B3::StackSlotValue::~StackSlotValue):
+ (JSC::B3::StackSlotValue::dumpMeta):
+ * b3/B3StackSlotValue.h:
+ * b3/B3Stackmap.cpp: Removed.
+ * b3/B3Stackmap.h: Removed.
+ * b3/B3StackmapSpecial.cpp:
+ (JSC::B3::StackmapSpecial::reportUsedRegisters):
+ (JSC::B3::StackmapSpecial::extraClobberedRegs):
+ (JSC::B3::StackmapSpecial::forEachArgImpl):
+ (JSC::B3::StackmapSpecial::isValidImpl):
+ (JSC::B3::StackmapSpecial::admitsStackImpl):
+ * b3/B3StackmapSpecial.h:
+ * b3/B3StackmapValue.cpp: Added.
+ (JSC::B3::StackmapValue::~StackmapValue):
+ (JSC::B3::StackmapValue::append):
+ (JSC::B3::StackmapValue::setConstrainedChild):
+ (JSC::B3::StackmapValue::setConstraint):
+ (JSC::B3::StackmapValue::dumpChildren):
+ (JSC::B3::StackmapValue::dumpMeta):
+ (JSC::B3::StackmapValue::StackmapValue):
+ * b3/B3StackmapValue.h: Added.
+ * b3/B3SwitchValue.cpp:
+ (JSC::B3::SwitchValue::appendCase):
+ (JSC::B3::SwitchValue::dumpMeta):
+ (JSC::B3::SwitchValue::SwitchValue):
+ * b3/B3SwitchValue.h:
+ * b3/B3UpsilonValue.cpp:
+ (JSC::B3::UpsilonValue::~UpsilonValue):
+ (JSC::B3::UpsilonValue::dumpMeta):
+ * b3/B3UpsilonValue.h:
+ * b3/B3Validate.cpp:
+ * b3/B3Value.cpp:
+ (JSC::B3::Value::dump):
+ (JSC::B3::Value::dumpChildren):
+ (JSC::B3::Value::deepDump):
+ (JSC::B3::Value::performSubstitution):
+ (JSC::B3::Value::dumpMeta):
+ * b3/B3Value.h:
+ * b3/B3ValueInlines.h:
+ (JSC::B3::Value::asNumber):
+ (JSC::B3::Value::stackmap): Deleted.
+ * b3/B3ValueRep.h:
+ (JSC::B3::ValueRep::kind):
+ (JSC::B3::ValueRep::operator==):
+ (JSC::B3::ValueRep::operator!=):
+ (JSC::B3::ValueRep::operator bool):
+ (JSC::B3::ValueRep::isAny):
+ * b3/air/AirInstInlines.h:
+ * b3/testb3.cpp:
+ (JSC::B3::testSimplePatchpoint):
+
</ins><span class="cx"> 2015-11-03 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><span class="cx"> [JSC] Add Air lowering for BitOr and impove BitAnd
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreJavaScriptCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -280,6 +280,10 @@
</span><span class="cx">                 0F300B7C18AB1B1400A6D72E /* DFGIntegerCheckCombiningPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F300B7A18AB1B1400A6D72E /* DFGIntegerCheckCombiningPhase.h */; };
</span><span class="cx">                 0F32BD101BB34F190093A57F /* HeapHelperPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F32BD0E1BB34F190093A57F /* HeapHelperPool.cpp */; };
</span><span class="cx">                 0F32BD111BB34F190093A57F /* HeapHelperPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F32BD0F1BB34F190093A57F /* HeapHelperPool.h */; };
</span><ins>+                0F338DF11BE93AD10013C88F /* B3StackmapValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F338DEF1BE93AD10013C88F /* B3StackmapValue.cpp */; };
+                0F338DF21BE93AD10013C88F /* B3StackmapValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F338DF01BE93AD10013C88F /* B3StackmapValue.h */; };
+                0F338DF51BE93D550013C88F /* B3ConstrainedValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F338DF31BE93D550013C88F /* B3ConstrainedValue.cpp */; };
+                0F338DF61BE93D550013C88F /* B3ConstrainedValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F338DF41BE93D550013C88F /* B3ConstrainedValue.h */; };
</ins><span class="cx">                 0F34B14916D42010001CDA5A /* DFGUseKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F34B14716D4200E001CDA5A /* DFGUseKind.cpp */; };
</span><span class="cx">                 0F34B14A16D42013001CDA5A /* DFGUseKind.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F34B14816D4200E001CDA5A /* DFGUseKind.h */; };
</span><span class="cx">                 0F38B01117CF078000B144D3 /* LLIntEntrypoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F38B00F17CF077F00B144D3 /* LLIntEntrypoint.cpp */; };
</span><span class="lines">@@ -737,8 +741,6 @@
</span><span class="cx">                 0FEC852B1BDACDAC0080FF74 /* B3Procedure.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E11BDACDAC0080FF74 /* B3Procedure.cpp */; };
</span><span class="cx">                 0FEC852C1BDACDAC0080FF74 /* B3Procedure.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E21BDACDAC0080FF74 /* B3Procedure.h */; };
</span><span class="cx">                 0FEC852D1BDACDAC0080FF74 /* B3ProcedureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */; };
</span><del>-                0FEC852E1BDACDAC0080FF74 /* B3Stackmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */; };
-                0FEC852F1BDACDAC0080FF74 /* B3Stackmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */; };
</del><span class="cx">                 0FEC85301BDACDAC0080FF74 /* B3StackmapSpecial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */; };
</span><span class="cx">                 0FEC85311BDACDAC0080FF74 /* B3StackmapSpecial.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */; };
</span><span class="cx">                 0FEC85321BDACDAC0080FF74 /* B3StackSlotKind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */; };
</span><span class="lines">@@ -2299,6 +2301,10 @@
</span><span class="cx">                 0F300B7A18AB1B1400A6D72E /* DFGIntegerCheckCombiningPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGIntegerCheckCombiningPhase.h; path = dfg/DFGIntegerCheckCombiningPhase.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F32BD0E1BB34F190093A57F /* HeapHelperPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapHelperPool.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F32BD0F1BB34F190093A57F /* HeapHelperPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapHelperPool.h; sourceTree = "<group>"; };
</span><ins>+                0F338DEF1BE93AD10013C88F /* B3StackmapValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackmapValue.cpp; path = b3/B3StackmapValue.cpp; sourceTree = "<group>"; };
+                0F338DF01BE93AD10013C88F /* B3StackmapValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3StackmapValue.h; path = b3/B3StackmapValue.h; sourceTree = "<group>"; };
+                0F338DF31BE93D550013C88F /* B3ConstrainedValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3ConstrainedValue.cpp; path = b3/B3ConstrainedValue.cpp; sourceTree = "<group>"; };
+                0F338DF41BE93D550013C88F /* B3ConstrainedValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ConstrainedValue.h; path = b3/B3ConstrainedValue.h; sourceTree = "<group>"; };
</ins><span class="cx">                 0F34B14716D4200E001CDA5A /* DFGUseKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGUseKind.cpp; path = dfg/DFGUseKind.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0F34B14816D4200E001CDA5A /* DFGUseKind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGUseKind.h; path = dfg/DFGUseKind.h; sourceTree = "<group>"; };
</span><span class="cx">                 0F38B00F17CF077F00B144D3 /* LLIntEntrypoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntEntrypoint.cpp; path = llint/LLIntEntrypoint.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -2769,8 +2775,6 @@
</span><span class="cx">                 0FEC84E11BDACDAC0080FF74 /* B3Procedure.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Procedure.cpp; path = b3/B3Procedure.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FEC84E21BDACDAC0080FF74 /* B3Procedure.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Procedure.h; path = b3/B3Procedure.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3ProcedureInlines.h; path = b3/B3ProcedureInlines.h; sourceTree = "<group>"; };
</span><del>-                0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3Stackmap.cpp; path = b3/B3Stackmap.cpp; sourceTree = "<group>"; };
-                0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3Stackmap.h; path = b3/B3Stackmap.h; sourceTree = "<group>"; };
</del><span class="cx">                 0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackmapSpecial.cpp; path = b3/B3StackmapSpecial.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = B3StackmapSpecial.h; path = b3/B3StackmapSpecial.h; sourceTree = "<group>"; };
</span><span class="cx">                 0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = B3StackSlotKind.cpp; path = b3/B3StackSlotKind.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -4408,6 +4412,8 @@
</span><span class="cx">                                 0FEC84C71BDACDAC0080FF74 /* B3ConstDoubleValue.cpp */,
</span><span class="cx">                                 0FEC84C81BDACDAC0080FF74 /* B3ConstDoubleValue.h */,
</span><span class="cx">                                 0FEC85B21BDED9570080FF74 /* B3ConstPtrValue.h */,
</span><ins>+                                0F338DF31BE93D550013C88F /* B3ConstrainedValue.cpp */,
+                                0F338DF41BE93D550013C88F /* B3ConstrainedValue.h */,
</ins><span class="cx">                                 0FEC84C91BDACDAC0080FF74 /* B3ControlValue.cpp */,
</span><span class="cx">                                 0FEC84CA1BDACDAC0080FF74 /* B3ControlValue.h */,
</span><span class="cx">                                 0FEC85C41BE16F5A0080FF74 /* B3Effects.cpp */,
</span><span class="lines">@@ -4444,10 +4450,10 @@
</span><span class="cx">                                 0FEC84E31BDACDAC0080FF74 /* B3ProcedureInlines.h */,
</span><span class="cx">                                 0FEC85B71BE1462F0080FF74 /* B3ReduceStrength.cpp */,
</span><span class="cx">                                 0FEC85B81BE1462F0080FF74 /* B3ReduceStrength.h */,
</span><del>-                                0FEC84E41BDACDAC0080FF74 /* B3Stackmap.cpp */,
-                                0FEC84E51BDACDAC0080FF74 /* B3Stackmap.h */,
</del><span class="cx">                                 0FEC84E61BDACDAC0080FF74 /* B3StackmapSpecial.cpp */,
</span><span class="cx">                                 0FEC84E71BDACDAC0080FF74 /* B3StackmapSpecial.h */,
</span><ins>+                                0F338DEF1BE93AD10013C88F /* B3StackmapValue.cpp */,
+                                0F338DF01BE93AD10013C88F /* B3StackmapValue.h */,
</ins><span class="cx">                                 0FEC84E81BDACDAC0080FF74 /* B3StackSlotKind.cpp */,
</span><span class="cx">                                 0FEC84E91BDACDAC0080FF74 /* B3StackSlotKind.h */,
</span><span class="cx">                                 0FEC84EA1BDACDAC0080FF74 /* B3StackSlotValue.cpp */,
</span><span class="lines">@@ -6597,7 +6603,6 @@
</span><span class="cx">                                 0FEC852C1BDACDAC0080FF74 /* B3Procedure.h in Headers */,
</span><span class="cx">                                 0FEC852D1BDACDAC0080FF74 /* B3ProcedureInlines.h in Headers */,
</span><span class="cx">                                 0FEC85BD1BE1462F0080FF74 /* B3ReduceStrength.h in Headers */,
</span><del>-                                0FEC852F1BDACDAC0080FF74 /* B3Stackmap.h in Headers */,
</del><span class="cx">                                 0FEC85311BDACDAC0080FF74 /* B3StackmapSpecial.h in Headers */,
</span><span class="cx">                                 0FEC85331BDACDAC0080FF74 /* B3StackSlotKind.h in Headers */,
</span><span class="cx">                                 0FEC85351BDACDAC0080FF74 /* B3StackSlotValue.h in Headers */,
</span><span class="lines">@@ -6818,6 +6823,7 @@
</span><span class="cx">                                 79C4B15E1BA2158F00FD592E /* DFGLiveCatchVariablePreservationPhase.h in Headers */,
</span><span class="cx">                                 A7D89CFC17A0B8CC00773AD8 /* DFGLivenessAnalysisPhase.h in Headers */,
</span><span class="cx">                                 0FF0F19B16B729FA005DF95B /* DFGLongLivedState.h in Headers */,
</span><ins>+                                0F338DF21BE93AD10013C88F /* B3StackmapValue.h in Headers */,
</ins><span class="cx">                                 A767B5B617A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h in Headers */,
</span><span class="cx">                                 79F8FC1F1B9FED0F00CA66AB /* DFGMaximalFlushInsertionPhase.h in Headers */,
</span><span class="cx">                                 0F5874EE194FEB1200AAB2C1 /* DFGMayExit.h in Headers */,
</span><span class="lines">@@ -7018,6 +7024,7 @@
</span><span class="cx">                                 A5EA710519F6DE740098F5EC /* generate_objc_configuration_header.py in Headers */,
</span><span class="cx">                                 A5EA710619F6DE760098F5EC /* generate_objc_configuration_implementation.py in Headers */,
</span><span class="cx">                                 A5EA710719F6DE780098F5EC /* generate_objc_conversion_helpers.py in Headers */,
</span><ins>+                                0F338DF61BE93D550013C88F /* B3ConstrainedValue.h in Headers */,
</ins><span class="cx">                                 A5EA710819F6DE7A0098F5EC /* generate_objc_frontend_dispatcher_implementation.py in Headers */,
</span><span class="cx">                                 A5EA710919F6DE7C0098F5EC /* generate_objc_header.py in Headers */,
</span><span class="cx">                                 A5EA710A19F6DE7E0098F5EC /* generate_objc_internal_header.py in Headers */,
</span><span class="lines">@@ -8165,7 +8172,6 @@
</span><span class="cx">                                 0FEC85291BDACDAC0080FF74 /* B3PhaseScope.cpp in Sources */,
</span><span class="cx">                                 0FEC852B1BDACDAC0080FF74 /* B3Procedure.cpp in Sources */,
</span><span class="cx">                                 0FEC85BC1BE1462F0080FF74 /* B3ReduceStrength.cpp in Sources */,
</span><del>-                                0FEC852E1BDACDAC0080FF74 /* B3Stackmap.cpp in Sources */,
</del><span class="cx">                                 0FEC85301BDACDAC0080FF74 /* B3StackmapSpecial.cpp in Sources */,
</span><span class="cx">                                 0FEC85321BDACDAC0080FF74 /* B3StackSlotKind.cpp in Sources */,
</span><span class="cx">                                 0FEC85341BDACDAC0080FF74 /* B3StackSlotValue.cpp in Sources */,
</span><span class="lines">@@ -8442,6 +8448,7 @@
</span><span class="cx">                                 0F485329187DFDEC0083B687 /* FTLRecoveryOpcode.cpp in Sources */,
</span><span class="cx">                                 0FCEFAAB1804C13E00472CE4 /* FTLSaveRestore.cpp in Sources */,
</span><span class="cx">                                 0F25F1B1181635F300522F39 /* FTLSlowPathCall.cpp in Sources */,
</span><ins>+                                0F338DF11BE93AD10013C88F /* B3StackmapValue.cpp in Sources */,
</ins><span class="cx">                                 0F25F1B3181635F300522F39 /* FTLSlowPathCallKey.cpp in Sources */,
</span><span class="cx">                                 0F9D339A1803ADB70073C2BC /* FTLStackMaps.cpp in Sources */,
</span><span class="cx">                                 0FEA0A161706BB9000BB722C /* FTLState.cpp in Sources */,
</span><span class="lines">@@ -8765,6 +8772,7 @@
</span><span class="cx">                                 9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */,
</span><span class="cx">                                 0F8F2B9E17306C8D007DBDA5 /* SourceCode.cpp in Sources */,
</span><span class="cx">                                 0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */,
</span><ins>+                                0F338DF51BE93D550013C88F /* B3ConstrainedValue.cpp in Sources */,
</ins><span class="cx">                                 E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */,
</span><span class="cx">                                 0F0CD4C415F6B6BB0032F1C0 /* SparseArrayValueMap.cpp in Sources */,
</span><span class="cx">                                 0F5541B11613C1FB00CE3E25 /* SpecialPointer.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ArgumentRegValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ArgumentRegValue::dumpMeta(PrintStream& out) const
</del><ins>+void ArgumentRegValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><del>- out.print(m_reg);
</del><ins>+ out.print(comma, m_reg);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ArgumentRegValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ArgumentRegValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> Reg argumentReg() const { return m_reg; }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3CheckSpecialcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3CheckSpecial.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3CheckSpecial.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3CheckSpecial.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -101,7 +101,8 @@
</span><span class="cx"> CCallHelpers::Jump fail = hiddenBranch(inst).generate(jit, context);
</span><span class="cx"> ASSERT(fail.isSet());
</span><span class="cx">
</span><del>- Value* value = inst.origin;
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><span class="cx"> Vector<ValueRep> reps;
</span><span class="cx"> if (isCheckMath(value->opcode())) {
</span><span class="lines">@@ -124,16 +125,12 @@
</span><span class="cx"> [=] (CCallHelpers& jit, GenerationContext&) {
</span><span class="cx"> fail.link(&jit);
</span><span class="cx">
</span><del>- Stackmap* stackmap = value->stackmap();
- ASSERT(stackmap);
-
- Stackmap::GenerationParams params;
</del><ins>+ StackmapGenerationParams params;
</ins><span class="cx"> params.value = value;
</span><del>- params.stackmap = stackmap;
</del><span class="cx"> params.reps = reps;
</span><del>- params.usedRegisters = stackmap->m_usedRegisters;
</del><ins>+ params.usedRegisters = value->m_usedRegisters;
</ins><span class="cx">
</span><del>- stackmap->m_generator->run(jit, params);
</del><ins>+ value->m_generator->run(jit, params);
</ins><span class="cx"> }));
</span><span class="cx">
</span><span class="cx"> return CCallHelpers::Jump(); // As far as Air thinks, we are not a terminal.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3CheckValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3CheckValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3CheckValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3CheckValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -34,11 +34,25 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void CheckValue::dumpMeta(PrintStream& out) const
</del><ins>+// Use this form for CheckAdd, CheckSub, and CheckMul.
+CheckValue::CheckValue(unsigned index, Opcode opcode, Origin origin, Value* left, Value* right)
+ : StackmapValue(index, opcode, left->type(), origin)
</ins><span class="cx"> {
</span><del>- out.print("stackmap = ", stackmap);
</del><ins>+ ASSERT(B3::isInt(type()));
+ ASSERT(left->type() == right->type());
+ ASSERT(opcode == CheckAdd || opcode == CheckSub || opcode == CheckMul);
+ append(ConstrainedValue(left, ValueRep::SomeRegister));
+ append(ConstrainedValue(right, ValueRep::SomeRegister));
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+// Use this form for Check.
+CheckValue::CheckValue(unsigned index, Opcode opcode, Origin origin, Value* predicate)
+ : StackmapValue(index, opcode, Void, origin)
+{
+ ASSERT(opcode == Check);
+ append(predicate);
+}
+
</ins><span class="cx"> } } // namespace JSC::B3
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(B3_JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3CheckValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3CheckValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3CheckValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3CheckValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -28,12 +28,11 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(B3_JIT)
</span><span class="cx">
</span><del>-#include "B3Stackmap.h"
-#include "B3Value.h"
</del><ins>+#include "B3StackmapValue.h"
</ins><span class="cx">
</span><span class="cx"> namespace JSC { namespace B3 {
</span><span class="cx">
</span><del>-class JS_EXPORT_PRIVATE CheckValue : public Value {
</del><ins>+class CheckValue : public StackmapValue {
</ins><span class="cx"> public:
</span><span class="cx"> static bool accepts(Opcode opcode)
</span><span class="cx"> {
</span><span class="lines">@@ -50,29 +49,14 @@
</span><span class="cx">
</span><span class="cx"> ~CheckValue();
</span><span class="cx">
</span><del>- Stackmap stackmap;
-
-protected:
- void dumpMeta(PrintStream&) const override;
-
</del><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span><span class="cx">
</span><span class="cx"> // Use this form for CheckAdd, CheckSub, and CheckMul.
</span><del>- CheckValue(unsigned index, Opcode opcode, Origin origin, Value* left, Value* right)
- : Value(index, opcode, left->type(), origin, left, right)
- {
- ASSERT(B3::isInt(type()));
- ASSERT(left->type() == right->type());
- ASSERT(opcode == CheckAdd || opcode == CheckSub || opcode == CheckMul);
- }
</del><ins>+ JS_EXPORT_PRIVATE CheckValue(unsigned index, Opcode, Origin, Value* left, Value* right);
</ins><span class="cx">
</span><span class="cx"> // Use this form for Check.
</span><del>- CheckValue(unsigned index, Opcode opcode, Origin origin, Value* predicate)
- : Value(index, opcode, Void, origin, predicate)
- {
- ASSERT(opcode == Check);
- }
</del><ins>+ JS_EXPORT_PRIVATE CheckValue(unsigned index, Opcode, Origin, Value* predicate);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Const32Valuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Const32Value.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Const32Value.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Const32Value.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -89,9 +89,9 @@
</span><span class="cx"> return proc.add<Const32Value>(origin(), m_value != other->asInt32());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Const32Value::dumpMeta(PrintStream& out) const
</del><ins>+void Const32Value::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><del>- out.print(m_value);
</del><ins>+ out.print(comma, m_value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Const32Valueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Const32Value.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Const32Value.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Const32Value.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> Value* notEqualConstant(Procedure&, Value* other) const override;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- JS_EXPORT_PRIVATE void dumpMeta(PrintStream&) const override;
</del><ins>+ JS_EXPORT_PRIVATE void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> friend class Procedure;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Const64Valuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Const64Value.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Const64Value.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Const64Value.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -89,9 +89,9 @@
</span><span class="cx"> return proc.add<Const32Value>(origin(), m_value != other->asInt64());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Const64Value::dumpMeta(PrintStream& out) const
</del><ins>+void Const64Value::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><del>- out.print(m_value);
</del><ins>+ out.print(comma, m_value);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Const64Valueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Const64Value.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Const64Value.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Const64Value.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx"> Value* notEqualConstant(Procedure&, Value* other) const override;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> friend class Procedure;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ConstDoubleValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -75,8 +75,9 @@
</span><span class="cx"> return proc.add<Const32Value>(origin(), m_value != other->asDouble());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ConstDoubleValue::dumpMeta(PrintStream& out) const
</del><ins>+void ConstDoubleValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><ins>+ out.print(comma);
</ins><span class="cx"> out.printf("%le", m_value);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ConstDoubleValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ConstDoubleValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> Value* notEqualConstant(Procedure& proc, Value* other) const override;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ConstrainedValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.cpp (0 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "B3ConstrainedValue.h"
+
+#if ENABLE(B3_JIT)
+
+#include "B3Value.h"
+
+namespace JSC { namespace B3 {
+
+void ConstrainedValue::dump(PrintStream& out) const
+{
+ out.print(pointerDump(m_value), ":", m_rep);
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ConstrainedValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.h (0 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.h         (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3ConstrainedValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -0,0 +1,72 @@
</span><ins>+/*
+ * 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 B3ConstrainedValue_h
+#define B3ConstrainedValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3ValueRep.h"
+
+namespace JSC { namespace B3 {
+
+class Value;
+
+class ConstrainedValue {
+public:
+ ConstrainedValue()
+ {
+ }
+
+ ConstrainedValue(Value* value)
+ : m_value(value)
+ , m_rep(ValueRep::Any)
+ {
+ }
+
+ ConstrainedValue(Value* value, const ValueRep& rep)
+ : m_value(value)
+ , m_rep(rep)
+ {
+ }
+
+ explicit operator bool() const { return m_value || m_rep; }
+
+ Value* value() const { return m_value; }
+ const ValueRep& rep() const { return m_rep; }
+
+ void dump(PrintStream& out) const;
+
+private:
+ Value* m_value;
+ ValueRep m_rep;
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3ConstrainedValue_h
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ControlValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ControlValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ControlValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ControlValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -29,7 +29,6 @@
</span><span class="cx"> #if ENABLE(B3_JIT)
</span><span class="cx">
</span><span class="cx"> #include "B3BasicBlock.h"
</span><del>-#include <wtf/ListDump.h>
</del><span class="cx">
</span><span class="cx"> namespace JSC { namespace B3 {
</span><span class="cx">
</span><span class="lines">@@ -50,9 +49,10 @@
</span><span class="cx"> this->owner = owner;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ControlValue::dumpMeta(PrintStream& out) const
</del><ins>+void ControlValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><del>- out.print(listDump(m_successors));
</del><ins>+ for (FrequentedBlock successor : m_successors)
+ out.print(comma, successor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ControlValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ControlValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ControlValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ControlValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -88,7 +88,7 @@
</span><span class="cx"> void convertToJump(const FrequentedBlock& destination);
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- JS_EXPORT_PRIVATE void dumpMeta(PrintStream&) const override;
</del><ins>+ JS_EXPORT_PRIVATE void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> // Use this for subclasses.
</span><span class="cx"> template<typename... Arguments>
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3LowerToAircpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3LowerToAir.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -791,26 +791,22 @@
</span><span class="cx"> if (patchpointValue->type() != Void)
</span><span class="cx"> inst.args.append(tmp(patchpointValue));
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < patchpointValue->numChildren(); ++i) {
- ValueRep rep;
- if (i < patchpointValue->stackmap.reps().size())
- rep = patchpointValue->stackmap.reps()[i];
-
</del><ins>+ for (ConstrainedValue value : patchpointValue->constrainedChildren()) {
</ins><span class="cx"> Arg arg;
</span><del>- switch (rep.kind()) {
</del><ins>+ switch (value.rep().kind()) {
</ins><span class="cx"> case ValueRep::Any:
</span><del>- arg = immOrTmp(patchpointValue->child(i));
</del><ins>+ arg = immOrTmp(value.value());
</ins><span class="cx"> break;
</span><span class="cx"> case ValueRep::SomeRegister:
</span><del>- arg = tmp(patchpointValue->child(i));
</del><ins>+ arg = tmp(value.value());
</ins><span class="cx"> break;
</span><span class="cx"> case ValueRep::Register:
</span><del>- arg = Tmp(rep.reg());
- append(Move, immOrTmp(patchpointValue->child(i)), arg);
</del><ins>+ arg = Tmp(value.rep().reg());
+ append(Move, immOrTmp(value.value()), arg);
</ins><span class="cx"> break;
</span><span class="cx"> case ValueRep::StackArgument:
</span><del>- arg = Arg::callArg(rep.offsetFromSP());
- appendStore(patchpointValue->child(i), arg);
</del><ins>+ arg = Arg::callArg(value.rep().offsetFromSP());
+ appendStore(value.value(), arg);
</ins><span class="cx"> break;
</span><span class="cx"> default:
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3MemoryValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3MemoryValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3MemoryValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3MemoryValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -58,10 +58,10 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void MemoryValue::dumpMeta(PrintStream& out) const
</del><ins>+void MemoryValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_offset)
</span><del>- out.print("offset = ", m_offset);
</del><ins>+ out.print(comma, "offset = ", m_offset);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3MemoryValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3MemoryValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3MemoryValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3MemoryValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> size_t accessByteSize() const;
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter& comma, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3PatchpointSpecialcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3PatchpointSpecial.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3PatchpointSpecial.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3PatchpointSpecial.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -84,9 +84,8 @@
</span><span class="cx"> CCallHelpers::Jump PatchpointSpecial::generate(
</span><span class="cx"> Inst& inst, CCallHelpers& jit, GenerationContext& context)
</span><span class="cx"> {
</span><del>- Value* value = inst.origin;
- Stackmap* stackmap = value->stackmap();
- ASSERT(stackmap);
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><span class="cx"> Vector<ValueRep> reps;
</span><span class="cx"> unsigned offset = 1;
</span><span class="lines">@@ -94,13 +93,12 @@
</span><span class="cx"> reps.append(repForArg(*context.code, inst.args[offset++]));
</span><span class="cx"> appendRepsImpl(context, offset, inst, reps);
</span><span class="cx">
</span><del>- Stackmap::GenerationParams params;
</del><ins>+ StackmapGenerationParams params;
</ins><span class="cx"> params.value = value;
</span><del>- params.stackmap = stackmap;
</del><span class="cx"> params.reps = reps;
</span><del>- params.usedRegisters = stackmap->m_usedRegisters;
</del><ins>+ params.usedRegisters = value->m_usedRegisters;
</ins><span class="cx">
</span><del>- stackmap->m_generator->run(jit, params);
</del><ins>+ value->m_generator->run(jit, params);
</ins><span class="cx">
</span><span class="cx"> return CCallHelpers::Jump();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3PatchpointValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3PatchpointValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3PatchpointValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3PatchpointValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PatchpointValue::dumpMeta(PrintStream& out) const
</del><ins>+PatchpointValue::PatchpointValue(unsigned index, Type type, Origin origin)
+ : StackmapValue(index, Patchpoint, type, origin)
</ins><span class="cx"> {
</span><del>- out.print("stackmap = ", stackmap);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3PatchpointValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3PatchpointValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3PatchpointValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3PatchpointValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -28,37 +28,20 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(B3_JIT)
</span><span class="cx">
</span><del>-#include "B3Stackmap.h"
-#include "B3Value.h"
</del><ins>+#include "B3StackmapValue.h"
</ins><span class="cx">
</span><span class="cx"> namespace JSC { namespace B3 {
</span><span class="cx">
</span><del>-class JS_EXPORT_PRIVATE PatchpointValue : public Value {
</del><ins>+class PatchpointValue : public StackmapValue {
</ins><span class="cx"> public:
</span><span class="cx"> static bool accepts(Opcode opcode) { return opcode == Patchpoint; }
</span><span class="cx">
</span><span class="cx"> ~PatchpointValue();
</span><span class="cx">
</span><del>- Stackmap stackmap;
-
-protected:
- void dumpMeta(PrintStream&) const override;
-
</del><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span><span class="cx">
</span><del>- template<typename ListType>
- PatchpointValue(unsigned index, Type type, Origin origin, ListType&& children)
- : Value(index, Patchpoint, type, origin, std::forward<ListType>(children))
- {
- }
-
- // It's totally fine to create a PatchpointValue without any children, and then append the
- // children as you build up the stackmap.
- PatchpointValue(unsigned index, Type type, Origin origin)
- : Value(index, Patchpoint, type, origin, AdjacencyList())
- {
- }
</del><ins>+ JS_EXPORT_PRIVATE PatchpointValue(unsigned index, Type, Origin);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackSlotValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3StackSlotValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackSlotValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3StackSlotValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void StackSlotValue::dumpMeta(PrintStream& out) const
</del><ins>+void StackSlotValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><del>- out.print("byteSize = ", m_byteSize, ", kind = ", m_kind);
</del><ins>+ out.print(comma, "byteSize = ", m_byteSize, ", kind = ", m_kind);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::B3
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackSlotValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3StackSlotValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackSlotValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3StackSlotValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Air::StackSlot;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Stackmapcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/b3/B3Stackmap.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Stackmap.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Stackmap.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -1,53 +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.
- */
-
-#include "config.h"
-#include "B3Stackmap.h"
-
-#if ENABLE(B3_JIT)
-
-#include <wtf/ListDump.h>
-
-namespace JSC { namespace B3 {
-
-Stackmap::Stackmap()
-{
-}
-
-Stackmap::~Stackmap()
-{
-}
-
-void Stackmap::dump(PrintStream& out) const
-{
- out.print(
- "{reps = ", listDump(m_reps), ", generator = ", RawPointer(m_generator.get()),
- ", clobbered = ", m_clobbered, ", usedRegisters = ", m_usedRegisters, "}");
-}
-
-} } // namespace JSC::B3
-
-#endif // ENABLE(B3_JIT)
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Stackmaph"></a>
<div class="delfile"><h4>Deleted: trunk/Source/JavaScriptCore/b3/B3Stackmap.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Stackmap.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Stackmap.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -1,120 +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 B3Stackmap_h
-#define B3Stackmap_h
-
-#if ENABLE(B3_JIT)
-
-#include "B3ValueRep.h"
-#include "CCallHelpers.h"
-#include "RegisterSet.h"
-#include <wtf/SharedTask.h>
-
-namespace JSC { namespace B3 {
-
-class CheckSpecial;
-class StackmapSpecial;
-class Value;
-
-class Stackmap {
-public:
- struct GenerationParams {
- // This is the Value containing the stackmap.
- Value* value;
-
- // This is the stackmap.
- Stackmap* stackmap;
-
- // This tells you the actual value representations that were chosen.
- Vector<ValueRep> reps;
-
- // This tells you the registers that were used.
- RegisterSet usedRegisters;
- };
-
- typedef void GeneratorFunction(CCallHelpers&, const GenerationParams&);
- typedef SharedTask<GeneratorFunction> Generator;
-
- JS_EXPORT_PRIVATE Stackmap();
- ~Stackmap();
-
- // Constrain an argument to the Value that uses this Stackmap. In case of a Patchpoint that
- // returns a value, the first argument is the result value. In all other cases, index zero refers
- // to the first argument to that Value, even if that argument is not constrainable. For example,
- // in a CheckAdd value, it would be an error to constrain indices 0 and 1. In a Check value, it
- // would be an error to constrain index 0. But, when the generation callback is called, you can
- // depend on the reps for those indices being filled in.
- void constrain(unsigned index, const ValueRep& rep)
- {
- if (index + 1 >= m_reps.size())
- m_reps.grow(index + 1);
- m_reps[index] = rep;
- }
-
- void appendConstraint(const ValueRep& rep)
- {
- m_reps.append(rep);
- }
-
- const Vector<ValueRep>& reps() const { return m_reps; }
-
- void clobber(const RegisterSet& set)
- {
- m_clobbered.merge(set);
- }
-
- const RegisterSet& clobbered() const { return m_clobbered; }
-
- void setGenerator(RefPtr<Generator> generator)
- {
- m_generator = generator;
- }
-
- template<typename Functor>
- void setGenerator(const Functor& functor)
- {
- m_generator = createSharedTask<GeneratorFunction>(functor);
- }
-
- void dump(PrintStream&) const;
-
-private:
- friend class CheckSpecial;
- friend class PatchpointSpecial;
- friend class StackmapSpecial;
-
- Vector<ValueRep> m_reps;
- RefPtr<Generator> m_generator;
- RegisterSet m_clobbered;
- RegisterSet m_usedRegisters; // Stackmaps could be further duplicated by Air, but that's unlikely, so we just merge the used registers sets if that were to happen.
-};
-
-} } // namespace JSC::B3
-
-#endif // ENABLE(B3_JIT)
-
-#endif // B3Stackmap_h
-
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackmapSpecialcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -46,21 +46,21 @@
</span><span class="cx">
</span><span class="cx"> void StackmapSpecial::reportUsedRegisters(Inst& inst, const RegisterSet& usedRegisters)
</span><span class="cx"> {
</span><del>- Value* value = inst.origin;
- Stackmap* stackmap = value->stackmap();
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><span class="cx"> // FIXME: If the Inst that uses the StackmapSpecial gets duplicated, then we end up merging used
</span><span class="cx"> // register sets from multiple places. This currently won't happen since Air doesn't have taildup
</span><span class="cx"> // or things like that. But maybe eventually it could be a problem.
</span><del>- stackmap->m_usedRegisters.merge(usedRegisters);
</del><ins>+ value->m_usedRegisters.merge(usedRegisters);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const RegisterSet& StackmapSpecial::extraClobberedRegs(Inst& inst)
</span><span class="cx"> {
</span><del>- Value* value = inst.origin;
- Stackmap* stackmap = value->stackmap();
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><del>- return stackmap->clobbered();
</del><ins>+ return value->clobbered();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void StackmapSpecial::forEachArgImpl(
</span><span class="lines">@@ -86,16 +86,13 @@
</span><span class="cx"> unsigned numIgnoredB3Args, unsigned numIgnoredAirArgs,
</span><span class="cx"> Inst& inst)
</span><span class="cx"> {
</span><del>- Value* value = inst.origin;
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><span class="cx"> // Check that insane things have not happened.
</span><span class="cx"> ASSERT(inst.args.size() >= numIgnoredAirArgs);
</span><span class="cx"> ASSERT(value->children().size() >= numIgnoredB3Args);
</span><span class="cx">
</span><del>- Stackmap* stackmap = value->stackmap();
-
- ASSERT(stackmap);
-
</del><span class="cx"> // For the Inst to be valid, it needs to have the right number of arguments.
</span><span class="cx"> if (inst.args.size() - numIgnoredAirArgs != value->children().size() - numIgnoredB3Args)
</span><span class="cx"> return false;
</span><span class="lines">@@ -130,11 +127,11 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // The number of constraints has to be no greater than the number of B3 children.
</span><del>- ASSERT(stackmap->m_reps.size() <= value->children().size());
</del><ins>+ ASSERT(value->m_reps.size() <= value->children().size());
</ins><span class="cx">
</span><span class="cx"> // Verify any explicitly supplied constraints.
</span><del>- for (unsigned i = numIgnoredB3Args; i < stackmap->m_reps.size(); ++i) {
- ValueRep& rep = stackmap->m_reps[i];
</del><ins>+ for (unsigned i = numIgnoredB3Args; i < value->m_reps.size(); ++i) {
+ ValueRep& rep = value->m_reps[i];
</ins><span class="cx"> Arg& arg = inst.args[i - numIgnoredB3Args + numIgnoredAirArgs];
</span><span class="cx">
</span><span class="cx"> switch (rep.kind()) {
</span><span class="lines">@@ -171,19 +168,19 @@
</span><span class="cx"> unsigned numIgnoredB3Args, unsigned numIgnoredAirArgs,
</span><span class="cx"> Inst& inst, unsigned argIndex)
</span><span class="cx"> {
</span><del>- Value* value = inst.origin;
- Stackmap* stackmap = value->stackmap();
</del><ins>+ StackmapValue* value = inst.origin->as<StackmapValue>();
+ ASSERT(value);
</ins><span class="cx">
</span><span class="cx"> unsigned stackmapArgIndex = argIndex - numIgnoredAirArgs + numIgnoredB3Args;
</span><span class="cx">
</span><del>- if (stackmapArgIndex >= stackmap->m_reps.size()) {
</del><ins>+ if (stackmapArgIndex >= value->m_reps.size()) {
</ins><span class="cx"> // This means that there was no constraint.
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // We only admit stack for Any's, since Stack is not a valid input constraint, and StackArgument
</span><span class="cx"> // translates to a CallArg in Air.
</span><del>- if (stackmap->m_reps[stackmapArgIndex].kind() == ValueRep::Any)
</del><ins>+ if (value->m_reps[stackmapArgIndex].kind() == ValueRep::Any)
</ins><span class="cx"> return true;
</span><span class="cx">
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackmapSpecialh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3StackmapSpecial.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #if ENABLE(B3_JIT)
</span><span class="cx">
</span><span class="cx"> #include "AirSpecial.h"
</span><del>-#include "B3Stackmap.h"
</del><ins>+#include "B3ValueRep.h"
</ins><span class="cx">
</span><span class="cx"> namespace JSC { namespace B3 {
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackmapValuecpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3StackmapValue.cpp (0 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackmapValue.cpp         (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3StackmapValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -0,0 +1,89 @@
</span><ins>+/*
+ * 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.
+ */
+
+#include "config.h"
+#include "B3StackmapValue.h"
+
+#if ENABLE(B3_JIT)
+
+namespace JSC { namespace B3 {
+
+StackmapValue::~StackmapValue()
+{
+}
+
+void StackmapValue::append(const ConstrainedValue& constrainedValue)
+{
+ if (constrainedValue.rep() == ValueRep(ValueRep::Any)) {
+ children().append(constrainedValue.value());
+ return;
+ }
+
+ while (m_reps.size() < numChildren())
+ m_reps.append(ValueRep::Any);
+
+ children().append(constrainedValue.value());
+ m_reps.append(constrainedValue.rep());
+}
+
+void StackmapValue::setConstrainedChild(unsigned index, const ConstrainedValue& constrainedValue)
+{
+ child(index) = constrainedValue.value();
+ setConstraint(index, constrainedValue.rep());
+}
+
+void StackmapValue::setConstraint(unsigned index, const ValueRep& rep)
+{
+ if (rep == ValueRep(ValueRep::Any))
+ return;
+
+ while (m_reps.size() <= index)
+ m_reps.append(ValueRep::Any);
+
+ m_reps[index] = rep;
+}
+
+void StackmapValue::dumpChildren(CommaPrinter& comma, PrintStream& out) const
+{
+ for (ConstrainedValue value : constrainedChildren())
+ out.print(comma, value);
+}
+
+void StackmapValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
+{
+ out.print(
+ comma, "generator = ", RawPointer(m_generator.get()), ", clobbered = ", m_clobbered,
+ ", usedRegisters = ", m_usedRegisters);
+}
+
+StackmapValue::StackmapValue(unsigned index, Opcode opcode, Type type, Origin origin)
+ : Value(index, opcode, type, origin)
+{
+}
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3StackmapValueh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/b3/B3StackmapValue.h (0 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3StackmapValue.h         (rev 0)
+++ trunk/Source/JavaScriptCore/b3/B3StackmapValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -0,0 +1,197 @@
</span><ins>+/*
+ * 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 B3StackmapValue_h
+#define B3StackmapValue_h
+
+#if ENABLE(B3_JIT)
+
+#include "B3ConstrainedValue.h"
+#include "B3Value.h"
+#include "B3ValueRep.h"
+#include "CCallHelpers.h"
+#include "RegisterSet.h"
+#include <wtf/SharedTask.h>
+
+namespace JSC { namespace B3 {
+
+class StackmapValue;
+
+struct StackmapGenerationParams {
+ // This is the stackmap value that we're generating.
+ StackmapValue* value;
+
+ // This tells you the actual value representations that were chosen. This is usually different
+ // from the constraints we supplied.
+ Vector<ValueRep> reps;
+
+ // This tells you the registers that were used.
+ RegisterSet usedRegisters;
+};
+
+typedef void StackmapGeneratorFunction(CCallHelpers&, const StackmapGenerationParams&);
+typedef SharedTask<StackmapGeneratorFunction> StackmapGenerator;
+
+class JS_EXPORT_PRIVATE StackmapValue : public Value {
+public:
+ static bool accepts(Opcode opcode)
+ {
+ // This needs to include opcodes of all subclasses.
+ switch (opcode) {
+ case CheckAdd:
+ case CheckSub:
+ case CheckMul:
+ case Check:
+ case Patchpoint:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ ~StackmapValue();
+
+ // Use this to add children. Note that you could also add children by doing
+ // children().append(). That will work fine, but it's not recommended.
+ void append(const ConstrainedValue&);
+
+ const Vector<ValueRep>& reps() const { return m_reps; }
+
+ void clobber(const RegisterSet& set)
+ {
+ m_clobbered.merge(set);
+ }
+
+ const RegisterSet& clobbered() const { return m_clobbered; }
+
+ void setGenerator(RefPtr<StackmapGenerator> generator)
+ {
+ m_generator = generator;
+ }
+
+ template<typename Functor>
+ void setGenerator(const Functor& functor)
+ {
+ m_generator = createSharedTask<StackmapGeneratorFunction>(functor);
+ }
+
+ ConstrainedValue constrainedChild(unsigned index) const
+ {
+ return ConstrainedValue(child(index), index < m_reps.size() ? m_reps[index] : ValueRep());
+ }
+
+ void setConstrainedChild(unsigned index, const ConstrainedValue&);
+
+ void setConstraint(unsigned index, const ValueRep&);
+
+ class ConstrainedValueCollection {
+ public:
+ ConstrainedValueCollection(const StackmapValue& value)
+ : m_value(value)
+ {
+ }
+
+ unsigned size() const { return m_value.numChildren(); }
+
+ ConstrainedValue at(unsigned index) const { return m_value.constrainedChild(index); }
+
+ ConstrainedValue operator[](unsigned index) const { return at(index); }
+
+ class iterator {
+ public:
+ iterator()
+ : m_collection(nullptr)
+ , m_index(0)
+ {
+ }
+
+ iterator(const ConstrainedValueCollection& collection, unsigned index)
+ : m_collection(&collection)
+ , m_index(index)
+ {
+ }
+
+ ConstrainedValue operator*() const
+ {
+ return m_collection->at(m_index);
+ }
+
+ iterator& operator++()
+ {
+ m_index++;
+ return *this;
+ }
+
+ bool operator==(const iterator& other) const
+ {
+ ASSERT(m_collection == other.m_collection);
+ return m_index == other.m_index;
+ }
+
+ bool operator!=(const iterator& other) const
+ {
+ return !(*this == other);
+ }
+
+ private:
+ const ConstrainedValueCollection* m_collection;
+ unsigned m_index;
+ };
+
+ iterator begin() const { return iterator(*this, 0); }
+ iterator end() const { return iterator(*this, size()); }
+
+ private:
+ const StackmapValue& m_value;
+ };
+
+ ConstrainedValueCollection constrainedChildren() const
+ {
+ return ConstrainedValueCollection(*this);
+ }
+
+protected:
+ void dumpChildren(CommaPrinter&, PrintStream&) const override;
+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
+
+ StackmapValue(unsigned index, Opcode, Type, Origin);
+
+private:
+ friend class CheckSpecial;
+ friend class PatchpointSpecial;
+ friend class StackmapSpecial;
+
+ Vector<ValueRep> m_reps;
+ RefPtr<StackmapGenerator> m_generator;
+ RegisterSet m_clobbered;
+ RegisterSet m_usedRegisters; // Stackmaps could be further duplicated by Air, but that's unlikely, so we just merge the used registers sets if that were to happen.
+};
+
+} } // namespace JSC::B3
+
+#endif // ENABLE(B3_JIT)
+
+#endif // B3StackmapValue_h
+
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3SwitchValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3SwitchValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3SwitchValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3SwitchValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -55,10 +55,12 @@
</span><span class="cx"> m_values.append(switchCase.caseValue());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void SwitchValue::dumpMeta(PrintStream& out) const
</del><ins>+void SwitchValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><span class="cx"> // This destructively overrides ControlValue's dumpMeta().
</span><del>- out.print(listDump(*this), ", fallThrough = ", fallThrough());
</del><ins>+ for (SwitchCase switchCase : *this)
+ out.print(comma, switchCase);
+ out.print(comma, "fallThrough = ", fallThrough());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> SwitchValue::SwitchValue(unsigned index, Origin origin, const FrequentedBlock& fallThrough)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3SwitchValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3SwitchValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3SwitchValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3SwitchValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -114,7 +114,7 @@
</span><span class="cx"> void appendCase(const SwitchCase&);
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3UpsilonValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3UpsilonValue.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3UpsilonValue.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3UpsilonValue.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -34,14 +34,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void UpsilonValue::dumpMeta(PrintStream& out) const
</del><ins>+void UpsilonValue::dumpMeta(CommaPrinter& comma, PrintStream& out) const
</ins><span class="cx"> {
</span><span class="cx"> if (m_phi)
</span><del>- out.print("^", m_phi->index());
</del><ins>+ out.print(comma, "^", m_phi->index());
</ins><span class="cx"> else {
</span><span class="cx"> // We want to have a dump for when the Phi isn't set yet, since although such IR won't pass
</span><span class="cx"> // validation, we may have such IR as an intermediate step.
</span><del>- out.print("^(null)");
</del><ins>+ out.print(comma, "^(null)");
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3UpsilonValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3UpsilonValue.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3UpsilonValue.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3UpsilonValue.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- void dumpMeta(PrintStream&) const override;
</del><ins>+ void dumpMeta(CommaPrinter&, PrintStream&) const override;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Validatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Validate.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Validate.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Validate.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -308,16 +308,17 @@
</span><span class="cx"> private:
</span><span class="cx"> void validateStackmap(Value* value)
</span><span class="cx"> {
</span><del>- Stackmap* stackmap = value->stackmap();
- VALIDATE(value->numChildren() >= stackmap->reps().size(), ("At ", *value));
</del><ins>+ StackmapValue* stackmap = value->as<StackmapValue>();
+ VALIDATE(stackmap, ("At ", *value));
+ VALIDATE(stackmap->numChildren() >= stackmap->reps().size(), ("At ", *stackmap));
</ins><span class="cx"> for (unsigned i = 0; i < stackmap->reps().size(); ++i) {
</span><span class="cx"> const ValueRep& rep = stackmap->reps()[i];
</span><span class="cx"> if (rep.kind() != ValueRep::Register)
</span><span class="cx"> continue;
</span><span class="cx"> if (rep.reg().isGPR())
</span><del>- VALIDATE(isInt(value->child(i)->type()), ("At ", *value));
</del><ins>+ VALIDATE(isInt(stackmap->child(i)->type()), ("At ", *stackmap));
</ins><span class="cx"> else
</span><del>- VALIDATE(isFloat(value->child(i)->type()), ("At ", *value));
</del><ins>+ VALIDATE(isFloat(stackmap->child(i)->type()), ("At ", *stackmap));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Valuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Value.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Value.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Value.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -78,25 +78,24 @@
</span><span class="cx"> out.print(dumpPrefix, m_index);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void Value::dumpChildren(CommaPrinter& comma, PrintStream& out) const
+{
+ for (Value* child : children())
+ out.print(comma, pointerDump(child));
+}
+
</ins><span class="cx"> void Value::deepDump(PrintStream& out) const
</span><span class="cx"> {
</span><span class="cx"> out.print(m_type, " ", *this, " = ", m_opcode);
</span><span class="cx">
</span><span class="cx"> out.print("(");
</span><span class="cx"> CommaPrinter comma;
</span><del>- for (Value* child : children())
- out.print(comma, pointerDump(child));
</del><ins>+ dumpChildren(comma, out);
</ins><span class="cx">
</span><span class="cx"> if (m_origin)
</span><span class="cx"> out.print(comma, m_origin);
</span><span class="cx">
</span><del>- {
- StringPrintStream stringOut;
- dumpMeta(stringOut);
- CString string = stringOut.toCString();
- if (string.length())
- out.print(comma, string);
- }
</del><ins>+ dumpMeta(comma, out);
</ins><span class="cx">
</span><span class="cx"> {
</span><span class="cx"> CString string = toCString(effects());
</span><span class="lines">@@ -294,7 +293,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void Value::dumpMeta(PrintStream&) const
</del><ins>+void Value::dumpMeta(CommaPrinter&, PrintStream&) const
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3Valueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3Value.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3Value.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3Value.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include "B3Opcode.h"
</span><span class="cx"> #include "B3Origin.h"
</span><span class="cx"> #include "B3Type.h"
</span><ins>+#include <wtf/CommaPrinter.h>
</ins><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/Noncopyable.h>
</span><span class="cx">
</span><span class="lines">@@ -40,7 +41,6 @@
</span><span class="cx">
</span><span class="cx"> class BasicBlock;
</span><span class="cx"> class Procedure;
</span><del>-class Stackmap;
</del><span class="cx">
</span><span class="cx"> class JS_EXPORT_PRIVATE Value {
</span><span class="cx"> WTF_MAKE_NONCOPYABLE(Value);
</span><span class="lines">@@ -151,15 +151,14 @@
</span><span class="cx">
</span><span class="cx"> Effects effects() const;
</span><span class="cx">
</span><del>- Stackmap* stackmap();
-
</del><span class="cx"> // Makes sure that none of the children are Identity's. If a child points to Identity, this will
</span><span class="cx"> // repoint it at the Identity's child. For simplicity, this will follow arbitrarily long chains
</span><span class="cx"> // of Identity's.
</span><span class="cx"> void performSubstitution();
</span><span class="cx">
</span><span class="cx"> protected:
</span><del>- virtual void dumpMeta(PrintStream&) const;
</del><ins>+ virtual void dumpChildren(CommaPrinter&, PrintStream&) const;
+ virtual void dumpMeta(CommaPrinter&, PrintStream&) const;
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class Procedure;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ValueInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ValueInlines.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ValueInlines.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ValueInlines.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -178,15 +178,6 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-inline Stackmap* Value::stackmap()
-{
- if (CheckValue* check = as<CheckValue>())
- return &check->stackmap;
- if (PatchpointValue* patchpoint = as<PatchpointValue>())
- return &patchpoint->stackmap;
- return nullptr;
-}
-
</del><span class="cx"> } } // namespace JSC::B3
</span><span class="cx">
</span><span class="cx"> #endif // ENABLE(B3_JIT)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3B3ValueReph"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/B3ValueRep.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/B3ValueRep.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/B3ValueRep.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -121,6 +121,29 @@
</span><span class="cx">
</span><span class="cx"> Kind kind() const { return m_kind; }
</span><span class="cx">
</span><ins>+ bool operator==(const ValueRep& other) const
+ {
+ if (kind() != other.kind())
+ return false;
+ switch (kind()) {
+ case Register:
+ return u.reg == other.u.reg;
+ case Stack:
+ return u.offsetFromFP == other.u.offsetFromFP;
+ case StackArgument:
+ return u.offsetFromSP == other.u.offsetFromSP;
+ case Constant:
+ return u.value == other.u.value;
+ default:
+ return true;
+ }
+ }
+
+ bool operator!=(const ValueRep& other) const
+ {
+ return !(*this == other);
+ }
+
</ins><span class="cx"> explicit operator bool() const { return kind() != Any; }
</span><span class="cx">
</span><span class="cx"> bool isAny() const { return kind() == Any; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3airAirInstInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/air/AirInstInlines.h (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/air/AirInstInlines.h        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/air/AirInstInlines.h        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "AirInst.h"
</span><span class="cx"> #include "AirOpcodeUtils.h"
</span><span class="cx"> #include "AirSpecial.h"
</span><del>-#include "B3Stackmap.h"
</del><span class="cx"> #include "B3Value.h"
</span><span class="cx">
</span><span class="cx"> namespace JSC { namespace B3 { namespace Air {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreb3testb3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/b3/testb3.cpp (191992 => 191993)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/b3/testb3.cpp        2015-11-04 00:11:26 UTC (rev 191992)
+++ trunk/Source/JavaScriptCore/b3/testb3.cpp        2015-11-04 00:13:27 UTC (rev 191993)
</span><span class="lines">@@ -1673,15 +1673,11 @@
</span><span class="cx"> BasicBlock* root = proc.addBlock();
</span><span class="cx"> Value* arg1 = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR0);
</span><span class="cx"> Value* arg2 = root->appendNew<ArgumentRegValue>(proc, Origin(), GPRInfo::argumentGPR1);
</span><del>- Value::AdjacencyList children;
- children.append(arg1);
- children.append(arg2);
- PatchpointValue* patchpoint = root->appendNew<PatchpointValue>(
- proc, Int32, Origin(), WTF::move(children));
- patchpoint->stackmap.appendConstraint(ValueRep::SomeRegister);
- patchpoint->stackmap.appendConstraint(ValueRep::SomeRegister);
- patchpoint->stackmap.setGenerator(
- [&] (CCallHelpers& jit, const Stackmap::GenerationParams& params) {
</del><ins>+ PatchpointValue* patchpoint = root->appendNew<PatchpointValue>(proc, Int32, Origin());
+ patchpoint->append(ConstrainedValue(arg1, ValueRep::SomeRegister));
+ patchpoint->append(ConstrainedValue(arg2, ValueRep::SomeRegister));
+ patchpoint->setGenerator(
+ [&] (CCallHelpers& jit, const StackmapGenerationParams& params) {
</ins><span class="cx"> CHECK(params.reps.size() == 3);
</span><span class="cx"> CHECK(params.reps[0].isGPR());
</span><span class="cx"> CHECK(params.reps[1].isGPR());
</span></span></pre>
</div>
</div>
</body>
</html>