Source/JavaScriptCore/ChangeLog

 12016-03-06 Filip Pizlo <fpizlo@apple.com>
 2
 3 DFG should know how to speculate StringOrOther
 4 https://bugs.webkit.org/show_bug.cgi?id=155094
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Any code that processes the regexp matches array was previously doing a relatively expensive
 9 Branch(Untyped:). This introduces a new use kind called StringOrOther, which is perfect for
 10 code that loops over the matches array and branches on the entries being non-empty.
 11
 12 To do this, I needed to introduce code into the FTL that creates new blocks. We still had that
 13 awful FTL_NEW_BLOCK idiom since the only way to debug LLVM IR was to ascribe names to basic
 14 blocks. B3 IR is inherently more debuggable since unlike LLVM, B3 knows how to always respect
 15 code origin, and it knows how to print the code origin nicely in the dumps. So, rather than
 16 continue using FTL_NEW_BLOCK(m_out, ("things")), I replaced all of that stuff with
 17 m_out.newBlock(). It's much nicer that way.
 18
 19 This is a tiny speed-up on Octane/regexp at best. I was hoping for more. Oh well.
 20
 21 * bytecode/SpeculatedType.h:
 22 (JSC::isStringSpeculation):
 23 (JSC::isStringOrOtherSpeculation):
 24 (JSC::isSymbolSpeculation):
 25 * dfg/DFGFixupPhase.cpp:
 26 (JSC::DFG::FixupPhase::fixupNode):
 27 * dfg/DFGNode.h:
 28 (JSC::DFG::Node::shouldSpeculateString):
 29 (JSC::DFG::Node::shouldSpeculateStringOrOther):
 30 (JSC::DFG::Node::shouldSpeculateStringObject):
 31 * dfg/DFGSafeToExecute.h:
 32 (JSC::DFG::SafeToExecuteEdge::operator()):
 33 * dfg/DFGSpeculativeJIT.cpp:
 34 (JSC::DFG::SpeculativeJIT::compileStringZeroLength):
 35 (JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
 36 (JSC::DFG::SpeculativeJIT::emitStringBranch):
 37 (JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
 38 (JSC::DFG::SpeculativeJIT::compileConstantStoragePointer):
 39 (JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
 40 (JSC::DFG::SpeculativeJIT::speculateString):
 41 (JSC::DFG::SpeculativeJIT::speculateStringOrOther):
 42 (JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
 43 (JSC::DFG::SpeculativeJIT::speculate):
 44 * dfg/DFGSpeculativeJIT.h:
 45 * dfg/DFGSpeculativeJIT32_64.cpp:
 46 (JSC::DFG::SpeculativeJIT::compileLogicalNot):
 47 (JSC::DFG::SpeculativeJIT::emitBranch):
 48 * dfg/DFGSpeculativeJIT64.cpp:
 49 (JSC::DFG::SpeculativeJIT::compileLogicalNot):
 50 (JSC::DFG::SpeculativeJIT::emitBranch):
 51 * dfg/DFGUseKind.cpp:
 52 (WTF::printInternal):
 53 * dfg/DFGUseKind.h:
 54 (JSC::DFG::typeFilterFor):
 55 * ftl/FTLCapabilities.cpp:
 56 (JSC::FTL::canCompile):
 57 * ftl/FTLLowerDFGToB3.cpp:
 58 (JSC::FTL::DFG::LowerDFGToB3::lower):
 59 (JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
 60 (JSC::FTL::DFG::LowerDFGToB3::compileBooleanToNumber):
 61 (JSC::FTL::DFG::LowerDFGToB3::compileToThis):
 62 (JSC::FTL::DFG::LowerDFGToB3::compileArithMul):
 63 (JSC::FTL::DFG::LowerDFGToB3::compileArithDiv):
 64 (JSC::FTL::DFG::LowerDFGToB3::compileArithMod):
 65 (JSC::FTL::DFG::LowerDFGToB3::compileArithMinOrMax):
 66 (JSC::FTL::DFG::LowerDFGToB3::compileArithPow):
 67 (JSC::FTL::DFG::LowerDFGToB3::compileArithRound):
 68 (JSC::FTL::DFG::LowerDFGToB3::compileCheckStructure):
 69 (JSC::FTL::DFG::LowerDFGToB3::compileArrayifyToStructure):
 70 (JSC::FTL::DFG::LowerDFGToB3::compileGetById):
 71 (JSC::FTL::DFG::LowerDFGToB3::compileGetIndexedPropertyStorage):
 72 (JSC::FTL::DFG::LowerDFGToB3::compileGetTypedArrayByteOffset):
 73 (JSC::FTL::DFG::LowerDFGToB3::compileGetByVal):
 74 (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
 75 (JSC::FTL::DFG::LowerDFGToB3::compileArrayPush):
 76 (JSC::FTL::DFG::LowerDFGToB3::compileArrayPop):
 77 (JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
 78 (JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
 79 (JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
 80 (JSC::FTL::DFG::LowerDFGToB3::compileCopyRest):
 81 (JSC::FTL::DFG::LowerDFGToB3::compileGetRestLength):
 82 (JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
 83 (JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
 84 (JSC::FTL::DFG::LowerDFGToB3::compileToStringOrCallStringConstructor):
 85 (JSC::FTL::DFG::LowerDFGToB3::compileToPrimitive):
 86 (JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
 87 (JSC::FTL::DFG::LowerDFGToB3::compileStringCharAt):
 88 (JSC::FTL::DFG::LowerDFGToB3::compileStringCharCodeAt):
 89 (JSC::FTL::DFG::LowerDFGToB3::compileStringFromCharCode):
 90 (JSC::FTL::DFG::LowerDFGToB3::compileMultiGetByOffset):
 91 (JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
 92 (JSC::FTL::DFG::LowerDFGToB3::compileNotifyWrite):
 93 (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):
 94 (JSC::FTL::DFG::LowerDFGToB3::compileForwardVarargs):
 95 (JSC::FTL::DFG::LowerDFGToB3::compileSwitch):
 96 (JSC::FTL::DFG::LowerDFGToB3::compileIsString):
 97 (JSC::FTL::DFG::LowerDFGToB3::compileIsObject):
 98 (JSC::FTL::DFG::LowerDFGToB3::compileIsObjectOrNull):
 99 (JSC::FTL::DFG::LowerDFGToB3::compileIsFunction):
 100 (JSC::FTL::DFG::LowerDFGToB3::compileTypeOf):
 101 (JSC::FTL::DFG::LowerDFGToB3::compileOverridesHasInstance):
 102 (JSC::FTL::DFG::LowerDFGToB3::compileInstanceOf):
 103 (JSC::FTL::DFG::LowerDFGToB3::compileHasIndexedProperty):
 104 (JSC::FTL::DFG::LowerDFGToB3::compileHasStructureProperty):
 105 (JSC::FTL::DFG::LowerDFGToB3::compileGetDirectPname):
 106 (JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorStructurePname):
 107 (JSC::FTL::DFG::LowerDFGToB3::compileGetEnumeratorGenericPname):
 108 (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
 109 (JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
 110 (JSC::FTL::DFG::LowerDFGToB3::compileCheckWatchdogTimer):
 111 (JSC::FTL::DFG::LowerDFGToB3::checkStructure):
 112 (JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
 113 (JSC::FTL::DFG::LowerDFGToB3::checkInferredType):
 114 (JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorageWithSizeImpl):
 115 (JSC::FTL::DFG::LowerDFGToB3::loadVectorWithBarrier):
 116 (JSC::FTL::DFG::LowerDFGToB3::copyBarrier):
 117 (JSC::FTL::DFG::LowerDFGToB3::loadVectorReadOnly):
 118 (JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
 119 (JSC::FTL::DFG::LowerDFGToB3::nonSpeculativeCompare):
 120 (JSC::FTL::DFG::LowerDFGToB3::stringsEqual):
 121 (JSC::FTL::DFG::LowerDFGToB3::allocateCell):
 122 (JSC::FTL::DFG::LowerDFGToB3::allocateVariableSizedObject):
 123 (JSC::FTL::DFG::LowerDFGToB3::allocateBasicStorageAndGetEnd):
 124 (JSC::FTL::DFG::LowerDFGToB3::allocateObject):
 125 (JSC::FTL::DFG::LowerDFGToB3::allocateJSArray):
 126 (JSC::FTL::DFG::LowerDFGToB3::boolify):
 127 (JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
 128 (JSC::FTL::DFG::LowerDFGToB3::contiguousPutByValOutOfBounds):
 129 (JSC::FTL::DFG::LowerDFGToB3::switchString):
 130 (JSC::FTL::DFG::LowerDFGToB3::switchStringRecurse):
 131 (JSC::FTL::DFG::LowerDFGToB3::buildTypeOf):
 132 (JSC::FTL::DFG::LowerDFGToB3::doubleToInt32):
 133 (JSC::FTL::DFG::LowerDFGToB3::sensibleDoubleToInt32):
 134 (JSC::FTL::DFG::LowerDFGToB3::strictInt52ToJSValue):
 135 (JSC::FTL::DFG::LowerDFGToB3::jsValueToStrictInt52):
 136 (JSC::FTL::DFG::LowerDFGToB3::convertDoubleToInt32):
 137 (JSC::FTL::DFG::LowerDFGToB3::speculate):
 138 (JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
 139 (JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
 140 (JSC::FTL::DFG::LowerDFGToB3::speculateString):
 141 (JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
 142 (JSC::FTL::DFG::LowerDFGToB3::speculateStringIdent):
 143 (JSC::FTL::DFG::LowerDFGToB3::speculateStringOrStringObject):
 144 (JSC::FTL::DFG::LowerDFGToB3::speculateRealNumber):
 145 (JSC::FTL::DFG::LowerDFGToB3::speculateNotStringVar):
 146 (JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
 147 (JSC::FTL::DFG::LowerDFGToB3::callCheck):
 148 * ftl/FTLOutput.cpp:
 149 (JSC::FTL::Output::initialize):
 150 (JSC::FTL::Output::newBlock):
 151 (JSC::FTL::Output::check):
 152 * ftl/FTLOutput.h:
 153 (JSC::FTL::Output::setFrequency):
 154 (JSC::FTL::Output::insertNewBlocksBefore):
 155
11562016-03-06 Filip Pizlo <fpizlo@apple.com>
2157
3158 RegExpMatchesArray doesn't know how to have a bad time
197642

Source/JavaScriptCore/bytecode/SpeculatedType.h

@@inline bool isStringSpeculation(Speculat
149149 return !!value && (value & SpecString) == value;
150150}
151151
 152inline bool isStringOrOtherSpeculation(SpeculatedType value)
 153{
 154 return !!value && (value & (SpecString | SpecOther)) == value;
 155}
 156
152157inline bool isSymbolSpeculation(SpeculatedType value)
153158{
154159 return value == SpecSymbol;
197641

Source/JavaScriptCore/dfg/DFGFixupPhase.cpp

@@private:
418418 fixEdge<DoubleRepUse>(node->child1());
419419 else if (node->child1()->shouldSpeculateString())
420420 fixEdge<StringUse>(node->child1());
 421 else if (node->child1()->shouldSpeculateStringOrOther())
 422 fixEdge<StringOrOtherUse>(node->child1());
421423 break;
422424 }
423425

@@private:
923925 fixEdge<DoubleRepUse>(node->child1());
924926 else if (node->child1()->shouldSpeculateString())
925927 fixEdge<StringUse>(node->child1());
 928 else if (node->child1()->shouldSpeculateStringOrOther())
 929 fixEdge<StringOrOtherUse>(node->child1());
926930 break;
927931 }
928932
197641

Source/JavaScriptCore/dfg/DFGNode.h

@@struct Node {
19571957 return isStringSpeculation(prediction());
19581958 }
19591959
 1960 bool shouldSpeculateStringOrOther()
 1961 {
 1962 return isStringOrOtherSpeculation(prediction());
 1963 }
 1964
19601965 bool shouldSpeculateStringObject()
19611966 {
19621967 return isStringObjectSpeculation(prediction());
197641

Source/JavaScriptCore/dfg/DFGSafeToExecute.h

@@public:
6161 case ObjectOrOtherUse:
6262 case StringIdentUse:
6363 case StringUse:
 64 case StringOrOtherUse:
6465 case SymbolUse:
6566 case StringObjectUse:
6667 case StringOrStringObjectUse:
197641

Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

@@void SpeculativeJIT::compileLogicalNot(N
16291629 case StringUse:
16301630 return compileStringZeroLength(node);
16311631
 1632 case StringOrOtherUse:
 1633 return compileLogicalNotStringOrOther(node);
 1634
16321635 default:
16331636 RELEASE_ASSERT_NOT_REACHED();
16341637 break;

@@void SpeculativeJIT::emitBranch(Node* no
17191722 return;
17201723 }
17211724
 1725 case StringOrOtherUse: {
 1726 emitStringOrOtherBranch(node->child1(), taken, notTaken);
 1727 return;
 1728 }
 1729
17221730 case DoubleRepUse:
17231731 case Int32Use: {
17241732 if (node->child1().useKind() == Int32Use) {
197641

Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

@@void SpeculativeJIT::compileLogicalNot(N
17741774 case StringUse:
17751775 return compileStringZeroLength(node);
17761776
 1777 case StringOrOtherUse:
 1778 return compileLogicalNotStringOrOther(node);
 1779
17771780 default:
17781781 DFG_CRASH(m_jit.graph(), node, "Bad use kind");
17791782 break;

@@void SpeculativeJIT::emitBranch(Node* no
18751878 return;
18761879 }
18771880
 1881 case StringOrOtherUse: {
 1882 emitStringOrOtherBranch(node->child1(), taken, notTaken);
 1883 return;
 1884 }
 1885
18781886 case UntypedUse:
18791887 case BooleanUse:
18801888 case KnownBooleanUse: {
197641

Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

@@void SpeculativeJIT::compileStringZeroLe
51175117 unblessedBooleanResult(eqGPR, node);
51185118}
51195119
 5120void SpeculativeJIT::compileLogicalNotStringOrOther(Node* node)
 5121{
 5122 JSValueOperand value(this, node->child1());
 5123 GPRTemporary temp(this);
 5124 JSValueRegs valueRegs = value.jsValueRegs();
 5125 GPRReg tempGPR = temp.gpr();
 5126
 5127 JITCompiler::Jump notCell = m_jit.branchIfNotCell(valueRegs);
 5128 GPRReg cellGPR = valueRegs.payloadGPR();
 5129 DFG_TYPE_CHECK(
 5130 valueRegs, node->child1(), (~SpecCell) | SpecString, m_jit.branchIfNotString(cellGPR));
 5131 m_jit.test32(
 5132 JITCompiler::Zero, JITCompiler::Address(cellGPR, JSString::offsetOfLength()),
 5133 JITCompiler::TrustedImm32(-1), tempGPR);
 5134 JITCompiler::Jump done = m_jit.jump();
 5135 notCell.link(&m_jit);
 5136 DFG_TYPE_CHECK(
 5137 valueRegs, node->child1(), SpecCell | SpecOther, m_jit.branchIfNotOther(valueRegs, tempGPR));
 5138 m_jit.move(TrustedImm32(1), tempGPR);
 5139 done.link(&m_jit);
 5140
 5141 unblessedBooleanResult(tempGPR, node);
 5142}
 5143
51205144void SpeculativeJIT::emitStringBranch(Edge nodeUse, BasicBlock* taken, BasicBlock* notTaken)
51215145{
51225146 SpeculateCellOperand str(this, nodeUse);

@@void SpeculativeJIT::emitStringBranch(Ed
51265150 noResult(m_currentNode);
51275151}
51285152
 5153void SpeculativeJIT::emitStringOrOtherBranch(Edge nodeUse, BasicBlock* taken, BasicBlock* notTaken)
 5154{
 5155 JSValueOperand value(this, nodeUse);
 5156 GPRTemporary temp(this);
 5157 JSValueRegs valueRegs = value.jsValueRegs();
 5158 GPRReg tempGPR = temp.gpr();
 5159
 5160 JITCompiler::Jump notCell = m_jit.branchIfNotCell(valueRegs);
 5161 GPRReg cellGPR = valueRegs.payloadGPR();
 5162 DFG_TYPE_CHECK(valueRegs, nodeUse, (~SpecCell) | SpecString, m_jit.branchIfNotString(cellGPR));
 5163 branchTest32(
 5164 JITCompiler::Zero, JITCompiler::Address(cellGPR, JSString::offsetOfLength()),
 5165 JITCompiler::TrustedImm32(-1), notTaken);
 5166 jump(taken, ForceJump);
 5167 notCell.link(&m_jit);
 5168 DFG_TYPE_CHECK(
 5169 valueRegs, nodeUse, SpecCell | SpecOther, m_jit.branchIfNotOther(valueRegs, tempGPR));
 5170 jump(notTaken);
 5171 noResult(m_currentNode);
 5172}
 5173
51295174void SpeculativeJIT::compileConstantStoragePointer(Node* node)
51305175{
51315176 GPRTemporary storage(this);

@@void SpeculativeJIT::speculateObjectOrOt
66616706 operand.jsValueRegs(), edge, (~SpecCell) | SpecObject, m_jit.branchIfNotObject(gpr));
66626707 MacroAssembler::Jump done = m_jit.jump();
66636708 notCell.link(&m_jit);
6664  if (needsTypeCheck(edge, SpecCell | SpecOther)) {
6665  typeCheck(
6666  operand.jsValueRegs(), edge, SpecCell | SpecOther,
6667  m_jit.branchIfNotOther(operand.jsValueRegs(), tempGPR));
6668  }
 6709 DFG_TYPE_CHECK(
 6710 operand.jsValueRegs(), edge, SpecCell | SpecOther,
 6711 m_jit.branchIfNotOther(operand.jsValueRegs(), tempGPR));
66696712 done.link(&m_jit);
66706713}
66716714

@@void SpeculativeJIT::speculateString(Edg
66756718 JSValueSource::unboxedCell(cell), edge, SpecString | ~SpecCell, m_jit.branchIfNotString(cell));
66766719}
66776720
 6721void SpeculativeJIT::speculateStringOrOther(Edge edge, JSValueRegs regs, GPRReg scratch)
 6722{
 6723 JITCompiler::Jump notCell = m_jit.branchIfNotCell(regs);
 6724 GPRReg cell = regs.payloadGPR();
 6725 DFG_TYPE_CHECK(regs, edge, (~SpecCell) | SpecString, m_jit.branchIfNotString(cell));
 6726 JITCompiler::Jump done = m_jit.jump();
 6727 notCell.link(&m_jit);
 6728 DFG_TYPE_CHECK(regs, edge, SpecCell | SpecOther, m_jit.branchIfNotOther(regs, scratch));
 6729 done.link(&m_jit);
 6730}
 6731
 6732void SpeculativeJIT::speculateStringOrOther(Edge edge)
 6733{
 6734 if (!needsTypeCheck(edge, SpecString | SpecOther))
 6735 return;
 6736
 6737 JSValueOperand operand(this, edge, ManualOperandSpeculation);
 6738 GPRTemporary temp(this);
 6739 JSValueRegs regs = operand.jsValueRegs();
 6740 GPRReg tempGPR = temp.gpr();
 6741 speculateStringOrOther(edge, regs, tempGPR);
 6742}
 6743
66786744void SpeculativeJIT::speculateStringIdentAndLoadStorage(Edge edge, GPRReg string, GPRReg storage)
66796745{
66806746 m_jit.loadPtr(MacroAssembler::Address(string, JSString::offsetOfValue()), storage);

@@void SpeculativeJIT::speculate(Node*, Ed
69226988 case StringUse:
69236989 speculateString(edge);
69246990 break;
 6991 case StringOrOtherUse:
 6992 speculateStringOrOther(edge);
 6993 break;
69256994 case SymbolUse:
69266995 speculateSymbol(edge);
69276996 break;
197641

Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

@@public:
22382238 void compileObjectToObjectOrOtherEquality(Edge leftChild, Edge rightChild);
22392239 void compileObjectOrOtherLogicalNot(Edge value);
22402240 void compileLogicalNot(Node*);
 2241 void compileLogicalNotStringOrOther(Node*);
22412242 void compileStringEquality(
22422243 Node*, GPRReg leftGPR, GPRReg rightGPR, GPRReg lengthGPR,
22432244 GPRReg leftTempGPR, GPRReg rightTempGPR, GPRReg leftTemp2GPR,

@@public:
22572258
22582259 void emitObjectOrOtherBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
22592260 void emitStringBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
 2261 void emitStringOrOtherBranch(Edge value, BasicBlock* taken, BasicBlock* notTaken);
22602262 void emitBranch(Node*);
22612263
22622264 struct StringSwitchCase {

@@public:
25732575 void speculateStringIdent(Edge edge, GPRReg string);
25742576 void speculateStringIdent(Edge);
25752577 void speculateString(Edge);
 2578 void speculateStringOrOther(Edge, JSValueRegs, GPRReg scratch);
 2579 void speculateStringOrOther(Edge);
25762580 void speculateNotStringVar(Edge);
25772581 template<typename StructureLocationType>
25782582 void speculateStringObjectForStructure(Edge, StructureLocationType);
197641

Source/JavaScriptCore/dfg/DFGUseKind.cpp

@@void printInternal(PrintStream& out, Use
103103 case StringUse:
104104 out.print("String");
105105 return;
 106 case StringOrOtherUse:
 107 out.print("StringOrOther");
 108 return;
106109 case KnownStringUse:
107110 out.print("KnownString");
108111 return;
197641

Source/JavaScriptCore/dfg/DFGUseKind.h

@@enum UseKind {
5959 ObjectOrOtherUse,
6060 StringIdentUse,
6161 StringUse,
 62 StringOrOtherUse,
6263 KnownStringUse,
6364 KnownPrimitiveUse, // This bizarre type arises for op_strcat, which has a bytecode guarantee that it will only see primitives (i.e. not objects).
6465 SymbolUse,

@@inline SpeculatedType typeFilterFor(UseK
127128 case StringUse:
128129 case KnownStringUse:
129130 return SpecString;
 131 case StringOrOtherUse:
 132 return SpecString | SpecOther;
130133 case KnownPrimitiveUse:
131134 return SpecHeapTop & ~SpecObject;
132135 case SymbolUse:
197641

Source/JavaScriptCore/ftl/FTLCapabilities.cpp

@@CapabilityLevel canCompile(Graph& graph)
463463 case FunctionUse:
464464 case ObjectOrOtherUse:
465465 case StringUse:
 466 case StringOrOtherUse:
466467 case KnownStringUse:
467468 case KnownPrimitiveUse:
468469 case StringObjectUse:
197641

Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

@@public:
154154 // We use prologue frequency for all of the initialization code.
155155 m_out.setFrequency(1);
156156
157  m_prologue = FTL_NEW_BLOCK(m_out, ("Prologue"));
158  LBasicBlock stackOverflow = FTL_NEW_BLOCK(m_out, ("Stack overflow"));
159  m_handleExceptions = FTL_NEW_BLOCK(m_out, ("Handle Exceptions"));
 157 m_prologue = m_out.newBlock();
 158 LBasicBlock stackOverflow = m_out.newBlock();
 159 m_handleExceptions = m_out.newBlock();
160160
161  LBasicBlock checkArguments = FTL_NEW_BLOCK(m_out, ("Check arguments"));
 161 LBasicBlock checkArguments = m_out.newBlock();
162162
163163 for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
164164 m_highBlock = m_graph.block(blockIndex);
165165 if (!m_highBlock)
166166 continue;
167167 m_out.setFrequency(m_highBlock->executionCount);
168  m_blocks.add(m_highBlock, FTL_NEW_BLOCK(m_out, ("Block ", *m_highBlock)));
 168 m_blocks.add(m_highBlock, m_out.newBlock());
169169 }
170170
171171 // Back to prologue frequency for any bocks that get sneakily created in the initialization code.

@@private:
10521052
10531053 LValue doubleValue = unboxDouble(value);
10541054
1055  LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("DoubleRep RealNumberUse int case"));
1056  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("DoubleRep continuation"));
 1055 LBasicBlock intCase = m_out.newBlock();
 1056 LBasicBlock continuation = m_out.newBlock();
10571057
10581058 ValueFromBlock fastResult = m_out.anchor(doubleValue);
10591059 m_out.branch(

@@private:
10801080
10811081 LValue value = lowJSValue(m_node->child1(), ManualOperandSpeculation);
10821082
1083  LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing int case"));
1084  LBasicBlock doubleTesting = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing double case"));
1085  LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing double case"));
1086  LBasicBlock nonDoubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing undefined case"));
1087  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("jsValueToDouble unboxing continuation"));
 1083 LBasicBlock intCase = m_out.newBlock();
 1084 LBasicBlock doubleTesting = m_out.newBlock();
 1085 LBasicBlock doubleCase = m_out.newBlock();
 1086 LBasicBlock nonDoubleCase = m_out.newBlock();
 1087 LBasicBlock continuation = m_out.newBlock();
10881088
10891089 m_out.branch(
10901090 isNotInt32(value, provenType(m_node->child1())),

@@private:
11051105 m_out.jump(continuation);
11061106
11071107 if (shouldConvertNonNumber) {
1108  LBasicBlock undefinedCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble converting undefined case"));
1109  LBasicBlock testNullCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing null case"));
1110  LBasicBlock nullCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble converting null case"));
1111  LBasicBlock testBooleanTrueCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble testing boolean true case"));
1112  LBasicBlock convertBooleanTrueCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble convert boolean true case"));
1113  LBasicBlock convertBooleanFalseCase = FTL_NEW_BLOCK(m_out, ("jsValueToDouble convert boolean false case"));
 1108 LBasicBlock undefinedCase = m_out.newBlock();
 1109 LBasicBlock testNullCase = m_out.newBlock();
 1110 LBasicBlock nullCase = m_out.newBlock();
 1111 LBasicBlock testBooleanTrueCase = m_out.newBlock();
 1112 LBasicBlock convertBooleanTrueCase = m_out.newBlock();
 1113 LBasicBlock convertBooleanFalseCase = m_out.newBlock();
11141114
11151115 m_out.appendTo(nonDoubleCase, undefinedCase);
11161116 LValue valueIsUndefined = m_out.equal(value, m_out.constInt64(ValueUndefined));

@@private:
12781278 return;
12791279 }
12801280
1281  LBasicBlock booleanCase = FTL_NEW_BLOCK(m_out, ("BooleanToNumber boolean case"));
1282  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("BooleanToNumber continuation"));
 1281 LBasicBlock booleanCase = m_out.newBlock();
 1282 LBasicBlock continuation = m_out.newBlock();
12831283
12841284 ValueFromBlock notBooleanResult = m_out.anchor(value);
12851285 m_out.branch(

@@private:
13871387 {
13881388 LValue value = lowJSValue(m_node->child1());
13891389
1390  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("ToThis is cell case"));
1391  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ToThis slow case"));
1392  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToThis continuation"));
 1390 LBasicBlock isCellCase = m_out.newBlock();
 1391 LBasicBlock slowCase = m_out.newBlock();
 1392 LBasicBlock continuation = m_out.newBlock();
13931393
13941394 m_out.branch(
13951395 isCell(value, provenType(m_node->child1())), usually(isCellCase), rarely(slowCase));

@@private:
15221522 }
15231523
15241524 if (shouldCheckNegativeZero(m_node->arithMode())) {
1525  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case"));
1526  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation"));
 1525 LBasicBlock slowCase = m_out.newBlock();
 1526 LBasicBlock continuation = m_out.newBlock();
15271527
15281528 m_out.branch(
15291529 m_out.notZero32(result), usually(continuation), rarely(slowCase));

@@private:
15481548 blessSpeculation(result, Overflow, noValue(), nullptr, m_origin);
15491549
15501550 if (shouldCheckNegativeZero(m_node->arithMode())) {
1551  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArithMul slow case"));
1552  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMul continuation"));
 1551 LBasicBlock slowCase = m_out.newBlock();
 1552 LBasicBlock continuation = m_out.newBlock();
15531553
15541554 m_out.branch(
15551555 m_out.notZero64(result), usually(continuation), rarely(slowCase));

@@private:
15901590 LValue denominator = lowInt32(m_node->child2());
15911591
15921592 if (shouldCheckNegativeZero(m_node->arithMode())) {
1593  LBasicBlock zeroNumerator = FTL_NEW_BLOCK(m_out, ("ArithDiv zero numerator"));
1594  LBasicBlock numeratorContinuation = FTL_NEW_BLOCK(m_out, ("ArithDiv numerator continuation"));
 1593 LBasicBlock zeroNumerator = m_out.newBlock();
 1594 LBasicBlock numeratorContinuation = m_out.newBlock();
15951595
15961596 m_out.branch(
15971597 m_out.isZero32(numerator),

@@private:
16081608 }
16091609
16101610 if (shouldCheckOverflow(m_node->arithMode())) {
1611  LBasicBlock unsafeDenominator = FTL_NEW_BLOCK(m_out, ("ArithDiv unsafe denominator"));
1612  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithDiv continuation"));
 1611 LBasicBlock unsafeDenominator = m_out.newBlock();
 1612 LBasicBlock continuation = m_out.newBlock();
16131613
16141614 LValue adjustedDenominator = m_out.add(denominator, m_out.int32One);
16151615 m_out.branch(

@@private:
16601660
16611661 LValue remainder;
16621662 if (shouldCheckOverflow(m_node->arithMode())) {
1663  LBasicBlock unsafeDenominator = FTL_NEW_BLOCK(m_out, ("ArithMod unsafe denominator"));
1664  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMod continuation"));
 1663 LBasicBlock unsafeDenominator = m_out.newBlock();
 1664 LBasicBlock continuation = m_out.newBlock();
16651665
16661666 LValue adjustedDenominator = m_out.add(denominator, m_out.int32One);
16671667 m_out.branch(

@@private:
16811681 remainder = m_out.chillMod(numerator, denominator);
16821682
16831683 if (shouldCheckNegativeZero(m_node->arithMode())) {
1684  LBasicBlock negativeNumerator = FTL_NEW_BLOCK(m_out, ("ArithMod negative numerator"));
1685  LBasicBlock numeratorContinuation = FTL_NEW_BLOCK(m_out, ("ArithMod numerator continuation"));
 1684 LBasicBlock negativeNumerator = m_out.newBlock();
 1685 LBasicBlock numeratorContinuation = m_out.newBlock();
16861686
16871687 m_out.branch(
16881688 m_out.lessThan(numerator, m_out.int32Zero),

@@private:
17331733 LValue left = lowDouble(m_node->child1());
17341734 LValue right = lowDouble(m_node->child2());
17351735
1736  LBasicBlock notLessThan = FTL_NEW_BLOCK(m_out, ("ArithMin/ArithMax not less than"));
1737  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithMin/ArithMax continuation"));
 1736 LBasicBlock notLessThan = m_out.newBlock();
 1737 LBasicBlock continuation = m_out.newBlock();
17381738
17391739 Vector<ValueFromBlock, 2> results;
17401740

@@private:
18031803 LValue base = lowDouble(m_node->child1());
18041804 LValue exponent = lowDouble(m_node->child2());
18051805
1806  LBasicBlock integerExponentIsSmallBlock = FTL_NEW_BLOCK(m_out, ("ArithPow test integer exponent is small."));
1807  LBasicBlock integerExponentPowBlock = FTL_NEW_BLOCK(m_out, ("ArithPow pow(double, (int)double)."));
1808  LBasicBlock doubleExponentPowBlockEntry = FTL_NEW_BLOCK(m_out, ("ArithPow pow(double, double)."));
1809  LBasicBlock nanExceptionExponentIsInfinity = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, check exponent is infinity."));
1810  LBasicBlock nanExceptionBaseIsOne = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, check base is one."));
1811  LBasicBlock powBlock = FTL_NEW_BLOCK(m_out, ("ArithPow regular pow"));
1812  LBasicBlock nanExceptionResultIsNaN = FTL_NEW_BLOCK(m_out, ("ArithPow NaN Exception, result is NaN."));
1813  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithPow continuation"));
 1806 LBasicBlock integerExponentIsSmallBlock = m_out.newBlock();
 1807 LBasicBlock integerExponentPowBlock = m_out.newBlock();
 1808 LBasicBlock doubleExponentPowBlockEntry = m_out.newBlock();
 1809 LBasicBlock nanExceptionExponentIsInfinity = m_out.newBlock();
 1810 LBasicBlock nanExceptionBaseIsOne = m_out.newBlock();
 1811 LBasicBlock powBlock = m_out.newBlock();
 1812 LBasicBlock nanExceptionResultIsNaN = m_out.newBlock();
 1813 LBasicBlock continuation = m_out.newBlock();
18141814
18151815 LValue integerExponent = m_out.doubleToInt(exponent);
18161816 LValue integerExponentConvertedToDouble = m_out.intToDouble(integerExponent);

@@private:
19141914 LValue value = lowDouble(m_node->child1());
19151915 result = m_out.doubleFloor(m_out.doubleAdd(value, m_out.constDouble(0.5)));
19161916 } else {
1917  LBasicBlock realPartIsMoreThanHalf = FTL_NEW_BLOCK(m_out, ("ArithRound should round down"));
1918  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArithRound continuation"));
 1917 LBasicBlock realPartIsMoreThanHalf = m_out.newBlock();
 1918 LBasicBlock continuation = m_out.newBlock();
19191919
19201920 LValue value = lowDouble(m_node->child1());
19211921 LValue integerValue = m_out.doubleCeil(value);

@@private:
21202120 case CellOrOtherUse: {
21212121 LValue value = lowJSValue(m_node->child1(), ManualOperandSpeculation);
21222122
2123  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse cell case"));
2124  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse not cell case"));
2125  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CheckStructure CellOrOtherUse continuation"));
 2123 LBasicBlock cellCase = m_out.newBlock();
 2124 LBasicBlock notCellCase = m_out.newBlock();
 2125 LBasicBlock continuation = m_out.newBlock();
21262126
21272127 m_out.branch(
21282128 isCell(value, provenType(m_node->child1())), unsure(cellCase), unsure(notCellCase));

@@private:
21952195 LValue cell = lowCell(m_node->child1());
21962196 LValue property = !!m_node->child2() ? lowInt32(m_node->child2()) : 0;
21972197
2198  LBasicBlock unexpectedStructure = FTL_NEW_BLOCK(m_out, ("ArrayifyToStructure unexpected structure"));
2199  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayifyToStructure continuation"));
 2198 LBasicBlock unexpectedStructure = m_out.newBlock();
 2199 LBasicBlock continuation = m_out.newBlock();
22002200
22012201 LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID);
22022202

@@private:
22782278 // https://bugs.webkit.org/show_bug.cgi?id=127830
22792279 LValue value = lowJSValue(m_node->child1());
22802280
2281  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("GetById untyped cell case"));
2282  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("GetById untyped not cell case"));
2283  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetById untyped continuation"));
 2281 LBasicBlock cellCase = m_out.newBlock();
 2282 LBasicBlock notCellCase = m_out.newBlock();
 2283 LBasicBlock continuation = m_out.newBlock();
22842284
22852285 m_out.branch(
22862286 isCell(value, provenType(m_node->child1())), unsure(cellCase), unsure(notCellCase));

@@private:
23972397 LValue cell = lowCell(m_node->child1());
23982398
23992399 if (m_node->arrayMode().type() == Array::String) {
2400  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("GetIndexedPropertyStorage String slow case"));
2401  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetIndexedPropertyStorage String continuation"));
 2400 LBasicBlock slowPath = m_out.newBlock();
 2401 LBasicBlock continuation = m_out.newBlock();
24022402
24032403 LValue fastResultValue = m_out.loadPtr(cell, m_heaps.JSString_value);
24042404 ValueFromBlock fastResult = m_out.anchor(fastResultValue);

@@private:
24392439 {
24402440 LValue basePtr = lowCell(m_node->child1());
24412441
2442  LBasicBlock simpleCase = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset wasteless typed array"));
2443  LBasicBlock wastefulCase = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset wasteful typed array"));
2444  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetTypedArrayByteOffset continuation"));
 2442 LBasicBlock simpleCase = m_out.newBlock();
 2443 LBasicBlock wastefulCase = m_out.newBlock();
 2444 LBasicBlock continuation = m_out.newBlock();
24452445
24462446 LValue mode = m_out.load32(basePtr, m_heaps.JSArrayBufferView_mode);
24472447 m_out.branch(

@@private:
25492549
25502550 LValue base = lowCell(m_node->child1());
25512551
2552  LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous fast case"));
2553  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous slow case"));
2554  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal int/contiguous continuation"));
 2552 LBasicBlock fastCase = m_out.newBlock();
 2553 LBasicBlock slowCase = m_out.newBlock();
 2554 LBasicBlock continuation = m_out.newBlock();
25552555
25562556 m_out.branch(
25572557 m_out.aboveOrEqual(

@@private:
25962596
25972597 LValue base = lowCell(m_node->child1());
25982598
2599  LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetByVal double in bounds"));
2600  LBasicBlock boxPath = FTL_NEW_BLOCK(m_out, ("GetByVal double boxing"));
2601  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetByVal double slow case"));
2602  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal double continuation"));
 2599 LBasicBlock inBounds = m_out.newBlock();
 2600 LBasicBlock boxPath = m_out.newBlock();
 2601 LBasicBlock slowCase = m_out.newBlock();
 2602 LBasicBlock continuation = m_out.newBlock();
26032603
26042604 m_out.branch(
26052605 m_out.aboveOrEqual(

@@private:
26672667 LValue table = m_out.loadPtr(base, m_heaps.ScopedArguments_table);
26682668 LValue namedLength = m_out.load32(table, m_heaps.ScopedArgumentsTable_length);
26692669
2670  LBasicBlock namedCase = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments named case"));
2671  LBasicBlock overflowCase = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments overflow case"));
2672  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal ScopedArguments continuation"));
 2670 LBasicBlock namedCase = m_out.newBlock();
 2671 LBasicBlock overflowCase = m_out.newBlock();
 2672 LBasicBlock continuation = m_out.newBlock();
26732673
26742674 m_out.branch(
26752675 m_out.aboveOrEqual(index, namedLength), unsure(overflowCase), unsure(namedCase));

@@private:
28752875 case Array::Int32:
28762876 case Array::Double:
28772877 case Array::Contiguous: {
2878  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal continuation"));
 2878 LBasicBlock continuation = m_out.newBlock();
28792879 LBasicBlock outerLastNext = m_out.appendTo(m_out.m_block, continuation);
28802880
28812881 switch (m_node->arrayMode().type()) {

@@private:
29692969 if (isClamped(type)) {
29702970 ASSERT(elementSize(type) == 1);
29712971
2972  LBasicBlock atLeastZero = FTL_NEW_BLOCK(m_out, ("PutByVal int clamp atLeastZero"));
2973  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal int clamp continuation"));
 2972 LBasicBlock atLeastZero = m_out.newBlock();
 2973 LBasicBlock continuation = m_out.newBlock();
29742974
29752975 Vector<ValueFromBlock, 2> intValues;
29762976 intValues.append(m_out.anchor(m_out.int32Zero));

@@private:
29982998 if (isClamped(type)) {
29992999 ASSERT(elementSize(type) == 1);
30003000
3001  LBasicBlock atLeastZero = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp atLeastZero"));
3002  LBasicBlock withinRange = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp withinRange"));
3003  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal double clamp continuation"));
 3001 LBasicBlock atLeastZero = m_out.newBlock();
 3002 LBasicBlock withinRange = m_out.newBlock();
 3003 LBasicBlock continuation = m_out.newBlock();
30043004
30053005 Vector<ValueFromBlock, 3> intValues;
30063006 intValues.append(m_out.anchor(m_out.int32Zero));

@@private:
30623062 if (m_node->arrayMode().isInBounds() || m_node->op() == PutByValAlias)
30633063 m_out.store(valueToStore, pointer, storeType);
30643064 else {
3065  LBasicBlock isInBounds = FTL_NEW_BLOCK(m_out, ("PutByVal typed array in bounds case"));
3066  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("PutByVal typed array continuation"));
 3065 LBasicBlock isInBounds = m_out.newBlock();
 3066 LBasicBlock continuation = m_out.newBlock();
30673067
30683068 m_out.branch(
30693069 m_out.aboveOrEqual(index, lowInt32(child5)),

@@private:
31493149
31503150 LValue prevLength = m_out.load32(storage, m_heaps.Butterfly_publicLength);
31513151
3152  LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("ArrayPush fast path"));
3153  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("ArrayPush slow path"));
3154  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayPush continuation"));
 3152 LBasicBlock fastPath = m_out.newBlock();
 3153 LBasicBlock slowPath = m_out.newBlock();
 3154 LBasicBlock continuation = m_out.newBlock();
31553155
31563156 m_out.branch(
31573157 m_out.aboveOrEqual(

@@private:
31993199 case Array::Contiguous: {
32003200 IndexedAbstractHeap& heap = m_heaps.forArrayType(m_node->arrayMode().type());
32013201
3202  LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("ArrayPop fast case"));
3203  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("ArrayPop slow case"));
3204  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ArrayPop continuation"));
 3202 LBasicBlock fastCase = m_out.newBlock();
 3203 LBasicBlock slowCase = m_out.newBlock();
 3204 LBasicBlock continuation = m_out.newBlock();
32053205
32063206 LValue prevLength = m_out.load32(storage, m_heaps.Butterfly_publicLength);
32073207

@@private:
32613261 return;
32623262 }
32633263
3264  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CreateActivation slow path"));
3265  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CreateActivation continuation"));
 3264 LBasicBlock slowPath = m_out.newBlock();
 3265 LBasicBlock continuation = m_out.newBlock();
32663266
32673267 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
32683268

@@private:
33203320 isGeneratorFunction ? m_graph.globalObjectFor(m_node->origin.semantic)->generatorFunctionStructure() :
33213321 m_graph.globalObjectFor(m_node->origin.semantic)->functionStructure();
33223322
3323  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("NewFunction slow path"));
3324  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewFunction continuation"));
 3323 LBasicBlock slowPath = m_out.newBlock();
 3324 LBasicBlock continuation = m_out.newBlock();
33253325
33263326 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
33273327

@@private:
33753375
33763376 unsigned minCapacity = m_graph.baselineCodeBlockFor(m_node->origin.semantic)->numParameters() - 1;
33773377
3378  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments slow path"));
3379  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments continuation"));
 3378 LBasicBlock slowPath = m_out.newBlock();
 3379 LBasicBlock continuation = m_out.newBlock();
33803380
33813381 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
33823382

@@private:
34333433 } else {
34343434 LValue stackBase = getArgumentsStart();
34353435
3436  LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments loop body"));
3437  LBasicBlock end = FTL_NEW_BLOCK(m_out, ("CreateDirectArguments loop end"));
 3436 LBasicBlock loop = m_out.newBlock();
 3437 LBasicBlock end = m_out.newBlock();
34383438
34393439 ValueFromBlock originalLength;
34403440 if (minCapacity) {

@@private:
34933493
34943494 void compileCopyRest()
34953495 {
3496  LBasicBlock doCopyRest = FTL_NEW_BLOCK(m_out, ("CopyRest C call"));
3497  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("FillRestParameter continuation"));
 3496 LBasicBlock doCopyRest = m_out.newBlock();
 3497 LBasicBlock continuation = m_out.newBlock();
34983498
34993499 LValue arrayLength = lowInt32(m_node->child2());
35003500

@@private:
35153515
35163516 void compileGetRestLength()
35173517 {
3518  LBasicBlock nonZeroLength = FTL_NEW_BLOCK(m_out, ("GetRestLength non zero"));
3519  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetRestLength continuation"));
 3518 LBasicBlock nonZeroLength = m_out.newBlock();
 3519 LBasicBlock continuation = m_out.newBlock();
35203520
35213521 ValueFromBlock zeroLengthResult = m_out.anchor(m_out.constInt32(0));
35223522

@@private:
36723672 || hasDouble(structure->indexingType())
36733673 || hasContiguous(structure->indexingType()));
36743674
3675  LBasicBlock fastCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize fast case"));
3676  LBasicBlock largeCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize large case"));
3677  LBasicBlock failCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize fail case"));
3678  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize slow case"));
3679  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize continuation"));
 3675 LBasicBlock fastCase = m_out.newBlock();
 3676 LBasicBlock largeCase = m_out.newBlock();
 3677 LBasicBlock failCase = m_out.newBlock();
 3678 LBasicBlock slowCase = m_out.newBlock();
 3679 LBasicBlock continuation = m_out.newBlock();
36803680
36813681 m_out.branch(
36823682 m_out.aboveOrEqual(publicLength, m_out.constInt32(MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH)),

@@private:
37033703 m_out.store32(vectorLength, butterfly, m_heaps.Butterfly_vectorLength);
37043704
37053705 if (hasDouble(m_node->indexingType())) {
3706  LBasicBlock initLoop = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize double init loop"));
3707  LBasicBlock initDone = FTL_NEW_BLOCK(m_out, ("NewArrayWithSize double init done"));
 3706 LBasicBlock initLoop = m_out.newBlock();
 3707 LBasicBlock initDone = m_out.newBlock();
37083708
37093709 ValueFromBlock originalIndex = m_out.anchor(vectorLength);
37103710 ValueFromBlock originalPointer = m_out.anchor(butterfly);

@@private:
37773777
37783778 LValue size = lowInt32(m_node->child1());
37793779
3780  LBasicBlock smallEnoughCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray small enough case"));
3781  LBasicBlock nonZeroCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray non-zero case"));
3782  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("NewTypedArray slow case"));
3783  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NewTypedArray continuation"));
 3780 LBasicBlock smallEnoughCase = m_out.newBlock();
 3781 LBasicBlock nonZeroCase = m_out.newBlock();
 3782 LBasicBlock slowCase = m_out.newBlock();
 3783 LBasicBlock continuation = m_out.newBlock();
37843784
37853785 m_out.branch(
37863786 m_out.above(size, m_out.constInt32(JSArrayBufferView::fastSizeLimit)),

@@private:
38793879 LValue cell = lowCell(m_node->child1());
38803880 LValue structureID = m_out.load32(cell, m_heaps.JSCell_structureID);
38813881
3882  LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("ToString StringOrStringObject not string case"));
3883  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToString StringOrStringObject continuation"));
 3882 LBasicBlock notString = m_out.newBlock();
 3883 LBasicBlock continuation = m_out.newBlock();
38843884
38853885 ValueFromBlock simpleResult = m_out.anchor(cell);
38863886 m_out.branch(

@@private:
39083908 else
39093909 value = lowJSValue(m_node->child1());
39103910
3911  LBasicBlock isCell = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse is cell"));
3912  LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse not string"));
3913  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToString CellUse/UntypedUse continuation"));
 3911 LBasicBlock isCell = m_out.newBlock();
 3912 LBasicBlock notString = m_out.newBlock();
 3913 LBasicBlock continuation = m_out.newBlock();
39143914
39153915 LValue isCellPredicate;
39163916 if (m_node->child1().useKind() == CellUse)

@@private:
39523952 {
39533953 LValue value = lowJSValue(m_node->child1());
39543954
3955  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("ToPrimitive cell case"));
3956  LBasicBlock isObjectCase = FTL_NEW_BLOCK(m_out, ("ToPrimitive object case"));
3957  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ToPrimitive continuation"));
 3955 LBasicBlock isCellCase = m_out.newBlock();
 3956 LBasicBlock isObjectCase = m_out.newBlock();
 3957 LBasicBlock continuation = m_out.newBlock();
39583958
39593959 Vector<ValueFromBlock, 3> results;
39603960

@@private:
39913991 numKids = 2;
39923992 }
39933993
3994  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MakeRope slow path"));
3995  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MakeRope continuation"));
 3994 LBasicBlock slowPath = m_out.newBlock();
 3995 LBasicBlock continuation = m_out.newBlock();
39963996
39973997 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
39983998

@@private:
40624062 LValue index = lowInt32(m_node->child2());
40634063 LValue storage = lowStorage(m_node->child3());
40644064
4065  LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("GetByVal String fast path"));
4066  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("GetByVal String slow path"));
4067  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetByVal String continuation"));
 4065 LBasicBlock fastPath = m_out.newBlock();
 4066 LBasicBlock slowPath = m_out.newBlock();
 4067 LBasicBlock continuation = m_out.newBlock();
40684068
40694069 m_out.branch(
40704070 m_out.aboveOrEqual(

@@private:
40754075
40764076 LValue stringImpl = m_out.loadPtr(base, m_heaps.JSString_value);
40774077
4078  LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("GetByVal String 8-bit case"));
4079  LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("GetByVal String 16-bit case"));
4080  LBasicBlock bitsContinuation = FTL_NEW_BLOCK(m_out, ("GetByVal String bitness continuation"));
4081  LBasicBlock bigCharacter = FTL_NEW_BLOCK(m_out, ("GetByVal String big character"));
 4078 LBasicBlock is8Bit = m_out.newBlock();
 4079 LBasicBlock is16Bit = m_out.newBlock();
 4080 LBasicBlock bitsContinuation = m_out.newBlock();
 4081 LBasicBlock bigCharacter = m_out.newBlock();
40824082
40834083 m_out.branch(
40844084 m_out.testIsZero32(

@@private:
41404140 m_graph.watchpoints().addLazily(globalObject->stringPrototype()->structure()->transitionWatchpointSet());
41414141 m_graph.watchpoints().addLazily(globalObject->objectPrototype()->structure()->transitionWatchpointSet());
41424142
4143  LBasicBlock negativeIndex = FTL_NEW_BLOCK(m_out, ("GetByVal String negative index"));
 4143 LBasicBlock negativeIndex = m_out.newBlock();
41444144
41454145 results.append(m_out.anchor(m_out.constInt64(JSValue::encode(jsUndefined()))));
41464146 m_out.branch(

@@private:
41624162
41634163 void compileStringCharCodeAt()
41644164 {
4165  LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt 8-bit case"));
4166  LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt 16-bit case"));
4167  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("StringCharCodeAt continuation"));
 4165 LBasicBlock is8Bit = m_out.newBlock();
 4166 LBasicBlock is16Bit = m_out.newBlock();
 4167 LBasicBlock continuation = m_out.newBlock();
41684168
41694169 LValue base = lowCell(m_node->child1());
41704170 LValue index = lowInt32(m_node->child2());

@@private:
42204220
42214221 LValue value = lowInt32(childEdge);
42224222
4223  LBasicBlock smallIntCase = FTL_NEW_BLOCK(m_out, ("StringFromCharCode small int case"));
4224  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("StringFromCharCode slow case"));
4225  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("StringFromCharCode continuation"));
 4223 LBasicBlock smallIntCase = m_out.newBlock();
 4224 LBasicBlock slowCase = m_out.newBlock();
 4225 LBasicBlock continuation = m_out.newBlock();
42264226
42274227 m_out.branch(
42284228 m_out.aboveOrEqual(value, m_out.constInt32(0xff)),

@@private:
42824282
42834283 Vector<LBasicBlock, 2> blocks(data.cases.size());
42844284 for (unsigned i = data.cases.size(); i--;)
4285  blocks[i] = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset case ", i));
4286  LBasicBlock exit = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset fail"));
4287  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MultiGetByOffset continuation"));
 4285 blocks[i] = m_out.newBlock();
 4286 LBasicBlock exit = m_out.newBlock();
 4287 LBasicBlock continuation = m_out.newBlock();
42884288
42894289 Vector<SwitchCase, 2> cases;
42904290 StructureSet baseSet;

@@private:
43644364
43654365 Vector<LBasicBlock, 2> blocks(data.variants.size());
43664366 for (unsigned i = data.variants.size(); i--;)
4367  blocks[i] = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset case ", i));
4368  LBasicBlock exit = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset fail"));
4369  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MultiPutByOffset continuation"));
 4367 blocks[i] = m_out.newBlock();
 4368 LBasicBlock exit = m_out.newBlock();
 4369 LBasicBlock continuation = m_out.newBlock();
43704370
43714371 Vector<SwitchCase, 2> cases;
43724372 StructureSet baseSet;

@@private:
44394439 {
44404440 WatchpointSet* set = m_node->watchpointSet();
44414441
4442  LBasicBlock isNotInvalidated = FTL_NEW_BLOCK(m_out, ("NotifyWrite not invalidated case"));
4443  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("NotifyWrite continuation"));
 4442 LBasicBlock isNotInvalidated = m_out.newBlock();
 4443 LBasicBlock continuation = m_out.newBlock();
44444444
44454445 LValue state = m_out.load8ZeroExt32(m_out.absolute(set->addressOfState()));
44464446 m_out.branch(

@@private:
45974597 LValue left = lowCell(m_node->child1());
45984598 LValue right = lowCell(m_node->child2());
45994599
4600  LBasicBlock notTriviallyEqualCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq/String not trivially equal case"));
4601  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareStrictEq/String continuation"));
 4600 LBasicBlock notTriviallyEqualCase = m_out.newBlock();
 4601 LBasicBlock continuation = m_out.newBlock();
46024602
46034603 speculateString(m_node->child1(), left);
46044604

@@private:
46754675 LValue left = lowStringIdent(leftEdge);
46764676 LValue rightValue = lowJSValue(rightEdge, ManualOperandSpeculation);
46774677
4678  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar is cell case"));
4679  LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar is string case"));
4680  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareStrictEq StringIdent to NotStringVar continuation"));
 4678 LBasicBlock isCellCase = m_out.newBlock();
 4679 LBasicBlock isStringCase = m_out.newBlock();
 4680 LBasicBlock continuation = m_out.newBlock();
46814681
46824682 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
46834683 m_out.branch(

@@private:
52935293 LValue sourceStart = getArgumentsStart(inlineCallFrame);
52945294 LValue targetStart = addressFor(data->machineStart).value();
52955295
5296  LBasicBlock undefinedLoop = FTL_NEW_BLOCK(m_out, ("ForwardVarargs undefined loop body"));
5297  LBasicBlock mainLoopEntry = FTL_NEW_BLOCK(m_out, ("ForwardVarargs main loop entry"));
5298  LBasicBlock mainLoop = FTL_NEW_BLOCK(m_out, ("ForwardVarargs main loop body"));
5299  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ForwardVarargs continuation"));
 5296 LBasicBlock undefinedLoop = m_out.newBlock();
 5297 LBasicBlock mainLoopEntry = m_out.newBlock();
 5298 LBasicBlock mainLoop = m_out.newBlock();
 5299 LBasicBlock continuation = m_out.newBlock();
53005300
53015301 LValue lengthAsPtr = m_out.zeroExtPtr(length);
53025302 LValue loopBoundValue = m_out.constIntPtr(data->mandatoryMinimum);

@@private:
53575357 switch (data->kind) {
53585358 case SwitchImm: {
53595359 Vector<ValueFromBlock, 2> intValues;
5360  LBasicBlock switchOnInts = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm int case"));
 5360 LBasicBlock switchOnInts = m_out.newBlock();
53615361
53625362 LBasicBlock lastNext = m_out.appendTo(m_out.m_block, switchOnInts);
53635363

@@private:
53695369 }
53705370
53715371 case UntypedUse: {
5372  LBasicBlock isInt = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is int"));
5373  LBasicBlock isNotInt = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is not int"));
5374  LBasicBlock isDouble = FTL_NEW_BLOCK(m_out, ("Switch/SwitchImm is double"));
 5372 LBasicBlock isInt = m_out.newBlock();
 5373 LBasicBlock isNotInt = m_out.newBlock();
 5374 LBasicBlock isDouble = m_out.newBlock();
53755375
53765376 LValue boxedValue = lowJSValue(m_node->child1());
53775377 m_out.branch(isNotInt32(boxedValue), unsure(isNotInt), unsure(isInt));

@@private:
54245424 case UntypedUse: {
54255425 LValue unboxedValue = lowJSValue(m_node->child1());
54265426
5427  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar is cell"));
5428  LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar is string"));
 5427 LBasicBlock isCellCase = m_out.newBlock();
 5428 LBasicBlock isStringCase = m_out.newBlock();
54295429
54305430 m_out.branch(
54315431 isNotCell(unboxedValue, provenType(m_node->child1())),

@@private:
54475447 break;
54485448 }
54495449
5450  LBasicBlock lengthIs1 = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar length is 1"));
5451  LBasicBlock needResolution = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar resolution"));
5452  LBasicBlock resolved = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar resolved"));
5453  LBasicBlock is8Bit = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar 8bit"));
5454  LBasicBlock is16Bit = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar 16bit"));
5455  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Switch/SwitchChar continuation"));
 5450 LBasicBlock lengthIs1 = m_out.newBlock();
 5451 LBasicBlock needResolution = m_out.newBlock();
 5452 LBasicBlock resolved = m_out.newBlock();
 5453 LBasicBlock is8Bit = m_out.newBlock();
 5454 LBasicBlock is16Bit = m_out.newBlock();
 5455 LBasicBlock continuation = m_out.newBlock();
54565456
54575457 m_out.branch(
54585458 m_out.notEqual(

@@private:
55215521 case UntypedUse: {
55225522 LValue value = lowJSValue(m_node->child1());
55235523
5524  LBasicBlock isCellBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString Untyped cell case"));
5525  LBasicBlock isStringBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString Untyped string case"));
 5524 LBasicBlock isCellBlock = m_out.newBlock();
 5525 LBasicBlock isStringBlock = m_out.newBlock();
55265526
55275527 m_out.branch(
55285528 isCell(value, provenType(m_node->child1())),

@@private:
55575557
55585558 case UntypedUse: {
55595559 LValue value = lowJSValue(m_node->child1());
5560  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("Switch/SwitchCell cell case"));
 5560 LBasicBlock cellCase = m_out.newBlock();
55615561 m_out.branch(
55625562 isCell(value, provenType(m_node->child1())),
55635563 unsure(cellCase), unsure(lowBlock(data->fallThrough.block)));

@@private:
56675667 {
56685668 LValue value = lowJSValue(m_node->child1());
56695669
5670  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsString cell case"));
5671  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsString continuation"));
 5670 LBasicBlock isCellCase = m_out.newBlock();
 5671 LBasicBlock continuation = m_out.newBlock();
56725672
56735673 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
56745674 m_out.branch(

@@private:
56865686 {
56875687 LValue value = lowJSValue(m_node->child1());
56885688
5689  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("IsObject cell case"));
5690  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObject continuation"));
 5689 LBasicBlock isCellCase = m_out.newBlock();
 5690 LBasicBlock continuation = m_out.newBlock();
56915691
56925692 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
56935693 m_out.branch(

@@private:
57085708 Edge child = m_node->child1();
57095709 LValue value = lowJSValue(child);
57105710
5711  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull cell case"));
5712  LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull not function case"));
5713  LBasicBlock objectCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull object case"));
5714  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull slow path"));
5715  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull not cell case"));
5716  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsObjectOrNull continuation"));
 5711 LBasicBlock cellCase = m_out.newBlock();
 5712 LBasicBlock notFunctionCase = m_out.newBlock();
 5713 LBasicBlock objectCase = m_out.newBlock();
 5714 LBasicBlock slowPath = m_out.newBlock();
 5715 LBasicBlock notCellCase = m_out.newBlock();
 5716 LBasicBlock continuation = m_out.newBlock();
57175717
57185718 m_out.branch(isCell(value, provenType(child)), unsure(cellCase), unsure(notCellCase));
57195719

@@private:
57645764 Edge child = m_node->child1();
57655765 LValue value = lowJSValue(child);
57665766
5767  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("IsFunction cell case"));
5768  LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("IsFunction not function case"));
5769  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("IsFunction slow path"));
5770  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("IsFunction continuation"));
 5767 LBasicBlock cellCase = m_out.newBlock();
 5768 LBasicBlock notFunctionCase = m_out.newBlock();
 5769 LBasicBlock slowPath = m_out.newBlock();
 5770 LBasicBlock continuation = m_out.newBlock();
57715771
57725772 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
57735773 m_out.branch(

@@private:
58065806 Edge child = m_node->child1();
58075807 LValue value = lowJSValue(child);
58085808
5809  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("TypeOf continuation"));
 5809 LBasicBlock continuation = m_out.newBlock();
58105810 LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
58115811
58125812 Vector<ValueFromBlock> results;

@@private:
59035903 LValue constructor = lowCell(m_node->child1());
59045904 LValue hasInstance = lowJSValue(m_node->child2());
59055905
5906  LBasicBlock defaultHasInstance = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance Symbol.hasInstance is default"));
5907  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("OverridesHasInstance continuation"));
 5906 LBasicBlock defaultHasInstance = m_out.newBlock();
 5907 LBasicBlock continuation = m_out.newBlock();
59085908
59095909 // 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.
59105910

@@private:
59435943
59445944 LValue prototype = lowCell(m_node->child2());
59455945
5946  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("InstanceOf cell case"));
5947  LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("InstanceOf loop"));
5948  LBasicBlock notYetInstance = FTL_NEW_BLOCK(m_out, ("InstanceOf not yet instance"));
5949  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("InstanceOf continuation"));
 5946 LBasicBlock isCellCase = m_out.newBlock();
 5947 LBasicBlock loop = m_out.newBlock();
 5948 LBasicBlock notYetInstance = m_out.newBlock();
 5949 LBasicBlock continuation = m_out.newBlock();
59505950
59515951 LValue condition;
59525952 if (m_node->child1().useKind() == UntypedUse)

@@private:
60156015 IndexedAbstractHeap& heap = m_node->arrayMode().type() == Array::Int32 ?
60166016 m_heaps.indexedInt32Properties : m_heaps.indexedContiguousProperties;
60176017
6018  LBasicBlock checkHole = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous check hole"));
6019  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous slow case"));
6020  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty int/contiguous continuation"));
 6018 LBasicBlock checkHole = m_out.newBlock();
 6019 LBasicBlock slowCase = m_out.newBlock();
 6020 LBasicBlock continuation = m_out.newBlock();
60216021
60226022 if (!m_node->arrayMode().isInBounds()) {
60236023 m_out.branch(

@@private:
60506050
60516051 IndexedAbstractHeap& heap = m_heaps.indexedDoubleProperties;
60526052
6053  LBasicBlock checkHole = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double check hole"));
6054  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double slow case"));
6055  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasIndexedProperty double continuation"));
 6053 LBasicBlock checkHole = m_out.newBlock();
 6054 LBasicBlock slowCase = m_out.newBlock();
 6055 LBasicBlock continuation = m_out.newBlock();
60566056
60576057 if (!m_node->arrayMode().isInBounds()) {
60586058 m_out.branch(

@@private:
60986098 LValue property = lowString(m_node->child2());
60996099 LValue enumerator = lowCell(m_node->child3());
61006100
6101  LBasicBlock correctStructure = FTL_NEW_BLOCK(m_out, ("HasStructureProperty correct structure"));
6102  LBasicBlock wrongStructure = FTL_NEW_BLOCK(m_out, ("HasStructureProperty wrong structure"));
6103  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("HasStructureProperty continuation"));
 6101 LBasicBlock correctStructure = m_out.newBlock();
 6102 LBasicBlock wrongStructure = m_out.newBlock();
 6103 LBasicBlock continuation = m_out.newBlock();
61046104
61056105 m_out.branch(m_out.notEqual(
61066106 m_out.load32(base, m_heaps.JSCell_structureID),

@@private:
61296129 LValue index = lowInt32(m_graph.varArgChild(m_node, 2));
61306130 LValue enumerator = lowCell(m_graph.varArgChild(m_node, 3));
61316131
6132  LBasicBlock checkOffset = FTL_NEW_BLOCK(m_out, ("GetDirectPname check offset"));
6133  LBasicBlock inlineLoad = FTL_NEW_BLOCK(m_out, ("GetDirectPname inline load"));
6134  LBasicBlock outOfLineLoad = FTL_NEW_BLOCK(m_out, ("GetDirectPname out-of-line load"));
6135  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("GetDirectPname slow case"));
6136  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetDirectPname continuation"));
 6132 LBasicBlock checkOffset = m_out.newBlock();
 6133 LBasicBlock inlineLoad = m_out.newBlock();
 6134 LBasicBlock outOfLineLoad = m_out.newBlock();
 6135 LBasicBlock slowCase = m_out.newBlock();
 6136 LBasicBlock continuation = m_out.newBlock();
61376137
61386138 m_out.branch(m_out.notEqual(
61396139 m_out.load32(base, m_heaps.JSCell_structureID),

@@private:
61856185 LValue enumerator = lowCell(m_node->child1());
61866186 LValue index = lowInt32(m_node->child2());
61876187
6188  LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname in bounds"));
6189  LBasicBlock outOfBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname out of bounds"));
6190  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetEnumeratorStructurePname continuation"));
 6188 LBasicBlock inBounds = m_out.newBlock();
 6189 LBasicBlock outOfBounds = m_out.newBlock();
 6190 LBasicBlock continuation = m_out.newBlock();
61916191
61926192 m_out.branch(m_out.below(index, m_out.load32(enumerator, m_heaps.JSPropertyNameEnumerator_endStructurePropertyIndex)),
61936193 usually(inBounds), rarely(outOfBounds));

@@private:
62116211 LValue enumerator = lowCell(m_node->child1());
62126212 LValue index = lowInt32(m_node->child2());
62136213
6214  LBasicBlock inBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname in bounds"));
6215  LBasicBlock outOfBounds = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname out of bounds"));
6216  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("GetEnumeratorGenericPname continuation"));
 6214 LBasicBlock inBounds = m_out.newBlock();
 6215 LBasicBlock outOfBounds = m_out.newBlock();
 6216 LBasicBlock continuation = m_out.newBlock();
62176217
62186218 m_out.branch(m_out.below(index, m_out.load32(enumerator, m_heaps.JSPropertyNameEnumerator_endGenericPropertyIndex)),
62196219 usually(inBounds), rarely(outOfBounds));

@@private:
62626262
62636263 Vector<LBasicBlock, 1> blocks(set.size());
62646264 for (unsigned i = set.size(); i--;)
6265  blocks[i] = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject case ", i));
6266  LBasicBlock dummyDefault = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject default case"));
6267  LBasicBlock outerContinuation = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject continuation"));
 6265 blocks[i] = m_out.newBlock();
 6266 LBasicBlock dummyDefault = m_out.newBlock();
 6267 LBasicBlock outerContinuation = m_out.newBlock();
62686268
62696269 Vector<SwitchCase, 1> cases(set.size());
62706270 for (unsigned i = set.size(); i--;)

@@private:
62886288 size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity());
62896289 MarkedAllocator* allocator = &vm().heap.allocatorForObjectWithoutDestructor(allocationSize);
62906290
6291  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject complex object allocation slow path"));
6292  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MaterializeNewObject complex object allocation continuation"));
 6291 LBasicBlock slowPath = m_out.newBlock();
 6292 LBasicBlock continuation = m_out.newBlock();
62936293
62946294 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
62956295

@@private:
63686368 ASSERT(table == m_graph.varArgChild(m_node, 0)->castConstant<SymbolTable*>());
63696369 Structure* structure = m_graph.globalObjectFor(m_node->origin.semantic)->activationStructure();
63706370
6371  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("MaterializeCreateActivation slow path"));
6372  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("MaterializeCreateActivation continuation"));
 6371 LBasicBlock slowPath = m_out.newBlock();
 6372 LBasicBlock continuation = m_out.newBlock();
63736373
63746374 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
63756375

@@private:
64296429
64306430 void compileCheckWatchdogTimer()
64316431 {
6432  LBasicBlock timerDidFire = FTL_NEW_BLOCK(m_out, ("CheckWatchdogTimer timer did fire"));
6433  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CheckWatchdogTimer continuation"));
 6432 LBasicBlock timerDidFire = m_out.newBlock();
 6433 LBasicBlock continuation = m_out.newBlock();
64346434
64356435 LValue state = m_out.load8ZeroExt32(m_out.absolute(vm().watchdog()->timerDidFireAddress()));
64366436 m_out.branch(m_out.isZero32(state),

@@private:
66966696 return;
66976697 }
66986698
6699  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkStructure continuation"));
 6699 LBasicBlock continuation = m_out.newBlock();
67006700
67016701 LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
67026702 for (unsigned i = 0; i < set.size() - 1; ++i) {
6703  LBasicBlock nextStructure = FTL_NEW_BLOCK(m_out, ("checkStructure nextStructure"));
 6703 LBasicBlock nextStructure = m_out.newBlock();
67046704 m_out.branch(
67056705 m_out.equal(structureDiscriminant, weakStructureDiscriminant(set[i])),
67066706 unsure(continuation), unsure(nextStructure));

@@private:
67176717
67186718 LValue numberOrNotCellToInt32(Edge edge, LValue value)
67196719 {
6720  LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 int case"));
6721  LBasicBlock notIntCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 not int case"));
 6720 LBasicBlock intCase = m_out.newBlock();
 6721 LBasicBlock notIntCase = m_out.newBlock();
67226722 LBasicBlock doubleCase = 0;
67236723 LBasicBlock notNumberCase = 0;
67246724 if (edge.useKind() == NotCellUse) {
6725  doubleCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 double case"));
6726  notNumberCase = FTL_NEW_BLOCK(m_out, ("ValueToInt32 not number case"));
 6725 doubleCase = m_out.newBlock();
 6726 notNumberCase = m_out.newBlock();
67276727 }
6728  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ValueToInt32 continuation"));
 6728 LBasicBlock continuation = m_out.newBlock();
67296729
67306730 Vector<ValueFromBlock> results;
67316731

@@private:
68296829 return;
68306830
68316831 case InferredType::ObjectWithStructureOrOther: {
6832  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther cell case"));
6833  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther not cell case"));
6834  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectWithStructureOrOther continuation"));
 6832 LBasicBlock cellCase = m_out.newBlock();
 6833 LBasicBlock notCellCase = m_out.newBlock();
 6834 LBasicBlock continuation = m_out.newBlock();
68356835
68366836 m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
68376837

@@private:
68656865 return;
68666866
68676867 case InferredType::ObjectOrOther: {
6868  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther cell case"));
6869  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther not cell case"));
6870  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("checkInferredType ObjectOrOther continuation"));
 6868 LBasicBlock cellCase = m_out.newBlock();
 6869 LBasicBlock notCellCase = m_out.newBlock();
 6870 LBasicBlock continuation = m_out.newBlock();
68716871
68726872 m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
68736873

@@private:
69866986
69876987 LValue allocatePropertyStorageWithSizeImpl(size_t sizeInValues)
69886988 {
6989  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("allocatePropertyStorageWithSizeImpl slow path"));
6990  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocatePropertyStorageWithSizeImpl continuation"));
 6989 LBasicBlock slowPath = m_out.newBlock();
 6990 LBasicBlock continuation = m_out.newBlock();
69916991
69926992 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
69936993

@@private:
71067106 return copyBarrier(
71077107 fastResultValue,
71087108 [&] () -> LValue {
7109  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("loadVectorWithBarrier slow path"));
7110  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("loadVectorWithBarrier continuation"));
 7109 LBasicBlock slowPath = m_out.newBlock();
 7110 LBasicBlock continuation = m_out.newBlock();
71117111
71127112 ValueFromBlock fastResult = m_out.anchor(fastResultValue);
71137113 m_out.branch(isFastTypedArray(object), rarely(slowPath), usually(continuation));

@@private:
71447144 template<typename Functor>
71457145 LValue copyBarrier(LValue pointer, const Functor& functor)
71467146 {
7147  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("copyBarrier slow path"));
7148  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("copyBarrier continuation"));
 7147 LBasicBlock slowPath = m_out.newBlock();
 7148 LBasicBlock continuation = m_out.newBlock();
71497149
71507150 ValueFromBlock fastResult = m_out.anchor(pointer);
71517151 m_out.branch(isInToSpace(pointer), usually(continuation), rarely(slowPath));

@@private:
71737173 {
71747174 LValue fastResultValue = m_out.loadPtr(object, m_heaps.JSArrayBufferView_vector);
71757175
7176  LBasicBlock possiblyFromSpace = FTL_NEW_BLOCK(m_out, ("loadVectorReadOnly possibly from space"));
7177  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("loadVectorReadOnly continuation"));
 7176 LBasicBlock possiblyFromSpace = m_out.newBlock();
 7177 LBasicBlock continuation = m_out.newBlock();
71787178
71797179 ValueFromBlock fastResult = m_out.anchor(fastResultValue);
71807180

@@private:
72537253
72547254 speculateTruthyObject(rightChild, rightCell, SpecObject);
72557255
7256  LBasicBlock leftCellCase = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject left cell case"));
7257  LBasicBlock leftNotCellCase = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject left not cell case"));
7258  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareEqObjectOrOtherToObject continuation"));
 7256 LBasicBlock leftCellCase = m_out.newBlock();
 7257 LBasicBlock leftNotCellCase = m_out.newBlock();
 7258 LBasicBlock continuation = m_out.newBlock();
72597259
72607260 m_out.branch(
72617261 isCell(leftValue, provenType(leftChild)),

@@private:
72977297 LValue left = lowJSValue(m_node->child1());
72987298 LValue right = lowJSValue(m_node->child2());
72997299
7300  LBasicBlock leftIsInt = FTL_NEW_BLOCK(m_out, ("CompareEq untyped left is int"));
7301  LBasicBlock fastPath = FTL_NEW_BLOCK(m_out, ("CompareEq untyped fast path"));
7302  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("CompareEq untyped slow path"));
7303  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("CompareEq untyped continuation"));
 7300 LBasicBlock leftIsInt = m_out.newBlock();
 7301 LBasicBlock fastPath = m_out.newBlock();
 7302 LBasicBlock slowPath = m_out.newBlock();
 7303 LBasicBlock continuation = m_out.newBlock();
73047304
73057305 m_out.branch(isNotInt32(left), rarely(slowPath), usually(leftIsInt));
73067306

@@private:
73227322
73237323 LValue stringsEqual(LValue leftJSString, LValue rightJSString)
73247324 {
7325  LBasicBlock notTriviallyUnequalCase = FTL_NEW_BLOCK(m_out, ("stringsEqual not trivially unequal case"));
7326  LBasicBlock notEmptyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual not empty case"));
7327  LBasicBlock leftReadyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual left ready case"));
7328  LBasicBlock rightReadyCase = FTL_NEW_BLOCK(m_out, ("stringsEqual right ready case"));
7329  LBasicBlock left8BitCase = FTL_NEW_BLOCK(m_out, ("stringsEqual left 8-bit case"));
7330  LBasicBlock right8BitCase = FTL_NEW_BLOCK(m_out, ("stringsEqual right 8-bit case"));
7331  LBasicBlock loop = FTL_NEW_BLOCK(m_out, ("stringsEqual loop"));
7332  LBasicBlock bytesEqual = FTL_NEW_BLOCK(m_out, ("stringsEqual bytes equal"));
7333  LBasicBlock trueCase = FTL_NEW_BLOCK(m_out, ("stringsEqual true case"));
7334  LBasicBlock falseCase = FTL_NEW_BLOCK(m_out, ("stringsEqual false case"));
7335  LBasicBlock slowCase = FTL_NEW_BLOCK(m_out, ("stringsEqual slow case"));
7336  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("stringsEqual continuation"));
 7325 LBasicBlock notTriviallyUnequalCase = m_out.newBlock();
 7326 LBasicBlock notEmptyCase = m_out.newBlock();
 7327 LBasicBlock leftReadyCase = m_out.newBlock();
 7328 LBasicBlock rightReadyCase = m_out.newBlock();
 7329 LBasicBlock left8BitCase = m_out.newBlock();
 7330 LBasicBlock right8BitCase = m_out.newBlock();
 7331 LBasicBlock loop = m_out.newBlock();
 7332 LBasicBlock bytesEqual = m_out.newBlock();
 7333 LBasicBlock trueCase = m_out.newBlock();
 7334 LBasicBlock falseCase = m_out.newBlock();
 7335 LBasicBlock slowCase = m_out.newBlock();
 7336 LBasicBlock continuation = m_out.newBlock();
73377337
73387338 LValue length = m_out.load32(leftJSString, m_heaps.JSString_length);
73397339

@@private:
76087608
76097609 LValue allocateCell(LValue allocator, LBasicBlock slowPath)
76107610 {
7611  LBasicBlock success = FTL_NEW_BLOCK(m_out, ("object allocation success"));
 7611 LBasicBlock success = m_out.newBlock();
76127612
76137613 LValue result;
76147614 LValue condition;

@@private:
76787678
76797679 LValue subspace = m_out.constIntPtr(&vm().heap.subspaceForObjectOfType<ClassType>());
76807680
7681  LBasicBlock smallCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject small case"));
7682  LBasicBlock largeOrOversizeCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject large or oversize case"));
7683  LBasicBlock largeCaseBlock = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject large case"));
7684  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocateVariableSizedObject continuation"));
 7681 LBasicBlock smallCaseBlock = m_out.newBlock();
 7682 LBasicBlock largeOrOversizeCaseBlock = m_out.newBlock();
 7683 LBasicBlock largeCaseBlock = m_out.newBlock();
 7684 LBasicBlock continuation = m_out.newBlock();
76857685
76867686 LValue uproundedSize = m_out.add(size, m_out.constInt32(MarkedSpace::preciseStep - 1));
76877687 LValue isSmall = m_out.below(uproundedSize, m_out.constInt32(MarkedSpace::preciseCutoff));

@@private:
77177717 {
77187718 CopiedAllocator& allocator = vm().heap.storageAllocator();
77197719
7720  LBasicBlock success = FTL_NEW_BLOCK(m_out, ("storage allocation success"));
 7720 LBasicBlock success = m_out.newBlock();
77217721
77227722 LValue remaining = m_out.loadPtr(m_out.absolute(&allocator.m_currentRemaining));
77237723 LValue newRemaining = m_out.sub(remaining, size);

@@private:
77437743 size_t allocationSize = JSFinalObject::allocationSize(structure->inlineCapacity());
77447744 MarkedAllocator* allocator = &vm().heap.allocatorForObjectWithoutDestructor(allocationSize);
77457745
7746  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("allocateObject slow path"));
7747  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("allocateObject continuation"));
 7746 LBasicBlock slowPath = m_out.newBlock();
 7747 LBasicBlock continuation = m_out.newBlock();
77487748
77497749 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
77507750

@@private:
78217821
78227822 ArrayValues allocateJSArray(Structure* structure, unsigned numElements)
78237823 {
7824  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("JSArray allocation slow path"));
7825  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("JSArray allocation continuation"));
 7824 LBasicBlock slowPath = m_out.newBlock();
 7825 LBasicBlock continuation = m_out.newBlock();
78267826
78277827 LBasicBlock lastNext = m_out.insertNewBlocksBefore(slowPath);
78287828

@@private:
78737873 LValue length = m_out.load32NonNegative(stringValue, m_heaps.JSString_length);
78747874 return m_out.notEqual(length, m_out.int32Zero);
78757875 }
 7876 case StringOrOtherUse: {
 7877 LValue value = lowJSValue(edge, ManualOperandSpeculation);
 7878
 7879 LBasicBlock cellCase = m_out.newBlock();
 7880 LBasicBlock notCellCase = m_out.newBlock();
 7881 LBasicBlock continuation = m_out.newBlock();
 7882
 7883 m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
 7884
 7885 LBasicBlock lastNext = m_out.appendTo(cellCase, notCellCase);
 7886
 7887 FTL_TYPE_CHECK(jsValueValue(value), edge, (~SpecCell) | SpecString, isNotString(value));
 7888 LValue length = m_out.load32NonNegative(value, m_heaps.JSString_length);
 7889 ValueFromBlock cellResult = m_out.anchor(m_out.notEqual(length, m_out.int32Zero));
 7890 m_out.jump(continuation);
 7891
 7892 m_out.appendTo(notCellCase, continuation);
 7893
 7894 FTL_TYPE_CHECK(jsValueValue(value), edge, SpecCell | SpecOther, isNotOther(value));
 7895 ValueFromBlock notCellResult = m_out.anchor(m_out.booleanFalse);
 7896 m_out.jump(continuation);
 7897 m_out.appendTo(continuation, lastNext);
 7898
 7899 return m_out.phi(Int32, cellResult, notCellResult);
 7900 }
78767901 case UntypedUse: {
78777902 LValue value = lowJSValue(edge);
78787903

@@private:
78927917 // result = value == jsTrue
78937918 // }
78947919
7895  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped cell case"));
7896  LBasicBlock stringCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped string case"));
7897  LBasicBlock notStringCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not string case"));
7898  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not cell case"));
7899  LBasicBlock int32Case = FTL_NEW_BLOCK(m_out, ("Boolify untyped int32 case"));
7900  LBasicBlock notInt32Case = FTL_NEW_BLOCK(m_out, ("Boolify untyped not int32 case"));
7901  LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped double case"));
7902  LBasicBlock notDoubleCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped not double case"));
7903  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Boolify untyped continuation"));
 7920 LBasicBlock cellCase = m_out.newBlock();
 7921 LBasicBlock stringCase = m_out.newBlock();
 7922 LBasicBlock notStringCase = m_out.newBlock();
 7923 LBasicBlock notCellCase = m_out.newBlock();
 7924 LBasicBlock int32Case = m_out.newBlock();
 7925 LBasicBlock notInt32Case = m_out.newBlock();
 7926 LBasicBlock doubleCase = m_out.newBlock();
 7927 LBasicBlock notDoubleCase = m_out.newBlock();
 7928 LBasicBlock continuation = m_out.newBlock();
79047929
79057930 Vector<ValueFromBlock> results;
79067931

@@private:
79227947 if (masqueradesAsUndefinedWatchpointIsStillValid())
79237948 isTruthyObject = m_out.booleanTrue;
79247949 else {
7925  LBasicBlock masqueradesCase = FTL_NEW_BLOCK(m_out, ("Boolify untyped masquerades case"));
 7950 LBasicBlock masqueradesCase = m_out.newBlock();
79267951
79277952 results.append(m_out.anchor(m_out.booleanTrue));
79287953

@@private:
79948019
79958020 LValue value = lowJSValue(edge, operandMode);
79968021
7997  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined cell case"));
7998  LBasicBlock primitiveCase = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined primitive case"));
7999  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined continuation"));
 8022 LBasicBlock cellCase = m_out.newBlock();
 8023 LBasicBlock primitiveCase = m_out.newBlock();
 8024 LBasicBlock continuation = m_out.newBlock();
80008025
80018026 m_out.branch(isNotCell(value, provenType(edge)), unsure(primitiveCase), unsure(cellCase));
80028027

@@private:
80188043 m_out.jump(continuation);
80198044 } else {
80208045 LBasicBlock masqueradesCase =
8021  FTL_NEW_BLOCK(m_out, ("EqualNullOrUndefined masquerades case"));
 8046 m_out.newBlock();
80228047
80238048 results.append(m_out.anchor(m_out.booleanFalse));
80248049

@@private:
80758100 index, m_out.load32NonNegative(storage, m_heaps.Butterfly_publicLength));
80768101 if (!m_node->arrayMode().isInBounds()) {
80778102 LBasicBlock notInBoundsCase =
8078  FTL_NEW_BLOCK(m_out, ("PutByVal not in bounds"));
 8103 m_out.newBlock();
80798104 LBasicBlock performStore =
8080  FTL_NEW_BLOCK(m_out, ("PutByVal perform store"));
 8105 m_out.newBlock();
80818106
80828107 m_out.branch(isNotInBounds, unsure(notInBoundsCase), unsure(performStore));
80838108

@@private:
80908115 speculate(OutOfBounds, noValue(), 0, isOutOfBounds);
80918116 else {
80928117 LBasicBlock outOfBoundsCase =
8093  FTL_NEW_BLOCK(m_out, ("PutByVal out of bounds"));
 8118 m_out.newBlock();
80948119 LBasicBlock holeCase =
8095  FTL_NEW_BLOCK(m_out, ("PutByVal hole case"));
 8120 m_out.newBlock();
80968121
80978122 m_out.branch(isOutOfBounds, rarely(outOfBoundsCase), usually(holeCase));
80988123

@@private:
81678192 LValue stringImpl = m_out.loadPtr(string, m_heaps.JSString_value);
81688193 LValue length = m_out.load32(string, m_heaps.JSString_length);
81698194
8170  LBasicBlock hasImplBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString has impl case"));
8171  LBasicBlock is8BitBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString is 8 bit case"));
8172  LBasicBlock slowBlock = FTL_NEW_BLOCK(m_out, ("Switch/SwitchString slow case"));
 8195 LBasicBlock hasImplBlock = m_out.newBlock();
 8196 LBasicBlock is8BitBlock = m_out.newBlock();
 8197 LBasicBlock slowBlock = m_out.newBlock();
81738198
81748199 m_out.branch(m_out.isNull(stringImpl), unsure(slowBlock), unsure(hasImplBlock));
81758200

@@private:
83448369 characterCases.append(currentCase);
83458370
83468371 Vector<LBasicBlock> characterBlocks;
8347  for (CharacterCase& myCase : characterCases)
8348  characterBlocks.append(FTL_NEW_BLOCK(m_out, ("Switch/SwitchString case for ", myCase.character, " at index ", commonChars)));
 8372 for (unsigned i = characterCases.size(); i--;)
 8373 characterBlocks.append(m_out.newBlock());
83498374
83508375 Vector<SwitchCase> switchCases;
83518376 for (unsigned i = 0; i < characterCases.size(); ++i) {

@@private:
84398464 // contination and set it as the nextBlock (m_out.insertNewBlocksBefore(continuation)) before
84408465 // calling this. For example:
84418466 //
8442  // LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("My continuation"));
 8467 // LBasicBlock continuation = m_out.newBlock();
84438468 // LBasicBlock lastNext = m_out.insertNewBlocksBefore(continuation);
84448469 // buildTypeOf(
84458470 // child, value,

@@private:
84798504 // return undefined
84808505 // }
84818506
8482  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf cell case"));
8483  LBasicBlock objectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf object case"));
8484  LBasicBlock functionCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf function case"));
8485  LBasicBlock notFunctionCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not function case"));
8486  LBasicBlock reallyObjectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf really object case"));
8487  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("buildTypeOf slow path"));
8488  LBasicBlock unreachable = FTL_NEW_BLOCK(m_out, ("buildTypeOf unreachable"));
8489  LBasicBlock notObjectCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not object case"));
8490  LBasicBlock stringCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf string case"));
8491  LBasicBlock symbolCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf symbol case"));
8492  LBasicBlock notCellCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not cell case"));
8493  LBasicBlock numberCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf number case"));
8494  LBasicBlock notNumberCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not number case"));
8495  LBasicBlock notNullCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf not null case"));
8496  LBasicBlock booleanCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf boolean case"));
8497  LBasicBlock undefinedCase = FTL_NEW_BLOCK(m_out, ("buildTypeOf undefined case"));
 8507 LBasicBlock cellCase = m_out.newBlock();
 8508 LBasicBlock objectCase = m_out.newBlock();
 8509 LBasicBlock functionCase = m_out.newBlock();
 8510 LBasicBlock notFunctionCase = m_out.newBlock();
 8511 LBasicBlock reallyObjectCase = m_out.newBlock();
 8512 LBasicBlock slowPath = m_out.newBlock();
 8513 LBasicBlock unreachable = m_out.newBlock();
 8514 LBasicBlock notObjectCase = m_out.newBlock();
 8515 LBasicBlock stringCase = m_out.newBlock();
 8516 LBasicBlock symbolCase = m_out.newBlock();
 8517 LBasicBlock notCellCase = m_out.newBlock();
 8518 LBasicBlock numberCase = m_out.newBlock();
 8519 LBasicBlock notNumberCase = m_out.newBlock();
 8520 LBasicBlock notNullCase = m_out.newBlock();
 8521 LBasicBlock booleanCase = m_out.newBlock();
 8522 LBasicBlock undefinedCase = m_out.newBlock();
84988523
84998524 m_out.branch(isCell(value, provenType(child)), unsure(cellCase), unsure(notCellCase));
85008525

@@private:
85748599
85758600 LValue doubleToInt32(LValue doubleValue, double low, double high, bool isSigned = true)
85768601 {
8577  LBasicBlock greatEnough = FTL_NEW_BLOCK(m_out, ("doubleToInt32 greatEnough"));
8578  LBasicBlock withinRange = FTL_NEW_BLOCK(m_out, ("doubleToInt32 withinRange"));
8579  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("doubleToInt32 slowPath"));
8580  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("doubleToInt32 continuation"));
 8602 LBasicBlock greatEnough = m_out.newBlock();
 8603 LBasicBlock withinRange = m_out.newBlock();
 8604 LBasicBlock slowPath = m_out.newBlock();
 8605 LBasicBlock continuation = m_out.newBlock();
85818606
85828607 Vector<ValueFromBlock, 2> results;
85838608

@@private:
86188643
86198644 LValue sensibleDoubleToInt32(LValue doubleValue)
86208645 {
8621  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("sensible doubleToInt32 slow path"));
8622  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("sensible doubleToInt32 continuation"));
 8646 LBasicBlock slowPath = m_out.newBlock();
 8647 LBasicBlock continuation = m_out.newBlock();
86238648
86248649 LValue fastResultValue = m_out.doubleToInt(doubleValue);
86258650 ValueFromBlock fastResult = m_out.anchor(fastResultValue);

@@private:
91339158
91349159 LValue strictInt52ToJSValue(LValue value)
91359160 {
9136  LBasicBlock isInt32 = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue isInt32 case"));
9137  LBasicBlock isDouble = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue isDouble case"));
9138  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("strictInt52ToJSValue continuation"));
 9161 LBasicBlock isInt32 = m_out.newBlock();
 9162 LBasicBlock isDouble = m_out.newBlock();
 9163 LBasicBlock continuation = m_out.newBlock();
91399164
91409165 Vector<ValueFromBlock, 2> results;
91419166

@@private:
92139238
92149239 LValue jsValueToStrictInt52(Edge edge, LValue boxedValue)
92159240 {
9216  LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing int case"));
9217  LBasicBlock doubleCase = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing double case"));
9218  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("jsValueToInt52 unboxing continuation"));
 9241 LBasicBlock intCase = m_out.newBlock();
 9242 LBasicBlock doubleCase = m_out.newBlock();
 9243 LBasicBlock continuation = m_out.newBlock();
92199244
92209245 LValue isNotInt32;
92219246 if (!m_interpreter.needsTypeCheck(edge, SpecInt32))

@@private:
92679292 speculate(Overflow, FormattedValue(DataFormatDouble, value), m_node, valueNotConvertibleToInteger);
92689293
92699294 if (shouldCheckNegativeZero) {
9270  LBasicBlock valueIsZero = FTL_NEW_BLOCK(m_out, ("ConvertDoubleToInt32 on zero"));
9271  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("ConvertDoubleToInt32 continuation"));
 9295 LBasicBlock valueIsZero = m_out.newBlock();
 9296 LBasicBlock continuation = m_out.newBlock();
92729297 m_out.branch(m_out.isZero32(integerValue), unsure(valueIsZero), unsure(continuation));
92739298
92749299 LBasicBlock lastNext = m_out.appendTo(valueIsZero, continuation);

@@private:
94219446 case StringUse:
94229447 speculateString(edge);
94239448 break;
 9449 case StringOrOtherUse:
 9450 speculateStringOrOther(edge);
 9451 break;
94249452 case StringIdentUse:
94259453 speculateStringIdent(edge);
94269454 break;

@@private:
94849512 {
94859513 LValue value = lowJSValue(edge, ManualOperandSpeculation);
94869514
9487  LBasicBlock isNotCell = FTL_NEW_BLOCK(m_out, ("Speculate CellOrOther not cell"));
9488  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate CellOrOther continuation"));
 9515 LBasicBlock isNotCell = m_out.newBlock();
 9516 LBasicBlock continuation = m_out.newBlock();
94899517
94909518 m_out.branch(isCell(value, provenType(edge)), unsure(continuation), unsure(isNotCell));
94919519

@@private:
96609688
96619689 LValue value = lowJSValue(edge, ManualOperandSpeculation);
96629690
9663  LBasicBlock cellCase = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther cell case"));
9664  LBasicBlock primitiveCase = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther primitive case"));
9665  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("speculateObjectOrOther continuation"));
 9691 LBasicBlock cellCase = m_out.newBlock();
 9692 LBasicBlock primitiveCase = m_out.newBlock();
 9693 LBasicBlock continuation = m_out.newBlock();
96669694
96679695 m_out.branch(isNotCell(value, provenType(edge)), unsure(primitiveCase), unsure(cellCase));
96689696

@@private:
97159743 speculateString(edge, lowCell(edge));
97169744 }
97179745
 9746 void speculateStringOrOther(Edge edge, LValue value)
 9747 {
 9748 LBasicBlock cellCase = m_out.newBlock();
 9749 LBasicBlock notCellCase = m_out.newBlock();
 9750 LBasicBlock continuation = m_out.newBlock();
 9751
 9752 m_out.branch(isCell(value, provenType(edge)), unsure(cellCase), unsure(notCellCase));
 9753
 9754 LBasicBlock lastNext = m_out.appendTo(cellCase, notCellCase);
 9755
 9756 FTL_TYPE_CHECK(jsValueValue(value), edge, (~SpecCell) | SpecString, isNotString(value));
 9757
 9758 m_out.jump(continuation);
 9759 m_out.appendTo(notCellCase, continuation);
 9760
 9761 FTL_TYPE_CHECK(jsValueValue(value), edge, SpecCell | SpecOther, isNotOther(value));
 9762
 9763 m_out.jump(continuation);
 9764 m_out.appendTo(continuation, lastNext);
 9765 }
 9766
 9767 void speculateStringOrOther(Edge edge)
 9768 {
 9769 speculateStringOrOther(edge, lowJSValue(edge, ManualOperandSpeculation));
 9770 }
 9771
97189772 void speculateStringIdent(Edge edge, LValue string, LValue stringImpl)
97199773 {
97209774 if (!m_interpreter.needsTypeCheck(edge, SpecStringIdent | ~SpecString))

@@private:
97489802 if (!m_interpreter.needsTypeCheck(edge, SpecString | SpecStringObject))
97499803 return;
97509804
9751  LBasicBlock notString = FTL_NEW_BLOCK(m_out, ("Speculate StringOrStringObject not string case"));
9752  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate StringOrStringObject continuation"));
 9805 LBasicBlock notString = m_out.newBlock();
 9806 LBasicBlock continuation = m_out.newBlock();
97539807
97549808 LValue structureID = m_out.load32(lowCell(edge), m_heaps.JSCell_structureID);
97559809 m_out.branch(

@@private:
98219875 LValue value = lowJSValue(edge, ManualOperandSpeculation);
98229876 LValue doubleValue = unboxDouble(value);
98239877
9824  LBasicBlock intCase = FTL_NEW_BLOCK(m_out, ("speculateRealNumber int case"));
9825  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("speculateRealNumber continuation"));
 9878 LBasicBlock intCase = m_out.newBlock();
 9879 LBasicBlock continuation = m_out.newBlock();
98269880
98279881 m_out.branch(
98289882 m_out.doubleEqual(doubleValue, doubleValue),

@@private:
98709924
98719925 LValue value = lowJSValue(edge, ManualOperandSpeculation);
98729926
9873  LBasicBlock isCellCase = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar is cell case"));
9874  LBasicBlock isStringCase = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar is string case"));
9875  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Speculate NotStringVar continuation"));
 9927 LBasicBlock isCellCase = m_out.newBlock();
 9928 LBasicBlock isStringCase = m_out.newBlock();
 9929 LBasicBlock continuation = m_out.newBlock();
98769930
98779931 m_out.branch(isCell(value, provenType(edge)), unsure(isCellCase), unsure(continuation));
98789932

@@private:
99259979
99269980 void emitStoreBarrier(LValue base)
99279981 {
9928  LBasicBlock slowPath = FTL_NEW_BLOCK(m_out, ("Store barrier slow path"));
9929  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Store barrier continuation"));
 9982 LBasicBlock slowPath = m_out.newBlock();
 9983 LBasicBlock continuation = m_out.newBlock();
99309984
99319985 m_out.branch(
99329986 m_out.notZero32(loadCellState(base)), usually(continuation), rarely(slowPath));

@@private:
1004910103 return;
1005010104 }
1005110105
10052  LBasicBlock continuation = FTL_NEW_BLOCK(m_out, ("Exception check continuation"));
 10106 LBasicBlock continuation = m_out.newBlock();
1005310107
1005410108 m_out.branch(
1005510109 hadException, rarely(m_handleExceptions), usually(continuation));
197641

Source/JavaScriptCore/ftl/FTLOutput.cpp

@@void Output::initialize(AbstractHeapRepo
4949 m_heaps = &heaps;
5050}
5151
52 LBasicBlock Output::newBlock(const char*)
 52LBasicBlock Output::newBlock()
5353{
5454 LBasicBlock result = m_proc.addBlock(m_frequency);
5555

@@void Output::branch(LValue condition, LB
232232
233233void Output::check(LValue condition, WeightedTarget taken, Weight notTakenWeight)
234234{
235  LBasicBlock continuation = FTL_NEW_BLOCK(*this, ("Output::check continuation"));
 235 LBasicBlock continuation = newBlock();
236236 branch(condition, taken, WeightedTarget(continuation, notTakenWeight));
237237 appendTo(continuation);
238238}
197641

Source/JavaScriptCore/ftl/FTLOutput.h

@@public:
8282 m_frequency = value;
8383 }
8484
85  LBasicBlock newBlock(const char* name = "");
 85 LBasicBlock newBlock();
8686
8787 LBasicBlock insertNewBlocksBefore(LBasicBlock nextBlock)
8888 {

@@inline LValue Output::fround(LValue doub
524524#pragma GCC diagnostic pop
525525#endif // COMPILER(GCC_OR_CLANG)
526526
527 #define FTL_NEW_BLOCK(output, nameArguments) \
528  (LIKELY(!verboseCompilationEnabled()) \
529  ? (output).newBlock() \
530  : (output).newBlock((toCString nameArguments).data()))
531 
532527} } // namespace JSC::FTL
533528
534529#endif // ENABLE(FTL_JIT)
197641