|
Lines 7551-7557
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec1
|
| 7551 |
// notNumber case. |
7551 |
// notNumber case. |
| 7552 |
LBasicBlock lastNext = m_out.appendTo(notNumber, continuation); |
7552 |
LBasicBlock lastNext = m_out.appendTo(notNumber, continuation); |
| 7553 |
#if USE(BIGINT32) |
7553 |
#if USE(BIGINT32) |
| 7554 |
m_out.branch(isBigInt32(value, provenType(m_node->child1())), unsure(continuation), unsure(notBigInt32)); |
7554 |
m_out.branch(isBigInt32KnownNotNumber(value, provenType(m_node->child1())), unsure(continuation), unsure(notBigInt32)); |
| 7555 |
m_out.appendTo(notBigInt32); |
7555 |
m_out.appendTo(notBigInt32); |
| 7556 |
#endif |
7556 |
#endif |
| 7557 |
m_out.branch(isCell(value, provenType(m_node->child1())), unsure(isCellPath), unsure(slowPath)); |
7557 |
m_out.branch(isCell(value, provenType(m_node->child1())), unsure(isCellPath), unsure(slowPath)); |
|
Lines 8716-8734
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec2
|
| 8716 |
LBasicBlock rightIsNotBigInt32 = m_out.newBlock(); |
8716 |
LBasicBlock rightIsNotBigInt32 = m_out.newBlock(); |
| 8717 |
LBasicBlock continuation = m_out.newBlock(); |
8717 |
LBasicBlock continuation = m_out.newBlock(); |
| 8718 |
|
8718 |
|
|
|
8719 |
FTL_TYPE_CHECK(jsValueValue(left), m_node->child1(), ~SpecFullNumber, isNumber(left)); |
| 8720 |
FTL_TYPE_CHECK(jsValueValue(right), m_node->child2(), ~SpecFullNumber, isNumber(right)); |
| 8721 |
|
| 8719 |
// Inserts a check that a value is a HeapBigInt, assuming only that we know it is not a BigInt32 |
8722 |
// Inserts a check that a value is a HeapBigInt, assuming only that we know it is not a BigInt32 |
| 8720 |
auto checkIsHeapBigInt = [&](LValue lowValue, Edge highValue) { |
8723 |
auto checkIsHeapBigInt = [&](LValue lowValue, Edge highValue) { |
| 8721 |
if (m_interpreter.needsTypeCheck(highValue, SpecHeapBigInt)) { |
8724 |
if (m_interpreter.needsTypeCheck(highValue, SpecHeapBigInt)) { |
| 8722 |
ASSERT(mayHaveTypeCheck(highValue.useKind())); |
8725 |
ASSERT(mayHaveTypeCheck(highValue.useKind())); |
| 8723 |
LValue checkFailed = isNotHeapBigIntUnknownWhetherCell(lowValue, ~SpecBigInt32); |
8726 |
LValue checkFailed = isNotHeapBigIntUnknownWhetherCell(lowValue, provenType(highValue) & ~SpecBigInt32); |
| 8724 |
appendOSRExit(BadType, jsValueValue(lowValue), highValue.node(), checkFailed, m_origin); |
8727 |
appendOSRExit(BadType, jsValueValue(lowValue), highValue.node(), checkFailed, m_origin); |
| 8725 |
} |
8728 |
} |
| 8726 |
}; |
8729 |
}; |
| 8727 |
|
8730 |
|
| 8728 |
m_out.branch(isBigInt32(left, provenType(m_node->child1())), unsure(leftIsBigInt32), unsure(leftIsNotBigInt32)); |
8731 |
m_out.branch(isBigInt32KnownNotNumber(left, provenType(m_node->child1())), unsure(leftIsBigInt32), unsure(leftIsNotBigInt32)); |
| 8729 |
|
8732 |
|
| 8730 |
LBasicBlock lastNext = m_out.appendTo(leftIsBigInt32, bothAreBigInt32); |
8733 |
LBasicBlock lastNext = m_out.appendTo(leftIsBigInt32, bothAreBigInt32); |
| 8731 |
m_out.branch(isBigInt32(right, provenType(m_node->child2())), unsure(bothAreBigInt32), unsure(onlyLeftIsBigInt32)); |
8734 |
m_out.branch(isBigInt32KnownNotNumber(right, provenType(m_node->child2())), unsure(bothAreBigInt32), unsure(onlyLeftIsBigInt32)); |
| 8732 |
|
8735 |
|
| 8733 |
m_out.appendTo(bothAreBigInt32, onlyLeftIsBigInt32); |
8736 |
m_out.appendTo(bothAreBigInt32, onlyLeftIsBigInt32); |
| 8734 |
ValueFromBlock resultBothAreBigInt32 = m_out.anchor(m_out.equal(left, right)); |
8737 |
ValueFromBlock resultBothAreBigInt32 = m_out.anchor(m_out.equal(left, right)); |
|
Lines 8749-8755
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec3
|
| 8749 |
m_out.jump(continuation); |
8752 |
m_out.jump(continuation); |
| 8750 |
|
8753 |
|
| 8751 |
m_out.appendTo(leftIsHeapBigInt, rightIsBigInt32); |
8754 |
m_out.appendTo(leftIsHeapBigInt, rightIsBigInt32); |
| 8752 |
m_out.branch(isBigInt32(right, provenType(m_node->child2())), unsure(rightIsBigInt32), unsure(rightIsNotBigInt32)); |
8755 |
m_out.branch(isBigInt32KnownNotNumber(right, provenType(m_node->child2())), unsure(rightIsBigInt32), unsure(rightIsNotBigInt32)); |
| 8753 |
|
8756 |
|
| 8754 |
m_out.appendTo(rightIsBigInt32, rightIsNotBigInt32); |
8757 |
m_out.appendTo(rightIsBigInt32, rightIsNotBigInt32); |
| 8755 |
LValue unboxedRight = unboxBigInt32(right); |
8758 |
LValue unboxedRight = unboxBigInt32(right); |
|
Lines 10922-10928
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec4
|
| 10922 |
|
10925 |
|
| 10923 |
LBasicBlock lastNext = m_out.appendTo(isNotCellCase, isCellCase); |
10926 |
LBasicBlock lastNext = m_out.appendTo(isNotCellCase, isCellCase); |
| 10924 |
// FIXME: we should filter the provenType to include the fact that we know we are not dealing with a cell |
10927 |
// FIXME: we should filter the provenType to include the fact that we know we are not dealing with a cell |
| 10925 |
ValueFromBlock notCellResult = m_out.anchor(isBigInt32(value, provenType(m_node->child1()))); |
10928 |
ValueFromBlock notCellResult = m_out.anchor(isBigInt32KnownNotCell(value, provenType(m_node->child1()))); |
| 10926 |
m_out.jump(continuation); |
10929 |
m_out.jump(continuation); |
| 10927 |
|
10930 |
|
| 10928 |
m_out.appendTo(isCellCase, continuation); |
10931 |
m_out.appendTo(isCellCase, continuation); |
|
Lines 15465-15471
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec5
|
| 15465 |
#if USE(BIGINT32) |
15468 |
#if USE(BIGINT32) |
| 15466 |
m_out.appendTo(notDoubleCase, bigInt32Case); |
15469 |
m_out.appendTo(notDoubleCase, bigInt32Case); |
| 15467 |
m_out.branch( |
15470 |
m_out.branch( |
| 15468 |
isBigInt32(value, provenType(edge) & ~SpecCell), |
15471 |
isBigInt32KnownNotNumber(value, provenType(edge) & ~SpecCell), |
| 15469 |
unsure(bigInt32Case), unsure(notBigInt32Case)); |
15472 |
unsure(bigInt32Case), unsure(notBigInt32Case)); |
| 15470 |
|
15473 |
|
| 15471 |
m_out.appendTo(bigInt32Case, notBigInt32Case); |
15474 |
m_out.appendTo(bigInt32Case, notBigInt32Case); |
|
Lines 16191-16197
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec6
|
| 16191 |
|
16194 |
|
| 16192 |
#if USE(BIGINT32) |
16195 |
#if USE(BIGINT32) |
| 16193 |
m_out.appendTo(notNumberCase, notBigInt32Case); |
16196 |
m_out.appendTo(notNumberCase, notBigInt32Case); |
| 16194 |
m_out.branch(isBigInt32(value, provenType(child) & ~SpecCell), unsure(bigIntCase), unsure(notBigInt32Case)); |
16197 |
m_out.branch(isBigInt32KnownNotNumber(value, provenType(child) & ~SpecCell), unsure(bigIntCase), unsure(notBigInt32Case)); |
| 16195 |
|
16198 |
|
| 16196 |
m_out.appendTo(notBigInt32Case, notNullCase); |
16199 |
m_out.appendTo(notBigInt32Case, notNullCase); |
| 16197 |
#else |
16200 |
#else |
|
Lines 16911-16917
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec7
|
| 16911 |
LoweredNodeValue value = m_jsValueValues.get(edge.node()); |
16914 |
LoweredNodeValue value = m_jsValueValues.get(edge.node()); |
| 16912 |
if (isValid(value)) { |
16915 |
if (isValid(value)) { |
| 16913 |
LValue result = value.value(); |
16916 |
LValue result = value.value(); |
| 16914 |
FTL_TYPE_CHECK(jsValueValue(result), edge, SpecBigInt32, isNotBigInt32(result)); |
16917 |
FTL_TYPE_CHECK(jsValueValue(result), edge, ~SpecFullNumber, isNumber(result)); |
|
|
16918 |
FTL_TYPE_CHECK(jsValueValue(result), edge, SpecBigInt32, isNotBigInt32KnownNotNumber(result)); |
| 16915 |
return result; |
16919 |
return result; |
| 16916 |
} |
16920 |
} |
| 16917 |
|
16921 |
|
|
Lines 17108-17128
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec8
|
| 17108 |
} |
17112 |
} |
| 17109 |
|
17113 |
|
| 17110 |
#if USE(BIGINT32) |
17114 |
#if USE(BIGINT32) |
| 17111 |
LValue isBigInt32(LValue jsValue, SpeculatedType type = SpecFullTop) |
17115 |
LValue isBigInt32KnownNotCell(LValue jsValue, SpeculatedType type = SpecFullTop) |
| 17112 |
{ |
17116 |
{ |
| 17113 |
if (LValue proven = isProvenValue(type, SpecBigInt32)) |
17117 |
if (LValue proven = isProvenValue(type, SpecBigInt32)) |
| 17114 |
return proven; |
17118 |
return proven; |
| 17115 |
return m_out.equal( |
17119 |
return m_out.equal(m_out.bitAnd(jsValue, m_out.constInt64(JSValue::BigInt32Mask)), m_out.constInt64(JSValue::BigInt32Tag)); |
| 17116 |
m_out.bitAnd(jsValue, m_out.constInt64(JSValue::BigInt32Mask)), |
|
|
| 17117 |
m_out.constInt64(JSValue::BigInt32Tag)); |
| 17118 |
} |
17120 |
} |
| 17119 |
LValue isNotBigInt32(LValue jsValue, SpeculatedType type = SpecFullTop) |
17121 |
LValue isBigInt32KnownNotNumber(LValue jsValue, SpeculatedType type = SpecFullTop) |
|
|
17122 |
{ |
| 17123 |
if (LValue proven = isProvenValue(type, SpecBigInt32)) |
| 17124 |
return proven; |
| 17125 |
return m_out.equal(m_out.bitAnd(jsValue, m_out.constInt64(JSValue::BigInt32Tag)), m_out.constInt64(JSValue::BigInt32Tag)); |
| 17126 |
} |
| 17127 |
LValue isNotBigInt32KnownNotNumber(LValue jsValue, SpeculatedType type = SpecFullTop) |
| 17120 |
{ |
17128 |
{ |
| 17121 |
if (LValue proven = isProvenValue(type, ~SpecBigInt32)) |
17129 |
if (LValue proven = isProvenValue(type, ~SpecBigInt32)) |
| 17122 |
return proven; |
17130 |
return proven; |
| 17123 |
return m_out.notEqual( |
17131 |
return m_out.notEqual(m_out.bitAnd(jsValue, m_out.constInt64(JSValue::BigInt32Tag)), m_out.constInt64(JSValue::BigInt32Tag)); |
| 17124 |
m_out.bitAnd(jsValue, m_out.constInt64(JSValue::BigInt32Mask)), |
|
|
| 17125 |
m_out.constInt64(JSValue::BigInt32Tag)); |
| 17126 |
} |
17132 |
} |
| 17127 |
LValue unboxBigInt32(LValue jsValue) |
17133 |
LValue unboxBigInt32(LValue jsValue) |
| 17128 |
{ |
17134 |
{ |
|
Lines 17134-17140
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec9
|
| 17134 |
m_out.shl(m_out.zeroExt(int32Value, B3::Int64), m_out.constInt64(16)), |
17140 |
m_out.shl(m_out.zeroExt(int32Value, B3::Int64), m_out.constInt64(16)), |
| 17135 |
m_out.constInt64(JSValue::BigInt32Tag)); |
17141 |
m_out.constInt64(JSValue::BigInt32Tag)); |
| 17136 |
} |
17142 |
} |
| 17137 |
LValue isNotAnyBigInt(LValue jsValue, SpeculatedType type = SpecFullTop) |
17143 |
LValue isNotAnyBigIntKnownNotNumber(LValue jsValue, SpeculatedType type = SpecFullTop) |
| 17138 |
{ |
17144 |
{ |
| 17139 |
if (LValue proven = isProvenValue(type, ~SpecBigInt)) |
17145 |
if (LValue proven = isProvenValue(type, ~SpecBigInt)) |
| 17140 |
return proven; |
17146 |
return proven; |
|
Lines 17150-17156
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec10
|
| 17150 |
LBasicBlock isCellCase = m_out.newBlock(); |
17156 |
LBasicBlock isCellCase = m_out.newBlock(); |
| 17151 |
LBasicBlock continuation = m_out.newBlock(); |
17157 |
LBasicBlock continuation = m_out.newBlock(); |
| 17152 |
|
17158 |
|
| 17153 |
m_out.branch(isBigInt32(jsValue, type), unsure(isBigInt32Case), unsure(isNotBigInt32Case)); |
17159 |
m_out.branch(isBigInt32KnownNotNumber(jsValue, type), unsure(isBigInt32Case), unsure(isNotBigInt32Case)); |
| 17154 |
|
17160 |
|
| 17155 |
LBasicBlock lastNext = m_out.appendTo(isBigInt32Case, isNotBigInt32Case); |
17161 |
LBasicBlock lastNext = m_out.appendTo(isBigInt32Case, isNotBigInt32Case); |
| 17156 |
ValueFromBlock returnFalse = m_out.anchor(m_out.booleanFalse); |
17162 |
ValueFromBlock returnFalse = m_out.anchor(m_out.booleanFalse); |
|
Lines 17687-17701
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec11
|
| 17687 |
LBasicBlock isCellCase = m_out.newBlock(); |
17693 |
LBasicBlock isCellCase = m_out.newBlock(); |
| 17688 |
LBasicBlock continuation = m_out.newBlock(); |
17694 |
LBasicBlock continuation = m_out.newBlock(); |
| 17689 |
|
17695 |
|
| 17690 |
ValueFromBlock defaultToFalse = m_out.anchor(m_out.booleanFalse); |
17696 |
ValueFromBlock defaultToTrue = m_out.anchor(m_out.booleanTrue); |
| 17691 |
m_out.branch(isCell(value, type), unsure(isCellCase), unsure(continuation)); |
17697 |
m_out.branch(isCell(value, type), unsure(isCellCase), unsure(continuation)); |
| 17692 |
|
17698 |
|
| 17693 |
LBasicBlock lastNext = m_out.appendTo(isCellCase, continuation); |
17699 |
LBasicBlock lastNext = m_out.appendTo(isCellCase, continuation); |
| 17694 |
ValueFromBlock returnForCell = m_out.anchor(isHeapBigInt(value, type)); |
17700 |
ValueFromBlock returnForCell = m_out.anchor(isNotHeapBigInt(value, type)); |
| 17695 |
m_out.jump(continuation); |
17701 |
m_out.jump(continuation); |
| 17696 |
|
17702 |
|
| 17697 |
m_out.appendTo(continuation, lastNext); |
17703 |
m_out.appendTo(continuation, lastNext); |
| 17698 |
LValue result = m_out.phi(Int32, defaultToFalse, returnForCell); |
17704 |
LValue result = m_out.phi(Int32, defaultToTrue, returnForCell); |
| 17699 |
return result; |
17705 |
return result; |
| 17700 |
} |
17706 |
} |
| 17701 |
|
17707 |
|
|
Lines 18181-18193
class LowerDFGToB3 {
a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp_sec12
|
| 18181 |
void speculateBigInt32(Edge edge) |
18187 |
void speculateBigInt32(Edge edge) |
| 18182 |
{ |
18188 |
{ |
| 18183 |
LValue value = lowJSValue(edge, ManualOperandSpeculation); |
18189 |
LValue value = lowJSValue(edge, ManualOperandSpeculation); |
| 18184 |
FTL_TYPE_CHECK(jsValueValue(value), edge, SpecBigInt32, isNotBigInt32(value)); |
18190 |
FTL_TYPE_CHECK(jsValueValue(value), edge, ~SpecFullNumber, isNumber(value)); |
|
|
18191 |
FTL_TYPE_CHECK(jsValueValue(value), edge, SpecBigInt32, isNotBigInt32KnownNotNumber(value)); |
| 18185 |
} |
18192 |
} |
| 18186 |
|
18193 |
|
| 18187 |
void speculateAnyBigInt(Edge edge) |
18194 |
void speculateAnyBigInt(Edge edge) |
| 18188 |
{ |
18195 |
{ |
| 18189 |
LValue value = lowJSValue(edge, ManualOperandSpeculation); |
18196 |
LValue value = lowJSValue(edge, ManualOperandSpeculation); |
| 18190 |
FTL_TYPE_CHECK(jsValueValue(value), edge, SpecBigInt, isNotAnyBigInt(value)); |
18197 |
FTL_TYPE_CHECK(jsValueValue(value), edge, ~SpecFullNumber, isNumber(value)); |
|
|
18198 |
FTL_TYPE_CHECK(jsValueValue(value), edge, SpecBigInt, isNotAnyBigIntKnownNotNumber(value)); |
| 18191 |
} |
18199 |
} |
| 18192 |
#endif |
18200 |
#endif |
| 18193 |
|
18201 |
|