Changeset 292372 in webkit for trunk/Source/JavaScriptCore/jit/JIT.cpp
- Timestamp:
- Apr 4, 2022, 9:10:35 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JIT.cpp
r292191 r292372 202 202 JITSlowPathCall slowPathCall(this, stub); 203 203 slowPathCall.call(); 204 }205 206 void JIT::emitPutCodeBlockToFrameInPrologue(GPRReg result)207 {208 RELEASE_ASSERT(m_unlinkedCodeBlock->codeType() == FunctionCode);209 emitGetFromCallFrameHeaderPtr(CallFrameSlot::callee, result);210 loadPtr(Address(result, JSFunction::offsetOfExecutableOrRareData()), result);211 auto hasExecutable = branchTestPtr(Zero, result, CCallHelpers::TrustedImm32(JSFunction::rareDataTag));212 loadPtr(Address(result, FunctionRareData::offsetOfExecutable() - JSFunction::rareDataTag), result);213 hasExecutable.link(this);214 if (m_unlinkedCodeBlock->isConstructor())215 loadPtr(Address(result, FunctionExecutable::offsetOfCodeBlockForConstruct()), result);216 else217 loadPtr(Address(result, FunctionExecutable::offsetOfCodeBlockForCall()), result);218 emitPutToCallFrameHeader(result, CallFrameSlot::codeBlock);219 220 #if ASSERT_ENABLED221 probeDebug([=] (Probe::Context& ctx) {222 CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock();223 RELEASE_ASSERT(codeBlock->jitType() == JITType::BaselineJIT);224 });225 #endif226 204 } 227 205 … … 752 730 753 731 std::optional<JITSizeStatistics::Marker> sizeMarker; 754 if (UNLIKELY(Options::dumpBaselineJITSizeStatistics())) { 755 String id = makeString("Baseline_prologue"); 756 sizeMarker = m_vm->jitSizeStatistics->markStart(id, *this); 757 } 732 if (UNLIKELY(Options::dumpBaselineJITSizeStatistics())) 733 sizeMarker = m_vm->jitSizeStatistics->markStart("Baseline_prologue"_s, *this); 758 734 759 735 Label entryLabel(this); … … 766 742 767 743 emitFunctionPrologue(); 768 if (m_unlinkedCodeBlock->codeType() == FunctionCode) 769 emitPutCodeBlockToFrameInPrologue(); 744 #if ASSERT_ENABLED 745 probeDebug([=](Probe::Context& ctx) { 746 CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock(); 747 if (codeBlock->jitType() != JITType::BaselineJIT) { 748 dataLogLn("FP ", RawPointer(ctx.fp<CallFrame*>())); 749 RELEASE_ASSERT_NOT_REACHED(); 750 } 751 }); 752 #endif 770 753 771 754 Label beginLabel(this); … … 830 813 831 814 emitFunctionPrologue(); 832 emitPutCodeBlockToFrameInPrologue(regT0); 815 RELEASE_ASSERT(m_unlinkedCodeBlock->codeType() == FunctionCode); 816 #if ASSERT_ENABLED 817 probeDebug([=](Probe::Context& ctx) { 818 CodeBlock* codeBlock = ctx.fp<CallFrame*>()->codeBlock(); 819 if (codeBlock->jitType() != JITType::BaselineJIT) { 820 dataLogLn("FP ", RawPointer(ctx.fp<CallFrame*>())); 821 RELEASE_ASSERT_NOT_REACHED(); 822 } 823 }); 824 #endif 825 emitGetFromCallFrameHeaderPtr(CallFrameSlot::codeBlock, regT0); 833 826 store8(TrustedImm32(0), Address(regT0, CodeBlock::offsetOfShouldAlwaysBeInlined())); 834 827
Note:
See TracChangeset
for help on using the changeset viewer.