Changeset 267820 in webkit for trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
- Timestamp:
- Sep 30, 2020, 10:15:14 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/llint/LLIntThunks.cpp
r267239 r267820 153 153 #endif // ENABLE(WEBASSEMBLY) 154 154 155 MacroAssemblerCodeRef<JSEntryPtrTag> getHostCallReturnValueThunk() 156 { 157 static LazyNeverDestroyed<MacroAssemblerCodeRef<JSEntryPtrTag>> codeRef; 158 static std::once_flag onceKey; 159 std::call_once(onceKey, [&] { 160 CCallHelpers jit; 161 162 jit.emitFunctionPrologue(); 163 jit.emitGetFromCallFrameHeaderPtr(CallFrameSlot::callee, GPRInfo::regT0); 164 165 auto preciseAllocationCase = jit.branchTestPtr(CCallHelpers::NonZero, GPRInfo::regT0, CCallHelpers::TrustedImm32(PreciseAllocation::halfAlignment)); 166 jit.andPtr(CCallHelpers::TrustedImmPtr(MarkedBlock::blockMask), GPRInfo::regT0); 167 jit.loadPtr(CCallHelpers::Address(GPRInfo::regT0, MarkedBlock::offsetOfFooter + MarkedBlock::Footer::offsetOfVM()), GPRInfo::regT0); 168 auto loadedCase = jit.jump(); 169 170 preciseAllocationCase.link(&jit); 171 jit.loadPtr(CCallHelpers::Address(GPRInfo::regT0, PreciseAllocation::offsetOfWeakSet() + WeakSet::offsetOfVM() - PreciseAllocation::headerSize()), GPRInfo::regT0); 172 173 loadedCase.link(&jit); 174 #if USE(JSVALUE64) 175 jit.loadValue(CCallHelpers::Address(GPRInfo::regT0, VM::offsetOfEncodedHostCallReturnValue()), JSValueRegs { GPRInfo::returnValueGPR }); 176 #else 177 jit.loadValue(CCallHelpers::Address(GPRInfo::regT0, VM::offsetOfEncodedHostCallReturnValue()), JSValueRegs { GPRInfo::returnValueGPR2, GPRInfo::returnValueGPR }); 178 #endif 179 jit.emitFunctionEpilogue(); 180 jit.ret(); 181 182 LinkBuffer patchBuffer(jit, GLOBAL_THUNK_ID); 183 codeRef.construct(FINALIZE_CODE(patchBuffer, JSEntryPtrTag, "LLInt::getHostCallReturnValue thunk")); 184 }); 185 return codeRef; 186 } 187 155 188 } // namespace LLInt 156 189 157 #endif 190 #endif // ENABLE(JIT) 158 191 159 192 #if ENABLE(C_LOOP)
Note:
See TracChangeset
for help on using the changeset viewer.