<!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>[206763] 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/206763">206763</a></dd>
<dt>Author</dt> <dd>sbarati@apple.com</dd>
<dt>Date</dt> <dd>2016-10-03 17:35:52 -0700 (Mon, 03 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>GetMapBucket node should speculate on the type of its 'key' child
https://bugs.webkit.org/show_bug.cgi?id=161638
Reviewed by Filip Pizlo.
This eliminates type-check branches when we've already
proven the type of the incoming key. Also, it reduces
the branches we emit when type checking the bucket's key.
This is a 2-3% speedup on ES6SampleBench/Basic.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucket):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGFixupPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (206762 => 206763)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-04 00:32:41 UTC (rev 206762)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-04 00:35:52 UTC (rev 206763)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-10-03 Saam Barati <sbarati@apple.com>
+
+ GetMapBucket node should speculate on the type of its 'key' child
+ https://bugs.webkit.org/show_bug.cgi?id=161638
+
+ Reviewed by Filip Pizlo.
+
+ This eliminates type-check branches when we've already
+ proven the type of the incoming key. Also, it reduces
+ the branches we emit when type checking the bucket's key.
+
+ This is a 2-3% speedup on ES6SampleBench/Basic.
+
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::fixupNode):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * ftl/FTLLowerDFGToB3.cpp:
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetMapBucket):
+
</ins><span class="cx"> 2016-10-03 Christopher Reid <Christopher.Reid@am.sony.com>
</span><span class="cx">
</span><span class="cx"> Offline asm should not output masm assembly when using a x86_64 asm backend
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGFixupPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (206762 => 206763)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-10-04 00:32:41 UTC (rev 206762)
+++ trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp        2016-10-04 00:35:52 UTC (rev 206763)
</span><span class="lines">@@ -1587,7 +1587,22 @@
</span><span class="cx"> fixEdge<SetObjectUse>(node->child1());
</span><span class="cx"> else
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span><del>- fixEdge<UntypedUse>(node->child2());
</del><ins>+
+ if (node->child2()->shouldSpeculateBoolean())
+ fixEdge<BooleanUse>(node->child2());
+ else if (node->child2()->shouldSpeculateInt32())
+ fixEdge<Int32Use>(node->child2());
+ else if (node->child2()->shouldSpeculateSymbol())
+ fixEdge<SymbolUse>(node->child2());
+ else if (node->child2()->shouldSpeculateObject())
+ fixEdge<ObjectUse>(node->child2());
+ else if (node->child2()->shouldSpeculateString())
+ fixEdge<StringUse>(node->child2());
+ else if (node->child2()->shouldSpeculateCell())
+ fixEdge<CellUse>(node->child2());
+ else
+ fixEdge<UntypedUse>(node->child2());
+
</ins><span class="cx"> fixEdge<Int32Use>(node->child3());
</span><span class="cx"> break;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJIT64cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp (206762 => 206763)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-10-04 00:32:41 UTC (rev 206762)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp        2016-10-04 00:35:52 UTC (rev 206763)
</span><span class="lines">@@ -4717,7 +4717,7 @@
</span><span class="cx"> }
</span><span class="cx"> case GetMapBucket: {
</span><span class="cx"> SpeculateCellOperand map(this, node->child1());
</span><del>- JSValueOperand key(this, node->child2());
</del><ins>+ JSValueOperand key(this, node->child2(), ManualOperandSpeculation);
</ins><span class="cx"> SpeculateInt32Operand hash(this, node->child3());
</span><span class="cx"> GPRTemporary mask(this);
</span><span class="cx"> GPRTemporary index(this);
</span><span class="lines">@@ -4741,6 +4741,9 @@
</span><span class="cx"> else
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">
</span><ins>+ if (node->child2().useKind() != UntypedUse)
+ speculate(node, node->child2());
+
</ins><span class="cx"> m_jit.loadPtr(MacroAssembler::Address(mapGPR, node->child1().useKind() == MapObjectUse ? JSMap::offsetOfHashMapImpl() : JSSet::offsetOfHashMapImpl()), bufferGPR);
</span><span class="cx"> m_jit.load32(MacroAssembler::Address(bufferGPR, HashMapImpl<HashMapBucket<HashMapBucketDataKey>>::offsetOfCapacity()), maskGPR);
</span><span class="cx"> m_jit.loadPtr(MacroAssembler::Address(bufferGPR, HashMapImpl<HashMapBucket<HashMapBucketDataKey>>::offsetOfBuffer()), bufferGPR);
</span><span class="lines">@@ -4763,40 +4766,79 @@
</span><span class="cx"> m_jit.load64(MacroAssembler::Address(bucketGPR, HashMapBucket<HashMapBucketDataKey>::offsetOfKey()), bucketGPR);
</span><span class="cx">
</span><span class="cx"> // Perform Object.is()
</span><del>- done.append(m_jit.branch64(MacroAssembler::Equal, bucketGPR, keyGPR)); // They're definitely the same value, we found the bucket we were looking for!
- auto oneIsntCell = m_jit.branchIfNotCell(JSValueRegs(bucketGPR));
- // first is a cell here.
- loopAround.append(m_jit.branchIfNotCell(JSValueRegs(keyGPR)));
- // Both are cells here.
- loopAround.append(m_jit.branch8(JITCompiler::NotEqual,
- JITCompiler::Address(bucketGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
- // The first is a string here.
- slowPathCases.append(m_jit.branch8(JITCompiler::Equal,
- JITCompiler::Address(keyGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
- // The first is a string, but the second is not, we continue to loop around.
- loopAround.append(m_jit.jump());
</del><ins>+ switch (node->child2().useKind()) {
+ case BooleanUse:
+ case Int32Use:
+ case SymbolUse:
+ case ObjectUse: {
+ done.append(m_jit.branch64(MacroAssembler::Equal, bucketGPR, keyGPR)); // They're definitely the same value, we found the bucket we were looking for!
+ // Otherwise, loop around.
+ break;
+ }
+ case CellUse: {
+ done.append(m_jit.branch64(MacroAssembler::Equal, bucketGPR, keyGPR));
+ loopAround.append(m_jit.branchIfNotCell(JSValueRegs(bucketGPR)));
+ loopAround.append(m_jit.branch8(JITCompiler::NotEqual,
+ JITCompiler::Address(bucketGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
+ loopAround.append(m_jit.branch8(JITCompiler::NotEqual,
+ JITCompiler::Address(keyGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
+ // They're both strings.
+ slowPathCases.append(m_jit.jump());
+ break;
+ }
+ case StringUse: {
+ done.append(m_jit.branch64(MacroAssembler::Equal, bucketGPR, keyGPR)); // They're definitely the same value, we found the bucket we were looking for!
+ loopAround.append(m_jit.branchIfNotCell(JSValueRegs(bucketGPR)));
+ loopAround.append(m_jit.branch8(JITCompiler::NotEqual,
+ JITCompiler::Address(bucketGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
+ slowPathCases.append(m_jit.jump());
+ break;
+ }
+ case UntypedUse: {
+ done.append(m_jit.branch64(MacroAssembler::Equal, bucketGPR, keyGPR)); // They're definitely the same value, we found the bucket we were looking for!
+ auto oneIsntCell = m_jit.branchIfNotCell(JSValueRegs(bucketGPR));
+ // first is a cell here.
+ loopAround.append(m_jit.branchIfNotCell(JSValueRegs(keyGPR)));
+ // Both are cells here.
+ loopAround.append(m_jit.branch8(JITCompiler::NotEqual,
+ JITCompiler::Address(bucketGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
+ // The first is a string here.
+ slowPathCases.append(m_jit.branch8(JITCompiler::Equal,
+ JITCompiler::Address(keyGPR, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType)));
+ // The first is a string, but the second is not, we continue to loop around.
+ loopAround.append(m_jit.jump());
</ins><span class="cx">
</span><del>- oneIsntCell.link(&m_jit);
- // We've already done a 64-bit compare at this point, so if one is not a number, they're definitely not equal.
- loopAround.append(m_jit.branchIfNotNumber(bucketGPR));
- loopAround.append(m_jit.branchIfNotNumber(keyGPR));
- // Both are definitely numbers. If we see a double, we go to the slow path.
- slowPathCases.append(m_jit.branchIfNotInt32(bucketGPR));
- slowPathCases.append(m_jit.branchIfNotInt32(keyGPR));
-
- loopAround.link(&m_jit);
</del><ins>+ oneIsntCell.link(&m_jit);
+ // We've already done a 64-bit compare at this point, so if one is not a number, they're definitely not equal.
+ loopAround.append(m_jit.branchIfNotNumber(bucketGPR));
+ loopAround.append(m_jit.branchIfNotNumber(keyGPR));
+ // Both are definitely numbers. If we see a double, we go to the slow path.
+ slowPathCases.append(m_jit.branchIfNotInt32(bucketGPR));
+ slowPathCases.append(m_jit.branchIfNotInt32(keyGPR));
+ break;
+ }
+ default:
+ RELEASE_ASSERT_NOT_REACHED();
+ }
+
+
+ if (!loopAround.empty())
+ loopAround.link(&m_jit);
+
</ins><span class="cx"> m_jit.add32(TrustedImm32(1), indexGPR);
</span><span class="cx"> m_jit.jump().linkTo(loop, &m_jit);
</span><span class="cx">
</span><del>- slowPathCases.link(&m_jit);
- silentSpillAllRegisters(indexGPR);
- if (node->child1().useKind() == MapObjectUse)
- callOperation(operationJSMapFindBucket, resultGPR, mapGPR, keyGPR, hashGPR);
- else
- callOperation(operationJSSetFindBucket, resultGPR, mapGPR, keyGPR, hashGPR);
- silentFillAllRegisters(indexGPR);
- m_jit.exceptionCheck();
- done.append(m_jit.jump());
</del><ins>+ if (!slowPathCases.empty()) {
+ slowPathCases.link(&m_jit);
+ silentSpillAllRegisters(indexGPR);
+ if (node->child1().useKind() == MapObjectUse)
+ callOperation(operationJSMapFindBucket, resultGPR, mapGPR, keyGPR, hashGPR);
+ else
+ callOperation(operationJSSetFindBucket, resultGPR, mapGPR, keyGPR, hashGPR);
+ silentFillAllRegisters(indexGPR);
+ m_jit.exceptionCheck();
+ done.append(m_jit.jump());
+ }
</ins><span class="cx">
</span><span class="cx"> notPresentInTable.link(&m_jit);
</span><span class="cx"> m_jit.move(TrustedImmPtr(nullptr), resultGPR);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToB3cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp (206762 => 206763)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-10-04 00:32:41 UTC (rev 206762)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp        2016-10-04 00:35:52 UTC (rev 206763)
</span><span class="lines">@@ -6509,14 +6509,6 @@
</span><span class="cx"> LBasicBlock notPresentInTable = m_out.newBlock();
</span><span class="cx"> LBasicBlock notEmptyValue = m_out.newBlock();
</span><span class="cx"> LBasicBlock notDeletedValue = m_out.newBlock();
</span><del>- LBasicBlock notBitEqual = m_out.newBlock();
- LBasicBlock bucketKeyNotCell = m_out.newBlock();
- LBasicBlock bucketKeyIsCell = m_out.newBlock();
- LBasicBlock bothAreCells = m_out.newBlock();
- LBasicBlock bucketKeyIsString = m_out.newBlock();
- LBasicBlock bucketKeyIsNumber = m_out.newBlock();
- LBasicBlock bothAreNumbers = m_out.newBlock();
- LBasicBlock bucketKeyIsInt32 = m_out.newBlock();
</del><span class="cx"> LBasicBlock continuation = m_out.newBlock();
</span><span class="cx">
</span><span class="cx"> LBasicBlock lastNext = m_out.insertNewBlocksBefore(loopStart);
</span><span class="lines">@@ -6529,7 +6521,10 @@
</span><span class="cx"> else
</span><span class="cx"> RELEASE_ASSERT_NOT_REACHED();
</span><span class="cx">
</span><del>- LValue key = lowJSValue(m_node->child2());
</del><ins>+ LValue key = lowJSValue(m_node->child2(), ManualOperandSpeculation);
+ if (m_node->child2().useKind() != UntypedUse)
+ speculate(m_node->child2());
+
</ins><span class="cx"> LValue hash = lowInt32(m_node->child3());
</span><span class="cx">
</span><span class="cx"> LValue hashMapImpl = m_out.loadPtr(map, m_node->child1().useKind() == MapObjectUse ? m_heaps.JSMap_hashMapImpl : m_heaps.JSSet_hashMapImpl);
</span><span class="lines">@@ -6551,44 +6546,106 @@
</span><span class="cx"> m_out.branch(m_out.equal(hashMapBucket, m_out.constIntPtr(HashMapImpl<HashMapBucket<HashMapBucketDataKey>>::deletedValue())),
</span><span class="cx"> unsure(loopAround), unsure(notDeletedValue));
</span><span class="cx">
</span><del>- m_out.appendTo(notDeletedValue, notBitEqual);
</del><ins>+ m_out.appendTo(notDeletedValue, loopAround);
</ins><span class="cx"> LValue bucketKey = m_out.load64(hashMapBucket, m_heaps.HashMapBucket_key);
</span><ins>+
</ins><span class="cx"> // Perform Object.is()
</span><del>- m_out.branch(m_out.equal(key, bucketKey),
- unsure(continuation), unsure(notBitEqual));
</del><ins>+ switch (m_node->child2().useKind()) {
+ case BooleanUse:
+ case Int32Use:
+ case SymbolUse:
+ case ObjectUse: {
+ m_out.branch(m_out.equal(key, bucketKey),
+ unsure(continuation), unsure(loopAround));
+ break;
+ }
+ case StringUse: {
+ LBasicBlock notBitEqual = m_out.newBlock();
+ LBasicBlock bucketKeyIsCell = m_out.newBlock();
</ins><span class="cx">
</span><del>- m_out.appendTo(notBitEqual, bucketKeyIsCell);
- m_out.branch(isCell(bucketKey),
- unsure(bucketKeyIsCell), unsure(bucketKeyNotCell));
</del><ins>+ m_out.branch(m_out.equal(key, bucketKey),
+ unsure(continuation), unsure(notBitEqual));
</ins><span class="cx">
</span><del>- m_out.appendTo(bucketKeyIsCell, bothAreCells);
- m_out.branch(isCell(key),
- unsure(bothAreCells), unsure(loopAround));
</del><ins>+ m_out.appendTo(notBitEqual, bucketKeyIsCell);
+ m_out.branch(isCell(bucketKey),
+ unsure(bucketKeyIsCell), unsure(loopAround));
</ins><span class="cx">
</span><del>- m_out.appendTo(bothAreCells, bucketKeyIsString);
- m_out.branch(isString(bucketKey),
- unsure(bucketKeyIsString), unsure(loopAround));
</del><ins>+ m_out.appendTo(bucketKeyIsCell, loopAround);
+ m_out.branch(isString(bucketKey),
+ unsure(slowPath), unsure(loopAround));
+ break;
+ }
+ case CellUse: {
+ LBasicBlock notBitEqual = m_out.newBlock();
+ LBasicBlock bucketKeyIsCell = m_out.newBlock();
+ LBasicBlock bucketKeyIsString = m_out.newBlock();
</ins><span class="cx">
</span><del>- m_out.appendTo(bucketKeyIsString, bucketKeyNotCell);
- m_out.branch(isString(key),
- unsure(slowPath), unsure(loopAround));
</del><ins>+ m_out.branch(m_out.equal(key, bucketKey),
+ unsure(continuation), unsure(notBitEqual));
</ins><span class="cx">
</span><del>- m_out.appendTo(bucketKeyNotCell, bucketKeyIsNumber);
- m_out.branch(isNotNumber(bucketKey),
- unsure(loopAround), unsure(bucketKeyIsNumber));
</del><ins>+ m_out.appendTo(notBitEqual, bucketKeyIsCell);
+ m_out.branch(isCell(bucketKey),
+ unsure(bucketKeyIsCell), unsure(loopAround));
</ins><span class="cx">
</span><del>- m_out.appendTo(bucketKeyIsNumber, bothAreNumbers);
- m_out.branch(isNotNumber(key),
- unsure(loopAround), unsure(bothAreNumbers));
</del><ins>+ m_out.appendTo(bucketKeyIsCell, bucketKeyIsString);
+ m_out.branch(isString(bucketKey),
+ unsure(bucketKeyIsString), unsure(loopAround));
</ins><span class="cx">
</span><del>- m_out.appendTo(bothAreNumbers, bucketKeyIsInt32);
- m_out.branch(isNotInt32(bucketKey),
- unsure(slowPath), unsure(bucketKeyIsInt32));
</del><ins>+ m_out.appendTo(bucketKeyIsString, loopAround);
+ m_out.branch(isString(key),
+ unsure(slowPath), unsure(loopAround));
+ break;
+ }
+ case UntypedUse: {
+ LBasicBlock notBitEqual = m_out.newBlock();
+ LBasicBlock bucketKeyIsCell = m_out.newBlock();
+ LBasicBlock bothAreCells = m_out.newBlock();
+ LBasicBlock bucketKeyIsString = m_out.newBlock();
+ LBasicBlock bucketKeyNotCell = m_out.newBlock();
+ LBasicBlock bucketKeyIsNumber = m_out.newBlock();
+ LBasicBlock bothAreNumbers = m_out.newBlock();
+ LBasicBlock bucketKeyIsInt32 = m_out.newBlock();
</ins><span class="cx">
</span><del>- m_out.appendTo(bucketKeyIsInt32, loopAround);
- m_out.branch(isNotInt32(key),
- unsure(slowPath), unsure(loopAround));
</del><ins>+ m_out.branch(m_out.equal(key, bucketKey),
+ unsure(continuation), unsure(notBitEqual));
</ins><span class="cx">
</span><ins>+ m_out.appendTo(notBitEqual, bucketKeyIsCell);
+ m_out.branch(isCell(bucketKey),
+ unsure(bucketKeyIsCell), unsure(bucketKeyNotCell));
+
+ m_out.appendTo(bucketKeyIsCell, bothAreCells);
+ m_out.branch(isCell(key),
+ unsure(bothAreCells), unsure(loopAround));
+
+ m_out.appendTo(bothAreCells, bucketKeyIsString);
+ m_out.branch(isString(bucketKey),
+ unsure(bucketKeyIsString), unsure(loopAround));
+
+ m_out.appendTo(bucketKeyIsString, bucketKeyNotCell);
+ m_out.branch(isString(key),
+ unsure(slowPath), unsure(loopAround));
+
+ m_out.appendTo(bucketKeyNotCell, bucketKeyIsNumber);
+ m_out.branch(isNotNumber(bucketKey),
+ unsure(loopAround), unsure(bucketKeyIsNumber));
+
+ m_out.appendTo(bucketKeyIsNumber, bothAreNumbers);
+ m_out.branch(isNotNumber(key),
+ unsure(loopAround), unsure(bothAreNumbers));
+
+ m_out.appendTo(bothAreNumbers, bucketKeyIsInt32);
+ m_out.branch(isNotInt32(bucketKey),
+ unsure(slowPath), unsure(bucketKeyIsInt32));
+
+ m_out.appendTo(bucketKeyIsInt32, loopAround);
+ m_out.branch(isNotInt32(key),
+ unsure(slowPath), unsure(loopAround));
+ break;
+ }
+ default:
+ RELEASE_ASSERT_NOT_REACHED();
+ }
+
</ins><span class="cx"> m_out.appendTo(loopAround, slowPath);
</span><span class="cx"> m_out.addIncomingToPhi(unmaskedIndex, m_out.anchor(m_out.add(index, m_out.int32One)));
</span><span class="cx"> m_out.jump(loopStart);
</span></span></pre>
</div>
</div>
</body>
</html>