Ignore:
Timestamp:
Apr 5, 2022, 5:54:05 PM (3 years ago)
Author:
[email protected]
Message:

[JSC] Strictly annotate pointers with TrustedImmPtr in CCallHelpers
https://bugs.webkit.org/show_bug.cgi?id=238827

Reviewed by Mark Lam.

This allows us to detect pointer use in DFG easy. This is important in unlinked DFG development.
We also consistently use m_graph instead of m_jit.graph() in DFG::SpeculativeJIT.

We also purge CodeBlock* embedding in DFG code completely. Now we load it from the cfr
instead (compileLogShadowChickenTail and callOperationWithCallFrameRollbackOnException).

  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGCallArrayAllocatorSlowPathGenerator.h:
  • dfg/DFGCallCreateDirectArgumentsSlowPathGenerator.h:
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::OSRExit):
(JSC::DFG::OSRExit::compileExit):

  • dfg/DFGOSRExitCompilerCommon.cpp:

(JSC::DFG::osrWriteBarrier):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::SpeculativeJIT):
(JSC::DFG::SpeculativeJIT::emitGetCallee):
(JSC::DFG::SpeculativeJIT::emitOSRExitFuzzCheck):
(JSC::DFG::SpeculativeJIT::speculationCheck):
(JSC::DFG::SpeculativeJIT::silentSavePlanForGPR):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::useChildren):
(JSC::DFG::SpeculativeJIT::compileGetById):
(JSC::DFG::SpeculativeJIT::compileGetByIdFlush):
(JSC::DFG::SpeculativeJIT::compileDeleteById):
(JSC::DFG::SpeculativeJIT::compileDeleteByVal):
(JSC::DFG::SpeculativeJIT::compileInById):
(JSC::DFG::SpeculativeJIT::compileInByVal):
(JSC::DFG::SpeculativeJIT::compileHasPrivate):
(JSC::DFG::SpeculativeJIT::compileStringSlice):
(JSC::DFG::SpeculativeJIT::compileLoopHint):
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::checkArgumentTypes):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::createOSREntries):
(JSC::DFG::SpeculativeJIT::linkOSREntries):
(JSC::DFG::SpeculativeJIT::compileCheckTraps):
(JSC::DFG::SpeculativeJIT::compileContiguousPutByVal):
(JSC::DFG::SpeculativeJIT::compileDoublePutByVal):
(JSC::DFG::SpeculativeJIT::compilePutByVal):
(JSC::DFG::SpeculativeJIT::compileGetByValOnString):
(JSC::DFG::compileClampDoubleToByte):
(JSC::DFG::SpeculativeJIT::jumpForTypedArrayOutOfBounds):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::nextBlock):
(JSC::DFG::SpeculativeJIT::masqueradesAsUndefinedWatchpointIsStillValid):
(JSC::DFG::SpeculativeJIT::identifierUID):
(JSC::DFG::SpeculativeJIT::callOperationWithCallFrameRollbackOnException):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::compileToBoolean):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileArithRandom):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillJSValue):
(JSC::DFG::SpeculativeJIT::cachedGetById):
(JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompareNullOrUndefined):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranchNullOrUndefined):
(JSC::DFG::SpeculativeJIT::emitCall):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt32Strict):
(JSC::DFG::SpeculativeJIT::fillSpeculateInt52):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::fillSpeculateBoolean):
(JSC::DFG::SpeculativeJIT::fillSpeculateBigInt32):
(JSC::DFG::SpeculativeJIT::compileCompareEqPtr):
(JSC::DFG::SpeculativeJIT::compileToBooleanObjectOrOther):
(JSC::DFG::SpeculativeJIT::compileToBoolean):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):
(JSC::DFG::SpeculativeJIT::emitUntypedBranch):
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compileGetByVal):
(JSC::DFG::SpeculativeJIT::compileNewTypedArrayWithInt52Size):
(JSC::DFG::SpeculativeJIT::compile):
(JSC::DFG::SpeculativeJIT::compileArithRandom):
(JSC::DFG::SpeculativeJIT::compileDateGet):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileUnaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileBinaryMathIC):
(JSC::FTL::DFG::LowerDFGToB3::getPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::compilePrivateBrandAccess):
(JSC::FTL::DFG::LowerDFGToB3::compilePutPrivateName):
(JSC::FTL::DFG::LowerDFGToB3::cachedPutById):
(JSC::FTL::DFG::LowerDFGToB3::compileGetByValImpl):
(JSC::FTL::DFG::LowerDFGToB3::compilePutByVal):
(JSC::FTL::DFG::LowerDFGToB3::compileDelBy):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileObjectKeysOrObjectGetOwnPropertyNames):
(JSC::FTL::DFG::LowerDFGToB3::compileNewStringObject):
(JSC::FTL::DFG::LowerDFGToB3::emitNewTypedArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileNotifyWrite):
(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • jit/CCallHelpers.cpp:
  • jit/CCallHelpers.h:

(JSC::CCallHelpers::std::is_pointer<CURRENT_ARGUMENT_TYPE>::value): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::emitEnterOptimizationCheck):

  • jit/JITArithmetic.cpp:

(JSC::JIT::emitMathICFast):
(JSC::JIT::emitMathICSlow):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emitSlow_op_new_object):
(JSC::JIT::emit_op_catch):
(JSC::JIT::emit_op_switch_imm):
(JSC::JIT::op_enter_handlerGenerator):
(JSC::JIT::emit_op_debug):
(JSC::JIT::emitSlow_op_loop_hint):
(JSC::JIT::emit_op_new_regexp):
(JSC::JIT::emitNewFuncCommon):
(JSC::JIT::emitNewFuncExprCommon):
(JSC::JIT::emit_op_profile_type):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_getter_by_id):
(JSC::JIT::emit_op_put_setter_by_id):
(JSC::JIT::emit_op_put_getter_setter_by_id):
(JSC::JIT::emitWriteBarrier):

  • wasm/js/WasmToJS.cpp:

(JSC::Wasm::wasmToJS):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r292372 r292445  
    8080    , m_lastGeneratedNode(LastNodeType)
    8181    , m_indexInBlock(0)
    82     , m_generationInfo(m_jit.graph().frameRegisterCount())
     82    , m_generationInfo(m_graph.frameRegisterCount())
    8383    , m_compileOkay(true)
    84     , m_state(m_jit.graph())
    85     , m_interpreter(m_jit.graph(), m_state)
     84    , m_state(m_graph)
     85    , m_interpreter(m_graph, m_state)
    8686    , m_stream(&jit.jitCode()->variableEventStream)
    8787    , m_minifiedGraph(&jit.jitCode()->minifiedDFG)
     
    208208        } else {
    209209            m_jit.move(
    210                 TrustedImmPtr::weakPointer(m_jit.graph(), inlineCallFrame->calleeRecovery.constant().asCell()),
     210                TrustedImmPtr::weakPointer(m_graph, inlineCallFrame->calleeRecovery.constant().asCell()),
    211211                calleeGPR);
    212212        }
     
    226226{
    227227    if (!Options::useOSRExitFuzz()
    228         || !canUseOSRExitFuzzing(m_jit.graph().baselineCodeBlockFor(m_origin.semantic))
     228        || !canUseOSRExitFuzzing(m_graph.baselineCodeBlockFor(m_origin.semantic))
    229229        || !doOSRExitFuzzing())
    230230        return MacroAssembler::Jump();
     
    271271    } else
    272272        m_jit.appendExitInfo(jumpToFail);
    273     m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_jit.graph().methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
     273    m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_graph.methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
    274274}
    275275
     
    286286    } else
    287287        m_jit.appendExitInfo(jumpsToFail);
    288     m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_jit.graph().methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
     288    m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_graph.methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
    289289}
    290290
     
    295295    unsigned index = m_jit.m_osrExit.size();
    296296    m_jit.appendExitInfo();
    297     m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_jit.graph().methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
     297    m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_graph.methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size()));
    298298    return OSRExitJumpPlaceholder(index);
    299299}
     
    320320    unsigned recoveryIndex = m_jit.appendSpeculationRecovery(recovery);
    321321    m_jit.appendExitInfo(jumpToFail);
    322     m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_jit.graph().methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size(), recoveryIndex));
     322    m_jit.appendOSRExit(OSRExit(kind, jsValueSource, m_graph.methodOfGettingAValueProfileFor(m_currentNode, node), this, m_stream->size(), recoveryIndex));
    323323}
    324324
     
    513513        ASSERT(info.gpr() == source);
    514514        if (node->hasConstant()) {
    515             DFG_ASSERT(m_jit.graph(), m_currentNode, node->isCellConstant());
     515            DFG_ASSERT(m_graph, m_currentNode, node->isCellConstant());
    516516            node->asCell(); // To get the assertion.
    517517            fillAction = SetCellConstant;
     
    857857    GPRReg baseReg = base.gpr();
    858858   
    859     if (arrayMode.alreadyChecked(m_jit.graph(), node, m_state.forNode(node->child1()))) {
     859    if (arrayMode.alreadyChecked(m_graph, node, m_state.forNode(node->child1()))) {
    860860        // We can purge Empty check completely in this case of CheckArrayOrEmpty since CellUse only accepts SpecCell | SpecEmpty.
    861861#if USE(JSVALUE64)
     
    10181018    if (node->flags() & NodeHasVarArgs) {
    10191019        for (unsigned childIdx = node->firstChild(); childIdx < node->firstChild() + node->numChildren(); childIdx++) {
    1020             if (!!m_jit.graph().m_varArgChildren[childIdx])
    1021                 use(m_jit.graph().m_varArgChildren[childIdx]);
     1020            if (!!m_graph.m_varArgChildren[childIdx])
     1021                use(m_graph.m_varArgChildren[childIdx]);
    10221022        }
    10231023    } else {
     
    11011101
    11021102    default:
    1103         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     1103        DFG_CRASH(m_graph, node, "Bad use kind");
    11041104        break;
    11051105    }
     
    11661166
    11671167    default:
    1168         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     1168        DFG_CRASH(m_graph, node, "Bad use kind");
    11691169        break;
    11701170    }
     
    12121212            slowPath = slowPathCall(
    12131213                slowCases, this, operationDeleteByIdOptimize,
    1214                 resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), JSValueRegs(baseGPR), node->cacheableIdentifier().rawBits(), TrustedImm32(node->ecmaMode().value()));
     1214                resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), JSValueRegs(baseGPR), node->cacheableIdentifier().rawBits(), TrustedImm32(node->ecmaMode().value()));
    12151215        }
    12161216#else
     
    12231223            slowPath = slowPathCall(
    12241224                slowCases, this, operationDeleteByIdOptimize,
    1225                 resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), CCallHelpers::CellValue(baseGPR), node->cacheableIdentifier().rawBits(), TrustedImm32(node->ecmaMode().value()));
     1225                resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), CCallHelpers::CellValue(baseGPR), node->cacheableIdentifier().rawBits(), TrustedImm32(node->ecmaMode().value()));
    12261226        }
    12271227#endif
     
    12981298            slowPath = slowPathCall(
    12991299                slowCases, this, operationDeleteByValOptimize,
    1300                 resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), JSValueRegs(baseGPR), keyRegs, TrustedImm32(node->ecmaMode().value()));
     1300                resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), JSValueRegs(baseGPR), keyRegs, TrustedImm32(node->ecmaMode().value()));
    13011301        }
    13021302#else
     
    13091309            slowPath = slowPathCall(
    13101310                slowCases, this, operationDeleteByValOptimize,
    1311                 resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), CCallHelpers::CellValue(baseGPR), keyRegs, TrustedImm32(node->ecmaMode().value()));
     1311                resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), CCallHelpers::CellValue(baseGPR), keyRegs, TrustedImm32(node->ecmaMode().value()));
    13121312        }
    13131313#endif
     
    13791379            slowCases, this, operationInByIdOptimize,
    13801380            NeedToSpill, ExceptionCheckRequirement::CheckNeeded,
    1381             resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), CCallHelpers::CellValue(baseGPR), node->cacheableIdentifier().rawBits());
     1381            resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), CCallHelpers::CellValue(baseGPR), node->cacheableIdentifier().rawBits());
    13821382    }
    13831383
     
    14291429            slowCases, this, operationInByValOptimize,
    14301430            NeedToSpill, ExceptionCheckRequirement::CheckNeeded,
    1431             resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), nullptr, CCallHelpers::CellValue(baseGPR), keyRegs);
     1431            resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), nullptr, CCallHelpers::CellValue(baseGPR), keyRegs);
    14321432    }
    14331433
     
    14831483            slowCases, this, type == AccessType::HasPrivateName ? operationHasPrivateNameOptimize : operationHasPrivateBrandOptimize,
    14841484            NeedToSpill, ExceptionCheckRequirement::CheckNeeded,
    1485             resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(propertyOrBrandGPR));
     1485            resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(propertyOrBrandGPR));
    14861486    }
    14871487
     
    19121912    VM& vm = this->vm();
    19131913    auto nonEmptyCase = m_jit.branch32(MacroAssembler::Below, startIndexGPR, tempGPR);
    1914     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(vm)), tempGPR);
     1914    m_jit.move(TrustedImmPtr::weakPointer(m_graph, jsEmptyString(vm)), tempGPR);
    19151915    doneCases.append(m_jit.jump());
    19161916
     
    19421942    m_jit.loadPtr(CCallHelpers::Address(tempGPR), tempGPR);
    19431943
    1944     addSlowPathGenerator(slowPathCall(bigCharacter, this, operationSingleCharacterString, tempGPR, &vm, tempGPR));
     1944    addSlowPathGenerator(slowPathCall(bigCharacter, this, operationSingleCharacterString, tempGPR, TrustedImmPtr(&vm), tempGPR));
    19451945
    19461946    addSlowPathGenerator(slowPathCall(slowCases, this, operationStringSubstr, tempGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), stringGPR, startIndexGPR, tempGPR));
     
    21152115        bool emitEarlyReturn = true;
    21162116        node->origin.semantic.walkUpInlineStack([&](CodeOrigin origin) {
    2117             CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(origin);
     2117            CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(origin);
    21182118            if (!baselineCodeBlock->loopHintsAreEligibleForFuzzingEarlyReturn())
    21192119                emitEarlyReturn = false;
    21202120        });
    21212121        if (emitEarlyReturn) {
    2122             CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
     2122            CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(node->origin.semantic);
    21232123            BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
    21242124            const auto* instruction = baselineCodeBlock->instructions().at(bytecodeIndex.offset()).ptr();
     
    21272127            m_jit.pushToSave(GPRInfo::regT0);
    21282128            m_jit.loadPtr(ptr, GPRInfo::regT0);
    2129             auto skipEarlyReturn = m_jit.branchPtr(CCallHelpers::Below, GPRInfo::regT0, CCallHelpers::TrustedImmPtr(Options::earlyReturnFromInfiniteLoopsLimit()));
     2129            auto skipEarlyReturn = m_jit.branchPtr(CCallHelpers::Below, GPRInfo::regT0, TrustedImmPtr(Options::earlyReturnFromInfiniteLoopsLimit()));
    21302130
    21312131            if constexpr (validateDFGDoesGC) {
     
    22152215
    22162216    if (m_block->isCatchEntrypoint) {
    2217         m_jit.addPtr(CCallHelpers::TrustedImm32(-(m_jit.graph().frameRegisterCount() * sizeof(Register))), GPRInfo::callFrameRegister,  CCallHelpers::stackPointerRegister);
     2217        m_jit.addPtr(CCallHelpers::TrustedImm32(-(m_graph.frameRegisterCount() * sizeof(Register))), GPRInfo::callFrameRegister,  CCallHelpers::stackPointerRegister);
    22182218        m_jit.emitSaveCalleeSaves();
    22192219        m_jit.emitMaterializeTagCheckRegisters();
     
    22412241            continue; // No need to record dead SetLocal's.
    22422242        format = dataFormatFor(variable->flushFormat());
    2243         DFG_ASSERT(m_jit.graph(), node, !operand.isArgument() || operand.virtualRegister().toArgument() >= 0);
     2243        DFG_ASSERT(m_graph, node, !operand.isArgument() || operand.virtualRegister().toArgument() >= 0);
    22442244        m_stream->appendAndLog(VariableEvent::setLocal(operand, variable->machineLocal(), format));
    22452245    }
     
    22902290            dataLogLn("SpeculativeJIT generating Node @", (int)m_currentNode->index(), " (", m_currentNode->origin.semantic.bytecodeIndex().offset(), ") at JIT offset 0x", m_jit.debugOffset());
    22912291
    2292         if (Options::validateDFGExceptionHandling() && (mayExit(m_jit.graph(), m_currentNode) != DoesNotExit || m_currentNode->isTerminal()))
    2293             m_jit.jitReleaseAssertNoException(m_jit.vm());
     2292        if (Options::validateDFGExceptionHandling() && (mayExit(m_graph, m_currentNode) != DoesNotExit || m_currentNode->isTerminal()))
     2293            m_jit.jitReleaseAssertNoException(vm());
    22942294
    22952295        m_jit.pcToCodeOriginMapBuilder().appendItem(m_jit.labelIgnoringWatchpoints(), m_origin.semantic);
     
    23512351    m_origin = NodeOrigin(CodeOrigin(BytecodeIndex(0)), CodeOrigin(BytecodeIndex(0)), true);
    23522352
    2353     auto& arguments = m_jit.graph().m_rootToArguments.find(m_jit.graph().block(0))->value;
     2353    auto& arguments = m_graph.m_rootToArguments.find(m_graph.block(0))->value;
    23542354    for (unsigned i = 0; i < m_jit.codeBlock()->numParameters(); ++i) {
    23552355        Node* node = arguments[i];
     
    24232423   
    24242424    ASSERT(!m_currentNode);
    2425     for (BlockIndex blockIndex = 0; blockIndex < m_jit.graph().numBlocks(); ++blockIndex) {
     2425    for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
    24262426        m_jit.setForBlockIndex(blockIndex);
    2427         m_block = m_jit.graph().block(blockIndex);
     2427        m_block = m_graph.block(blockIndex);
    24282428        compileCurrentBlock();
    24292429    }
     
    24342434void SpeculativeJIT::createOSREntries()
    24352435{
    2436     for (BlockIndex blockIndex = 0; blockIndex < m_jit.graph().numBlocks(); ++blockIndex) {
    2437         BasicBlock* block = m_jit.graph().block(blockIndex);
     2436    for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
     2437        BasicBlock* block = m_graph.block(blockIndex);
    24382438        if (!block)
    24392439            continue;
     
    24492449{
    24502450    unsigned osrEntryIndex = 0;
    2451     for (BlockIndex blockIndex = 0; blockIndex < m_jit.graph().numBlocks(); ++blockIndex) {
    2452         BasicBlock* block = m_jit.graph().block(blockIndex);
     2451    for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) {
     2452        BasicBlock* block = m_graph.block(blockIndex);
    24532453        if (!block)
    24542454            continue;
     
    24562456            continue;
    24572457        if (block->isCatchEntrypoint) {
    2458             auto& argumentsVector = m_jit.graph().m_rootToArguments.find(block)->value;
     2458            auto& argumentsVector = m_graph.m_rootToArguments.find(block)->value;
    24592459            Vector<FlushFormat> argumentFormats;
    24602460            argumentFormats.reserveInitialCapacity(argumentsVector.size());
     
    24752475
    24762476    m_jit.jitCode()->finalizeOSREntrypoints(WTFMove(m_jit.m_osrEntry));
    2477     m_jit.jitCode()->common.finalizeCatchEntrypoints(WTFMove(m_jit.graph().m_catchEntrypoints));
     2477    m_jit.jitCode()->common.finalizeCatchEntrypoints(WTFMove(m_graph.m_catchEntrypoints));
    24782478
    24792479    ASSERT(osrEntryIndex == m_osrEntryHeads.size());
     
    24962496
    24972497    JITCompiler::Jump needTrapHandling = m_jit.branchTest32(JITCompiler::NonZero,
    2498         JITCompiler::AbsoluteAddress(m_jit.vm().traps().trapBitsAddress()),
     2498        JITCompiler::AbsoluteAddress(vm().traps().trapBitsAddress()),
    24992499        TrustedImm32(VMTraps::AsyncEvents));
    25002500
     
    25052505void SpeculativeJIT::compileContiguousPutByVal(Node* node)
    25062506{
    2507     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
    2508     SpeculateStrictInt32Operand property(this, m_jit.graph().varArgChild(node, 1));
    2509     JSValueOperand value(this, m_jit.graph().varArgChild(node, 2), ManualOperandSpeculation);
     2507    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
     2508    SpeculateStrictInt32Operand property(this, m_graph.varArgChild(node, 1));
     2509    JSValueOperand value(this, m_graph.varArgChild(node, 2), ManualOperandSpeculation);
    25102510
    25112511    GPRReg baseReg = base.gpr();
     
    25162516        return;
    25172517
    2518     StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
     2518    StorageOperand storage(this, m_graph.varArgChild(node, 3));
    25192519    GPRReg storageReg = storage.gpr();
    25202520
     
    25742574    ArrayMode arrayMode = node->arrayMode();
    25752575
    2576     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
    2577     SpeculateStrictInt32Operand property(this, m_jit.graph().varArgChild(node, 1));
    2578     SpeculateDoubleOperand value(this, m_jit.graph().varArgChild(node, 2));
     2576    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
     2577    SpeculateStrictInt32Operand property(this, m_graph.varArgChild(node, 1));
     2578    SpeculateDoubleOperand value(this, m_graph.varArgChild(node, 2));
    25792579
    25802580    GPRReg baseReg = base.gpr();
     
    25832583
    25842584    DFG_TYPE_CHECK(
    2585         JSValueRegs(), m_jit.graph().varArgChild(node, 2), SpecFullRealNumber,
     2585        JSValueRegs(), m_graph.varArgChild(node, 2), SpecFullRealNumber,
    25862586        m_jit.branchIfNaN(valueReg));
    25872587
     
    25892589        return;
    25902590
    2591     StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
     2591    StorageOperand storage(this, m_graph.varArgChild(node, 3));
    25922592    GPRReg storageReg = storage.gpr();
    25932593
     
    26482648{
    26492649    ArrayMode arrayMode = node->arrayMode().modeForPut();
    2650     Edge child1 = m_jit.graph().varArgChild(node, 0);
    2651     Edge child2 = m_jit.graph().varArgChild(node, 1);
    2652     Edge child3 = m_jit.graph().varArgChild(node, 2);
    2653     Edge child4 = m_jit.graph().varArgChild(node, 3);
     2650    Edge child1 = m_graph.varArgChild(node, 0);
     2651    Edge child2 = m_graph.varArgChild(node, 1);
     2652    Edge child3 = m_graph.varArgChild(node, 2);
     2653    Edge child4 = m_graph.varArgChild(node, 3);
    26542654
    26552655    switch (arrayMode.type()) {
     
    26672667    case Array::BigUint64Array:
    26682668#endif
    2669         DFG_CRASH(m_jit.graph(), node, "Bad array mode type");
     2669        DFG_CRASH(m_graph, node, "Bad array mode type");
    26702670        break;
    26712671#if USE(JSVALUE64)
     
    26742674#endif
    26752675    case Array::Generic: {
    2676         DFG_ASSERT(m_jit.graph(), node, node->op() == PutByVal || node->op() == PutByValDirect, node->op());
     2676        DFG_ASSERT(m_graph, node, node->op() == PutByVal || node->op() == PutByValDirect, node->op());
    26772677        if (m_graph.m_slowPutByVal.contains(node) || (child1.useKind() != CellUse && child1.useKind() != KnownCellUse)) {
    26782678            if (child1.useKind() == CellUse || child1.useKind() == KnownCellUse) {
     
    27562756            slowPath = slowPathCall(
    27572757                slowCases, this, operation,
    2758                 NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), baseRegs, propertyRegs, valueRegs, gen.stubInfo(), nullptr);
     2758                NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), baseRegs, propertyRegs, valueRegs, TrustedImmPtr(gen.stubInfo()), nullptr);
    27592759        }
    27602760
     
    29502950    addSlowPathGenerator(
    29512951        slowPathCall(
    2952             bigCharacter, this, operationSingleCharacterString, scratchReg, &vm, scratchReg));
     2952            bigCharacter, this, operationSingleCharacterString, scratchReg, TrustedImmPtr(&vm), scratchReg));
    29532953
    29542954    if (node->arrayMode().isOutOfBounds()) {
     
    29702970            // indexed properties either.
    29712971            // https://bugs.webkit.org/show_bug.cgi?id=144668
    2972             m_jit.graph().registerAndWatchStructureTransition(stringPrototypeStructure);
    2973             m_jit.graph().registerAndWatchStructureTransition(objectPrototypeStructure);
     2972            m_graph.registerAndWatchStructureTransition(stringPrototypeStructure);
     2973            m_graph.registerAndWatchStructureTransition(objectPrototypeStructure);
    29742974
    29752975            addSlowPathGenerator(makeUnique<SaneStringGetByValSlowPathGenerator>(
     
    35263526    static constexpr double byteMax = 255;
    35273527    static constexpr double half = 0.5;
    3528     jit.loadDouble(JITCompiler::TrustedImmPtr(&zero), scratch);
     3528    jit.loadDouble(SpeculativeJIT::TrustedImmPtr(&zero), scratch);
    35293529    MacroAssembler::Jump tooSmall = jit.branchDouble(MacroAssembler::DoubleLessThanOrEqualOrUnordered, source, scratch);
    3530     jit.loadDouble(JITCompiler::TrustedImmPtr(&byteMax), scratch);
     3530    jit.loadDouble(SpeculativeJIT::TrustedImmPtr(&byteMax), scratch);
    35313531    MacroAssembler::Jump tooBig = jit.branchDouble(MacroAssembler::DoubleGreaterThanAndOrdered, source, scratch);
    35323532   
    3533     jit.loadDouble(JITCompiler::TrustedImmPtr(&half), scratch);
     3533    jit.loadDouble(SpeculativeJIT::TrustedImmPtr(&half), scratch);
    35343534    // FIXME: This should probably just use a floating point round!
    35353535    // https://bugs.webkit.org/show_bug.cgi?id=72054
     
    35543554    if (node->op() == PutByValAlias)
    35553555        return JITCompiler::Jump();
    3556     JSArrayBufferView* view = m_jit.graph().tryGetFoldableView(
    3557         m_state.forNode(m_jit.graph().child(node, 0)).m_value, node->arrayMode());
     3556    JSArrayBufferView* view = m_graph.tryGetFoldableView(
     3557        m_state.forNode(m_graph.child(node, 0)).m_value, node->arrayMode());
    35583558    if (view) {
    35593559        size_t length = view->length();
    3560         Node* indexNode = m_jit.graph().child(node, 1).node();
     3560        Node* indexNode = m_graph.child(node, 1).node();
    35613561        if (indexNode->isAnyIntConstant() && static_cast<uint64_t>(indexNode->asAnyInt()) < length)
    35623562            return JITCompiler::Jump();
     
    38833883    ASSERT(isInt(type));
    38843884
    3885     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
    3886     SpeculateStrictInt32Operand property(this, m_jit.graph().varArgChild(node, 1));
    3887     StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
     3885    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
     3886    SpeculateStrictInt32Operand property(this, m_graph.varArgChild(node, 1));
     3887    StorageOperand storage(this, m_graph.varArgChild(node, 3));
    38883888
    38893889    GPRTemporary scratch(this);
     
    39053905        propertyTag, valueTag,
    39063906#endif
    3907         m_jit.graph().varArgChild(node, 2), slowPathCases, isClamped(type));
     3907        m_graph.varArgChild(node, 2), slowPathCases, isClamped(type));
    39083908    if (!result) {
    39093909        noResult(node);
     
    40034003    ASSERT(isFloat(type));
    40044004
    4005     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
    4006     SpeculateStrictInt32Operand property(this, m_jit.graph().varArgChild(node, 1));
    4007     SpeculateDoubleOperand valueOp(this, m_jit.graph().varArgChild(node, 2));
    4008     StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
     4005    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
     4006    SpeculateStrictInt32Operand property(this, m_graph.varArgChild(node, 1));
     4007    SpeculateDoubleOperand valueOp(this, m_graph.varArgChild(node, 2));
     4008    StorageOperand storage(this, m_graph.varArgChild(node, 3));
    40094009
    40104010    FPRTemporary scratch(this);
     
    41104110    }
    41114111    default:
    4112         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     4112        DFG_CRASH(m_graph, node, "Bad use kind");
    41134113    }
    41144114}
     
    41164116void SpeculativeJIT::compileGetPrivateNameByVal(Node* node, JSValueRegs base, JSValueRegs property)
    41174117{
    4118     DFG_ASSERT(m_jit.graph(), node, node->op() == GetPrivateName);
    4119     DFG_ASSERT(m_jit.graph(), node, m_graph.child(node, 1).useKind() == SymbolUse);
     4118    DFG_ASSERT(m_graph, node, node->op() == GetPrivateName);
     4119    DFG_ASSERT(m_graph, node, m_graph.child(node, 1).useKind() == SymbolUse);
    41204120
    41214121    std::optional<GPRTemporary> stubInfo;
     
    41574157        return slowPathCall(
    41584158            slowCases, this, operationGetPrivateNameOptimize,
    4159             result.regs(), TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(),
     4159            result.regs(), TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()),
    41604160            base, CCallHelpers::CellValue(property.payloadGPR()));
    41614161    };
     
    42234223
    42244224    default:
    4225         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     4225        DFG_CRASH(m_graph, node, "Bad use kind");
    42264226        break;
    42274227    }
     
    42304230void SpeculativeJIT::compilePutByValForCellWithString(Node* node)
    42314231{
    4232     SpeculateCellOperand arg1(this, m_jit.graph().varArgChild(node, 0));
    4233     SpeculateCellOperand arg2(this, m_jit.graph().varArgChild(node, 1));
    4234     JSValueOperand arg3(this, m_jit.graph().varArgChild(node, 2));
     4232    SpeculateCellOperand arg1(this, m_graph.varArgChild(node, 0));
     4233    SpeculateCellOperand arg2(this, m_graph.varArgChild(node, 1));
     4234    JSValueOperand arg3(this, m_graph.varArgChild(node, 2));
    42354235
    42364236    GPRReg arg1GPR = arg1.gpr();
     
    42384238    JSValueRegs arg3Regs = arg3.jsValueRegs();
    42394239
    4240     speculateString(m_jit.graph().varArgChild(node, 1), arg2GPR);
     4240    speculateString(m_graph.varArgChild(node, 1), arg2GPR);
    42414241
    42424242    flushRegisters();
     
    42534253void SpeculativeJIT::compilePutByValForCellWithSymbol(Node* node)
    42544254{
    4255     SpeculateCellOperand arg1(this, m_jit.graph().varArgChild(node, 0));
    4256     SpeculateCellOperand arg2(this, m_jit.graph().varArgChild(node, 1));
    4257     JSValueOperand arg3(this, m_jit.graph().varArgChild(node, 2));
     4255    SpeculateCellOperand arg1(this, m_graph.varArgChild(node, 0));
     4256    SpeculateCellOperand arg2(this, m_graph.varArgChild(node, 1));
     4257    JSValueOperand arg3(this, m_graph.varArgChild(node, 2));
    42584258
    42594259    GPRReg arg1GPR = arg1.gpr();
     
    42614261    JSValueRegs arg3Regs = arg3.jsValueRegs();
    42624262
    4263     speculateSymbol(m_jit.graph().varArgChild(node, 1), arg2GPR);
     4263    speculateSymbol(m_graph.varArgChild(node, 1), arg2GPR);
    42644264
    42654265    flushRegisters();
     
    43604360        slowPath = slowPathCall(
    43614361            slowCases, this, operation,
    4362             NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(propertyGPR), valueRegs, gen.stubInfo(), nullptr);
     4362            NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(propertyGPR), valueRegs, TrustedImmPtr(gen.stubInfo()), nullptr);
    43634363    }
    43644364
     
    44384438        slowPath = slowPathCall(
    44394439            slowCases, this, operationCheckPrivateBrandOptimize, NoResult,
    4440             TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), baseRegs, CCallHelpers::CellValue(brandGPR));
     4440            TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), baseRegs, CCallHelpers::CellValue(brandGPR));
    44414441    }
    44424442
     
    44864486        slowPath = slowPathCall(
    44874487            slowCases, this, operationSetPrivateBrandOptimize, NoResult,
    4488             TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(brandGPR));
     4488            TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), CCallHelpers::CellValue(baseGPR), CCallHelpers::CellValue(brandGPR));
    44894489    }
    44904490
     
    46254625    } else {
    46264626        slowPath = slowPathCall(
    4627             slowCases, this, operationInstanceOfOptimize, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), gen.stubInfo(), valueRegs, prototypeRegs);
     4627            slowCases, this, operationInstanceOfOptimize, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), TrustedImmPtr(gen.stubInfo()), valueRegs, prototypeRegs);
    46284628    }
    46294629   
     
    46634663#endif
    46644664   
    4665     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse);
    4666     DFG_ASSERT(m_jit.graph(), node, node->child2().useKind() == UntypedUse);
     4665    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse);
     4666    DFG_ASSERT(m_graph, node, node->child2().useKind() == UntypedUse);
    46674667   
    46684668    std::optional<GPRTemporary> stubInfo;
     
    47774777    Edge& rightChild = node->child2();
    47784778
    4779     DFG_ASSERT(m_jit.graph(), node, node->isBinaryUseKind(UntypedUse) || node->isBinaryUseKind(AnyBigIntUse) || node->isBinaryUseKind(HeapBigIntUse) || node->isBinaryUseKind(BigInt32Use));
     4779    DFG_ASSERT(m_graph, node, node->isBinaryUseKind(UntypedUse) || node->isBinaryUseKind(AnyBigIntUse) || node->isBinaryUseKind(HeapBigIntUse) || node->isBinaryUseKind(BigInt32Use));
    47804780
    47814781    if (isKnownNotNumber(leftChild.node()) || isKnownNotNumber(rightChild.node())) {
     
    52625262    }
    52635263
    5264     CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
     5264    CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(node->origin.semantic);
    52655265    BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
    52665266    BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
     
    53465346    }
    53475347
    5348     CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
     5348    CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(node->origin.semantic);
    53495349    BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
    53505350    BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
     
    56095609        if (node->identifierNumber() != UINT32_MAX)
    56105610            errorMessage = identifierUID(node->identifierNumber());
    5611         addSlowPathGenerator(slowPathCall(slowCases, this, operationToObject, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), valueRegs, errorMessage));
     5611        addSlowPathGenerator(slowPathCall(slowCases, this, operationToObject, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), valueRegs, TrustedImmPtr(errorMessage)));
    56125612    } else
    56135613        addSlowPathGenerator(slowPathCall(slowCases, this, operationCallObjectConstructor, resultGPR, TrustedImmPtr(node->cellOperand()), valueRegs));
     
    57505750
    57515751    default: {
    5752         DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     5752        DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    57535753        JSValueOperand op1(this, node->child1());
    57545754        JSValueRegs op1Regs = op1.jsValueRegs();
     
    59285928{
    59295929    // FIXME: add a fast path, at least for BigInt32, but probably also for HeapBigInt here.
    5930     CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
     5930    CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(node->origin.semantic);
    59315931    BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
    59325932    UnaryArithProfile* arithProfile = baselineCodeBlock->unaryArithProfileForBytecodeIndex(bytecodeIndex);
     
    61726172    }
    61736173
    6174     CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
     6174    CodeBlock* baselineCodeBlock = m_graph.baselineCodeBlockFor(node->origin.semantic);
    61756175    BytecodeIndex bytecodeIndex = node->origin.semantic.bytecodeIndex();
    61766176    BinaryArithProfile* arithProfile = baselineCodeBlock->binaryArithProfileForBytecodeIndex(bytecodeIndex);
     
    66456645    }
    66466646
    6647     DFG_ASSERT(m_jit.graph(), node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == AnyBigIntUse || node->binaryUseKind() == BigInt32Use, node->binaryUseKind());
     6647    DFG_ASSERT(m_graph, node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == AnyBigIntUse || node->binaryUseKind() == BigInt32Use, node->binaryUseKind());
    66486648    JSValueOperand op1(this, leftChild, ManualOperandSpeculation);
    66496649    JSValueOperand op2(this, rightChild, ManualOperandSpeculation);
     
    70337033    }
    70347034
    7035     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     7035    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    70367036
    70377037    JSValueOperand argument(this, node->child1());
     
    71657165
    71667166    default:
    7167         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     7167        DFG_CRASH(m_graph, node, "Bad use kind");
    71687168        break;
    71697169    }
     
    71787178
    71797179    static constexpr double oneConstant = 1.0;
    7180     assembler.loadDouble(MacroAssembler::TrustedImmPtr(&oneConstant), result);
     7180    assembler.loadDouble(SpeculativeJIT::TrustedImmPtr(&oneConstant), result);
    71817181
    71827182    MacroAssembler::Label startLoop(assembler.label());
     
    72207220    }
    72217221
    7222     DFG_ASSERT(m_jit.graph(), node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == AnyBigIntUse || node->binaryUseKind() == BigInt32Use, node->binaryUseKind());
     7222    DFG_ASSERT(m_graph, node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == AnyBigIntUse || node->binaryUseKind() == BigInt32Use, node->binaryUseKind());
    72237223
    72247224    JSValueOperand left(this, leftChild, ManualOperandSpeculation);
     
    82378237    GPRReg eqGPR = eq.gpr();
    82388238
    8239     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(vm())), eqGPR);
     8239    m_jit.move(TrustedImmPtr::weakPointer(m_graph, jsEmptyString(vm())), eqGPR);
    82408240    m_jit.comparePtr(invert ? CCallHelpers::Equal : CCallHelpers::NotEqual, strGPR, eqGPR, eqGPR);
    82418241    unblessedBooleanResult(eqGPR, node);
     
    82548254        valueRegs, node->child1(), (~SpecCellCheck) | SpecString, m_jit.branchIfNotString(cellGPR));
    82558255
    8256     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(vm())), tempGPR);
     8256    m_jit.move(TrustedImmPtr::weakPointer(m_graph, jsEmptyString(vm())), tempGPR);
    82578257    m_jit.comparePtr(invert ? CCallHelpers::Equal : CCallHelpers::NotEqual, cellGPR, tempGPR, tempGPR);
    82588258    auto done = m_jit.jump();
     
    82758275    speculateString(nodeUse, strGPR);
    82768276
    8277     branchPtr(CCallHelpers::Equal, strGPR, TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(vm())), notTaken);
     8277    branchPtr(CCallHelpers::Equal, strGPR, TrustedImmPtr::weakPointer(m_graph, jsEmptyString(vm())), notTaken);
    82788278    jump(taken);
    82798279
     
    82928292    DFG_TYPE_CHECK(valueRegs, nodeUse, (~SpecCellCheck) | SpecString, m_jit.branchIfNotString(cellGPR));
    82938293
    8294     branchPtr(CCallHelpers::Equal, cellGPR, TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(vm())), notTaken);
     8294    branchPtr(CCallHelpers::Equal, cellGPR, TrustedImmPtr::weakPointer(m_graph, jsEmptyString(vm())), notTaken);
    82958295    jump(taken, ForceJump);
    82968296
     
    83328332        VM& vm = this->vm();
    83338333        if (vm.primitiveGigacageEnabled().isStillValid())
    8334             m_jit.graph().watchpoints().addLazily(vm.primitiveGigacageEnabled());
     8334            m_graph.watchpoints().addLazily(vm.primitiveGigacageEnabled());
    83358335        else {
    83368336            untagArrayPtr();
     
    85768576    GPRTemporary result(this);
    85778577    GPRReg resultGPR = result.gpr();
    8578     auto* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     8578    auto* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    85798579    m_jit.loadPtr(globalObject->addressOfGlobalThis(), resultGPR);
    85808580    cellResult(resultGPR, node);
     
    87398739   
    87408740    m_jit.storePtr(scopeGPR, JITCompiler::Address(resultGPR, JSFunction::offsetOfScopeChain()));
    8741     m_jit.storePtr(TrustedImmPtr::weakPointer(m_jit.graph(), executable), JITCompiler::Address(resultGPR, JSFunction::offsetOfExecutableOrRareData()));
     8741    m_jit.storePtr(TrustedImmPtr::weakPointer(m_graph, executable), JITCompiler::Address(resultGPR, JSFunction::offsetOfExecutableOrRareData()));
    87428742    m_jit.mutatorFence(vm());
    87438743}
     
    87608760
    87618761        if (nodeType == NewGeneratorFunction)
    8762             callOperation(operationNewGeneratorFunction, resultGPR, &vm(), scopeGPR, executable);
     8762            callOperation(operationNewGeneratorFunction, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable));
    87638763        else if (nodeType == NewAsyncFunction)
    8764             callOperation(operationNewAsyncFunction, resultGPR, &vm(), scopeGPR, executable);
     8764            callOperation(operationNewAsyncFunction, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable));
    87658765        else if (nodeType == NewAsyncGeneratorFunction)
    8766             callOperation(operationNewAsyncGeneratorFunction, resultGPR, &vm(), scopeGPR, executable);
     8766            callOperation(operationNewAsyncGeneratorFunction, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable));
    87678767        else
    8768             callOperation(operationNewFunction, resultGPR, &vm(), scopeGPR, executable);
     8768            callOperation(operationNewFunction, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable));
    87698769        m_jit.exceptionCheck();
    87708770        cellResult(resultGPR, node);
     
    87728772    }
    87738773
    8774     RegisteredStructure structure = m_jit.graph().registerStructure(
     8774    RegisteredStructure structure = m_graph.registerStructure(
    87758775        [&] () {
    8776             JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     8776            JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    87778777            switch (nodeType) {
    87788778            case NewGeneratorFunction:
     
    88028802        compileNewFunctionCommon<JSFunction>(resultGPR, structure, scratch1GPR, scratch2GPR, scopeGPR, slowPath, JSFunction::allocationSize(0), executable);
    88038803           
    8804         addSlowPathGenerator(slowPathCall(slowPath, this, operationNewFunctionWithInvalidatedReallocationWatchpoint, resultGPR, &vm(), scopeGPR, executable));
     8804        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewFunctionWithInvalidatedReallocationWatchpoint, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable)));
    88058805    }
    88068806
     
    88088808        compileNewFunctionCommon<JSGeneratorFunction>(resultGPR, structure, scratch1GPR, scratch2GPR, scopeGPR, slowPath, JSGeneratorFunction::allocationSize(0), executable);
    88098809
    8810         addSlowPathGenerator(slowPathCall(slowPath, this, operationNewGeneratorFunctionWithInvalidatedReallocationWatchpoint, resultGPR, &vm(), scopeGPR, executable));
     8810        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewGeneratorFunctionWithInvalidatedReallocationWatchpoint, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable)));
    88118811    }
    88128812
     
    88148814        compileNewFunctionCommon<JSAsyncFunction>(resultGPR, structure, scratch1GPR, scratch2GPR, scopeGPR, slowPath, JSAsyncFunction::allocationSize(0), executable);
    88158815
    8816         addSlowPathGenerator(slowPathCall(slowPath, this, operationNewAsyncFunctionWithInvalidatedReallocationWatchpoint, resultGPR, &vm(), scopeGPR, executable));
     8816        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewAsyncFunctionWithInvalidatedReallocationWatchpoint, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable)));
    88178817    }
    88188818
     
    88208820        compileNewFunctionCommon<JSAsyncGeneratorFunction>(resultGPR, structure, scratch1GPR, scratch2GPR, scopeGPR, slowPath, JSAsyncGeneratorFunction::allocationSize(0), executable);
    88218821       
    8822         addSlowPathGenerator(slowPathCall(slowPath, this, operationNewAsyncGeneratorFunctionWithInvalidatedReallocationWatchpoint, resultGPR, &vm(), scopeGPR, executable));
     8822        addSlowPathGenerator(slowPathCall(slowPath, this, operationNewAsyncGeneratorFunctionWithInvalidatedReallocationWatchpoint, resultGPR, TrustedImmPtr(&vm()), scopeGPR, TrustedImmPtr::weakPointer(m_graph, executable)));
    88238823    }
    88248824   
     
    89658965{
    89668966    SymbolTable* table = node->castOperand<SymbolTable*>();
    8967     RegisteredStructure structure = m_jit.graph().registerStructure(m_jit.graph().globalObjectFor(
     8967    RegisteredStructure structure = m_graph.registerStructure(m_graph.globalObjectFor(
    89688968        node->origin.semantic)->activationStructure());
    89698969       
     
    89878987#if USE(JSVALUE64)
    89888988        callOperation(operationCreateActivationDirect,
    8989             resultGPR, &vm(), structure, scopeGPR, table, TrustedImm64(JSValue::encode(initializationValue)));
     8989            resultGPR, TrustedImmPtr(&vm()), structure, scopeGPR, TrustedImmPtr::weakPointer(m_graph, table), TrustedImm64(JSValue::encode(initializationValue)));
    89908990#else
    89918991        callOperation(operationCreateActivationDirect,
    8992             resultGPR, &vm(), structure, scopeGPR, table, initializationRegs);
     8992            resultGPR, TrustedImmPtr(&vm()), structure, scopeGPR, TrustedImmPtr::weakPointer(m_graph, table), initializationRegs);
    89938993#endif
    89948994        m_jit.exceptionCheck();
     
    90369036    addSlowPathGenerator(
    90379037        slowPathCall(
    9038             slowPath, this, operationCreateActivationDirect, resultGPR, &vm(), structure, scopeGPR, table, TrustedImm64(JSValue::encode(initializationValue))));
     9038            slowPath, this, operationCreateActivationDirect, resultGPR, TrustedImmPtr(&vm()), structure, scopeGPR, TrustedImmPtr::weakPointer(m_graph, table), TrustedImm64(JSValue::encode(initializationValue))));
    90399039#else
    90409040    addSlowPathGenerator(
    90419041        slowPathCall(
    9042             slowPath, this, operationCreateActivationDirect, resultGPR, &vm(), structure, scopeGPR, table, initializationRegs));
     9042            slowPath, this, operationCreateActivationDirect, resultGPR, TrustedImmPtr(&vm()), structure, scopeGPR, TrustedImmPtr::weakPointer(m_graph, table), initializationRegs));
    90439043#endif
    90449044
     
    90629062    JSValueRegs valueRegs = JSValueRegs::withTwoAvailableRegs(scratch1GPR, scratch2GPR);
    90639063       
    9064     unsigned minCapacity = m_jit.graph().baselineCodeBlockFor(node->origin.semantic)->numParameters() - 1;
     9064    unsigned minCapacity = m_graph.baselineCodeBlockFor(node->origin.semantic)->numParameters() - 1;
    90659065       
    90669066    unsigned knownLength;
     
    90859085       
    90869086    RegisteredStructure structure =
    9087         m_jit.graph().registerStructure(m_jit.graph().globalObjectFor(node->origin.semantic)->directArgumentsStructure());
     9087        m_graph.registerStructure(m_graph.globalObjectFor(node->origin.semantic)->directArgumentsStructure());
    90889088       
    90899089    // Use a different strategy for allocating the object depending on whether we know its
     
    91359135        addSlowPathGenerator(
    91369136            slowPathCall(
    9137                 slowPath, this, operationCreateDirectArguments, resultGPR, &vm(), structure,
     9137                slowPath, this, operationCreateDirectArguments, resultGPR, TrustedImmPtr(&vm()), structure,
    91389138                knownLength, minCapacity));
    91399139    } else {
     
    91529152            m_jit.move(
    91539153                TrustedImmPtr::weakPointer(
    9154                     m_jit.graph(), inlineCallFrame->calleeRecovery.constant().asCell()),
     9154                    m_graph, inlineCallFrame->calleeRecovery.constant().asCell()),
    91559155                scratch1GPR);
    91569156        }
     
    92709270        1, [&] (GPRReg destGPR) {
    92719271            m_jit.move(
    9272                 TrustedImmPtr::weakPointer(m_jit.graph(), globalObject->scopedArgumentsStructure()),
     9272                TrustedImmPtr::weakPointer(m_graph, globalObject->scopedArgumentsStructure()),
    92739273                destGPR);
    92749274        });
     
    93009300            m_jit.move(
    93019301                TrustedImmPtr::weakPointer(
    9302                     m_jit.graph(), globalObject->clonedArgumentsStructure()),
     9302                    m_graph, globalObject->clonedArgumentsStructure()),
    93039303                destGPR);
    93049304        });
     
    93379337    ASSERT(node->op() == CreateRest);
    93389338
    9339     if (m_jit.graph().isWatchingHavingABadTimeWatchpoint(node)) {
     9339    if (m_graph.isWatchingHavingABadTimeWatchpoint(node)) {
    93409340        SpeculateStrictInt32Operand arrayLength(this, node->child1());
    93419341        GPRTemporary arrayResult(this);
     
    93499349        // arguments to have arrayLength exceed MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH.
    93509350        bool shouldAllowForArrayStorageStructureForLargeArrays = false;
    9351         compileAllocateNewArrayWithSize(m_jit.graph().globalObjectFor(node->origin.semantic), arrayResultGPR, arrayLengthGPR, ArrayWithContiguous, shouldAllowForArrayStorageStructureForLargeArrays);
     9351        compileAllocateNewArrayWithSize(m_graph.globalObjectFor(node->origin.semantic), arrayResultGPR, arrayLengthGPR, ArrayWithContiguous, shouldAllowForArrayStorageStructureForLargeArrays);
    93529352
    93539353        GPRTemporary argumentsStart(this);
     
    94109410        speculateArray(node->child1(), argument);
    94119411
    9412     if (m_jit.graph().canDoFastSpread(node, m_state.forNode(node->child1()))) {
     9412    if (m_graph.canDoFastSpread(node, m_state.forNode(node->child1()))) {
    94139413#if USE(JSVALUE64)
    94149414        GPRTemporary result(this);
     
    94489448        m_jit.add32(TrustedImm32(JSImmutableButterfly::offsetOfData()), scratch1GPR);
    94499449
    9450         m_jit.emitAllocateVariableSizedCell<JSImmutableButterfly>(vm(), resultGPR, TrustedImmPtr(m_jit.graph().registerStructure(m_jit.graph().m_vm.immutableButterflyStructures[arrayIndexFromIndexingType(CopyOnWriteArrayWithContiguous) - NumberOfIndexingShapes].get())), scratch1GPR, scratch1GPR, scratch2GPR, slowPath);
     9450        m_jit.emitAllocateVariableSizedCell<JSImmutableButterfly>(vm(), resultGPR, TrustedImmPtr(m_graph.registerStructure(m_graph.m_vm.immutableButterflyStructures[arrayIndexFromIndexingType(CopyOnWriteArrayWithContiguous) - NumberOfIndexingShapes].get())), scratch1GPR, scratch1GPR, scratch2GPR, slowPath);
    94519451        m_jit.store32(lengthGPR, MacroAssembler::Address(resultGPR, JSImmutableButterfly::offsetOfPublicLength()));
    94529452        m_jit.store32(lengthGPR, MacroAssembler::Address(resultGPR, JSImmutableButterfly::offsetOfVectorLength()));
     
    95159515void SpeculativeJIT::compileNewArray(Node* node)
    95169516{
    9517     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
    9518     RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()));
     9517    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
     9518    RegisteredStructure structure = m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()));
    95199519    if (!globalObject->isHavingABadTime() && !hasAnyArrayStorage(node->indexingType())) {
    95209520        unsigned numElements = node->numChildren();
     
    95259525        // uninitialized contiguous JSArray, which ensures that we will never produce a half-baked JSArray.
    95269526        for (unsigned operandIndex = 0; operandIndex < node->numChildren(); ++operandIndex)
    9527             speculate(node, m_jit.graph().varArgChild(node, operandIndex));
     9527            speculate(node, m_graph.varArgChild(node, operandIndex));
    95289528
    95299529        GPRTemporary result(this);
     
    95419541
    95429542        for (unsigned operandIndex = 0; operandIndex < node->numChildren(); ++operandIndex) {
    9543             Edge use = m_jit.graph().varArgChild(node, operandIndex);
     9543            Edge use = m_graph.varArgChild(node, operandIndex);
    95449544            switch (node->indexingType()) {
    95459545            case ALL_BLANK_INDEXING_TYPES:
     
    95809580        flushRegisters();
    95819581        GPRFlushedCallResult result(this);
    9582         callOperation(operationNewEmptyArray, result.gpr(), &vm(), structure);
     9582        callOperation(operationNewEmptyArray, result.gpr(), TrustedImmPtr(&vm()), structure);
    95839583        m_jit.exceptionCheck();
    95849584        cellResult(result.gpr(), node);
     
    95959595        // probably something hilarious going on and we're already failing at all the
    95969596        // things, but at least we're going to be sound.
    9597         Edge use = m_jit.graph().m_varArgChildren[node->firstChild() + operandIdx];
     9597        Edge use = m_graph.m_varArgChildren[node->firstChild() + operandIdx];
    95989598        switch (node->indexingType()) {
    95999599        case ALL_BLANK_INDEXING_TYPES:
     
    96449644
    96459645    callOperation(
    9646         operationNewArray, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType())),
    9647         static_cast<void*>(buffer), size_t(node->numChildren()));
     9646        operationNewArray, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType())),
     9647        TrustedImmPtr(buffer), size_t(node->numChildren()));
    96489648    m_jit.exceptionCheck();
    96499649
     
    96549654{
    96559655    ASSERT(node->op() == NewArrayWithSpread);
    9656     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     9656    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    96579657
    96589658#if USE(JSVALUE64)
    9659     if (m_jit.graph().isWatchingHavingABadTimeWatchpoint(node)) {
     9659    if (m_graph.isWatchingHavingABadTimeWatchpoint(node)) {
    96609660        GPRTemporary result(this);
    96619661        GPRReg resultGPR = result.gpr();
     
    96649664
    96659665        if (node->numChildren() == 1 && bitVector->get(0)) {
    9666             Edge use = m_jit.graph().varArgChild(node, 0);
     9666            Edge use = m_graph.varArgChild(node, 0);
    96679667            SpeculateCellOperand immutableButterfly(this, use);
    96689668            GPRTemporary result(this);
     
    96779677            GPRReg scratch2GPR = scratch2.gpr();
    96789678
    9679             RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->originalArrayStructureForIndexingType(CopyOnWriteArrayWithContiguous));
     9679            RegisteredStructure structure = m_graph.registerStructure(globalObject->originalArrayStructureForIndexingType(CopyOnWriteArrayWithContiguous));
    96809680
    96819681            MacroAssembler::JumpList slowCases;
     
    96869686            emitAllocateJSObject<JSArray>(resultGPR, TrustedImmPtr(structure), butterflyGPR, scratch1GPR, scratch2GPR, slowCases);
    96879687
    9688             addSlowPathGenerator(slowPathCall(slowCases, this, operationNewArrayBuffer, resultGPR, &vm(), structure, immutableButterflyGPR));
     9688            addSlowPathGenerator(slowPathCall(slowCases, this, operationNewArrayBuffer, resultGPR, TrustedImmPtr(&vm()), structure, immutableButterflyGPR));
    96899689
    96909690            cellResult(resultGPR, node);
     
    97059705            for (unsigned i = 0; i < node->numChildren(); ++i) {
    97069706                if (bitVector->get(i)) {
    9707                     Edge use = m_jit.graph().varArgChild(node, i);
     9707                    Edge use = m_graph.varArgChild(node, i);
    97089708                    SpeculateCellOperand immutableButterfly(this, use);
    97099709                    GPRReg immutableButterflyGPR = immutableButterfly.gpr();
     
    97329732
    97339733        for (unsigned i = 0; i < node->numChildren(); ++i) {
    9734             Edge use = m_jit.graph().varArgChild(node, i);
     9734            Edge use = m_graph.varArgChild(node, i);
    97359735            if (bitVector->get(i)) {
    97369736                SpeculateCellOperand immutableButterfly(this, use);
     
    97809780    BitVector* bitVector = node->bitVector();
    97819781    for (unsigned i = 0; i < node->numChildren(); ++i) {
    9782         Edge use = m_jit.graph().m_varArgChildren[node->firstChild() + i];
     9782        Edge use = m_graph.m_varArgChildren[node->firstChild() + i];
    97839783        if (bitVector->get(i)) {
    97849784            SpeculateCellOperand immutableButterfly(this, use);
     
    98039803    GPRReg resultGPR = result.gpr();
    98049804
    9805     callOperation(operationNewArrayWithSpreadSlow, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), buffer, node->numChildren());
     9805    callOperation(operationNewArrayWithSpreadSlow, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), TrustedImmPtr(buffer), node->numChildren());
    98069806    m_jit.exceptionCheck();
    98079807
     
    98769876    ASSERT(node->op() == ArraySlice);
    98779877
    9878     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     9878    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    98799879
    98809880    GPRTemporary temp(this);
    9881     StorageOperand storage(this, m_jit.graph().varArgChild(node, node->numChildren() - 1));
     9881    StorageOperand storage(this, m_graph.varArgChild(node, node->numChildren() - 1));
    98829882    GPRTemporary result(this);
    98839883   
     
    98959895
    98969896        if (node->numChildren() == 4)
    9897             emitPopulateSliceIndex(m_jit.graph().varArgChild(node, 2), std::nullopt, lengthGPR, tempGPR);
     9897            emitPopulateSliceIndex(m_graph.varArgChild(node, 2), std::nullopt, lengthGPR, tempGPR);
    98989898        else
    98999899            m_jit.move(lengthGPR, tempGPR);
    99009900
    9901         if (m_jit.graph().varArgChild(node, 1)->isInt32Constant() && m_jit.graph().varArgChild(node, 1)->asInt32() == 0) {
     9901        if (m_graph.varArgChild(node, 1)->isInt32Constant() && m_graph.varArgChild(node, 1)->asInt32() == 0) {
    99029902            // Do nothing for array.slice(0, end) or array.slice(0) cases.
    99039903            // `tempGPR` already points to the size of a newly created array.
     
    99059905            GPRTemporary tempStartIndex(this);
    99069906            GPRReg startGPR = tempStartIndex.gpr();
    9907             emitPopulateSliceIndex(m_jit.graph().varArgChild(node, 1), std::nullopt, lengthGPR, startGPR);
     9907            emitPopulateSliceIndex(m_graph.varArgChild(node, 1), std::nullopt, lengthGPR, startGPR);
    99089908
    99099909            auto tooBig = m_jit.branch32(MacroAssembler::Above, startGPR, tempGPR);
     
    99239923        // We need to keep the source array alive at least until after we're done
    99249924        // with anything that can GC (e.g. allocating the result array below).
    9925         SpeculateCellOperand cell(this, m_jit.graph().varArgChild(node, 0));
     9925        SpeculateCellOperand cell(this, m_graph.varArgChild(node, 0));
    99269926
    99279927        m_jit.load8(MacroAssembler::Address(cell.gpr(), JSCell::indexingTypeAndMiscOffset()), tempValue);
     
    99499949        // with one of the following indexing shapes: Int32, Contiguous, Double. Therefore,
    99509950        // we're a double array here.
    9951         m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithDouble))), tempValue);
     9951        m_jit.move(TrustedImmPtr(m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithDouble))), tempValue);
    99529952        emitMoveEmptyValue(jsNaN());
    99539953        done.append(m_jit.jump());
    99549954
    99559955        isContiguous.link(&m_jit);
    9956         m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous))), tempValue);
     9956        m_jit.move(TrustedImmPtr(m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithContiguous))), tempValue);
    99579957        emitMoveEmptyValue(JSValue());
    99589958        done.append(m_jit.jump());
    99599959
    99609960        isInt32.link(&m_jit);
    9961         m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithInt32))), tempValue);
     9961        m_jit.move(TrustedImmPtr(m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithInt32))), tempValue);
    99629962        emitMoveEmptyValue(JSValue());
    99639963
     
    99959995        m_jit.load32(MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()), tempValue);
    99969996        if (node->numChildren() == 4)
    9997             emitPopulateSliceIndex(m_jit.graph().varArgChild(node, 2), std::nullopt, tempValue, tempGPR);
     9997            emitPopulateSliceIndex(m_graph.varArgChild(node, 2), std::nullopt, tempValue, tempGPR);
    99989998        else
    99999999            m_jit.move(tempValue, tempGPR);
    10000         emitPopulateSliceIndex(m_jit.graph().varArgChild(node, 1), std::nullopt, tempValue, loadIndex);
     10000        emitPopulateSliceIndex(m_graph.varArgChild(node, 1), std::nullopt, tempValue, loadIndex);
    1000110001    }
    1000210002
     
    1004110041    ASSERT(node->op() == ArrayIndexOf);
    1004210042
    10043     StorageOperand storage(this, m_jit.graph().varArgChild(node, node->numChildren() == 3 ? 2 : 3));
     10043    StorageOperand storage(this, m_graph.varArgChild(node, node->numChildren() == 3 ? 2 : 3));
    1004410044    GPRTemporary index(this);
    1004510045    GPRTemporary tempLength(this);
     
    1005210052
    1005310053    if (node->numChildren() == 4)
    10054         emitPopulateSliceIndex(m_jit.graph().varArgChild(node, 2), std::nullopt, lengthGPR, indexGPR);
     10054        emitPopulateSliceIndex(m_graph.varArgChild(node, 2), std::nullopt, lengthGPR, indexGPR);
    1005510055    else
    1005610056        m_jit.move(TrustedImm32(0), indexGPR);
    1005710057
    10058     Edge& searchElementEdge = m_jit.graph().varArgChild(node, 1);
     10058    Edge& searchElementEdge = m_graph.varArgChild(node, 1);
    1005910059    switch (searchElementEdge.useKind()) {
    1006010060    case Int32Use:
     
    1024310243    ASSERT(node->arrayMode().isJSArray());
    1024410244
    10245     Edge& storageEdge = m_jit.graph().varArgChild(node, 0);
    10246     Edge& arrayEdge = m_jit.graph().varArgChild(node, 1);
     10245    Edge& storageEdge = m_graph.varArgChild(node, 0);
     10246    Edge& arrayEdge = m_graph.varArgChild(node, 1);
    1024710247
    1024810248    SpeculateCellOperand base(this, arrayEdge);
     
    1027410274    case Array::Contiguous: {
    1027510275        if (elementCount == 1) {
    10276             Edge& element = m_jit.graph().varArgChild(node, elementOffset);
     10276            Edge& element = m_graph.varArgChild(node, elementOffset);
    1027710277            if (node->arrayMode().type() == Array::Int32) {
    1027810278                ASSERT(element.useKind() == Int32Use);
     
    1029810298        if (node->arrayMode().type() == Array::Int32) {
    1029910299            for (unsigned elementIndex = 0; elementIndex < elementCount; ++elementIndex) {
    10300                 Edge element = m_jit.graph().varArgChild(node, elementIndex + elementOffset);
     10300                Edge element = m_graph.varArgChild(node, elementIndex + elementOffset);
    1030110301                ASSERT(element.useKind() == Int32Use);
    1030210302                speculateInt32(element);
     
    1032610326        storageDone.link(&m_jit);
    1032710327        for (unsigned elementIndex = 0; elementIndex < elementCount; ++elementIndex) {
    10328             Edge& element = m_jit.graph().varArgChild(node, elementIndex + elementOffset);
     10328            Edge& element = m_graph.varArgChild(node, elementIndex + elementOffset);
    1032910329            JSValueOperand value(this, element, ManualOperandSpeculation); // We did type checks above.
    1033010330            JSValueRegs valueRegs = value.jsValueRegs();
     
    1034810348    case Array::Double: {
    1034910349        if (elementCount == 1) {
    10350             Edge& element = m_jit.graph().varArgChild(node, elementOffset);
     10350            Edge& element = m_graph.varArgChild(node, elementOffset);
    1035110351            speculate(node, element);
    1035210352            SpeculateDoubleOperand value(this, element);
     
    1036810368
    1036910369        for (unsigned elementIndex = 0; elementIndex < elementCount; ++elementIndex) {
    10370             Edge element = m_jit.graph().varArgChild(node, elementIndex + elementOffset);
     10370            Edge element = m_graph.varArgChild(node, elementIndex + elementOffset);
    1037110371            ASSERT(element.useKind() == DoubleRepRealUse);
    1037210372            speculate(node, element);
     
    1039510395        storageDone.link(&m_jit);
    1039610396        for (unsigned elementIndex = 0; elementIndex < elementCount; ++elementIndex) {
    10397             Edge& element = m_jit.graph().varArgChild(node, elementIndex + elementOffset);
     10397            Edge& element = m_graph.varArgChild(node, elementIndex + elementOffset);
    1039810398            SpeculateDoubleOperand value(this, element);
    1039910399            FPRReg valueFPR = value.fpr();
     
    1041910419        int32_t largestPositiveInt32Length = 0x7fffffff - elementCount;
    1042010420        if (elementCount == 1) {
    10421             Edge& element = m_jit.graph().varArgChild(node, elementOffset);
     10421            Edge& element = m_graph.varArgChild(node, elementOffset);
    1042210422            JSValueOperand value(this, element);
    1042310423            JSValueRegs valueRegs = value.jsValueRegs();
     
    1047110471        storageDone.link(&m_jit);
    1047210472        for (unsigned elementIndex = 0; elementIndex < elementCount; ++elementIndex) {
    10473             Edge& element = m_jit.graph().varArgChild(node, elementIndex + elementOffset);
     10473            Edge& element = m_graph.varArgChild(node, elementIndex + elementOffset);
    1047410474            JSValueOperand value(this, element);
    1047510475            JSValueRegs valueRegs = value.jsValueRegs();
     
    1050710507   
    1050810508    addSlowPathGenerator(
    10509         slowPathCall(slowCase, this, operationNotifyWrite, NeedToSpill, ExceptionCheckRequirement::CheckNotNeeded, NoResult, &vm(), set));
     10509        slowPathCall(slowCase, this, operationNotifyWrite, NeedToSpill, ExceptionCheckRequirement::CheckNotNeeded, NoResult, TrustedImmPtr(&vm()), TrustedImmPtr(set)));
    1051010510   
    1051110511    noResult(node);
     
    1053710537void SpeculativeJIT::compileTypeOfIsObject(Node* node)
    1053810538{
    10539     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     10539    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1054010540   
    1054110541    JSValueOperand value(this, node->child1());
     
    1057010570    addSlowPathGenerator(
    1057110571        slowPathCall(
    10572             slowPath, this, operationTypeOfIsObject, resultGPR, globalObject,
     10572            slowPath, this, operationTypeOfIsObject, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject),
    1057310573            valueRegs.payloadGPR()));
    1057410574   
     
    1058010580void SpeculativeJIT::compileIsCallable(Node* node, S_JITOperation_GC slowPathOperation)
    1058110581{
    10582     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     10582    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1058310583   
    1058410584    JSValueOperand value(this, node->child1());
     
    1060710607    addSlowPathGenerator(
    1060810608        slowPathCall(
    10609             slowPath, this, slowPathOperation, resultGPR, globalObject,
     10609            slowPath, this, slowPathOperation, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject),
    1061010610            valueRegs.payloadGPR()));
    1061110611   
     
    1062910629void SpeculativeJIT::compileTypeOf(Node* node)
    1063010630{
    10631     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     10631    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1063210632   
    1063310633    JSValueOperand value(this, node->child1());
     
    1064210642        valueRegs, resultGPR,
    1064310643        [&] (TypeofType type, bool fallsThrough) {
    10644             m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), vm().smallStrings.typeString(type)), resultGPR);
     10644            m_jit.move(TrustedImmPtr::weakPointer(m_graph, vm().smallStrings.typeString(type)), resultGPR);
    1064510645            if (!fallsThrough)
    1064610646                done.append(m_jit.jump());
     
    1065310653    addSlowPathGenerator(
    1065410654        slowPathCall(
    10655             slowPath, this, operationTypeOfObject, resultGPR, globalObject,
     10655            slowPath, this, operationTypeOfObject, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject),
    1065610656            valueRegs.payloadGPR()));
    1065710657   
     
    1075910759
    1076010760    default:
    10761         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     10761        DFG_CRASH(m_graph, node, "Bad use kind");
    1076210762        return;
    1076310763    }
     
    1078110781
    1078210782        GPRFlushedCallResult result(this);
    10783         callOperation(operationAllocateComplexPropertyStorageWithInitialCapacity, result.gpr(), &vm(), baseGPR);
     10783        callOperation(operationAllocateComplexPropertyStorageWithInitialCapacity, result.gpr(), TrustedImmPtr(&vm()), baseGPR);
    1078410784        m_jit.exceptionCheck();
    1078510785       
     
    1080110801
    1080210802    addSlowPathGenerator(
    10803         slowPathCall(slowPath, this, operationAllocateSimplePropertyStorageWithInitialCapacity, scratchGPR1, &vm()));
     10803        slowPathCall(slowPath, this, operationAllocateSimplePropertyStorageWithInitialCapacity, scratchGPR1, TrustedImmPtr(&vm())));
    1080410804
    1080510805    for (ptrdiff_t offset = 0; offset < static_cast<ptrdiff_t>(size); offset += sizeof(void*))
     
    1082510825
    1082610826        GPRFlushedCallResult result(this);
    10827         callOperation(operationAllocateComplexPropertyStorage, result.gpr(), &vm(), baseGPR, newSize / sizeof(JSValue));
     10827        callOperation(operationAllocateComplexPropertyStorage, result.gpr(), TrustedImmPtr(&vm()), baseGPR, newSize / sizeof(JSValue));
    1082810828        m_jit.exceptionCheck();
    1082910829
     
    1084810848
    1084910849    addSlowPathGenerator(
    10850         slowPathCall(slowPath, this, operationAllocateSimplePropertyStorage, scratchGPR1, &vm(), newSize / sizeof(JSValue)));
     10850        slowPathCall(slowPath, this, operationAllocateSimplePropertyStorage, scratchGPR1, TrustedImmPtr(&vm()), newSize / sizeof(JSValue)));
    1085110851
    1085210852    for (ptrdiff_t offset = oldSize; offset < static_cast<ptrdiff_t>(newSize); offset += sizeof(void*))
     
    1094010940
    1094110941    unsigned index = 0;
    10942     m_jit.graph().doToChildren(node, [&](Edge edge) {
     10942    m_graph.doToChildren(node, [&](Edge edge) {
    1094310943        if (!index)
    1094410944            appendCell(edge);
     
    1100311003        flushRegisters();
    1100411004        if (Options::useJITCage())
    11005             m_jit.setupArguments<J_JITOperation_GJIP>(TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), CCallHelpers::CellValue(baseGPR), identifierUID(node->callDOMGetterData()->identifierNumber), getter.executableAddress());
     11005            m_jit.setupArguments<J_JITOperation_GJIP>(TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), CCallHelpers::CellValue(baseGPR), TrustedImmPtr(identifierUID(node->callDOMGetterData()->identifierNumber)), TrustedImmPtr(getter.executableAddress()));
    1100611006        else
    11007             m_jit.setupArguments<J_JITOperation_GJI>(TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), CCallHelpers::CellValue(baseGPR), identifierUID(node->callDOMGetterData()->identifierNumber));
     11007            m_jit.setupArguments<J_JITOperation_GJI>(TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), CCallHelpers::CellValue(baseGPR), TrustedImmPtr(identifierUID(node->callDOMGetterData()->identifierNumber)));
    1100811008
    1100911009        m_jit.storePtr(GPRInfo::callFrameRegister, &vm().topCallFrame);
     
    1105011050void SpeculativeJIT::compileCheckJSCast(Node* node)
    1105111051{
    11052     DFG_ASSERT(m_jit.graph(), node, node->op() == CheckJSCast || node->op() == CheckNotJSCast);
     11052    DFG_ASSERT(m_graph, node, node->op() == CheckJSCast || node->op() == CheckNotJSCast);
    1105311053    const ClassInfo* classInfo = node->classInfo();
    1105411054    if (classInfo->inheritsJSTypeRange) {
     
    1107711077        m_jit.emitLoadStructure(vm(), baseGPR, otherGPR);
    1107811078        m_jit.loadPtr(CCallHelpers::Address(otherGPR, Structure::classInfoOffset()), otherGPR);
    11079         m_jit.move(CCallHelpers::TrustedImmPtr(node->classInfo()), specifiedGPR);
     11079        m_jit.move(TrustedImmPtr(node->classInfo()), specifiedGPR);
    1108011080
    1108111081        CCallHelpers::Label loop = m_jit.label();
     
    1143911439   
    1144011440    addSlowPathGenerator(slowPathCall(
    11441         slowPath, this, operationNewStringObject, resultGPR, &vm(), operandGPR, node->structure()));
     11441        slowPath, this, operationNewStringObject, resultGPR, TrustedImmPtr(&vm()), operandGPR, node->structure()));
    1144211442   
    1144311443    cellResult(resultGPR, node);
     
    1145011450        GPRFlushedCallResult result(this);
    1145111451        GPRReg resultGPR = result.gpr();
    11452         callOperation(operationNewSymbol, resultGPR, &vm());
     11452        callOperation(operationNewSymbol, resultGPR, TrustedImmPtr(&vm()));
    1145311453        m_jit.exceptionCheck();
    1145411454        cellResult(resultGPR, node);
     
    1148311483void SpeculativeJIT::compileNewTypedArrayWithSize(Node* node)
    1148411484{
    11485     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     11485    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1148611486    auto typedArrayType = node->typedArrayType();
    11487     RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->typedArrayStructureConcurrently(typedArrayType));
     11487    RegisteredStructure structure = m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(typedArrayType));
    1148811488    RELEASE_ASSERT(structure.get());
    1148911489
     
    1162011620    JITCompiler::JumpList slowPath;
    1162111621
    11622     auto structure = m_jit.graph().registerStructure(m_jit.graph().globalObjectFor(node->origin.semantic)->regExpStructure());
     11622    auto structure = m_graph.registerStructure(m_graph.globalObjectFor(node->origin.semantic)->regExpStructure());
    1162311623    auto butterfly = TrustedImmPtr(nullptr);
    1162411624    emitAllocateJSObject<RegExpObject>(resultGPR, TrustedImmPtr(structure), butterfly, scratch1GPR, scratch2GPR, slowPath);
     
    1163011630    m_jit.mutatorFence(vm());
    1163111631
    11632     addSlowPathGenerator(slowPathCall(slowPath, this, operationNewRegexpWithLastIndex, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), regexp, lastIndexRegs));
     11632    addSlowPathGenerator(slowPathCall(slowPath, this, operationNewRegexpWithLastIndex, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), TrustedImmPtr::weakPointer(m_graph, regexp), lastIndexRegs));
    1163311633
    1163411634    cellResult(resultGPR, node);
     
    1249312493    SwitchData* data, GPRReg value, GPRReg scratch)
    1249412494{
    12495     const UnlinkedSimpleJumpTable& unlinkedTable = m_jit.graph().unlinkedSwitchJumpTable(data->switchTableIndex);
    12496     SimpleJumpTable& linkedTable = m_jit.graph().switchJumpTable(data->switchTableIndex);
     12495    const UnlinkedSimpleJumpTable& unlinkedTable = m_graph.unlinkedSwitchJumpTable(data->switchTableIndex);
     12496    SimpleJumpTable& linkedTable = m_graph.switchJumpTable(data->switchTableIndex);
    1249712497    linkedTable.ensureCTITable(unlinkedTable);
    1249812498    m_jit.sub32(Imm32(unlinkedTable.m_min), value);
     
    1253512535        addBranch(m_jit.branchIfNotNumber(valueRegs, scratch), data->fallThrough.block);
    1253612536
    12537         const UnlinkedSimpleJumpTable& unlinkedTable = m_jit.graph().unlinkedSwitchJumpTable(data->switchTableIndex);
     12537        const UnlinkedSimpleJumpTable& unlinkedTable = m_graph.unlinkedSwitchJumpTable(data->switchTableIndex);
    1253812538        silentSpillAllRegisters(scratch);
    12539         callOperation(operationFindSwitchImmTargetForDouble, scratch, &vm(), valueRegs, data->switchTableIndex, unlinkedTable.m_min);
     12539        callOperation(operationFindSwitchImmTargetForDouble, scratch, TrustedImmPtr(&vm()), valueRegs, data->switchTableIndex, unlinkedTable.m_min);
    1254012540        silentFillAllRegisters();
    1254112541
     
    1277712777
    1277812778    const UnlinkedStringJumpTable& unlinkedTable = m_graph.unlinkedStringSwitchJumpTable(data->switchTableIndex);
    12779     StringJumpTable& linkedTable = m_jit.graph().stringSwitchJumpTable(data->switchTableIndex);
     12779    StringJumpTable& linkedTable = m_graph.stringSwitchJumpTable(data->switchTableIndex);
    1278012780    linkedTable.ensureCTITable(unlinkedTable);
    1278112781
     
    1279812798    if (!canDoBinarySwitch || totalLength > Options::maximumBinaryStringSwitchTotalLength()) {
    1279912799        flushRegisters();
    12800         callOperation(operationSwitchString, string, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), static_cast<size_t>(data->switchTableIndex), &unlinkedTable, string);
     12800        callOperation(operationSwitchString, string, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), static_cast<size_t>(data->switchTableIndex), TrustedImmPtr(&unlinkedTable), string);
    1280112801        m_jit.exceptionCheck();
    1280212802        m_jit.farJump(string, JSSwitchPtrTag);
     
    1283512835    slowCases.link(&m_jit);
    1283612836    silentSpillAllRegisters(string);
    12837     callOperation(operationSwitchString, string, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), static_cast<size_t>(data->switchTableIndex), &unlinkedTable, string);
     12837    callOperation(operationSwitchString, string, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), static_cast<size_t>(data->switchTableIndex), TrustedImmPtr(&unlinkedTable), string);
    1283812838    silentFillAllRegisters();
    1283912839    m_jit.exceptionCheck();
     
    1292212922    }
    1292312923    case SwitchCell: {
    12924         DFG_CRASH(m_jit.graph(), node, "Bad switch kind");
     12924        DFG_CRASH(m_graph, node, "Bad switch kind");
    1292512925        return;
    1292612926    } }
     
    1296512965
    1296612966    silentSpillAllRegisters(InvalidGPRReg);
    12967     callOperation(operationWriteBarrierSlowPath, &vm(), baseGPR);
     12967    callOperation(operationWriteBarrierSlowPath, TrustedImmPtr(&vm()), baseGPR);
    1296812968    silentFillAllRegisters();
    1296912969
     
    1298212982
    1298312983    flushRegisters();
    12984     callOperation(node->op() == PutGetterById ? operationPutGetterById : operationPutSetterById, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, identifierUID(node->identifierNumber()), node->accessorAttributes(), accessorGPR);
     12984    callOperation(node->op() == PutGetterById ? operationPutGetterById : operationPutSetterById, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, TrustedImmPtr(identifierUID(node->identifierNumber())), node->accessorAttributes(), accessorGPR);
    1298512985    m_jit.exceptionCheck();
    1298612986
     
    1300013000
    1300113001    flushRegisters();
    13002     callOperation(operationPutGetterSetter, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, identifierUID(node->identifierNumber()), node->accessorAttributes(), getterGPR, setterGPR);
     13002    callOperation(operationPutGetterSetter, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, TrustedImmPtr(identifierUID(node->identifierNumber())), node->accessorAttributes(), getterGPR, setterGPR);
    1300313003#else
    1300413004    // These JSValues may be JSUndefined OR JSFunction*.
     
    1301213012
    1301313013    flushRegisters();
    13014     callOperation(operationPutGetterSetter, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, identifierUID(node->identifierNumber()), node->accessorAttributes(), getterRegs.payloadGPR(), setterRegs.payloadGPR());
     13014    callOperation(operationPutGetterSetter, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), baseGPR, TrustedImmPtr(identifierUID(node->identifierNumber())), node->accessorAttributes(), getterRegs.payloadGPR(), setterRegs.payloadGPR());
    1301513015#endif
    1301613016    m_jit.exceptionCheck();
     
    1302613026    GPRReg resultGPR = result.gpr();
    1302713027    flushRegisters();
    13028     callOperation(operationResolveScope, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, identifierUID(node->identifierNumber()));
     13028    callOperation(operationResolveScope, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, TrustedImmPtr(identifierUID(node->identifierNumber())));
    1302913029    m_jit.exceptionCheck();
    1303013030    cellResult(resultGPR, node);
     
    1303813038    JSValueRegsFlushedCallResult result(this);
    1303913039    JSValueRegs resultRegs = result.regs();
    13040     callOperation(operationResolveScopeForHoistingFuncDeclInEval, resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, identifierUID(node->identifierNumber()));
     13040    callOperation(operationResolveScopeForHoistingFuncDeclInEval, resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, TrustedImmPtr(identifierUID(node->identifierNumber())));
    1304113041    m_jit.exceptionCheck();
    1304213042    jsValueResult(resultRegs, node);
     
    1306613066    JSValueRegsFlushedCallResult result(this);
    1306713067    JSValueRegs resultRegs = result.regs();
    13068     callOperation(operationGetDynamicVar, resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, identifierUID(node->identifierNumber()), node->getPutInfo());
     13068    callOperation(operationGetDynamicVar, resultRegs, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, TrustedImmPtr(identifierUID(node->identifierNumber())), node->getPutInfo());
    1306913069    m_jit.exceptionCheck();
    1307013070    jsValueResult(resultRegs, node);
     
    1308013080
    1308113081    flushRegisters();
    13082     callOperation(node->ecmaMode().isStrict() ? operationPutDynamicVarStrict : operationPutDynamicVarNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, valueRegs, identifierUID(node->identifierNumber()), node->getPutInfo());
     13082    callOperation(node->ecmaMode().isStrict() ? operationPutDynamicVarStrict : operationPutDynamicVarNonStrict, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), scopeGPR, valueRegs, TrustedImmPtr(identifierUID(node->identifierNumber())), node->getPutInfo());
    1308313083    m_jit.exceptionCheck();
    1308413084    noResult(node);
     
    1344613446{
    1344713447    RegisteredStructure structure = node->structureSet().at(0);
    13448     ASSERT(m_jit.graph().varArgChild(node, 0)->dynamicCastConstant<Structure*>(vm()) == structure.get());
     13448    ASSERT(m_graph.varArgChild(node, 0)->dynamicCastConstant<Structure*>(vm()) == structure.get());
    1344913449
    1345013450    ObjectMaterializationData& data = node->objectMaterializationData();
     
    1345713457    if (hasIndexingHeader) {
    1345813458        for (unsigned i = data.m_properties.size(); i--;) {
    13459             Edge edge = m_jit.graph().varArgChild(node, 1 + i);
     13459            Edge edge = m_graph.varArgChild(node, 1 + i);
    1346013460            switch (data.m_properties[i].kind()) {
    1346113461            case PublicLengthPLoc:
     
    1348513485
    1348613486    for (unsigned i = data.m_properties.size(); i--;) {
    13487         Edge edge = m_jit.graph().varArgChild(node, 1 + i);
     13487        Edge edge = m_graph.varArgChild(node, 1 + i);
    1348813488        PromotedLocationDescriptor descriptor = data.m_properties[i];
    1348913489        switch (descriptor.kind()) {
     
    1349713497
    1349813498        case NamedPropertyPLoc: {
    13499             StringImpl* uid = m_jit.graph().identifiers()[descriptor.info()];
     13499            StringImpl* uid = m_graph.identifiers()[descriptor.info()];
    1350013500            for (PropertyMapEntry entry : structure->getPropertiesConcurrently()) {
    1350113501                if (uid != entry.key)
     
    1352113521void SpeculativeJIT::compileRecordRegExpCachedResult(Node* node)
    1352213522{
    13523     Edge globalObjectEdge = m_jit.graph().varArgChild(node, 0);
    13524     Edge regExpEdge = m_jit.graph().varArgChild(node, 1);
    13525     Edge stringEdge = m_jit.graph().varArgChild(node, 2);
    13526     Edge startEdge = m_jit.graph().varArgChild(node, 3);
    13527     Edge endEdge = m_jit.graph().varArgChild(node, 4);
     13523    Edge globalObjectEdge = m_graph.varArgChild(node, 0);
     13524    Edge regExpEdge = m_graph.varArgChild(node, 1);
     13525    Edge stringEdge = m_graph.varArgChild(node, 2);
     13526    Edge startEdge = m_graph.varArgChild(node, 3);
     13527    Edge endEdge = m_graph.varArgChild(node, 4);
    1352813528
    1352913529    SpeculateCellOperand globalObject(this, globalObjectEdge);
     
    1357213572#endif
    1357313573
    13574     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
     13574    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
    1357513575    GPRReg baseGPR = base.gpr();
    1357613576
    13577     JSValueOperand value(this, m_jit.graph().varArgChild(node, 2));
     13577    JSValueOperand value(this, m_graph.varArgChild(node, 2));
    1357813578    JSValueRegs valueRegs = value.jsValueRegs();
    1357913579
    13580     SpeculateInt32Operand attributes(this, m_jit.graph().varArgChild(node, 3));
     13580    SpeculateInt32Operand attributes(this, m_graph.varArgChild(node, 3));
    1358113581    GPRReg attributesGPR = attributes.gpr();
    1358213582
    13583     Edge& propertyEdge = m_jit.graph().varArgChild(node, 1);
     13583    Edge& propertyEdge = m_graph.varArgChild(node, 1);
    1358413584    switch (propertyEdge.useKind()) {
    1358513585    case StringUse: {
     
    1365013650#endif
    1365113651
    13652     SpeculateCellOperand base(this, m_jit.graph().varArgChild(node, 0));
     13652    SpeculateCellOperand base(this, m_graph.varArgChild(node, 0));
    1365313653    GPRReg baseGPR = base.gpr();
    1365413654
    13655     SpeculateCellOperand getter(this, m_jit.graph().varArgChild(node, 2));
     13655    SpeculateCellOperand getter(this, m_graph.varArgChild(node, 2));
    1365613656    GPRReg getterGPR = getter.gpr();
    1365713657
    13658     SpeculateCellOperand setter(this, m_jit.graph().varArgChild(node, 3));
     13658    SpeculateCellOperand setter(this, m_graph.varArgChild(node, 3));
    1365913659    GPRReg setterGPR = setter.gpr();
    1366013660
    13661     SpeculateInt32Operand attributes(this, m_jit.graph().varArgChild(node, 4));
     13661    SpeculateInt32Operand attributes(this, m_graph.varArgChild(node, 4));
    1366213662    GPRReg attributesGPR = attributes.gpr();
    1366313663
    13664     Edge& propertyEdge = m_jit.graph().varArgChild(node, 1);
     13664    Edge& propertyEdge = m_graph.varArgChild(node, 1);
    1366513665    switch (propertyEdge.useKind()) {
    1366613666    case StringUse: {
     
    1378813788    passThroughCases.link(&m_jit);
    1378913789    m_jit.moveValueRegs(keyRegs, resultRegs);
    13790     addSlowPathGenerator(slowPathCall(slowPath, this, operationNormalizeMapKeyHeapBigInt, NeedToSpill, ExceptionCheckRequirement::CheckNotNeeded, resultRegs, &vm(), keyRegs.payloadGPR()));
     13790    addSlowPathGenerator(slowPathCall(slowPath, this, operationNormalizeMapKeyHeapBigInt, NeedToSpill, ExceptionCheckRequirement::CheckNotNeeded, resultRegs, TrustedImmPtr(&vm()), keyRegs.payloadGPR()));
    1379113791
    1379213792    doneCases.link(&m_jit);
     
    1384413844        sentinel = vm().sentinelSetBucket();
    1384513845    }
    13846     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), sentinel), resultGPR);
     13846    m_jit.move(TrustedImmPtr::weakPointer(m_graph, sentinel), resultGPR);
    1384713847    done.link(&m_jit);
    1384813848
     
    1449914499void SpeculativeJIT::compileNewArrayBuffer(Node* node)
    1450014500{
    14501     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     14501    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1450214502    auto* array = node->castOperand<JSImmutableButterfly*>();
    1450314503
    1450414504    IndexingType indexingMode = node->indexingMode();
    14505     RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(indexingMode));
     14505    RegisteredStructure structure = m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(indexingMode));
    1450614506
    1450714507    if (!globalObject->isHavingABadTime() && !hasAnyArrayStorage(indexingMode)) {
     
    1451814518        emitAllocateJSObject<JSArray>(resultGPR, TrustedImmPtr(structure), TrustedImmPtr(array->toButterfly()), scratch1GPR, scratch2GPR, slowCases);
    1451914519
    14520         addSlowPathGenerator(slowPathCall(slowCases, this, operationNewArrayBuffer, result.gpr(), &vm(), structure, array));
    14521 
    14522         DFG_ASSERT(m_jit.graph(), node, indexingMode & IsArray, indexingMode);
     14520        addSlowPathGenerator(slowPathCall(slowCases, this, operationNewArrayBuffer, result.gpr(), TrustedImmPtr(&vm()), structure, TrustedImmPtr::weakPointer(m_graph, array)));
     14521
     14522        DFG_ASSERT(m_graph, node, indexingMode & IsArray, indexingMode);
    1452314523        cellResult(resultGPR, node);
    1452414524        return;
     
    1452814528    GPRFlushedCallResult result(this);
    1452914529
    14530     callOperation(operationNewArrayBuffer, result.gpr(), &vm(), structure, TrustedImmPtr(node->cellOperand()));
     14530    callOperation(operationNewArrayBuffer, result.gpr(), TrustedImmPtr(&vm()), structure, TrustedImmPtr(node->cellOperand()));
    1453114531    m_jit.exceptionCheck();
    1453214532
     
    1453614536void SpeculativeJIT::compileNewArrayWithSize(Node* node)
    1453714537{
    14538     JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     14538    JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1453914539    if (!globalObject->isHavingABadTime() && !hasAnyArrayStorage(node->indexingType())) {
    1454014540        SpeculateStrictInt32Operand size(this, node->child1());
     
    1455614556    GPRReg structureGPR = AssemblyHelpers::selectScratchGPR(sizeGPR);
    1455714557    MacroAssembler::Jump bigLength = m_jit.branch32(MacroAssembler::AboveOrEqual, sizeGPR, TrustedImm32(MIN_ARRAY_STORAGE_CONSTRUCTION_LENGTH));
    14558     m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()))), structureGPR);
     14558    m_jit.move(TrustedImmPtr(m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(node->indexingType()))), structureGPR);
    1455914559    MacroAssembler::Jump done = m_jit.jump();
    1456014560    bigLength.link(&m_jit);
    14561     m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithArrayStorage))), structureGPR);
     14561    m_jit.move(TrustedImmPtr(m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithArrayStorage))), structureGPR);
    1456214562    done.link(&m_jit);
    1456314563    callOperation(operationNewArrayWithSize, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), structureGPR, sizeGPR, nullptr);
     
    1458614586        GPRReg resultGPR = result.gpr();
    1458714587
    14588         JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
     14588        JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
    1458914589        callOperation(
    1459014590            operationNewTypedArrayWithOneArgumentForType(node->typedArrayType()),
    14591             resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), m_jit.graph().registerStructure(globalObject->typedArrayStructureConcurrently(node->typedArrayType())), argumentRegs);
     14591            resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), m_graph.registerStructure(globalObject->typedArrayStructureConcurrently(node->typedArrayType())), argumentRegs);
    1459214592        m_jit.exceptionCheck();
    1459314593
     
    1466414664            MacroAssembler::JumpList slowButArrayBufferCases;
    1466514665
    14666             JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(node->origin.semantic);
    14667             RegisteredStructure arrayStructure = m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(CopyOnWriteArrayWithContiguous));
     14666            JSGlobalObject* globalObject = m_graph.globalObjectFor(node->origin.semantic);
     14667            RegisteredStructure arrayStructure = m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(CopyOnWriteArrayWithContiguous));
    1466814668
    1466914669            m_jit.move(scratchGPR, scratch3GPR);
     
    1467214672            emitAllocateJSObject<JSArray>(resultGPR, TrustedImmPtr(arrayStructure), scratchGPR, structureGPR, scratch2GPR, slowButArrayBufferCases);
    1467314673
    14674             addSlowPathGenerator(slowPathCall(slowButArrayBufferCases, this, operationNewArrayBuffer, resultGPR, &vm(), arrayStructure, scratch3GPR));
     14674            addSlowPathGenerator(slowPathCall(slowButArrayBufferCases, this, operationNewArrayBuffer, resultGPR, TrustedImmPtr(&vm()), arrayStructure, scratch3GPR));
    1467514675
    1467614676            addSlowPathGenerator(slowPathCall(slowCases, this, node->op() == ObjectKeys ? operationObjectKeysObject : operationObjectGetOwnPropertyNamesObject, resultGPR, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(node->origin.semantic)), objectGPR));
     
    1475114751    }
    1475214752    default:
    14753         DFG_CRASH(m_jit.graph(), node, "Bad use kind");
     14753        DFG_CRASH(m_graph, node, "Bad use kind");
    1475414754        return;
    1475514755    }
     
    1486014860    GPRReg rareDataGPR = structureGPR;
    1486114861
    14862     m_jit.move(TrustedImmPtr(m_jit.graph().registerStructure(node->isInternalPromise() ? globalObject->internalPromiseStructure() : globalObject->promiseStructure())), structureGPR);
    14863     auto fastPromisePath = m_jit.branchPtr(CCallHelpers::Equal, calleeGPR, TrustedImmPtr::weakPointer(m_jit.graph(), node->isInternalPromise() ? globalObject->internalPromiseConstructor() : globalObject->promiseConstructor()));
     14862    m_jit.move(TrustedImmPtr(m_graph.registerStructure(node->isInternalPromise() ? globalObject->internalPromiseStructure() : globalObject->promiseStructure())), structureGPR);
     14863    auto fastPromisePath = m_jit.branchPtr(CCallHelpers::Equal, calleeGPR, TrustedImmPtr::weakPointer(m_graph, node->isInternalPromise() ? globalObject->internalPromiseConstructor() : globalObject->promiseConstructor()));
    1486414864
    1486514865    MacroAssembler::JumpList slowCases;
     
    1487314873    m_jit.move(TrustedImmPtr(node->isInternalPromise() ? JSInternalPromise::info() : JSPromise::info()), scratch1GPR);
    1487414874    slowCases.append(m_jit.branchPtr(CCallHelpers::NotEqual, scratch1GPR, CCallHelpers::Address(structureGPR, Structure::classInfoOffset())));
    14875     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), scratch1GPR);
     14875    m_jit.move(TrustedImmPtr::weakPointer(m_graph, globalObject), scratch1GPR);
    1487614876    slowCases.append(m_jit.branchPtr(CCallHelpers::NotEqual, scratch1GPR, CCallHelpers::Address(structureGPR, Structure::globalObjectOffset())));
    1487714877
     
    1488414884    m_jit.storeTrustedValue(jsNumber(static_cast<unsigned>(JSPromise::Status::Pending)), CCallHelpers::Address(resultGPR, JSInternalFieldObjectImpl<>::offsetOfInternalField(static_cast<unsigned>(JSPromise::Field::Flags))));
    1488514885    m_jit.storeTrustedValue(jsUndefined(), CCallHelpers::Address(resultGPR, JSInternalFieldObjectImpl<>::offsetOfInternalField(static_cast<unsigned>(JSPromise::Field::ReactionsOrResult))));
    14886     m_jit.mutatorFence(m_jit.vm());
    14887 
    14888     addSlowPathGenerator(slowPathCall(slowCases, this, node->isInternalPromise() ? operationCreateInternalPromise : operationCreatePromise, resultGPR, TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), calleeGPR));
     14886    m_jit.mutatorFence(vm());
     14887
     14888    addSlowPathGenerator(slowPathCall(slowCases, this, node->isInternalPromise() ? operationCreateInternalPromise : operationCreatePromise, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), calleeGPR));
    1488914889
    1489014890    cellResult(resultGPR, node);
     
    1492214922    m_jit.move(TrustedImmPtr(JSClass::info()), scratch1GPR);
    1492314923    slowCases.append(m_jit.branchPtr(CCallHelpers::NotEqual, scratch1GPR, CCallHelpers::Address(structureGPR, Structure::classInfoOffset())));
    14924     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), scratch1GPR);
     14924    m_jit.move(TrustedImmPtr::weakPointer(m_graph, globalObject), scratch1GPR);
    1492514925    slowCases.append(m_jit.branchPtr(CCallHelpers::NotEqual, scratch1GPR, CCallHelpers::Address(structureGPR, Structure::globalObjectOffset())));
    1492614926
     
    1493114931    for (unsigned index = 0; index < initialValues.size(); ++index)
    1493214932        m_jit.storeTrustedValue(initialValues[index], CCallHelpers::Address(resultGPR, JSInternalFieldObjectImpl<>::offsetOfInternalField(index)));
    14933     m_jit.mutatorFence(m_jit.vm());
    14934 
    14935     addSlowPathGenerator(slowPathCall(slowCases, this, operation, resultGPR, TrustedImmPtr::weakPointer(m_jit.graph(), globalObject), calleeGPR));
     14933    m_jit.mutatorFence(vm());
     14934
     14935    addSlowPathGenerator(slowPathCall(slowCases, this, operation, resultGPR, TrustedImmPtr::weakPointer(m_graph, globalObject), calleeGPR));
    1493614936
    1493714937    cellResult(resultGPR, node);
     
    1497214972    }
    1497314973
    14974     addSlowPathGenerator(slowPathCall(slowPath, this, operationNewObject, resultGPR, &vm(), structure));
     14974    addSlowPathGenerator(slowPathCall(slowPath, this, operationNewObject, resultGPR, TrustedImmPtr(&vm()), structure));
    1497514975
    1497614976    cellResult(resultGPR, node);
     
    1499714997    for (unsigned index = 0; index < initialValues.size(); ++index)
    1499814998        m_jit.storeTrustedValue(initialValues[index], CCallHelpers::Address(resultGPR, JSInternalFieldObjectImpl<>::offsetOfInternalField(index)));
    14999     m_jit.mutatorFence(m_jit.vm());
    15000 
    15001     addSlowPathGenerator(slowPathCall(slowCases, this, operation, resultGPR, &vm(), TrustedImmPtr(structure)));
     14999    m_jit.mutatorFence(vm());
     15000
     15001    addSlowPathGenerator(slowPathCall(slowCases, this, operation, resultGPR, TrustedImmPtr(&vm()), TrustedImmPtr(structure)));
    1500215002
    1500315003    cellResult(resultGPR, node);
     
    1504215042void SpeculativeJIT::compileToPrimitive(Node* node)
    1504315043{
    15044     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     15044    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    1504515045    JSValueOperand argument(this, node->child1());
    1504615046    JSValueRegsTemporary result(this, Reuse, argument);
     
    1506415064void SpeculativeJIT::compileToPropertyKey(Node* node)
    1506515065{
    15066     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     15066    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    1506715067    JSValueOperand argument(this, node->child1());
    1506815068    JSValueRegsTemporary result(this, Reuse, argument);
     
    1508815088void SpeculativeJIT::compileToNumeric(Node* node)
    1508915089{
    15090     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     15090    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    1509115091    JSValueOperand argument(this, node->child1());
    1509215092    JSValueRegsTemporary result(this);
     
    1513215132#endif
    1513315133
    15134     DFG_ASSERT(m_jit.graph(), node, node->child1().useKind() == UntypedUse, node->child1().useKind());
     15134    DFG_ASSERT(m_graph, node, node->child1().useKind() == UntypedUse, node->child1().useKind());
    1513515135    JSValueOperand argument(this, node->child1());
    1513615136    JSValueRegsTemporary result(this);
     
    1519315193    GPRReg scopeReg = scope.gpr();
    1519415194
    15195     m_jit.logShadowChickenTailPacket(shadowPacketReg, thisRegs, scopeReg, CCallHelpers::TrustedImmPtr(m_jit.codeBlock()), callSiteIndex);
     15195    m_jit.emitGetFromCallFrameHeaderPtr(CallFrameSlot::codeBlock, scratch1Reg);
     15196    m_jit.logShadowChickenTailPacket(shadowPacketReg, thisRegs, scopeReg, scratch1Reg, callSiteIndex);
    1519615197    noResult(node);
    1519715198}
     
    1521915220void SpeculativeJIT::compileMapSet(Node* node)
    1522015221{
    15221     SpeculateCellOperand map(this, m_jit.graph().varArgChild(node, 0));
    15222     JSValueOperand key(this, m_jit.graph().varArgChild(node, 1));
    15223     JSValueOperand value(this, m_jit.graph().varArgChild(node, 2));
    15224     SpeculateInt32Operand hash(this, m_jit.graph().varArgChild(node, 3));
     15222    SpeculateCellOperand map(this, m_graph.varArgChild(node, 0));
     15223    JSValueOperand key(this, m_graph.varArgChild(node, 1));
     15224    JSValueOperand value(this, m_graph.varArgChild(node, 2));
     15225    SpeculateInt32Operand hash(this, m_graph.varArgChild(node, 3));
    1522515226
    1522615227    GPRReg mapGPR = map.gpr();
     
    1522915230    GPRReg hashGPR = hash.gpr();
    1523015231
    15231     speculateMapObject(m_jit.graph().varArgChild(node, 0), mapGPR);
     15232    speculateMapObject(m_graph.varArgChild(node, 0), mapGPR);
    1523215233
    1523315234    flushRegisters();
     
    1535115352
    1535215353    flushRegisters();
    15353     callOperation(operationWeakSetAdd, &vm(), setGPR, keyGPR, hashGPR);
     15354    callOperation(operationWeakSetAdd, TrustedImmPtr(&vm()), setGPR, keyGPR, hashGPR);
    1535415355    m_jit.exceptionCheck();
    1535515356    noResult(node);
     
    1535815359void SpeculativeJIT::compileWeakMapSet(Node* node)
    1535915360{
    15360     SpeculateCellOperand map(this, m_jit.graph().varArgChild(node, 0));
    15361     SpeculateCellOperand key(this, m_jit.graph().varArgChild(node, 1));
    15362     JSValueOperand value(this, m_jit.graph().varArgChild(node, 2));
    15363     SpeculateInt32Operand hash(this, m_jit.graph().varArgChild(node, 3));
     15361    SpeculateCellOperand map(this, m_graph.varArgChild(node, 0));
     15362    SpeculateCellOperand key(this, m_graph.varArgChild(node, 1));
     15363    JSValueOperand value(this, m_graph.varArgChild(node, 2));
     15364    SpeculateInt32Operand hash(this, m_graph.varArgChild(node, 3));
    1536415365
    1536515366    GPRReg mapGPR = map.gpr();
     
    1536815369    GPRReg hashGPR = hash.gpr();
    1536915370
    15370     speculateWeakMapObject(m_jit.graph().varArgChild(node, 0), mapGPR);
    15371     speculateObject(m_jit.graph().varArgChild(node, 1), keyGPR);
     15371    speculateWeakMapObject(m_graph.varArgChild(node, 0), mapGPR);
     15372    speculateObject(m_graph.varArgChild(node, 1), keyGPR);
    1537215373
    1537315374    flushRegisters();
    15374     callOperation(operationWeakMapSet, &vm(), mapGPR, keyGPR, valueRegs, hashGPR);
     15375    callOperation(operationWeakMapSet, TrustedImmPtr(&vm()), mapGPR, keyGPR, valueRegs, hashGPR);
    1537515376    m_jit.exceptionCheck();
    1537615377    noResult(node);
     
    1558915590    emitInitializeButterfly(storageGPR, sizeGPR, emptyValueRegs, resultGPR);
    1559015591
    15591     RegisteredStructure structure = m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(indexingType));
     15592    RegisteredStructure structure = m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(indexingType));
    1559215593
    1559315594    emitAllocateJSObject<JSArray>(resultGPR, TrustedImmPtr(structure), storageGPR, scratchGPR, scratch2GPR, slowCases);
     
    1559915600        TrustedImmPtr::weakPointer(m_graph, globalObject),
    1560015601        structure,
    15601         shouldConvertLargeSizeToArrayStorage ? m_jit.graph().registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithArrayStorage)) : structure,
     15602        shouldConvertLargeSizeToArrayStorage ? m_graph.registerStructure(globalObject->arrayStructureForIndexingTypeDuringAllocation(ArrayWithArrayStorage)) : structure,
    1560215603        sizeGPR, storageGPR));
    1560315604}
     
    1585915860    } else {
    1586015861        slowPath = slowPathCall(
    15861             slowCases, this, gen.slowPathFunction(), NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), gen.stubInfo(), valueRegs,
     15862            slowCases, this, gen.slowPathFunction(), NoResult, TrustedImmPtr::weakPointer(m_graph, m_graph.globalObjectFor(codeOrigin)), TrustedImmPtr(gen.stubInfo()), valueRegs,
    1586215863            CCallHelpers::CellValue(baseGPR), identifier.rawBits());
    1586315864    }
     
    1606016061    CCallHelpers::JumpList slowPath;
    1606116062    Allocator allocatorValue = allocatorForConcurrently<JSRopeString>(vm(), sizeof(JSRopeString), AllocatorForMode::AllocatorIfExists);
    16062     emitAllocateJSCell(resultGPR, JITAllocator::constant(allocatorValue), allocatorGPR, TrustedImmPtr(m_jit.graph().registerStructure(vm().stringStructure.get())), scratchGPR, slowPath);
     16063    emitAllocateJSCell(resultGPR, JITAllocator::constant(allocatorValue), allocatorGPR, TrustedImmPtr(m_graph.registerStructure(vm().stringStructure.get())), scratchGPR, slowPath);
    1606316064
    1606416065    // This puts nullptr for the first fiber. It makes visitChildren safe even if this JSRopeString is discarded due to the speculation failure in the following path.
     
    1616616167    auto isNonEmptyString = m_jit.branchTest32(CCallHelpers::NonZero, allocatorGPR);
    1616716168
    16168     m_jit.move(TrustedImmPtr::weakPointer(m_jit.graph(), jsEmptyString(m_jit.graph().m_vm)), resultGPR);
     16169    m_jit.move(TrustedImmPtr::weakPointer(m_graph, jsEmptyString(m_graph.m_vm)), resultGPR);
    1616916170
    1617016171    isNonEmptyString.link(&m_jit);
Note: See TracChangeset for help on using the changeset viewer.