Changeset 192856 in webkit for trunk/Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp
- Timestamp:
- Nov 30, 2015, 8:43:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ftl/FTLLazySlowPath.cpp
r192525 r192856 35 35 36 36 LazySlowPath::LazySlowPath( 37 CodeLocationLabel patchpoint, CodeLocationLabel exceptionTarget, 38 const RegisterSet& usedRegisters, CallSiteIndex callSiteIndex, RefPtr<Generator> generator, 39 GPRReg newZeroReg, ScratchRegisterAllocator scratchRegisterAllocator) 37 #if FTL_USES_B3 38 CodeLocationJump patchableJump, CodeLocationLabel done, 39 #else // FTL_USES_B3 40 CodeLocationLabel patchpoint, 41 #endif // FTL_USES_B3 42 CodeLocationLabel exceptionTarget, 43 const RegisterSet& usedRegisters, CallSiteIndex callSiteIndex, RefPtr<Generator> generator 44 #if !FTL_USES_B3 45 , GPRReg newZeroReg, ScratchRegisterAllocator scratchRegisterAllocator 46 #endif // !FTL_USES_B3 47 ) 48 #if FTL_USES_B3 49 : m_patchableJump(patchableJump) 50 , m_done(done) 51 #else // FTL_USES_B3 40 52 : m_patchpoint(patchpoint) 53 #endif // FTL_USES_B3 41 54 , m_exceptionTarget(exceptionTarget) 42 55 , m_usedRegisters(usedRegisters) 43 56 , m_callSiteIndex(callSiteIndex) 44 57 , m_generator(generator) 58 #if !FTL_USES_B3 45 59 , m_newZeroValueRegister(newZeroReg) 46 60 , m_scratchRegisterAllocator(scratchRegisterAllocator) 61 #endif // !FTL_USES_B3 47 62 { 48 63 } … … 64 79 params.lazySlowPath = this; 65 80 81 #if !FTL_USES_B3 66 82 unsigned bytesSaved = m_scratchRegisterAllocator.preserveReusedRegistersByPushing(jit, ScratchRegisterAllocator::ExtraStackSpace::NoExtraSpace); 67 83 // This is needed because LLVM may create a stackmap location that is the register SP. … … 72 88 if (m_newZeroValueRegister != InvalidGPRReg) 73 89 jit.move(CCallHelpers::TrustedImm32(0), m_newZeroValueRegister); 90 #endif // !FTL_USES_B3 74 91 75 92 m_generator->run(jit, params); 76 93 94 #if !FTL_USES_B3 77 95 CCallHelpers::Label doneLabel; 78 96 CCallHelpers::Jump jumpToEndOfPatchpoint; … … 82 100 jumpToEndOfPatchpoint = jit.jump(); 83 101 } 102 #endif // !FTL_USES_B3 84 103 85 104 LinkBuffer linkBuffer(vm, jit, codeBlock, JITCompilationMustSucceed); 105 #if FTL_USES_B3 106 linkBuffer.link(params.doneJumps, m_done); 107 #else // FTL_USES_B3 86 108 if (bytesSaved) { 87 109 linkBuffer.link(params.doneJumps, linkBuffer.locationOf(doneLabel)); … … 89 111 } else 90 112 linkBuffer.link(params.doneJumps, m_patchpoint.labelAtOffset(MacroAssembler::maxJumpReplacementSize())); 113 #endif // FTL_USES_B3 91 114 if (m_exceptionTarget) 92 115 linkBuffer.link(exceptionJumps, m_exceptionTarget); 93 116 m_stub = FINALIZE_CODE_FOR(codeBlock, linkBuffer, ("Lazy slow path call stub")); 94 117 118 #if FTL_USES_B3 119 MacroAssembler::repatchJump(m_patchableJump, CodeLocationLabel(m_stub.code())); 120 #else // FTL_USES_B3 95 121 MacroAssembler::replaceWithJump(m_patchpoint, CodeLocationLabel(m_stub.code())); 122 #endif // FTL_USES_B3 96 123 } 97 124
Note:
See TracChangeset
for help on using the changeset viewer.