DFG should know how to speculate StringOrOther
https://bugs.webkit.org/show_bug.cgi?id=155094
Reviewed by Saam Barati.
Any code that processes the regexp matches array was previously doing a relatively expensive
Branch(Untyped:). This introduces a new use kind called StringOrOther, which is perfect for
code that loops over the matches array and branches on the entries being non-empty.
To do this, I needed to introduce code into the FTL that creates new blocks. We still had that
awful FTL_NEW_BLOCK idiom since the only way to debug LLVM IR was to ascribe names to basic
blocks. B3 IR is inherently more debuggable since unlike LLVM, B3 knows how to always respect
code origin, and it knows how to print the code origin nicely in the dumps. So, rather than
continue using FTL_NEW_BLOCK(m_out, ("things")), I replaced all of that stuff with
m_out.newBlock(). It's much nicer that way.
This is a tiny speed-up on Octane/regexp at best. I was hoping for more. Oh well.
* bytecode/SpeculatedType.h:
(JSC::isStringSpeculation):
(JSC::isStringOrOtherSpeculation):
(JSC::isSymbolSpeculation):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateString):
(JSC::DFG::Node::shouldSpeculateStringOrOther):
(JSC::DFG::Node::shouldSpeculateStringObject):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::SafeToExecuteEdge::operator()):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileStringZeroLength):
(JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
(JSC::DFG::SpeculativeJIT::emitStringBranch):
(JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
(JSC::DFG::SpeculativeJIT::compileConstantStoragePointer):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateStringOrOther):
(JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
(JSC::DFG::SpeculativeJIT::speculate):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileLogicalNot):
(JSC::DFG::SpeculativeJIT::emitBranch):
* dfg/DFGUseKind.cpp:
(WTF::printInternal):
* dfg/DFGUseKind.h:
(JSC::DFG::typeFilterFor):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::lower):
(JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
(JSC::FTL::DFG::LowerDFGToB3::compileBooleanToNumber):
(JSC::FTL::DFG::LowerDFGToB3::compileToThis):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMul):
(JSC::FTL::DFG::LowerDFGToB3::compileArithDiv):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMod):
(JSC::FTL::DFG::LowerDFGToB3::compileArithMinOrMax):
(JSC::FTL::DFG::LowerDFGToB3::compileArithPow):
(JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayifyToStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileGetById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileCopyRest):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRestLength):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructor):
(JSC::FTL::DFG::LowerDFGToB3::compileToPrimitive):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
(JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileNotifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
(JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileSwitch):
(JSC::FTL::DFG::LowerDFGToB3::compileIsString):
(JSC::FTL::DFG::LowerDFGToB3::compileIsObject):
(JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull):
(JSC::FTL::DFG::LowerDFGToB3::compileIsFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
(JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
(JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):
(JSC::FTL::DFG::LowerDFGToB3::compileHasStructureProperty):
(JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorStructurePname):
(JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorGenericPname):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileCheckWatchdogTimer):
(JSC::FTL::DFG::LowerDFGToB3::checkStructure):
(JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
(JSC::FTL::DFG::LowerDFGToB3::checkInferredType):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):
(JSC::FTL::DFG::LowerDFGToB3::loadVectorWithBarrier):
(JSC::FTL::DFG::LowerDFGToB3::copyBarrier):
(JSC::FTL::DFG::LowerDFGToB3::loadVectorReadOnly):
(JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
(JSC::FTL::DFG::LowerDFGToB3::nonSpeculativeCompare):
(JSC::FTL::DFG::LowerDFGToB3::stringsEqual):
(JSC::FTL::DFG::LowerDFGToB3::allocateCell):
(JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateBasicStorageAndGetEnd):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::contiguousPutByValOutOfBounds):
(JSC::FTL::DFG::LowerDFGToB3::switchString):
(JSC::FTL::DFG::LowerDFGToB3::switchStringRecurse):
(JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
(JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::strictInt52ToJSValue):
(JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
(JSC::FTL::DFG::LowerDFGToB3::convertDoubleToInt32):
(JSC::FTL::DFG::LowerDFGToB3::speculate):
(JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateString):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject):
(JSC::FTL::DFG::LowerDFGToB3::speculateRealNumber):
(JSC::FTL::DFG::LowerDFGToB3::speculateNotStringVar):
(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
(JSC::FTL::DFG::LowerDFGToB3::callCheck):
* ftl/FTLOutput.cpp:
(JSC::FTL::Output::initialize):
(JSC::FTL::Output::newBlock):
(JSC::FTL::Output::check):
* ftl/FTLOutput.h:
(JSC::FTL::Output::setFrequency):
(JSC::FTL::Output::insertNewBlocksBefore):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@197649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index 22c4897..cc0202c 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,158 @@
+2016-03-06 Filip Pizlo <fpizlo@apple.com>
+
+ DFG should know how to speculate StringOrOther
+ https://bugs.webkit.org/show_bug.cgi?id=155094
+
+ Reviewed by Saam Barati.
+
+ Any code that processes the regexp matches array was previously doing a relatively expensive
+ Branch(Untyped:). This introduces a new use kind called StringOrOther, which is perfect for
+ code that loops over the matches array and branches on the entries being non-empty.
+
+ To do this, I needed to introduce code into the FTL that creates new blocks. We still had that
+ awful FTL_NEW_BLOCK idiom since the only way to debug LLVM IR was to ascribe names to basic
+ blocks. B3 IR is inherently more debuggable since unlike LLVM, B3 knows how to always respect
+ code origin, and it knows how to print the code origin nicely in the dumps. So, rather than
+ continue using FTL_NEW_BLOCK(m_out, ("things")), I replaced all of that stuff with
+ m_out.newBlock(). It's much nicer that way.
+
+ This is a tiny speed-up on Octane/regexp at best. I was hoping for more. Oh well.
+
+ * bytecode/SpeculatedType.h:
+ (JSC::isStringSpeculation):
+ (JSC::isStringOrOtherSpeculation):
+ (JSC::isSymbolSpeculation):
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::fixupNode):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::shouldSpeculateString):
+ (JSC::DFG::Node::shouldSpeculateStringOrOther):
+ (JSC::DFG::Node::shouldSpeculateStringObject):
+ * dfg/DFGSafeToExecute.h:
+ (JSC::DFG::SafeToExecuteEdge::operator()):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::compileStringZeroLength):
+ (JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
+ (JSC::DFG::SpeculativeJIT::emitStringBranch):
+ (JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
+ (JSC::DFG::SpeculativeJIT::compileConstantStoragePointer):
+ (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
+ (JSC::DFG::SpeculativeJIT::speculateString):
+ (JSC::DFG::SpeculativeJIT::speculateStringOrOther):
+ (JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
+ (JSC::DFG::SpeculativeJIT::speculate):
+ * dfg/DFGSpeculativeJIT.h:
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+ (JSC::DFG::SpeculativeJIT::emitBranch):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compileLogicalNot):
+ (JSC::DFG::SpeculativeJIT::emitBranch):
+ * dfg/DFGUseKind.cpp:
+ (WTF::printInternal):
+ * dfg/DFGUseKind.h:
+ (JSC::DFG::typeFilterFor):
+ * ftl/FTLCapabilities.cpp:
+ (JSC::FTL::canCompile):
+ * ftl/FTLLowerDFGToB3.cpp:
+ (JSC::FTL::DFG::LowerDFGToB3::lower):
+ (JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
+ (JSC::FTL::DFG::LowerDFGToB3::compileBooleanToNumber):
+ (JSC::FTL::DFG::LowerDFGToB3::compileToThis):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithMul):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithDiv):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithMod):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithMinOrMax):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithPow):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCheckStructure):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArrayifyToStructure):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetById):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
+ (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
+ (JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
+ (JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCopyRest):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetRestLength):
+ (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
+ (JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
+ (JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructor):
+ (JSC::FTL::DFG::LowerDFGToB3::compileToPrimitive):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
+ (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
+ (JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
+ (JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
+ (JSC::FTL::DFG::LowerDFGToB3::compileNotifyWrite):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
+ (JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
+ (JSC::FTL::DFG::LowerDFGToB3::compileSwitch):
+ (JSC::FTL::DFG::LowerDFGToB3::compileIsString):
+ (JSC::FTL::DFG::LowerDFGToB3::compileIsObject):
+ (JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull):
+ (JSC::FTL::DFG::LowerDFGToB3::compileIsFunction):
+ (JSC::FTL::DFG::LowerDFGToB3::compileTypeOf):
+ (JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
+ (JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
+ (JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):
+ (JSC::FTL::DFG::LowerDFGToB3::compileHasStructureProperty):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorStructurePname):
+ (JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorGenericPname):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
+ (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
+ (JSC::FTL::DFG::LowerDFGToB3::compileCheckWatchdogTimer):
+ (JSC::FTL::DFG::LowerDFGToB3::checkStructure):
+ (JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
+ (JSC::FTL::DFG::LowerDFGToB3::checkInferredType):
+ (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):
+ (JSC::FTL::DFG::LowerDFGToB3::loadVectorWithBarrier):
+ (JSC::FTL::DFG::LowerDFGToB3::copyBarrier):
+ (JSC::FTL::DFG::LowerDFGToB3::loadVectorReadOnly):
+ (JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
+ (JSC::FTL::DFG::LowerDFGToB3::nonSpeculativeCompare):
+ (JSC::FTL::DFG::LowerDFGToB3::stringsEqual):
+ (JSC::FTL::DFG::LowerDFGToB3::allocateCell):
+ (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
+ (JSC::FTL::DFG::LowerDFGToB3::allocateBasicStorageAndGetEnd):
+ (JSC::FTL::DFG::LowerDFGToB3::allocateObject):
+ (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
+ (JSC::FTL::DFG::LowerDFGToB3::boolify):
+ (JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
+ (JSC::FTL::DFG::LowerDFGToB3::contiguousPutByValOutOfBounds):
+ (JSC::FTL::DFG::LowerDFGToB3::switchString):
+ (JSC::FTL::DFG::LowerDFGToB3::switchStringRecurse):
+ (JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
+ (JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
+ (JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
+ (JSC::FTL::DFG::LowerDFGToB3::strictInt52ToJSValue):
+ (JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
+ (JSC::FTL::DFG::LowerDFGToB3::convertDoubleToInt32):
+ (JSC::FTL::DFG::LowerDFGToB3::speculate):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateString):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateRealNumber):
+ (JSC::FTL::DFG::LowerDFGToB3::speculateNotStringVar):
+ (JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
+ (JSC::FTL::DFG::LowerDFGToB3::callCheck):
+ * ftl/FTLOutput.cpp:
+ (JSC::FTL::Output::initialize):
+ (JSC::FTL::Output::newBlock):
+ (JSC::FTL::Output::check):
+ * ftl/FTLOutput.h:
+ (JSC::FTL::Output::setFrequency):
+ (JSC::FTL::Output::insertNewBlocksBefore):
+
2016-03-06 Saam Barati <sbarati@apple.com>
[[GetPrototypeOf]] should be a fully virtual method in the method table
diff --git a/Source/JavaScriptCore/bytecode/SpeculatedType.h b/Source/JavaScriptCore/bytecode/SpeculatedType.h
index be25180..1ebbeb1 100644
--- a/Source/JavaScriptCore/bytecode/SpeculatedType.h
+++ b/Source/JavaScriptCore/bytecode/SpeculatedType.h
@@ -149,6 +149,11 @@
return !!value && (value & SpecString) == value;
}
+inline bool isStringOrOtherSpeculation(SpeculatedType value)
+{
+ return !!value && (value & (SpecString | SpecOther)) == value;
+}
+
inline bool isSymbolSpeculation(SpeculatedType value)
{
return value == SpecSymbol;
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index e119bcd..cdd3e64 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -418,6 +418,8 @@
fixEdge<DoubleRepUse>(node->child1());
else if (node->child1()->shouldSpeculateString())
fixEdge<StringUse>(node->child1());
+ else if (node->child1()->shouldSpeculateStringOrOther())
+ fixEdge<StringOrOtherUse>(node->child1());
break;
}
@@ -923,6 +925,8 @@
fixEdge<DoubleRepUse>(node->child1());
else if (node->child1()->shouldSpeculateString())
fixEdge<StringUse>(node->child1());
+ else if (node->child1()->shouldSpeculateStringOrOther())
+ fixEdge<StringOrOtherUse>(node->child1());
break;
}
diff --git a/Source/JavaScriptCore/dfg/DFGNode.h b/Source/JavaScriptCore/dfg/DFGNode.h
index 1d9ed05..e29374f 100644
--- a/Source/JavaScriptCore/dfg/DFGNode.h
+++ b/Source/JavaScriptCore/dfg/DFGNode.h
@@ -1957,6 +1957,11 @@
return isStringSpeculation(prediction());
}
+ bool shouldSpeculateStringOrOther()
+ {
+ return isStringOrOtherSpeculation(prediction());
+ }
+
bool shouldSpeculateStringObject()
{
return isStringObjectSpeculation(prediction());
diff --git a/Source/JavaScriptCore/dfg/DFGSafeToExecute.h b/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
index a0dc5cb..0f0e633 100644
--- a/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
+++ b/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
@@ -61,6 +61,7 @@
case ObjectOrOtherUse:
case StringIdentUse:
case StringUse:
+ case StringOrOtherUse:
case SymbolUse:
case StringObjectUse:
case StringOrStringObjectUse:
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
index fbc1d29..52a3181 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
@@ -5130,6 +5130,30 @@
unblessedBooleanResult(eqGPR, node);
}
+void SpeculativeJIT::compileLogicalNotStringOrOther(Node* node)
+{
+ JSValueOperand value(this, node->child1(), ManualOperandSpeculation);
+ GPRTemporary temp(this);
+ JSValueRegs valueRegs = value.jsValueRegs();
+ GPRReg tempGPR = temp.gpr();
+
+ JITCompiler::Jump notCell = m_jit.branchIfNotCell(valueRegs);
+ GPRReg cellGPR = valueRegs.payloadGPR();
+ DFG_TYPE_CHECK(
+ valueRegs, node->child1(), (~SpecCell) | SpecString, m_jit.branchIfNotString(cellGPR));
+ m_jit.test32(
+ JITCompiler::Zero, JITCompiler::Address(cellGPR, JSString::offsetOfLength()),
+ JITCompiler::TrustedImm32(-1), tempGPR);
+ JITCompiler::Jump done = m_jit.jump();
+ notCell.link(&m_jit);
+ DFG_TYPE_CHECK(
+ valueRegs, node->child1(), SpecCell | SpecOther, m_jit.branchIfNotOther(valueRegs, tempGPR));
+ m_jit.move(TrustedImm32(1), tempGPR);
+ done.link(&m_jit);
+
+ unblessedBooleanResult(tempGPR, node);
+}
+
void SpeculativeJIT::emitStringBranch(Edge nodeUse, BasicBlock* taken, BasicBlock* notTaken)
{
SpeculateCellOperand str(this, nodeUse);
@@ -5139,6 +5163,27 @@
noResult(m_currentNode);
}
+void SpeculativeJIT::emitStringOrOtherBranch(Edge nodeUse, BasicBlock* taken, BasicBlock* notTaken)
+{
+ JSValueOperand value(this, nodeUse, ManualOperandSpeculation);
+ GPRTemporary temp(this);
+ JSValueRegs valueRegs = value.jsValueRegs();
+ GPRReg tempGPR = temp.gpr();
+
+ JITCompiler::Jump notCell = m_jit.branchIfNotCell(valueRegs);
+ GPRReg cellGPR = valueRegs.payloadGPR();
+ DFG_TYPE_CHECK(valueRegs, nodeUse, (~SpecCell) | SpecString, m_jit.branchIfNotString(cellGPR));
+ branchTest32(
+ JITCompiler::Zero, JITCompiler::Address(cellGPR, JSString::offsetOfLength()),
+ JITCompiler::TrustedImm32(-1), notTaken);
+ jump(taken, ForceJump);
+ notCell.link(&m_jit);
+ DFG_TYPE_CHECK(
+ valueRegs, nodeUse, SpecCell | SpecOther, m_jit.branchIfNotOther(valueRegs, tempGPR));
+ jump(notTaken);
+ noResult(m_currentNode);
+}
+
void SpeculativeJIT::compileConstantStoragePointer(Node* node)
{
GPRTemporary storage(this);
@@ -6674,11 +6719,9 @@
operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, m_jit.branchIfNotObject(gpr));
MacroAssembler::Jump done = m_jit.jump();
notCell.link(&m_jit);
- if (needsTypeCheck(edge, SpecCell | SpecOther)) {
- typeCheck(
- operand.jsValueRegs(), edge, SpecCell | SpecOther,
- m_jit.branchIfNotOther(operand.jsValueRegs(), tempGPR));
- }
+ DFG_TYPE_CHECK(
+ operand.jsValueRegs(), edge, SpecCell | SpecOther,
+ m_jit.branchIfNotOther(operand.jsValueRegs(), tempGPR));
done.link(&m_jit);
}
@@ -6688,6 +6731,29 @@
JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell, m_jit.branchIfNotString(cell));
}
+void SpeculativeJIT::speculateStringOrOther(Edge edge, JSValueRegs regs, GPRReg scratch)
+{
+ JITCompiler::Jump notCell = m_jit.branchIfNotCell(regs);
+ GPRReg cell = regs.payloadGPR();
+ DFG_TYPE_CHECK(regs, edge, (~SpecCell) | SpecString, m_jit.branchIfNotString(cell));
+ JITCompiler::Jump done = m_jit.jump();
+ notCell.link(&m_jit);
+ DFG_TYPE_CHECK(regs, edge, SpecCell | SpecOther, m_jit.branchIfNotOther(regs, scratch));
+ done.link(&m_jit);
+}
+
+void SpeculativeJIT::speculateStringOrOther(Edge edge)
+{
+ if (!needsTypeCheck(edge, SpecString | SpecOther))
+ return;
+
+ JSValueOperand operand(this, edge, ManualOperandSpeculation);
+ GPRTemporary temp(this);
+ JSValueRegs regs = operand.jsValueRegs();
+ GPRReg tempGPR = temp.gpr();
+ speculateStringOrOther(edge, regs, tempGPR);
+}
+
void SpeculativeJIT::speculateStringIdentAndLoadStorage(Edge edge, GPRReg string, GPRReg storage)
{
m_jit.loadPtr(MacroAssembler::Address(string, JSString::offsetOfValue()), storage);
@@ -6935,6 +7001,9 @@
case StringUse:
speculateString(edge);
break;
+ case StringOrOtherUse:
+ speculateStringOrOther(edge);
+ break;
case SymbolUse:
speculateSymbol(edge);
break;
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
index 2a81c1e..e6fbc53 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
@@ -2238,6 +2238,7 @@
void compileObjectToObjectOrOtherEquality(Edge leftChild, Edge rightChild);
void compileObjectOrOtherLogicalNot(Edge value);
void compileLogicalNot(Node*);
+ void compileLogicalNotStringOrOther(Node*);
void compileStringEquality(
Node*, GPRReg leftGPR, GPRReg rightGPR, GPRReg lengthGPR,
GPRReg leftTempGPR, GPRReg rightTempGPR, GPRReg leftTemp2GPR,
@@ -2257,6 +2258,7 @@
void emitObjectOrOtherBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
void emitStringBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
+ void emitStringOrOtherBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
void emitBranch(Node*);
struct StringSwitchCase {
@@ -2573,6 +2575,8 @@
void speculateStringIdent(Edge edge, GPRReg string);
void speculateStringIdent(Edge);
void speculateString(Edge);
+ void speculateStringOrOther(Edge, JSValueRegs, GPRReg scratch);
+ void speculateStringOrOther(Edge);
void speculateNotStringVar(Edge);
template<typename StructureLocationType>
void speculateStringObjectForStructure(Edge, StructureLocationType);
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
index 6ad47c1..514968c 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
@@ -1629,6 +1629,9 @@
case StringUse:
return compileStringZeroLength(node);
+ case StringOrOtherUse:
+ return compileLogicalNotStringOrOther(node);
+
default:
RELEASE_ASSERT_NOT_REACHED();
break;
@@ -1719,6 +1722,11 @@
return;
}
+ case StringOrOtherUse: {
+ emitStringOrOtherBranch(node->child1(), taken, notTaken);
+ return;
+ }
+
case DoubleRepUse:
case Int32Use: {
if (node->child1().useKind() == Int32Use) {
diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
index 51ba32c..13f10b0 100644
--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
+++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
@@ -1774,6 +1774,9 @@
case StringUse:
return compileStringZeroLength(node);
+ case StringOrOtherUse:
+ return compileLogicalNotStringOrOther(node);
+
default:
DFG_CRASH(m_jit.graph(), node, "Bad use kind");
break;
@@ -1875,6 +1878,11 @@
return;
}
+ case StringOrOtherUse: {
+ emitStringOrOtherBranch(node->child1(), taken, notTaken);
+ return;
+ }
+
case UntypedUse:
case BooleanUse:
case KnownBooleanUse: {
diff --git a/Source/JavaScriptCore/dfg/DFGUseKind.cpp b/Source/JavaScriptCore/dfg/DFGUseKind.cpp
index 3b9ad74..502a147 100644
--- a/Source/JavaScriptCore/dfg/DFGUseKind.cpp
+++ b/Source/JavaScriptCore/dfg/DFGUseKind.cpp
@@ -103,6 +103,9 @@
case StringUse:
out.print("String");
return;
+ case StringOrOtherUse:
+ out.print("StringOrOther");
+ return;
case KnownStringUse:
out.print("KnownString");
return;
diff --git a/Source/JavaScriptCore/dfg/DFGUseKind.h b/Source/JavaScriptCore/dfg/DFGUseKind.h
index 816c19e..41527f6 100644
--- a/Source/JavaScriptCore/dfg/DFGUseKind.h
+++ b/Source/JavaScriptCore/dfg/DFGUseKind.h
@@ -59,6 +59,7 @@
ObjectOrOtherUse,
StringIdentUse,
StringUse,
+ StringOrOtherUse,
KnownStringUse,
KnownPrimitiveUse, // This bizarre type arises for op_strcat, which has a bytecode guarantee that it will only see primitives (i.e. not objects).
SymbolUse,
@@ -127,6 +128,8 @@
case StringUse:
case KnownStringUse:
return SpecString;
+ case StringOrOtherUse:
+ return SpecString | SpecOther;
case KnownPrimitiveUse:
return SpecHeapTop & ~SpecObject;
case SymbolUse:
diff --git a/Source/JavaScriptCore/ftl/FTLCapabilities.cpp b/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
index 7840e7c..7d44cfd 100644
--- a/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
+++ b/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
@@ -463,6 +463,7 @@
case FunctionUse:
case ObjectOrOtherUse:
case StringUse:
+ case StringOrOtherUse:
case KnownStringUse:
case KnownPrimitiveUse:
case StringObjectUse:
diff --git a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
index 4de893c..ee204de 100644
--- a/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
+++ b/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
@@ -154,18 +154,18 @@
// We use prologue frequency for all of the initialization code.
m_out.setFrequency(1);
- m_prologue = FTL_NEW_BLOCK(m_out, ("Prologue"));
- LBasicBlock stackOverflow = FTL_NEW_BLOCK(m_out, ("Stack overflow"));
- m_handleExceptions = FTL_NEW_BLOCK(m_out, ("Handle Exceptions"));
+ m_prologue = m_out.newBlock();
+ LBasicBlock stackOverflow = m_out.newBlock();
+ m_handleExceptions = m_out.newBlock();
- LBasicBlock checkArguments = FTL_NEW_BLOCK(m_out, ("Check arguments"));
+ LBasicBlock checkArguments = m_out.newBlock();
for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
m_highBlock = m_graph.block(blockIndex);
if (!m_highBlock)
continue;
m_out.setFrequency(m_highBlock->executionCount);
- m_blocks.add(m_highBlock, FTL_NEW_BLOCK(m_out, ("Block ", *m_highBlock)));
+ m_blocks.add(m_highBlock, m_out.newBlock());
}
// Back to prologue frequency for any bocks that get sneakily created in the initialization code.
@@ -1052,8 +1052,8 @@
LValue doubleValue = unboxDouble(value);
- LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("DoubleRep RealNumberUse int case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("DoubleRep continuation"));
+ LBasicBlock intCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock fastResult = m_out.anchor(doubleValue);
m_out.branch(
@@ -1080,11 +1080,11 @@
LValue value = lowJSValue(m_node->child1(), ManualOperandSpeculation);
- LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing int case"));
- LBasicBlock doubleTesting = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing double case"));
- LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing double case"));
- LBasicBlock nonDoubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing undefined case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing continuation"));
+ LBasicBlock intCase = m_out.newBlock();
+ LBasicBlock doubleTesting = m_out.newBlock();
+ LBasicBlock doubleCase = m_out.newBlock();
+ LBasicBlock nonDoubleCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
isNotInt32(value, provenType(m_node->child1())),
@@ -1105,12 +1105,12 @@
m_out.jump(continuation);
if (shouldConvertNonNumber) {
- LBasicBlock undefinedCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble converting undefined case"));
- LBasicBlock testNullCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing null case"));
- LBasicBlock nullCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble converting null case"));
- LBasicBlock testBooleanTrueCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing boolean true case"));
- LBasicBlock convertBooleanTrueCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble convert boolean true case"));
- LBasicBlock convertBooleanFalseCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble convert boolean false case"));
+ LBasicBlock undefinedCase = m_out.newBlock();
+ LBasicBlock testNullCase = m_out.newBlock();
+ LBasicBlock nullCase = m_out.newBlock();
+ LBasicBlock testBooleanTrueCase = m_out.newBlock();
+ LBasicBlock convertBooleanTrueCase = m_out.newBlock();
+ LBasicBlock convertBooleanFalseCase = m_out.newBlock();
m_out.appendTo(nonDoubleCase, undefinedCase);
LValue valueIsUndefined = m_out.equal(value, m_out.constInt64(ValueUndefined));
@@ -1278,8 +1278,8 @@
return;
}
- LBasicBlock booleanCase = FTL_NEW_BLOCK(m_out, ("BooleanToNumber boolean case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("BooleanToNumber continuation"));
+ LBasicBlock booleanCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock notBooleanResult = m_out.anchor(value);
m_out.branch(
@@ -1387,9 +1387,9 @@
{
LValue value = lowJSValue(m_node->child1());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("ToThis is cell case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ToThis slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToThis continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
isCell(value, provenType(m_node->child1())), usually(isCellCase), rarely(slowCase));
@@ -1522,8 +1522,8 @@
}
if (shouldCheckNegativeZero(m_node->arithMode())) {
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation"));
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.notZero32(result), usually(continuation), rarely(slowCase));
@@ -1548,8 +1548,8 @@
blessSpeculation(result, Overflow, noValue(), nullptr, m_origin);
if (shouldCheckNegativeZero(m_node->arithMode())) {
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation"));
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.notZero64(result), usually(continuation), rarely(slowCase));
@@ -1590,8 +1590,8 @@
LValue denominator = lowInt32(m_node->child2());
if (shouldCheckNegativeZero(m_node->arithMode())) {
- LBasicBlock zeroNumerator = FTL_NEW_BLOCK(m_out, ("ArithDiv zero numerator"));
- LBasicBlock numeratorContinuation = FTL_NEW_BLOCK(m_out, ("ArithDiv numerator continuation"));
+ LBasicBlock zeroNumerator = m_out.newBlock();
+ LBasicBlock numeratorContinuation = m_out.newBlock();
m_out.branch(
m_out.isZero32(numerator),
@@ -1608,8 +1608,8 @@
}
if (shouldCheckOverflow(m_node->arithMode())) {
- LBasicBlock unsafeDenominator = FTL_NEW_BLOCK(m_out, ("ArithDiv unsafe denominator"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithDiv continuation"));
+ LBasicBlock unsafeDenominator = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue adjustedDenominator = m_out.add(denominator, m_out.int32One);
m_out.branch(
@@ -1660,8 +1660,8 @@
LValue remainder;
if (shouldCheckOverflow(m_node->arithMode())) {
- LBasicBlock unsafeDenominator = FTL_NEW_BLOCK(m_out, ("ArithMod unsafe denominator"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMod continuation"));
+ LBasicBlock unsafeDenominator = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue adjustedDenominator = m_out.add(denominator, m_out.int32One);
m_out.branch(
@@ -1681,8 +1681,8 @@
remainder = m_out.chillMod(numerator, denominator);
if (shouldCheckNegativeZero(m_node->arithMode())) {
- LBasicBlock negativeNumerator = FTL_NEW_BLOCK(m_out, ("ArithMod negative numerator"));
- LBasicBlock numeratorContinuation = FTL_NEW_BLOCK(m_out, ("ArithMod numerator continuation"));
+ LBasicBlock negativeNumerator = m_out.newBlock();
+ LBasicBlock numeratorContinuation = m_out.newBlock();
m_out.branch(
m_out.lessThan(numerator, m_out.int32Zero),
@@ -1733,8 +1733,8 @@
LValue left = lowDouble(m_node->child1());
LValue right = lowDouble(m_node->child2());
- LBasicBlock notLessThan = FTL_NEW_BLOCK(m_out, ("ArithMin/ArithMax not less than"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMin/ArithMax continuation"));
+ LBasicBlock notLessThan = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 2> results;
@@ -1803,14 +1803,14 @@
LValue base = lowDouble(m_node->child1());
LValue exponent = lowDouble(m_node->child2());
- LBasicBlock integerExponentIsSmallBlock = FTL_NEW_BLOCK(m_out, ("ArithPow test integer exponent is small."));
- LBasicBlock integerExponentPowBlock = FTL_NEW_BLOCK(m_out, ("ArithPow pow(double, (int)double)."));
- LBasicBlock doubleExponentPowBlockEntry = FTL_NEW_BLOCK(m_out, ("ArithPow pow(double, double)."));
- LBasicBlock nanExceptionExponentIsInfinity = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, check exponent is infinity."));
- LBasicBlock nanExceptionBaseIsOne = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, check base is one."));
- LBasicBlock powBlock = FTL_NEW_BLOCK(m_out, ("ArithPow regular pow"));
- LBasicBlock nanExceptionResultIsNaN = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, result is NaN."));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithPow continuation"));
+ LBasicBlock integerExponentIsSmallBlock = m_out.newBlock();
+ LBasicBlock integerExponentPowBlock = m_out.newBlock();
+ LBasicBlock doubleExponentPowBlockEntry = m_out.newBlock();
+ LBasicBlock nanExceptionExponentIsInfinity = m_out.newBlock();
+ LBasicBlock nanExceptionBaseIsOne = m_out.newBlock();
+ LBasicBlock powBlock = m_out.newBlock();
+ LBasicBlock nanExceptionResultIsNaN = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue integerExponent = m_out.doubleToInt(exponent);
LValue integerExponentConvertedToDouble = m_out.intToDouble(integerExponent);
@@ -1914,8 +1914,8 @@
LValue value = lowDouble(m_node->child1());
result = m_out.doubleFloor(m_out.doubleAdd(value, m_out.constDouble(0.5)));
} else {
- LBasicBlock realPartIsMoreThanHalf = FTL_NEW_BLOCK(m_out, ("ArithRound should round down"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithRound continuation"));
+ LBasicBlock realPartIsMoreThanHalf = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue value = lowDouble(m_node->child1());
LValue integerValue = m_out.doubleCeil(value);
@@ -2120,9 +2120,9 @@
case CellOrOtherUse: {
LValue value = lowJSValue(m_node->child1(), ManualOperandSpeculation);
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse cell case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
isCell(value, provenType(m_node->child1())), unsure(cellCase), unsure(notCellCase));
@@ -2195,8 +2195,8 @@
LValue cell = lowCell(m_node->child1());
LValue property = !!m_node->child2() ? lowInt32(m_node->child2()) : 0;
- LBasicBlock unexpectedStructure = FTL_NEW_BLOCK(m_out, ("ArrayifyToStructure unexpected structure"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayifyToStructure continuation"));
+ LBasicBlock unexpectedStructure = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID);
@@ -2278,9 +2278,9 @@
// https://bugs.webkit.org/show_bug.cgi?id=127830
LValue value = lowJSValue(m_node->child1());
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("GetById untyped cell case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("GetById untyped not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetById untyped continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
isCell(value, provenType(m_node->child1())), unsure(cellCase), unsure(notCellCase));
@@ -2397,8 +2397,8 @@
LValue cell = lowCell(m_node->child1());
if (m_node->arrayMode().type() == Array::String) {
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("GetIndexedPropertyStorage String slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetIndexedPropertyStorage String continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue fastResultValue = m_out.loadPtr(cell, m_heaps.JSString_value);
ValueFromBlock fastResult = m_out.anchor(fastResultValue);
@@ -2439,9 +2439,9 @@
{
LValue basePtr = lowCell(m_node->child1());
- LBasicBlock simpleCase = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset wasteless typed array"));
- LBasicBlock wastefulCase = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset wasteful typed array"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset continuation"));
+ LBasicBlock simpleCase = m_out.newBlock();
+ LBasicBlock wastefulCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue mode = m_out.load32(basePtr, m_heaps.JSArrayBufferView_mode);
m_out.branch(
@@ -2549,9 +2549,9 @@
LValue base = lowCell(m_node->child1());
- LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous fast case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous continuation"));
+ LBasicBlock fastCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(
@@ -2596,10 +2596,10 @@
LValue base = lowCell(m_node->child1());
- LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetByVal double in bounds"));
- LBasicBlock boxPath = FTL_NEW_BLOCK(m_out, ("GetByVal double boxing"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetByVal double slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal double continuation"));
+ LBasicBlock inBounds = m_out.newBlock();
+ LBasicBlock boxPath = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(
@@ -2667,9 +2667,9 @@
LValue table = m_out.loadPtr(base, m_heaps.ScopedArguments_table);
LValue namedLength = m_out.load32(table, m_heaps.ScopedArgumentsTable_length);
- LBasicBlock namedCase = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments named case"));
- LBasicBlock overflowCase = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments overflow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments continuation"));
+ LBasicBlock namedCase = m_out.newBlock();
+ LBasicBlock overflowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(index, namedLength), unsure(overflowCase), unsure(namedCase));
@@ -2875,7 +2875,7 @@
case Array::Int32:
case Array::Double:
case Array::Contiguous: {
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal continuation"));
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock outerLastNext = m_out.appendTo(m_out.m_block, continuation);
switch (m_node->arrayMode().type()) {
@@ -2969,8 +2969,8 @@
if (isClamped(type)) {
ASSERT(elementSize(type) == 1);
- LBasicBlock atLeastZero = FTL_NEW_BLOCK(m_out, ("PutByVal int clamp atLeastZero"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal int clamp continuation"));
+ LBasicBlock atLeastZero = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 2> intValues;
intValues.append(m_out.anchor(m_out.int32Zero));
@@ -2998,9 +2998,9 @@
if (isClamped(type)) {
ASSERT(elementSize(type) == 1);
- LBasicBlock atLeastZero = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp atLeastZero"));
- LBasicBlock withinRange = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp withinRange"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp continuation"));
+ LBasicBlock atLeastZero = m_out.newBlock();
+ LBasicBlock withinRange = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 3> intValues;
intValues.append(m_out.anchor(m_out.int32Zero));
@@ -3062,8 +3062,8 @@
if (m_node->arrayMode().isInBounds() || m_node->op() == PutByValAlias)
m_out.store(valueToStore, pointer, storeType);
else {
- LBasicBlock isInBounds = FTL_NEW_BLOCK(m_out, ("PutByVal typed array in bounds case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal typed array continuation"));
+ LBasicBlock isInBounds = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(index, lowInt32(child5)),
@@ -3149,9 +3149,9 @@
LValue prevLength = m_out.load32(storage, m_heaps.Butterfly_publicLength);
- LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("ArrayPush fast path"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("ArrayPush slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayPush continuation"));
+ LBasicBlock fastPath = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(
@@ -3199,9 +3199,9 @@
case Array::Contiguous: {
IndexedAbstractHeap& heap = m_heaps.forArrayType(m_node->arrayMode().type());
- LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("ArrayPop fast case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArrayPop slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayPop continuation"));
+ LBasicBlock fastCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue prevLength = m_out.load32(storage, m_heaps.Butterfly_publicLength);
@@ -3261,8 +3261,8 @@
return;
}
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CreateActivation slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CreateActivation continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -3320,8 +3320,8 @@
isGeneratorFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->generatorFunctionStructure() :
m_graph.globalObjectFor(m_node->origin.semantic)->functionStructure();
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("NewFunction slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewFunction continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -3375,8 +3375,8 @@
unsigned minCapacity = m_graph.baselineCodeBlockFor(m_node->origin.semantic)->numParameters() - 1;
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -3433,8 +3433,8 @@
} else {
LValue stackBase = getArgumentsStart();
- LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments loop body"));
- LBasicBlock end = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments loop end"));
+ LBasicBlock loop = m_out.newBlock();
+ LBasicBlock end = m_out.newBlock();
ValueFromBlock originalLength;
if (minCapacity) {
@@ -3493,8 +3493,8 @@
void compileCopyRest()
{
- LBasicBlock doCopyRest = FTL_NEW_BLOCK(m_out, ("CopyRest C call"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("FillRestParameter continuation"));
+ LBasicBlock doCopyRest = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue arrayLength = lowInt32(m_node->child2());
@@ -3515,8 +3515,8 @@
void compileGetRestLength()
{
- LBasicBlock nonZeroLength = FTL_NEW_BLOCK(m_out, ("GetRestLength non zero"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetRestLength continuation"));
+ LBasicBlock nonZeroLength = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock zeroLengthResult = m_out.anchor(m_out.constInt32(0));
@@ -3672,11 +3672,11 @@
|| hasDouble(structure->indexingType())
|| hasContiguous(structure->indexingType()));
- LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize fast case"));
- LBasicBlock largeCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize large case"));
- LBasicBlock failCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize fail case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize continuation"));
+ LBasicBlock fastCase = m_out.newBlock();
+ LBasicBlock largeCase = m_out.newBlock();
+ LBasicBlock failCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(publicLength, m_out.constInt32(MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH)),
@@ -3703,8 +3703,8 @@
m_out.store32(vectorLength, butterfly, m_heaps.Butterfly_vectorLength);
if (hasDouble(m_node->indexingType())) {
- LBasicBlock initLoop = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize double init loop"));
- LBasicBlock initDone = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize double init done"));
+ LBasicBlock initLoop = m_out.newBlock();
+ LBasicBlock initDone = m_out.newBlock();
ValueFromBlock originalIndex = m_out.anchor(vectorLength);
ValueFromBlock originalPointer = m_out.anchor(butterfly);
@@ -3777,10 +3777,10 @@
LValue size = lowInt32(m_node->child1());
- LBasicBlock smallEnoughCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray small enough case"));
- LBasicBlock nonZeroCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray non-zero case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewTypedArray continuation"));
+ LBasicBlock smallEnoughCase = m_out.newBlock();
+ LBasicBlock nonZeroCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.above(size, m_out.constInt32(JSArrayBufferView::fastSizeLimit)),
@@ -3879,8 +3879,8 @@
LValue cell = lowCell(m_node->child1());
LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID);
- LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("ToString StringOrStringObject not string case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToString StringOrStringObject continuation"));
+ LBasicBlock notString = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock simpleResult = m_out.anchor(cell);
m_out.branch(
@@ -3908,9 +3908,9 @@
else
value = lowJSValue(m_node->child1());
- LBasicBlock isCell = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse is cell"));
- LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse not string"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse continuation"));
+ LBasicBlock isCell = m_out.newBlock();
+ LBasicBlock notString = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue isCellPredicate;
if (m_node->child1().useKind() == CellUse)
@@ -3952,9 +3952,9 @@
{
LValue value = lowJSValue(m_node->child1());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("ToPrimitive cell case"));
- LBasicBlock isObjectCase = FTL_NEW_BLOCK(m_out, ("ToPrimitive object case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToPrimitive continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock isObjectCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 3> results;
@@ -3991,8 +3991,8 @@
numKids = 2;
}
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MakeRope slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MakeRope continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -4062,9 +4062,9 @@
LValue index = lowInt32(m_node->child2());
LValue storage = lowStorage(m_node->child3());
- LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("GetByVal String fast path"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("GetByVal String slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal String continuation"));
+ LBasicBlock fastPath = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(
@@ -4075,10 +4075,10 @@
LValue stringImpl = m_out.loadPtr(base, m_heaps.JSString_value);
- LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("GetByVal String 8-bit case"));
- LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("GetByVal String 16-bit case"));
- LBasicBlock bitsContinuation = FTL_NEW_BLOCK(m_out, ("GetByVal String bitness continuation"));
- LBasicBlock bigCharacter = FTL_NEW_BLOCK(m_out, ("GetByVal String big character"));
+ LBasicBlock is8Bit = m_out.newBlock();
+ LBasicBlock is16Bit = m_out.newBlock();
+ LBasicBlock bitsContinuation = m_out.newBlock();
+ LBasicBlock bigCharacter = m_out.newBlock();
m_out.branch(
m_out.testIsZero32(
@@ -4140,7 +4140,7 @@
m_graph.watchpoints().addLazily(globalObject->stringPrototype()->structure()->transitionWatchpointSet());
m_graph.watchpoints().addLazily(globalObject->objectPrototype()->structure()->transitionWatchpointSet());
- LBasicBlock negativeIndex = FTL_NEW_BLOCK(m_out, ("GetByVal String negative index"));
+ LBasicBlock negativeIndex = m_out.newBlock();
results.append(m_out.anchor(m_out.constInt64(JSValue::encode(jsUndefined()))));
m_out.branch(
@@ -4162,9 +4162,9 @@
void compileStringCharCodeAt()
{
- LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt 8-bit case"));
- LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt 16-bit case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt continuation"));
+ LBasicBlock is8Bit = m_out.newBlock();
+ LBasicBlock is16Bit = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue base = lowCell(m_node->child1());
LValue index = lowInt32(m_node->child2());
@@ -4220,9 +4220,9 @@
LValue value = lowInt32(childEdge);
- LBasicBlock smallIntCase = FTL_NEW_BLOCK(m_out, ("StringFromCharCode small int case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("StringFromCharCode slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("StringFromCharCode continuation"));
+ LBasicBlock smallIntCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.aboveOrEqual(value, m_out.constInt32(0xff)),
@@ -4282,9 +4282,9 @@
Vector<LBasicBlock, 2> blocks(data.cases.size());
for (unsigned i = data.cases.size(); i--;)
- blocks[i] = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset case ", i));
- LBasicBlock exit = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset fail"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset continuation"));
+ blocks[i] = m_out.newBlock();
+ LBasicBlock exit = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<SwitchCase, 2> cases;
StructureSet baseSet;
@@ -4364,9 +4364,9 @@
Vector<LBasicBlock, 2> blocks(data.variants.size());
for (unsigned i = data.variants.size(); i--;)
- blocks[i] = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset case ", i));
- LBasicBlock exit = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset fail"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset continuation"));
+ blocks[i] = m_out.newBlock();
+ LBasicBlock exit = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<SwitchCase, 2> cases;
StructureSet baseSet;
@@ -4439,8 +4439,8 @@
{
WatchpointSet* set = m_node->watchpointSet();
- LBasicBlock isNotInvalidated = FTL_NEW_BLOCK(m_out, ("NotifyWrite not invalidated case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NotifyWrite continuation"));
+ LBasicBlock isNotInvalidated = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue state = m_out.load8ZeroExt32(m_out.absolute(set->addressOfState()));
m_out.branch(
@@ -4597,8 +4597,8 @@
LValue left = lowCell(m_node->child1());
LValue right = lowCell(m_node->child2());
- LBasicBlock notTriviallyEqualCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq/String not trivially equal case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareStrictEq/String continuation"));
+ LBasicBlock notTriviallyEqualCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
speculateString(m_node->child1(), left);
@@ -4675,9 +4675,9 @@
LValue left = lowStringIdent(leftEdge);
LValue rightValue = lowJSValue(rightEdge, ManualOperandSpeculation);
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar is cell case"));
- LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar is string case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock isStringCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
m_out.branch(
@@ -5293,10 +5293,10 @@
LValue sourceStart = getArgumentsStart(inlineCallFrame);
LValue targetStart = addressFor(data->machineStart).value();
- LBasicBlock undefinedLoop = FTL_NEW_BLOCK(m_out, ("ForwardVarargs undefined loop body"));
- LBasicBlock mainLoopEntry = FTL_NEW_BLOCK(m_out, ("ForwardVarargs main loop entry"));
- LBasicBlock mainLoop = FTL_NEW_BLOCK(m_out, ("ForwardVarargs main loop body"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ForwardVarargs continuation"));
+ LBasicBlock undefinedLoop = m_out.newBlock();
+ LBasicBlock mainLoopEntry = m_out.newBlock();
+ LBasicBlock mainLoop = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue lengthAsPtr = m_out.zeroExtPtr(length);
LValue loopBoundValue = m_out.constIntPtr(data->mandatoryMinimum);
@@ -5357,7 +5357,7 @@
switch (data->kind) {
case SwitchImm: {
Vector<ValueFromBlock, 2> intValues;
- LBasicBlock switchOnInts = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm int case"));
+ LBasicBlock switchOnInts = m_out.newBlock();
LBasicBlock lastNext = m_out.appendTo(m_out.m_block, switchOnInts);
@@ -5369,9 +5369,9 @@
}
case UntypedUse: {
- LBasicBlock isInt = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is int"));
- LBasicBlock isNotInt = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is not int"));
- LBasicBlock isDouble = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is double"));
+ LBasicBlock isInt = m_out.newBlock();
+ LBasicBlock isNotInt = m_out.newBlock();
+ LBasicBlock isDouble = m_out.newBlock();
LValue boxedValue = lowJSValue(m_node->child1());
m_out.branch(isNotInt32(boxedValue), unsure(isNotInt), unsure(isInt));
@@ -5424,8 +5424,8 @@
case UntypedUse: {
LValue unboxedValue = lowJSValue(m_node->child1());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar is cell"));
- LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar is string"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock isStringCase = m_out.newBlock();
m_out.branch(
isNotCell(unboxedValue, provenType(m_node->child1())),
@@ -5447,12 +5447,12 @@
break;
}
- LBasicBlock lengthIs1 = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar length is 1"));
- LBasicBlock needResolution = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar resolution"));
- LBasicBlock resolved = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar resolved"));
- LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar 8bit"));
- LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar 16bit"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar continuation"));
+ LBasicBlock lengthIs1 = m_out.newBlock();
+ LBasicBlock needResolution = m_out.newBlock();
+ LBasicBlock resolved = m_out.newBlock();
+ LBasicBlock is8Bit = m_out.newBlock();
+ LBasicBlock is16Bit = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.notEqual(
@@ -5521,8 +5521,8 @@
case UntypedUse: {
LValue value = lowJSValue(m_node->child1());
- LBasicBlock isCellBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString Untyped cell case"));
- LBasicBlock isStringBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString Untyped string case"));
+ LBasicBlock isCellBlock = m_out.newBlock();
+ LBasicBlock isStringBlock = m_out.newBlock();
m_out.branch(
isCell(value, provenType(m_node->child1())),
@@ -5557,7 +5557,7 @@
case UntypedUse: {
LValue value = lowJSValue(m_node->child1());
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchCell cell case"));
+ LBasicBlock cellCase = m_out.newBlock();
m_out.branch(
isCell(value, provenType(m_node->child1())),
unsure(cellCase), unsure(lowBlock(data->fallThrough.block)));
@@ -5667,8 +5667,8 @@
{
LValue value = lowJSValue(m_node->child1());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsString cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsString continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
m_out.branch(
@@ -5686,8 +5686,8 @@
{
LValue value = lowJSValue(m_node->child1());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsObject cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObject continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
m_out.branch(
@@ -5708,12 +5708,12 @@
Edge child = m_node->child1();
LValue value = lowJSValue(child);
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull cell case"));
- LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull not function case"));
- LBasicBlock objectCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull object case"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull slow path"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notFunctionCase = m_out.newBlock();
+ LBasicBlock objectCase = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isCell(value, provenType(child)), unsure(cellCase), unsure(notCellCase));
@@ -5764,10 +5764,10 @@
Edge child = m_node->child1();
LValue value = lowJSValue(child);
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("IsFunction cell case"));
- LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("IsFunction not function case"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("IsFunction slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsFunction continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notFunctionCase = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
m_out.branch(
@@ -5806,7 +5806,7 @@
Edge child = m_node->child1();
LValue value = lowJSValue(child);
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("TypeOf continuation"));
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
Vector<ValueFromBlock> results;
@@ -5903,8 +5903,8 @@
LValue constructor = lowCell(m_node->child1());
LValue hasInstance = lowJSValue(m_node->child2());
- LBasicBlock defaultHasInstance = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance Symbol.hasInstance is default"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance continuation"));
+ LBasicBlock defaultHasInstance = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
// Unlike in the DFG, we don't worry about cleaning this code up for the case where we have proven the hasInstanceValue is a constant as B3 should fix it for us.
@@ -5943,10 +5943,10 @@
LValue prototype = lowCell(m_node->child2());
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("InstanceOf cell case"));
- LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("InstanceOf loop"));
- LBasicBlock notYetInstance = FTL_NEW_BLOCK(m_out, ("InstanceOf not yet instance"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("InstanceOf continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock loop = m_out.newBlock();
+ LBasicBlock notYetInstance = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock loadPrototypeDirect = FTL_NEW_BLOCK(m_out, ("Instanceof defaultPrototypeFunction"));
LBasicBlock defaultHasInstanceSlow = FTL_NEW_BLOCK(m_out, ("Instanceof defaultPrototypeFunction"));
@@ -6031,9 +6031,9 @@
IndexedAbstractHeap& heap = m_node->arrayMode().type() == Array::Int32 ?
m_heaps.indexedInt32Properties : m_heaps.indexedContiguousProperties;
- LBasicBlock checkHole = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous check hole"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous continuation"));
+ LBasicBlock checkHole = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
if (!m_node->arrayMode().isInBounds()) {
m_out.branch(
@@ -6066,9 +6066,9 @@
IndexedAbstractHeap& heap = m_heaps.indexedDoubleProperties;
- LBasicBlock checkHole = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double check hole"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double continuation"));
+ LBasicBlock checkHole = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
if (!m_node->arrayMode().isInBounds()) {
m_out.branch(
@@ -6114,9 +6114,9 @@
LValue property = lowString(m_node->child2());
LValue enumerator = lowCell(m_node->child3());
- LBasicBlock correctStructure = FTL_NEW_BLOCK(m_out, ("HasStructureProperty correct structure"));
- LBasicBlock wrongStructure = FTL_NEW_BLOCK(m_out, ("HasStructureProperty wrong structure"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasStructureProperty continuation"));
+ LBasicBlock correctStructure = m_out.newBlock();
+ LBasicBlock wrongStructure = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(m_out.notEqual(
m_out.load32(base, m_heaps.JSCell_structureID),
@@ -6145,11 +6145,11 @@
LValue index = lowInt32(m_graph.varArgChild(m_node, 2));
LValue enumerator = lowCell(m_graph.varArgChild(m_node, 3));
- LBasicBlock checkOffset = FTL_NEW_BLOCK(m_out, ("GetDirectPname check offset"));
- LBasicBlock inlineLoad = FTL_NEW_BLOCK(m_out, ("GetDirectPname inline load"));
- LBasicBlock outOfLineLoad = FTL_NEW_BLOCK(m_out, ("GetDirectPname out-of-line load"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetDirectPname slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetDirectPname continuation"));
+ LBasicBlock checkOffset = m_out.newBlock();
+ LBasicBlock inlineLoad = m_out.newBlock();
+ LBasicBlock outOfLineLoad = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(m_out.notEqual(
m_out.load32(base, m_heaps.JSCell_structureID),
@@ -6201,9 +6201,9 @@
LValue enumerator = lowCell(m_node->child1());
LValue index = lowInt32(m_node->child2());
- LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname in bounds"));
- LBasicBlock outOfBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname out of bounds"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname continuation"));
+ LBasicBlock inBounds = m_out.newBlock();
+ LBasicBlock outOfBounds = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(m_out.below(index, m_out.load32(enumerator, m_heaps.JSPropertyNameEnumerator_endStructurePropertyIndex)),
usually(inBounds), rarely(outOfBounds));
@@ -6227,9 +6227,9 @@
LValue enumerator = lowCell(m_node->child1());
LValue index = lowInt32(m_node->child2());
- LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname in bounds"));
- LBasicBlock outOfBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname out of bounds"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname continuation"));
+ LBasicBlock inBounds = m_out.newBlock();
+ LBasicBlock outOfBounds = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(m_out.below(index, m_out.load32(enumerator, m_heaps.JSPropertyNameEnumerator_endGenericPropertyIndex)),
usually(inBounds), rarely(outOfBounds));
@@ -6278,9 +6278,9 @@
Vector<LBasicBlock, 1> blocks(set.size());
for (unsigned i = set.size(); i--;)
- blocks[i] = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject case ", i));
- LBasicBlock dummyDefault = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject default case"));
- LBasicBlock outerContinuation = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject continuation"));
+ blocks[i] = m_out.newBlock();
+ LBasicBlock dummyDefault = m_out.newBlock();
+ LBasicBlock outerContinuation = m_out.newBlock();
Vector<SwitchCase, 1> cases(set.size());
for (unsigned i = set.size(); i--;)
@@ -6304,8 +6304,8 @@
size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity());
MarkedAllocator* allocator = &vm().heap.allocatorForObjectWithoutDestructor(allocationSize);
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject complex object allocation slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject complex object allocation continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -6384,8 +6384,8 @@
ASSERT(table == m_graph.varArgChild(m_node, 0)->castConstant<SymbolTable*>());
Structure* structure = m_graph.globalObjectFor(m_node->origin.semantic)->activationStructure();
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MaterializeCreateActivation slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MaterializeCreateActivation continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -6445,8 +6445,8 @@
void compileCheckWatchdogTimer()
{
- LBasicBlock timerDidFire = FTL_NEW_BLOCK(m_out, ("CheckWatchdogTimer timer did fire"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CheckWatchdogTimer continuation"));
+ LBasicBlock timerDidFire = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue state = m_out.load8ZeroExt32(m_out.absolute(vm().watchdog()->timerDidFireAddress()));
m_out.branch(m_out.isZero32(state),
@@ -6712,11 +6712,11 @@
return;
}
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkStructure continuation"));
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
for (unsigned i = 0; i < set.size() - 1; ++i) {
- LBasicBlock nextStructure = FTL_NEW_BLOCK(m_out, ("checkStructure nextStructure"));
+ LBasicBlock nextStructure = m_out.newBlock();
m_out.branch(
m_out.equal(structureDiscriminant, weakStructureDiscriminant(set[i])),
unsure(continuation), unsure(nextStructure));
@@ -6733,15 +6733,15 @@
LValue numberOrNotCellToInt32(Edge edge, LValue value)
{
- LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 int case"));
- LBasicBlock notIntCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 not int case"));
+ LBasicBlock intCase = m_out.newBlock();
+ LBasicBlock notIntCase = m_out.newBlock();
LBasicBlock doubleCase = 0;
LBasicBlock notNumberCase = 0;
if (edge.useKind() == NotCellUse) {
- doubleCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 double case"));
- notNumberCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 not number case"));
+ doubleCase = m_out.newBlock();
+ notNumberCase = m_out.newBlock();
}
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ValueToInt32 continuation"));
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock> results;
@@ -6845,9 +6845,9 @@
return;
case InferredType::ObjectWithStructureOrOther: {
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther cell case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
@@ -6881,9 +6881,9 @@
return;
case InferredType::ObjectOrOther: {
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther cell case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
@@ -7002,8 +7002,8 @@
LValue allocatePropertyStorageWithSizeImpl(size_t sizeInValues)
{
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("allocatePropertyStorageWithSizeImpl slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocatePropertyStorageWithSizeImpl continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -7122,8 +7122,8 @@
return copyBarrier(
fastResultValue,
[&] () -> LValue {
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("loadVectorWithBarrier slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("loadVectorWithBarrier continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock fastResult = m_out.anchor(fastResultValue);
m_out.branch(isFastTypedArray(object), rarely(slowPath), usually(continuation));
@@ -7160,8 +7160,8 @@
template<typename Functor>
LValue copyBarrier(LValue pointer, const Functor& functor)
{
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("copyBarrier slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("copyBarrier continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock fastResult = m_out.anchor(pointer);
m_out.branch(isInToSpace(pointer), usually(continuation), rarely(slowPath));
@@ -7189,8 +7189,8 @@
{
LValue fastResultValue = m_out.loadPtr(object, m_heaps.JSArrayBufferView_vector);
- LBasicBlock possiblyFromSpace = FTL_NEW_BLOCK(m_out, ("loadVectorReadOnly possibly from space"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("loadVectorReadOnly continuation"));
+ LBasicBlock possiblyFromSpace = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
ValueFromBlock fastResult = m_out.anchor(fastResultValue);
@@ -7269,9 +7269,9 @@
speculateTruthyObject(rightChild, rightCell, SpecObject);
- LBasicBlock leftCellCase = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject left cell case"));
- LBasicBlock leftNotCellCase = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject left not cell case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject continuation"));
+ LBasicBlock leftCellCase = m_out.newBlock();
+ LBasicBlock leftNotCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
isCell(leftValue, provenType(leftChild)),
@@ -7313,10 +7313,10 @@
LValue left = lowJSValue(m_node->child1());
LValue right = lowJSValue(m_node->child2());
- LBasicBlock leftIsInt = FTL_NEW_BLOCK(m_out, ("CompareEq untyped left is int"));
- LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("CompareEq untyped fast path"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CompareEq untyped slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareEq untyped continuation"));
+ LBasicBlock leftIsInt = m_out.newBlock();
+ LBasicBlock fastPath = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isNotInt32(left), rarely(slowPath), usually(leftIsInt));
@@ -7338,18 +7338,18 @@
LValue stringsEqual(LValue leftJSString, LValue rightJSString)
{
- LBasicBlock notTriviallyUnequalCase = FTL_NEW_BLOCK(m_out, ("stringsEqual not trivially unequal case"));
- LBasicBlock notEmptyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual not empty case"));
- LBasicBlock leftReadyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual left ready case"));
- LBasicBlock rightReadyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual right ready case"));
- LBasicBlock left8BitCase = FTL_NEW_BLOCK(m_out, ("stringsEqual left 8-bit case"));
- LBasicBlock right8BitCase = FTL_NEW_BLOCK(m_out, ("stringsEqual right 8-bit case"));
- LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("stringsEqual loop"));
- LBasicBlock bytesEqual = FTL_NEW_BLOCK(m_out, ("stringsEqual bytes equal"));
- LBasicBlock trueCase = FTL_NEW_BLOCK(m_out, ("stringsEqual true case"));
- LBasicBlock falseCase = FTL_NEW_BLOCK(m_out, ("stringsEqual false case"));
- LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("stringsEqual slow case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("stringsEqual continuation"));
+ LBasicBlock notTriviallyUnequalCase = m_out.newBlock();
+ LBasicBlock notEmptyCase = m_out.newBlock();
+ LBasicBlock leftReadyCase = m_out.newBlock();
+ LBasicBlock rightReadyCase = m_out.newBlock();
+ LBasicBlock left8BitCase = m_out.newBlock();
+ LBasicBlock right8BitCase = m_out.newBlock();
+ LBasicBlock loop = m_out.newBlock();
+ LBasicBlock bytesEqual = m_out.newBlock();
+ LBasicBlock trueCase = m_out.newBlock();
+ LBasicBlock falseCase = m_out.newBlock();
+ LBasicBlock slowCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue length = m_out.load32(leftJSString, m_heaps.JSString_length);
@@ -7624,7 +7624,7 @@
LValue allocateCell(LValue allocator, LBasicBlock slowPath)
{
- LBasicBlock success = FTL_NEW_BLOCK(m_out, ("object allocation success"));
+ LBasicBlock success = m_out.newBlock();
LValue result;
LValue condition;
@@ -7694,10 +7694,10 @@
LValue subspace = m_out.constIntPtr(&vm().heap.subspaceForObjectOfType<ClassType>());
- LBasicBlock smallCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject small case"));
- LBasicBlock largeOrOversizeCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject large or oversize case"));
- LBasicBlock largeCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject large case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject continuation"));
+ LBasicBlock smallCaseBlock = m_out.newBlock();
+ LBasicBlock largeOrOversizeCaseBlock = m_out.newBlock();
+ LBasicBlock largeCaseBlock = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue uproundedSize = m_out.add(size, m_out.constInt32(MarkedSpace::preciseStep - 1));
LValue isSmall = m_out.below(uproundedSize, m_out.constInt32(MarkedSpace::preciseCutoff));
@@ -7733,7 +7733,7 @@
{
CopiedAllocator& allocator = vm().heap.storageAllocator();
- LBasicBlock success = FTL_NEW_BLOCK(m_out, ("storage allocation success"));
+ LBasicBlock success = m_out.newBlock();
LValue remaining = m_out.loadPtr(m_out.absolute(&allocator.m_currentRemaining));
LValue newRemaining = m_out.sub(remaining, size);
@@ -7759,8 +7759,8 @@
size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity());
MarkedAllocator* allocator = &vm().heap.allocatorForObjectWithoutDestructor(allocationSize);
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("allocateObject slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocateObject continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -7837,8 +7837,8 @@
ArrayValues allocateJSArray(Structure* structure, unsigned numElements)
{
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("JSArray allocation slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("JSArray allocation continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
@@ -7889,6 +7889,31 @@
LValue length = m_out.load32NonNegative(stringValue, m_heaps.JSString_length);
return m_out.notEqual(length, m_out.int32Zero);
}
+ case StringOrOtherUse: {
+ LValue value = lowJSValue(edge, ManualOperandSpeculation);
+
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
+
+ m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
+
+ LBasicBlock lastNext = m_out.appendTo(cellCase, notCellCase);
+
+ FTL_TYPE_CHECK(jsValueValue(value), edge, (~SpecCell) | SpecString, isNotString(value));
+ LValue length = m_out.load32NonNegative(value, m_heaps.JSString_length);
+ ValueFromBlock cellResult = m_out.anchor(m_out.notEqual(length, m_out.int32Zero));
+ m_out.jump(continuation);
+
+ m_out.appendTo(notCellCase, continuation);
+
+ FTL_TYPE_CHECK(jsValueValue(value), edge, SpecCell | SpecOther, isNotOther(value));
+ ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
+ m_out.jump(continuation);
+ m_out.appendTo(continuation, lastNext);
+
+ return m_out.phi(Int32, cellResult, notCellResult);
+ }
case UntypedUse: {
LValue value = lowJSValue(edge);
@@ -7908,15 +7933,15 @@
// result = value == jsTrue
// }
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped cell case"));
- LBasicBlock stringCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped string case"));
- LBasicBlock notStringCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not string case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not cell case"));
- LBasicBlock int32Case = FTL_NEW_BLOCK(m_out, ("Boolify untyped int32 case"));
- LBasicBlock notInt32Case = FTL_NEW_BLOCK(m_out, ("Boolify untyped not int32 case"));
- LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped double case"));
- LBasicBlock notDoubleCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not double case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Boolify untyped continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock stringCase = m_out.newBlock();
+ LBasicBlock notStringCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock int32Case = m_out.newBlock();
+ LBasicBlock notInt32Case = m_out.newBlock();
+ LBasicBlock doubleCase = m_out.newBlock();
+ LBasicBlock notDoubleCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock> results;
@@ -7938,7 +7963,7 @@
if (masqueradesAsUndefinedWatchpointIsStillValid())
isTruthyObject = m_out.booleanTrue;
else {
- LBasicBlock masqueradesCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped masquerades case"));
+ LBasicBlock masqueradesCase = m_out.newBlock();
results.append(m_out.anchor(m_out.booleanTrue));
@@ -8010,9 +8035,9 @@
LValue value = lowJSValue(edge, operandMode);
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined cell case"));
- LBasicBlock primitiveCase = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined primitive case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock primitiveCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isNotCell(value, provenType(edge)), unsure(primitiveCase), unsure(cellCase));
@@ -8034,7 +8059,7 @@
m_out.jump(continuation);
} else {
LBasicBlock masqueradesCase =
- FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined masquerades case"));
+ m_out.newBlock();
results.append(m_out.anchor(m_out.booleanFalse));
@@ -8091,9 +8116,9 @@
index, m_out.load32NonNegative(storage, m_heaps.Butterfly_publicLength));
if (!m_node->arrayMode().isInBounds()) {
LBasicBlock notInBoundsCase =
- FTL_NEW_BLOCK(m_out, ("PutByVal not in bounds"));
+ m_out.newBlock();
LBasicBlock performStore =
- FTL_NEW_BLOCK(m_out, ("PutByVal perform store"));
+ m_out.newBlock();
m_out.branch(isNotInBounds, unsure(notInBoundsCase), unsure(performStore));
@@ -8106,9 +8131,9 @@
speculate(OutOfBounds, noValue(), 0, isOutOfBounds);
else {
LBasicBlock outOfBoundsCase =
- FTL_NEW_BLOCK(m_out, ("PutByVal out of bounds"));
+ m_out.newBlock();
LBasicBlock holeCase =
- FTL_NEW_BLOCK(m_out, ("PutByVal hole case"));
+ m_out.newBlock();
m_out.branch(isOutOfBounds, rarely(outOfBoundsCase), usually(holeCase));
@@ -8183,9 +8208,9 @@
LValue stringImpl = m_out.loadPtr(string, m_heaps.JSString_value);
LValue length = m_out.load32(string, m_heaps.JSString_length);
- LBasicBlock hasImplBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString has impl case"));
- LBasicBlock is8BitBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString is 8 bit case"));
- LBasicBlock slowBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString slow case"));
+ LBasicBlock hasImplBlock = m_out.newBlock();
+ LBasicBlock is8BitBlock = m_out.newBlock();
+ LBasicBlock slowBlock = m_out.newBlock();
m_out.branch(m_out.isNull(stringImpl), unsure(slowBlock), unsure(hasImplBlock));
@@ -8360,8 +8385,8 @@
characterCases.append(currentCase);
Vector<LBasicBlock> characterBlocks;
- for (CharacterCase& myCase : characterCases)
- characterBlocks.append(FTL_NEW_BLOCK(m_out, ("Switch/SwitchString case for ", myCase.character, " at index ", commonChars)));
+ for (unsigned i = characterCases.size(); i--;)
+ characterBlocks.append(m_out.newBlock());
Vector<SwitchCase> switchCases;
for (unsigned i = 0; i < characterCases.size(); ++i) {
@@ -8455,7 +8480,7 @@
// contination and set it as the nextBlock (m_out.insertNewBlocksBefore(continuation)) before
// calling this. For example:
//
- // LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("My continuation"));
+ // LBasicBlock continuation = m_out.newBlock();
// LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
// buildTypeOf(
// child, value,
@@ -8495,22 +8520,22 @@
// return undefined
// }
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf cell case"));
- LBasicBlock objectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf object case"));
- LBasicBlock functionCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf function case"));
- LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not function case"));
- LBasicBlock reallyObjectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf really object case"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("buildTypeOf slow path"));
- LBasicBlock unreachable = FTL_NEW_BLOCK(m_out, ("buildTypeOf unreachable"));
- LBasicBlock notObjectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not object case"));
- LBasicBlock stringCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf string case"));
- LBasicBlock symbolCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf symbol case"));
- LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not cell case"));
- LBasicBlock numberCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf number case"));
- LBasicBlock notNumberCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not number case"));
- LBasicBlock notNullCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not null case"));
- LBasicBlock booleanCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf boolean case"));
- LBasicBlock undefinedCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf undefined case"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock objectCase = m_out.newBlock();
+ LBasicBlock functionCase = m_out.newBlock();
+ LBasicBlock notFunctionCase = m_out.newBlock();
+ LBasicBlock reallyObjectCase = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock unreachable = m_out.newBlock();
+ LBasicBlock notObjectCase = m_out.newBlock();
+ LBasicBlock stringCase = m_out.newBlock();
+ LBasicBlock symbolCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock numberCase = m_out.newBlock();
+ LBasicBlock notNumberCase = m_out.newBlock();
+ LBasicBlock notNullCase = m_out.newBlock();
+ LBasicBlock booleanCase = m_out.newBlock();
+ LBasicBlock undefinedCase = m_out.newBlock();
m_out.branch(isCell(value, provenType(child)), unsure(cellCase), unsure(notCellCase));
@@ -8590,10 +8615,10 @@
LValue doubleToInt32(LValue doubleValue, double low, double high, bool isSigned = true)
{
- LBasicBlock greatEnough = FTL_NEW_BLOCK(m_out, ("doubleToInt32 greatEnough"));
- LBasicBlock withinRange = FTL_NEW_BLOCK(m_out, ("doubleToInt32 withinRange"));
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("doubleToInt32 slowPath"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("doubleToInt32 continuation"));
+ LBasicBlock greatEnough = m_out.newBlock();
+ LBasicBlock withinRange = m_out.newBlock();
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 2> results;
@@ -8634,8 +8659,8 @@
LValue sensibleDoubleToInt32(LValue doubleValue)
{
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("sensible doubleToInt32 slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("sensible doubleToInt32 continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue fastResultValue = m_out.doubleToInt(doubleValue);
ValueFromBlock fastResult = m_out.anchor(fastResultValue);
@@ -9149,9 +9174,9 @@
LValue strictInt52ToJSValue(LValue value)
{
- LBasicBlock isInt32 = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue isInt32 case"));
- LBasicBlock isDouble = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue isDouble case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue continuation"));
+ LBasicBlock isInt32 = m_out.newBlock();
+ LBasicBlock isDouble = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
Vector<ValueFromBlock, 2> results;
@@ -9229,9 +9254,9 @@
LValue jsValueToStrictInt52(Edge edge, LValue boxedValue)
{
- LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing int case"));
- LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing double case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing continuation"));
+ LBasicBlock intCase = m_out.newBlock();
+ LBasicBlock doubleCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue isNotInt32;
if (!m_interpreter.needsTypeCheck(edge, SpecInt32))
@@ -9283,8 +9308,8 @@
speculate(Overflow, FormattedValue(DataFormatDouble, value), m_node, valueNotConvertibleToInteger);
if (shouldCheckNegativeZero) {
- LBasicBlock valueIsZero = FTL_NEW_BLOCK(m_out, ("ConvertDoubleToInt32 on zero"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ConvertDoubleToInt32 continuation"));
+ LBasicBlock valueIsZero = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(m_out.isZero32(integerValue), unsure(valueIsZero), unsure(continuation));
LBasicBlock lastNext = m_out.appendTo(valueIsZero, continuation);
@@ -9437,6 +9462,9 @@
case StringUse:
speculateString(edge);
break;
+ case StringOrOtherUse:
+ speculateStringOrOther(edge);
+ break;
case StringIdentUse:
speculateStringIdent(edge);
break;
@@ -9500,8 +9528,8 @@
{
LValue value = lowJSValue(edge, ManualOperandSpeculation);
- LBasicBlock isNotCell = FTL_NEW_BLOCK(m_out, ("Speculate CellOrOther not cell"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate CellOrOther continuation"));
+ LBasicBlock isNotCell = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isCell(value, provenType(edge)), unsure(continuation), unsure(isNotCell));
@@ -9676,9 +9704,9 @@
LValue value = lowJSValue(edge, ManualOperandSpeculation);
- LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther cell case"));
- LBasicBlock primitiveCase = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther primitive case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther continuation"));
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock primitiveCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isNotCell(value, provenType(edge)), unsure(primitiveCase), unsure(cellCase));
@@ -9731,6 +9759,32 @@
speculateString(edge, lowCell(edge));
}
+ void speculateStringOrOther(Edge edge, LValue value)
+ {
+ LBasicBlock cellCase = m_out.newBlock();
+ LBasicBlock notCellCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
+
+ m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
+
+ LBasicBlock lastNext = m_out.appendTo(cellCase, notCellCase);
+
+ FTL_TYPE_CHECK(jsValueValue(value), edge, (~SpecCell) | SpecString, isNotString(value));
+
+ m_out.jump(continuation);
+ m_out.appendTo(notCellCase, continuation);
+
+ FTL_TYPE_CHECK(jsValueValue(value), edge, SpecCell | SpecOther, isNotOther(value));
+
+ m_out.jump(continuation);
+ m_out.appendTo(continuation, lastNext);
+ }
+
+ void speculateStringOrOther(Edge edge)
+ {
+ speculateStringOrOther(edge, lowJSValue(edge, ManualOperandSpeculation));
+ }
+
void speculateStringIdent(Edge edge, LValue string, LValue stringImpl)
{
if (!m_interpreter.needsTypeCheck(edge, SpecStringIdent | ~SpecString))
@@ -9764,8 +9818,8 @@
if (!m_interpreter.needsTypeCheck(edge, SpecString | SpecStringObject))
return;
- LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("Speculate StringOrStringObject not string case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate StringOrStringObject continuation"));
+ LBasicBlock notString = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
LValue structureID = m_out.load32(lowCell(edge), m_heaps.JSCell_structureID);
m_out.branch(
@@ -9837,8 +9891,8 @@
LValue value = lowJSValue(edge, ManualOperandSpeculation);
LValue doubleValue = unboxDouble(value);
- LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("speculateRealNumber int case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("speculateRealNumber continuation"));
+ LBasicBlock intCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.doubleEqual(doubleValue, doubleValue),
@@ -9886,9 +9940,9 @@
LValue value = lowJSValue(edge, ManualOperandSpeculation);
- LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar is cell case"));
- LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar is string case"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar continuation"));
+ LBasicBlock isCellCase = m_out.newBlock();
+ LBasicBlock isStringCase = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(isCell(value, provenType(edge)), unsure(isCellCase), unsure(continuation));
@@ -9941,8 +9995,8 @@
void emitStoreBarrier(LValue base)
{
- LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("Store barrier slow path"));
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Store barrier continuation"));
+ LBasicBlock slowPath = m_out.newBlock();
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
m_out.notZero32(loadCellState(base)), usually(continuation), rarely(slowPath));
@@ -10065,7 +10119,7 @@
return;
}
- LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Exception check continuation"));
+ LBasicBlock continuation = m_out.newBlock();
m_out.branch(
hadException, rarely(m_handleExceptions), usually(continuation));
diff --git a/Source/JavaScriptCore/ftl/FTLOutput.cpp b/Source/JavaScriptCore/ftl/FTLOutput.cpp
index b4ae275..c4f2861 100644
--- a/Source/JavaScriptCore/ftl/FTLOutput.cpp
+++ b/Source/JavaScriptCore/ftl/FTLOutput.cpp
@@ -49,7 +49,7 @@
m_heaps = &heaps;
}
-LBasicBlock Output::newBlock(const char*)
+LBasicBlock Output::newBlock()
{
LBasicBlock result = m_proc.addBlock(m_frequency);
@@ -232,7 +232,7 @@
void Output::check(LValue condition, WeightedTarget taken, Weight notTakenWeight)
{
- LBasicBlock continuation = FTL_NEW_BLOCK(*this, ("Output::check continuation"));
+ LBasicBlock continuation = newBlock();
branch(condition, taken, WeightedTarget(continuation, notTakenWeight));
appendTo(continuation);
}
diff --git a/Source/JavaScriptCore/ftl/FTLOutput.h b/Source/JavaScriptCore/ftl/FTLOutput.h
index a6487e5..dd50c24 100644
--- a/Source/JavaScriptCore/ftl/FTLOutput.h
+++ b/Source/JavaScriptCore/ftl/FTLOutput.h
@@ -82,7 +82,7 @@
m_frequency = value;
}
- LBasicBlock newBlock(const char* name = "");
+ LBasicBlock newBlock();
LBasicBlock insertNewBlocksBefore(LBasicBlock nextBlock)
{
@@ -524,11 +524,6 @@
#pragma GCC diagnostic pop
#endif // COMPILER(GCC_OR_CLANG)
-#define FTL_NEW_BLOCK(output, nameArguments) \
- (LIKELY(!verboseCompilationEnabled()) \
- ? (output).newBlock() \
- : (output).newBlock((toCString nameArguments).data()))
-
} } // namespace JSC::FTL
#endif // ENABLE(FTL_JIT)