Changeset 214571 in webkit for trunk/Source/JavaScriptCore/ftl


Ignore:
Timestamp:
Mar 29, 2017, 3:55:53 PM (8 years ago)
Author:
[email protected]
Message:

LinkBuffer and ExecutableAllocator shouldn't have anything to do with VM
https://bugs.webkit.org/show_bug.cgi?id=170210

Reviewed by Mark Lam.

Source/JavaScriptCore:

This is one more step in the direction of PIC-ified Wasm.
LinkBuffer and ExecutableAllocator have no business knowing about VM.

  • assembler/LinkBuffer.cpp:

(JSC::LinkBuffer::allocate):

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::LinkBuffer):
(JSC::LinkBuffer::vm): Deleted.

  • b3/B3Compile.cpp:

(JSC::B3::compile):

  • b3/B3Compile.h:
  • b3/air/testair.cpp:
  • b3/testb3.cpp:

(JSC::B3::compileProc):
(JSC::B3::compileAndRun):
(JSC::B3::testLoadAcq42):
(JSC::B3::testAddArgZeroImmZDef):
(JSC::B3::testAddLoadTwice):
(JSC::B3::testMulLoadTwice):
(JSC::B3::testMulAddArgsLeft):
(JSC::B3::testMulAddArgsRight):
(JSC::B3::testMulAddArgsLeft32):
(JSC::B3::testMulAddArgsRight32):
(JSC::B3::testMulSubArgsLeft):
(JSC::B3::testMulSubArgsRight):
(JSC::B3::testMulSubArgsLeft32):
(JSC::B3::testMulSubArgsRight32):
(JSC::B3::testMulNegArgs):
(JSC::B3::testMulNegArgs32):
(JSC::B3::testCompareFloatToDoubleThroughPhi):
(JSC::B3::testDoubleToFloatThroughPhi):
(JSC::B3::testReduceFloatToDoubleValidates):
(JSC::B3::testDoubleProducerPhiToFloatConversion):
(JSC::B3::testDoubleProducerPhiToFloatConversionWithDoubleConsumer):
(JSC::B3::testDoubleProducerPhiWithNonFloatConst):
(JSC::B3::testIToD64Arg):
(JSC::B3::testIToF64Arg):
(JSC::B3::testIToD32Arg):
(JSC::B3::testIToF32Arg):
(JSC::B3::testIToD64Mem):
(JSC::B3::testIToF64Mem):
(JSC::B3::testIToD32Mem):
(JSC::B3::testIToF32Mem):
(JSC::B3::testIToDReducedToIToF64Arg):
(JSC::B3::testIToDReducedToIToF32Arg):
(JSC::B3::testStoreRelAddLoadAcq32):
(JSC::B3::testStoreRelAddLoadAcq8):
(JSC::B3::testStoreRelAddFenceLoadAcq8):
(JSC::B3::testStoreRelAddLoadAcq16):
(JSC::B3::testStoreRelAddLoadAcq64):
(JSC::B3::testBranch):
(JSC::B3::testBranchPtr):
(JSC::B3::testDiamond):
(JSC::B3::testBranchNotEqual):
(JSC::B3::testBranchNotEqualCommute):
(JSC::B3::testBranchNotEqualNotEqual):
(JSC::B3::testBranchEqual):
(JSC::B3::testBranchEqualEqual):
(JSC::B3::testBranchEqualCommute):
(JSC::B3::testBranchEqualEqual1):
(JSC::B3::testBranchLoadPtr):
(JSC::B3::testBranchLoad32):
(JSC::B3::testBranchLoad8S):
(JSC::B3::testBranchLoad8Z):
(JSC::B3::testBranchLoad16S):
(JSC::B3::testBranchLoad16Z):
(JSC::B3::testBranch8WithLoad8ZIndex):
(JSC::B3::testComplex):
(JSC::B3::testSimpleCheck):
(JSC::B3::testCheckFalse):
(JSC::B3::testCheckTrue):
(JSC::B3::testCheckLessThan):
(JSC::B3::testCheckMegaCombo):
(JSC::B3::testCheckTrickyMegaCombo):
(JSC::B3::testCheckTwoMegaCombos):
(JSC::B3::testCheckTwoNonRedundantMegaCombos):
(JSC::B3::testCheckAddImm):
(JSC::B3::testCheckAddImmCommute):
(JSC::B3::testCheckAddImmSomeRegister):
(JSC::B3::testCheckAdd):
(JSC::B3::testCheckAdd64):
(JSC::B3::testCheckAddFold):
(JSC::B3::testCheckAddFoldFail):
(JSC::B3::testCheckAddSelfOverflow64):
(JSC::B3::testCheckAddSelfOverflow32):
(JSC::B3::testCheckSubImm):
(JSC::B3::testCheckSubBadImm):
(JSC::B3::testCheckSub):
(JSC::B3::testCheckSub64):
(JSC::B3::testCheckSubFold):
(JSC::B3::testCheckSubFoldFail):
(JSC::B3::testCheckNeg):
(JSC::B3::testCheckNeg64):
(JSC::B3::testCheckMul):
(JSC::B3::testCheckMulMemory):
(JSC::B3::testCheckMul2):
(JSC::B3::testCheckMul64):
(JSC::B3::testCheckMulFold):
(JSC::B3::testCheckMulFoldFail):
(JSC::B3::testCheckMul64SShr):
(JSC::B3::testSwitch):
(JSC::B3::testSwitchChillDiv):
(JSC::B3::testSwitchTargettingSameBlock):
(JSC::B3::testSwitchTargettingSameBlockFoldPathConstant):
(JSC::B3::testBasicSelect):
(JSC::B3::testSelectTest):
(JSC::B3::testSelectCompareDouble):
(JSC::B3::testSelectDouble):
(JSC::B3::testSelectDoubleTest):
(JSC::B3::testSelectDoubleCompareDouble):
(JSC::B3::testSelectFloatCompareFloat):
(JSC::B3::testSelectFold):
(JSC::B3::testSelectInvert):
(JSC::B3::testCheckSelect):
(JSC::B3::testCheckSelectCheckSelect):
(JSC::B3::testCheckSelectAndCSE):
(JSC::B3::testTrivialInfiniteLoop):
(JSC::B3::testFoldPathEqual):
(JSC::B3::testLShiftSelf32):
(JSC::B3::testRShiftSelf32):
(JSC::B3::testURShiftSelf32):
(JSC::B3::testLShiftSelf64):
(JSC::B3::testRShiftSelf64):
(JSC::B3::testURShiftSelf64):
(JSC::B3::testPatchpointDoubleRegs):
(JSC::B3::testSpillDefSmallerThanUse):
(JSC::B3::testSpillUseLargerThanDef):
(JSC::B3::testLateRegister):
(JSC::B3::testInterpreter):
(JSC::B3::testEntrySwitchSimple):
(JSC::B3::testEntrySwitchNoEntrySwitch):
(JSC::B3::testEntrySwitchWithCommonPaths):
(JSC::B3::testEntrySwitchWithCommonPathsAndNonTrivialEntrypoint):
(JSC::B3::testEntrySwitchLoop):
(JSC::B3::testSomeEarlyRegister):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled):
(JSC::B3::testTerminalPatchpointThatNeedsToBeSpilled2):
(JSC::B3::testPatchpointTerminalReturnValue):
(JSC::B3::testMemoryFence):
(JSC::B3::testStoreFence):
(JSC::B3::testLoadFence):
(JSC::B3::testPCOriginMapDoesntInsertNops):
(JSC::B3::testPinRegisters):
(JSC::B3::testX86LeaAddAddShlLeft):
(JSC::B3::testX86LeaAddAddShlRight):
(JSC::B3::testX86LeaAddAdd):
(JSC::B3::testX86LeaAddShlRight):
(JSC::B3::testX86LeaAddShlLeftScale1):
(JSC::B3::testX86LeaAddShlLeftScale2):
(JSC::B3::testX86LeaAddShlLeftScale4):
(JSC::B3::testX86LeaAddShlLeftScale8):
(JSC::B3::testAddShl32):
(JSC::B3::testAddShl64):
(JSC::B3::testAddShl65):
(JSC::B3::testLoadBaseIndexShift2):
(JSC::B3::testLoadBaseIndexShift32):
(JSC::B3::testOptimizeMaterialization):
(JSC::B3::testAtomicWeakCAS):
(JSC::B3::testAtomicStrongCAS):
(JSC::B3::testAtomicXchg):
(JSC::B3::testDepend32):
(JSC::B3::testDepend64):
(JSC::B3::testWasmBoundsCheck):
(JSC::B3::testWasmAddress):
(JSC::B3::run):
(JSC::B3::compile): Deleted.

  • bytecode/PolymorphicAccess.cpp:

(JSC::PolymorphicAccess::regenerate):

  • dfg/DFGJITCompiler.cpp:

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

  • dfg/DFGLazyJSValue.cpp:

(JSC::DFG::LazyJSValue::emit):

  • dfg/DFGOSRExitCompiler.cpp:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::emitCall):

  • dfg/DFGThunks.cpp:

(JSC::DFG::osrExitGenerationThunkGenerator):
(JSC::DFG::osrEntryThunkGenerator):

  • ftl/FTLCompile.cpp:

(JSC::FTL::compile):

  • ftl/FTLLazySlowPath.cpp:

(JSC::FTL::LazySlowPath::generate):

  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileTailCall):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargsSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOSRExitHandle.cpp:

(JSC::FTL::OSRExitHandle::emitExitThunk):

  • ftl/FTLSlowPathCall.cpp:

(JSC::FTL::SlowPathCallContext::makeCall):

  • ftl/FTLSlowPathCall.h:

(JSC::FTL::callOperation):

  • ftl/FTLState.h:
  • ftl/FTLThunks.cpp:

(JSC::FTL::genericGenerationThunkGenerator):
(JSC::FTL::slowPathCallThunkGenerator):

  • ftl/FTLThunks.h:

(JSC::FTL::generateIfNecessary):
(JSC::FTL::Thunks::getSlowPathCallThunk):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitDumbVirtualCall):

  • jit/AssemblyHelpers.h:
  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::initializeAllocator):
(JSC::ExecutableAllocator::singleton):
(JSC::ExecutableAllocator::ExecutableAllocator):
(JSC::ExecutableAllocator::allocate):

  • jit/ExecutableAllocator.h:
  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):

  • jit/JITMathIC.h:

(JSC::JITMathIC::generateOutOfLine):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileHasIndexedProperty):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::privateCompilePutByValWithCachedId):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::stringGetByValStubGenerator):

  • jit/JITStubRoutine.h:
  • jit/Repatch.cpp:

(JSC::ftlThunkAwareRepatchCall):
(JSC::linkPolymorphicCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkPolymorphicCallThunkGenerator):
(JSC::virtualThunkFor):
(JSC::nativeForGenerator):
(JSC::arityFixupGenerator):
(JSC::unreachableGenerator):
(JSC::boundThisNoArgsFunctionCallGenerator):
(JSC::throwExceptionFromWasmThunkGenerator):

  • llint/LLIntThunks.cpp:

(JSC::LLInt::generateThunkWithJumpTo):

  • runtime/SamplingProfiler.cpp:

(JSC::SamplingProfiler::takeSample):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/VMTraps.cpp:

(JSC::VMTraps::tryInstallTrapBreakpoints):

  • tools/VMInspector.cpp:
  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):
(JSC::Wasm::wasmToWasm):
(JSC::Wasm::exitStubGenerator):

  • wasm/WasmPlan.cpp:

(JSC::Wasm::Plan::complete):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::compile):
(JSC::Yarr::jitCompile):

Source/WebCore:

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::compileSelector):
(WebCore::SelectorCompiler::SelectorCodeGenerator::compile):

Location:
trunk/Source/JavaScriptCore/ftl
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp

    r214531 r214571  
    142142        });
    143143
    144     state.finalizer->b3CodeLinkBuffer = std::make_unique<LinkBuffer>(
    145         vm, jit, codeBlock, JITCompilationCanFail);
     144    state.finalizer->b3CodeLinkBuffer = std::make_unique<LinkBuffer>(jit, codeBlock, JITCompilationCanFail);
    146145    if (state.finalizer->b3CodeLinkBuffer->didFailToAllocate()) {
    147146        state.allocationFailed = true;
  • trunk/Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp

    r214531 r214571  
    5656    RELEASE_ASSERT(!m_stub);
    5757
    58     VM& vm = *codeBlock->vm();
    59 
    6058    CCallHelpers jit(codeBlock);
    6159    GenerationParams params;
     
    6664    m_generator->run(jit, params);
    6765
    68     LinkBuffer linkBuffer(vm, jit, codeBlock, JITCompilationMustSucceed);
     66    LinkBuffer linkBuffer(jit, codeBlock, JITCompilationMustSucceed);
    6967    linkBuffer.link(params.doneJumps, m_done);
    7068    if (m_exceptionTarget)
  • trunk/Source/JavaScriptCore/ftl/FTLLink.cpp

    r214531 r214571  
    163163            mainPathJumps.append(jit.jump());
    164164
    165             linkBuffer = std::make_unique<LinkBuffer>(vm, jit, codeBlock, JITCompilationCanFail);
     165            linkBuffer = std::make_unique<LinkBuffer>(jit, codeBlock, JITCompilationCanFail);
    166166            if (linkBuffer->didFailToAllocate()) {
    167167                state.allocationFailed = true;
     
    187187        CCallHelpers::Jump mainPathJump = jit.jump();
    188188       
    189         linkBuffer = std::make_unique<LinkBuffer>(vm, jit, codeBlock, JITCompilationCanFail);
     189        linkBuffer = std::make_unique<LinkBuffer>(jit, codeBlock, JITCompilationCanFail);
    190190        if (linkBuffer->didFailToAllocate()) {
    191191            state.allocationFailed = true;
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r214531 r214571  
    59825982        CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite();
    59835983        State* state = &m_ftlState;
     5984        VM* vm = &this->vm();
    59845985        patchpoint->setGenerator(
    59855986            [=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
     
    60206021                    [=] (LinkBuffer& linkBuffer) {
    60216022                        MacroAssemblerCodePtr linkCall =
    6022                             linkBuffer.vm().getCTIStub(linkCallThunkGenerator).code();
     6023                            vm->getCTIStub(linkCallThunkGenerator).code();
    60236024                        linkBuffer.link(slowCall, FunctionPtr(linkCall.executableAddress()));
    60246025
     
    62796280        CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite();
    62806281        State* state = &m_ftlState;
     6282        VM* vm = &this->vm();
    62816283        patchpoint->setGenerator(
    62826284            [=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
     
    63306332                    [=] (LinkBuffer& linkBuffer) {
    63316333                        MacroAssemblerCodePtr linkCall =
    6332                             linkBuffer.vm().getCTIStub(linkCallThunkGenerator).code();
     6334                            vm->getCTIStub(linkCallThunkGenerator).code();
    63336335                        linkBuffer.link(slowCall, FunctionPtr(linkCall.executableAddress()));
    63346336
     
    64046406        CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite();
    64056407        State* state = &m_ftlState;
     6408        VM* vm = &this->vm();
    64066409        patchpoint->setGenerator(
    64076410            [=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
     
    64576460                    jit.move(CCallHelpers::TrustedImmPtr(callee), GPRInfo::nonPreservedNonArgumentGPR);
    64586461                    jit.call(GPRInfo::nonPreservedNonArgumentGPR);
    6459                     exceptions->append(jit.emitExceptionCheck(state->vm(), AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth));
     6462                    exceptions->append(jit.emitExceptionCheck(*vm, AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth));
    64606463                };
    64616464
     
    65836586                    [=] (LinkBuffer& linkBuffer) {
    65846587                        MacroAssemblerCodePtr linkCall =
    6585                             linkBuffer.vm().getCTIStub(linkCallThunkGenerator).code();
     6588                            vm->getCTIStub(linkCallThunkGenerator).code();
    65866589                        linkBuffer.link(slowCall, FunctionPtr(linkCall.executableAddress()));
    65876590                       
     
    66736676        CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite();
    66746677        State* state = &m_ftlState;
     6678        VM* vm = &this->vm();
    66756679        patchpoint->setGenerator(
    66766680            [=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
     
    67646768                    jit.move(CCallHelpers::TrustedImmPtr(callee), GPRInfo::nonPreservedNonArgumentGPR);
    67656769                    jit.call(GPRInfo::nonPreservedNonArgumentGPR);
    6766                     exceptions->append(jit.emitExceptionCheck(state->vm(), AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth));
     6770                    exceptions->append(jit.emitExceptionCheck(*vm, AssemblyHelpers::NormalExceptionCheck, AssemblyHelpers::FarJumpWidth));
    67676771                };
    67686772
     
    67806784
    67816785                    // emitSetupVarargsFrameFastCase modifies the stack pointer if it succeeds.
    6782                     emitSetupVarargsFrameFastCase(state->vm(), jit, scratchGPR2, scratchGPR1, scratchGPR2, scratchGPR3, inlineCallFrame, data->firstVarArgOffset, slowCase);
     6786                    emitSetupVarargsFrameFastCase(*vm, jit, scratchGPR2, scratchGPR1, scratchGPR2, scratchGPR3, inlineCallFrame, data->firstVarArgOffset, slowCase);
    67836787
    67846788                    CCallHelpers::Jump done = jit.jump();
     
    68626866                    [=] (LinkBuffer& linkBuffer) {
    68636867                        MacroAssemblerCodePtr linkCall =
    6864                             linkBuffer.vm().getCTIStub(linkCallThunkGenerator).code();
     6868                            vm->getCTIStub(linkCallThunkGenerator).code();
    68656869                        linkBuffer.link(slowCall, FunctionPtr(linkCall.executableAddress()));
    68666870                       
     
    69236927        CodeOrigin codeOrigin = codeOriginDescriptionOfCallSite();
    69246928        State* state = &m_ftlState;
     6929        VM& vm = this->vm();
    69256930        patchpoint->setGenerator(
    6926             [=] (CCallHelpers& jit, const StackmapGenerationParams& params) {
     6931            [=, &vm] (CCallHelpers& jit, const StackmapGenerationParams& params) {
    69276932                AllowMacroScratchRegisterUsage allowScratch(jit);
    69286933                CallSiteIndex callSiteIndex = state->jitCode->common.addUniqueCallSiteIndex(codeOrigin);
     
    69576962                jit.addPtr(CCallHelpers::TrustedImm32(requiredBytes), CCallHelpers::stackPointerRegister);
    69586963                jit.load64(CCallHelpers::calleeFrameSlot(CallFrameSlot::callee), GPRInfo::regT0);
    6959                 jit.emitDumbVirtualCall(callLinkInfo);
     6964                jit.emitDumbVirtualCall(vm, callLinkInfo);
    69606965               
    69616966                done.link(&jit);
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp

    r214531 r214571  
    492492    adjustAndJumpToTarget(*vm, jit, exit);
    493493   
    494     LinkBuffer patchBuffer(*vm, jit, codeBlock);
     494    LinkBuffer patchBuffer(jit, codeBlock);
    495495    exit.m_code = FINALIZE_CODE_IF(
    496496        shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(),
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExitHandle.cpp

    r196729 r214571  
    4545    CCallHelpers::PatchableJump jump = jit.patchableJump();
    4646    RefPtr<OSRExitHandle> self = this;
     47    VM& vm = state.vm();
    4748    jit.addLinkTask(
    48         [self, jump, myLabel, compilation] (LinkBuffer& linkBuffer) {
     49        [self, jump, myLabel, compilation, &vm] (LinkBuffer& linkBuffer) {
    4950            self->exit.m_patchableJump = CodeLocationJump(linkBuffer.locationOf(jump));
    5051
    5152            linkBuffer.link(
    5253                jump.m_jump,
    53                 CodeLocationLabel(linkBuffer.vm().getCTIStub(osrExitGenerationThunkGenerator).code()));
     54                CodeLocationLabel(vm.getCTIStub(osrExitGenerationThunkGenerator).code()));
    5455            if (compilation)
    5556                compilation->addOSRExitSite({ linkBuffer.locationOf(myLabel).executableAddress() });
  • trunk/Source/JavaScriptCore/ftl/FTLSlowPathCall.cpp

    r190860 r214571  
    119119}
    120120
    121 SlowPathCall SlowPathCallContext::makeCall(void* callTarget)
     121SlowPathCall SlowPathCallContext::makeCall(VM& vm, void* callTarget)
    122122{
    123123    SlowPathCall result = SlowPathCall(m_jit.call(), keyWithTarget(callTarget));
    124124
    125125    m_jit.addLinkTask(
    126         [result] (LinkBuffer& linkBuffer) {
    127             VM& vm = linkBuffer.vm();
    128 
     126        [result, &vm] (LinkBuffer& linkBuffer) {
    129127            MacroAssemblerCodeRef thunk =
    130                 vm.ftlThunks->getSlowPathCallThunk(vm, result.key());
     128                vm.ftlThunks->getSlowPathCallThunk(result.key());
    131129
    132130            linkBuffer.link(result.call(), CodeLocationLabel(thunk.code()));
  • trunk/Source/JavaScriptCore/ftl/FTLSlowPathCall.h

    r214531 r214571  
    6060    // NOTE: The call that this returns is already going to be linked by the JIT using addLinkTask(),
    6161    // so there is no need for you to link it yourself.
    62     SlowPathCall makeCall(void* callTarget);
     62    SlowPathCall makeCall(VM&, void* callTarget);
    6363
    6464private:
     
    8585        SlowPathCallContext context(usedRegisters, jit, sizeof...(ArgumentTypes) + 1, resultGPR);
    8686        jit.setupArgumentsWithExecState(arguments...);
    87         call = context.makeCall(function.value());
     87        call = context.makeCall(vm, function.value());
    8888    }
    8989    if (exceptionTarget)
  • trunk/Source/JavaScriptCore/ftl/FTLState.h

    r214531 r214571  
    6767
    6868    VM& vm() { return graph.m_vm; }
    69    
     69
    7070    // None of these things is owned by State. It is the responsibility of
    7171    // FTL phases to properly manage the lifecycle of the module and function.
  • trunk/Source/JavaScriptCore/ftl/FTLThunks.cpp

    r214531 r214571  
    118118    jit.ret();
    119119   
    120     LinkBuffer patchBuffer(*vm, jit, GLOBAL_THUNK_ID);
     120    LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
    121121    patchBuffer.link(functionCall, generationFunction);
    122122    return FINALIZE_CODE(patchBuffer, ("%s", name));
     
    165165}
    166166
    167 MacroAssemblerCodeRef slowPathCallThunkGenerator(VM& vm, const SlowPathCallKey& key)
     167MacroAssemblerCodeRef slowPathCallThunkGenerator(const SlowPathCallKey& key)
    168168{
    169169    AssemblyHelpers jit(nullptr);
     
    223223    jit.ret();
    224224
    225     LinkBuffer patchBuffer(vm, jit, GLOBAL_THUNK_ID);
     225    LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID);
    226226    patchBuffer.link(call, FunctionPtr(key.callTarget()));
    227227    return FINALIZE_CODE(patchBuffer, ("FTL slow path call thunk for %s", toCString(key).data()));
  • trunk/Source/JavaScriptCore/ftl/FTLThunks.h

    r206525 r214571  
    4141MacroAssemblerCodeRef osrExitGenerationThunkGenerator(VM*);
    4242MacroAssemblerCodeRef lazySlowPathGenerationThunkGenerator(VM*);
    43 MacroAssemblerCodeRef slowPathCallThunkGenerator(VM&, const SlowPathCallKey&);
     43MacroAssemblerCodeRef slowPathCallThunkGenerator(const SlowPathCallKey&);
    4444
    4545template<typename KeyTypeArgument>
     
    5555template<typename MapType, typename GeneratorType>
    5656MacroAssemblerCodeRef generateIfNecessary(
    57     VM& vm, MapType& map, const typename MapType::KeyType& key, GeneratorType generator)
     57    MapType& map, const typename MapType::KeyType& key, GeneratorType generator)
    5858{
    5959    typename MapType::ToThunkMap::iterator iter = map.m_toThunk.find(key);
     
    6161        return iter->value;
    6262   
    63     MacroAssemblerCodeRef result = generator(vm, key);
     63    MacroAssemblerCodeRef result = generator(key);
    6464    map.m_toThunk.add(key, result);
    6565    map.m_fromThunk.add(result.code(), key);
     
    7777class Thunks {
    7878public:
    79     MacroAssemblerCodeRef getSlowPathCallThunk(VM& vm, const SlowPathCallKey& key)
     79    MacroAssemblerCodeRef getSlowPathCallThunk(const SlowPathCallKey& key)
    8080    {
    8181        return generateIfNecessary(
    82             vm, m_slowPathCallThunks, key, slowPathCallThunkGenerator);
     82            m_slowPathCallThunks, key, slowPathCallThunkGenerator);
    8383    }
    8484   
Note: See TracChangeset for help on using the changeset viewer.