WebKit Bugzilla
Attachment 370175 Details for
Bug 197993
: Allow OSR exit to the LLInt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP
b-backup.diff (text/plain), 26.66 KB, created by
Saam Barati
on 2019-05-17 18:31:12 PDT
(
hide
)
Description:
WIP
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2019-05-17 18:31:12 PDT
Size:
26.66 KB
patch
obsolete
>Index: Source/JavaScriptCore/bytecode/CodeBlock.h >=================================================================== >--- Source/JavaScriptCore/bytecode/CodeBlock.h (revision 245472) >+++ Source/JavaScriptCore/bytecode/CodeBlock.h (working copy) >@@ -884,6 +884,9 @@ public: > return m_unlinkedCode->metadataSizeInBytes(); > } > >+ MetadataTable* metadataTable() { return m_metadata.get(); } >+ const void* instructionsRawPointer() { return m_instructionsRawPointer; } >+ > protected: > void finalizeLLIntInlineCaches(); > #if ENABLE(JIT) >Index: Source/JavaScriptCore/dfg/DFGOSRExit.cpp >=================================================================== >--- Source/JavaScriptCore/dfg/DFGOSRExit.cpp (revision 245472) >+++ Source/JavaScriptCore/dfg/DFGOSRExit.cpp (working copy) >@@ -1167,6 +1167,13 @@ void OSRExit::compileExit(CCallHelpers& > > CodeOrigin codeOrigin = exit.m_codeOriginForExitProfile; > if (ArrayProfile* arrayProfile = jit.baselineCodeBlockFor(codeOrigin)->getArrayProfile(codeOrigin.bytecodeIndex())) { >+ const Instruction* instruction = jit.baselineCodeBlockFor(codeOrigin)->instructions().at(codeOrigin.bytecodeIndex()).ptr(); >+ CCallHelpers::Jump skipProfile; >+ if (instruction->opcodeID() == op_get_by_id) { >+ auto& metadata = instruction->as<OpGetById>().metadata(jit.baselineCodeBlockFor(codeOrigin)); >+ skipProfile = jit.branch8(CCallHelpers::NotEqual, CCallHelpers::AbsoluteAddress(&metadata.m_mode), CCallHelpers::TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength))); >+ } >+ > #if USE(JSVALUE64) > GPRReg usedRegister; > if (exit.m_jsValueSource.isAddress()) >@@ -1242,6 +1249,9 @@ void OSRExit::compileExit(CCallHelpers& > jit.pop(scratch2); > jit.pop(scratch1); > } >+ >+ if (skipProfile.isSet()) >+ skipProfile.link(&jit); > } > } > >Index: Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp >=================================================================== >--- Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp (revision 245472) >+++ Source/JavaScriptCore/dfg/DFGOSRExitCompilerCommon.cpp (working copy) >@@ -33,10 +33,26 @@ > #include "JIT.h" > #include "JSCJSValueInlines.h" > #include "JSCInlines.h" >+#include "LLIntData.h" > #include "StructureStubInfo.h" > >+#include "MacroAssemblerPrinter.h" >+ > namespace JSC { namespace DFG { > >+extern "C" void op_call_return_location_wide(); >+extern "C" void op_call_return_location_narrow(); >+extern "C" void op_construct_return_location_wide(); >+extern "C" void op_construct_return_location_narrow(); >+extern "C" void op_call_varargs_slow_return_location_wide(); >+extern "C" void op_call_varargs_slow_return_location_narrow(); >+extern "C" void op_construct_varargs_slow_return_location_wide(); >+extern "C" void op_construct_varargs_slow_return_location_narrow(); >+extern "C" void op_tail_call_return_location_wide(); >+extern "C" void op_tail_call_return_location_narrow(); >+extern "C" void op_tail_call_varargs_slow_return_location_wide(); >+extern "C" void op_tail_call_varargs_slow_return_location_narrow(); >+ > void handleExitCounts(CCallHelpers& jit, const OSRExitBase& exit) > { > if (!exitKindMayJettison(exit.m_kind)) { >@@ -152,6 +168,9 @@ void reifyInlinedCallFrames(CCallHelpers > CodeOrigin* trueCaller = inlineCallFrame->getCallerSkippingTailCalls(&trueCallerCallKind); > GPRReg callerFrameGPR = GPRInfo::callFrameRegister; > >+ bool exitToLLInt = Options::forceOSRExitToLLInt(); >+ >+ > if (!trueCaller) { > ASSERT(inlineCallFrame->isTail()); > jit.loadPtr(AssemblyHelpers::Address(GPRInfo::callFrameRegister, CallFrame::returnPCOffset()), GPRInfo::regT3); >@@ -168,34 +187,111 @@ void reifyInlinedCallFrames(CCallHelpers > CodeBlock* baselineCodeBlockForCaller = jit.baselineCodeBlockFor(*trueCaller); > unsigned callBytecodeIndex = trueCaller->bytecodeIndex(); > void* jumpTarget = nullptr; >+ const Instruction& callInstruction = *baselineCodeBlockForCaller->instructions().at(callBytecodeIndex).ptr(); > >- switch (trueCallerCallKind) { >- case InlineCallFrame::Call: >- case InlineCallFrame::Construct: >- case InlineCallFrame::CallVarargs: >- case InlineCallFrame::ConstructVarargs: >- case InlineCallFrame::TailCall: >- case InlineCallFrame::TailCallVarargs: { >- CallLinkInfo* callLinkInfo = >- baselineCodeBlockForCaller->getCallLinkInfoForBytecodeIndex(callBytecodeIndex); >- RELEASE_ASSERT(callLinkInfo); >- >- jumpTarget = callLinkInfo->callReturnLocation().untaggedExecutableAddress(); >- break; >- } >- >- case InlineCallFrame::GetterCall: >- case InlineCallFrame::SetterCall: { >- StructureStubInfo* stubInfo = >- baselineCodeBlockForCaller->findStubInfo(CodeOrigin(callBytecodeIndex)); >- RELEASE_ASSERT(stubInfo); >- >- jumpTarget = stubInfo->doneLocation().untaggedExecutableAddress(); >- break; >- } >- >- default: >- RELEASE_ASSERT_NOT_REACHED(); >+ if (exitToLLInt) { >+ bool isWide = callInstruction.isWide(); >+ switch (trueCallerCallKind) { >+ case InlineCallFrame::Call: >+ if (isWide) { >+ dataLogLn("call wide"); >+ jumpTarget = bitwise_cast<void*>(op_call_return_location_wide); >+ } >+ else { >+ dataLogLn("call narrow"); >+ jumpTarget = bitwise_cast<void*>(op_call_return_location_narrow); >+ } >+ break; >+ case InlineCallFrame::Construct: >+ if (isWide) { >+ dataLogLn("construct wide"); >+ jumpTarget = bitwise_cast<void*>(op_construct_return_location_wide); >+ } >+ else { >+ dataLogLn("construct narrow"); >+ jumpTarget = bitwise_cast<void*>(op_construct_return_location_narrow); >+ } >+ break; >+ case InlineCallFrame::CallVarargs: >+ if (isWide) { >+ jumpTarget = bitwise_cast<void*>(op_call_varargs_slow_return_location_wide); >+ dataLogLn("call varargs wide"); >+ } else { >+ jumpTarget = bitwise_cast<void*>(op_call_varargs_slow_return_location_narrow); >+ dataLogLn("call varargs narrow"); >+ } >+ break; >+ case InlineCallFrame::ConstructVarargs: >+ if (isWide) { >+ jumpTarget = bitwise_cast<void*>(op_construct_varargs_slow_return_location_wide); >+ dataLogLn("construct varargs wide"); >+ } else { >+ jumpTarget = bitwise_cast<void*>(op_construct_varargs_slow_return_location_narrow); >+ dataLogLn("construct varargs narrow"); >+ } >+ break; >+ case InlineCallFrame::TailCall: >+ if (isWide) { >+ dataLogLn("tail call wide"); >+ jumpTarget = bitwise_cast<void*>(op_tail_call_return_location_wide); >+ } >+ else { >+ dataLogLn("tal call narrow"); >+ jumpTarget = bitwise_cast<void*>(op_tail_call_return_location_narrow); >+ } >+ break; >+ case InlineCallFrame::TailCallVarargs: >+ if (isWide) { >+ jumpTarget = bitwise_cast<void*>(op_tail_call_varargs_slow_return_location_wide); >+ dataLogLn("tail call varargs wide"); >+ } else { >+ jumpTarget = bitwise_cast<void*>(op_tail_call_varargs_slow_return_location_narrow); >+ dataLogLn("tail call varargs narrow"); >+ } >+ break; >+ >+ case InlineCallFrame::GetterCall: >+ case InlineCallFrame::SetterCall: { >+ StructureStubInfo* stubInfo = >+ baselineCodeBlockForCaller->findStubInfo(CodeOrigin(callBytecodeIndex)); >+ RELEASE_ASSERT(stubInfo); >+ >+ jumpTarget = stubInfo->doneLocation().untaggedExecutableAddress(); >+ break; >+ } >+ >+ default: >+ RELEASE_ASSERT_NOT_REACHED(); >+ } >+ } else { >+ switch (trueCallerCallKind) { >+ case InlineCallFrame::Call: >+ case InlineCallFrame::Construct: >+ case InlineCallFrame::CallVarargs: >+ case InlineCallFrame::ConstructVarargs: >+ case InlineCallFrame::TailCall: >+ case InlineCallFrame::TailCallVarargs: { >+ CallLinkInfo* callLinkInfo = >+ baselineCodeBlockForCaller->getCallLinkInfoForBytecodeIndex(callBytecodeIndex); >+ RELEASE_ASSERT(callLinkInfo); >+ >+ jumpTarget = callLinkInfo->callReturnLocation().untaggedExecutableAddress(); >+ break; >+ } >+ >+ case InlineCallFrame::GetterCall: >+ case InlineCallFrame::SetterCall: { >+ StructureStubInfo* stubInfo = >+ baselineCodeBlockForCaller->findStubInfo(CodeOrigin(callBytecodeIndex)); >+ RELEASE_ASSERT(stubInfo); >+ >+ jumpTarget = stubInfo->doneLocation().untaggedExecutableAddress(); >+ break; >+ } >+ >+ default: >+ RELEASE_ASSERT_NOT_REACHED(); >+ } > } > > if (trueCaller->inlineCallFrame()) { >@@ -227,6 +323,25 @@ void reifyInlinedCallFrames(CCallHelpers > trueCaller ? AssemblyHelpers::UseExistingTagRegisterContents : AssemblyHelpers::CopyBaselineCalleeSavedRegistersFromBaseFrame, > GPRInfo::regT2); > >+ if (trueCaller && exitToLLInt) { >+ auto getSlot = [&] (GPRReg reg) -> CCallHelpers::Address { >+ const RegisterAtOffsetList* calleeSaves = baselineCodeBlock->calleeSaveRegisters(); >+ for (unsigned i = 0; i < calleeSaves->size(); i++) { >+ RegisterAtOffset entry = calleeSaves->at(i); >+ if (entry.reg() != reg) >+ continue; >+ return CCallHelpers::Address(CCallHelpers::framePointerRegister, static_cast<VirtualRegister>(inlineCallFrame->stackOffset).offsetInBytes() + entry.offset()); >+ } >+ >+ RELEASE_ASSERT_NOT_REACHED(); >+ }; >+ >+ CodeBlock* baselineCodeBlockForCaller = jit.baselineCodeBlockFor(*trueCaller); >+ dataLogLn("overwriting callee saves!"); >+ jit.storePtr(CCallHelpers::TrustedImmPtr(baselineCodeBlockForCaller->metadataTable()), getSlot(LLInt::Registers::metadataTableGPR)); >+ jit.storePtr(CCallHelpers::TrustedImmPtr(baselineCodeBlockForCaller->instructionsRawPointer()), getSlot(LLInt::Registers::pbGPR)); >+ } >+ > if (!inlineCallFrame->isVarargs()) > jit.store32(AssemblyHelpers::TrustedImm32(inlineCallFrame->argumentCountIncludingThis), AssemblyHelpers::payloadFor((VirtualRegister)(inlineCallFrame->stackOffset + CallFrameSlot::argumentCount))); > #if USE(JSVALUE64) >@@ -311,10 +426,35 @@ void adjustAndJumpToTarget(VM& vm, CCall > CodeBlock* codeBlockForExit = jit.baselineCodeBlockFor(exit.m_codeOrigin); > ASSERT(codeBlockForExit == codeBlockForExit->baselineVersion()); > ASSERT(codeBlockForExit->jitType() == JITType::BaselineJIT); >- CodeLocationLabel<JSEntryPtrTag> codeLocation = codeBlockForExit->jitCodeMap().find(exit.m_codeOrigin.bytecodeIndex()); >- ASSERT(codeLocation); > >- void* jumpTarget = codeLocation.retagged<OSRExitPtrTag>().executableAddress(); >+ void* jumpTarget; >+ if (Options::forceOSRExitToLLInt()) { >+ unsigned bytecodeOffset = exit.m_codeOrigin.bytecodeIndex(); >+ const Instruction& currentInstruction = *codeBlockForExit->instructions().at(bytecodeOffset).ptr(); >+ MacroAssemblerCodePtr<JSEntryPtrTag> destination; >+ if (currentInstruction.isWide()) { >+ destination = LLInt::getWideCodePtr<JSEntryPtrTag>(currentInstruction.opcodeID()); >+ } else { >+ destination = LLInt::getCodePtr<JSEntryPtrTag>(currentInstruction.opcodeID()); >+ } >+ >+ if (currentInstruction.opcodeID() == op_catch) { >+ jit.move(CCallHelpers::TrustedImmPtr(¤tInstruction), GPRInfo::regT2); >+ jit.storePtr(GPRInfo::regT2, &vm.targetInterpreterPCForThrow); >+ } >+ >+ jit.move(CCallHelpers::TrustedImmPtr(codeBlockForExit->metadataTable()), LLInt::Registers::metadataTableGPR); >+ jit.move(CCallHelpers::TrustedImmPtr(codeBlockForExit->instructionsRawPointer()), LLInt::Registers::pbGPR); >+ jit.move(CCallHelpers::TrustedImm32(bytecodeOffset), LLInt::Registers::pcGPR); >+ >+ jumpTarget = destination.retagged<OSRExitPtrTag>().executableAddress(); >+ } else { >+ CodeLocationLabel<JSEntryPtrTag> codeLocation = codeBlockForExit->jitCodeMap().find(exit.m_codeOrigin.bytecodeIndex()); >+ ASSERT(codeLocation); >+ >+ jumpTarget = codeLocation.retagged<OSRExitPtrTag>().executableAddress(); >+ } >+ > jit.addPtr(AssemblyHelpers::TrustedImm32(JIT::stackPointerOffsetFor(codeBlockForExit) * sizeof(Register)), GPRInfo::callFrameRegister, AssemblyHelpers::stackPointerRegister); > if (exit.isExceptionHandler()) { > // Since we're jumping to op_catch, we need to set callFrameForCatch. >Index: Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp >=================================================================== >--- Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp (revision 245472) >+++ Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp (working copy) >@@ -28,6 +28,7 @@ > > #if ENABLE(FTL_JIT) > >+#include "BytecodeStructs.h" > #include "DFGOSRExitCompilerCommon.h" > #include "DFGOSRExitPreparation.h" > #include "FTLExitArgumentForOperand.h" >@@ -37,6 +38,7 @@ > #include "FTLOperations.h" > #include "FTLState.h" > #include "FTLSaveRestore.h" >+#include "GetByIdMetadata.h" > #include "LinkBuffer.h" > #include "MaxFrameExtentForSlowPathCall.h" > #include "OperandsInlines.h" >@@ -249,6 +251,14 @@ static void compileStub( > if (exit.m_kind == BadCache || exit.m_kind == BadIndexingType) { > CodeOrigin codeOrigin = exit.m_codeOriginForExitProfile; > if (ArrayProfile* arrayProfile = jit.baselineCodeBlockFor(codeOrigin)->getArrayProfile(codeOrigin.bytecodeIndex())) { >+ >+ const Instruction* instruction = jit.baselineCodeBlockFor(codeOrigin)->instructions().at(codeOrigin.bytecodeIndex()).ptr(); >+ CCallHelpers::Jump skipProfile; >+ if (instruction->opcodeID() == op_get_by_id) { >+ auto& metadata = instruction->as<OpGetById>().metadata(jit.baselineCodeBlockFor(codeOrigin)); >+ skipProfile = jit.branch8(CCallHelpers::NotEqual, CCallHelpers::AbsoluteAddress(&metadata.m_mode), CCallHelpers::TrustedImm32(static_cast<uint8_t>(GetByIdMode::ArrayLength))); >+ } >+ > jit.load32(MacroAssembler::Address(GPRInfo::regT0, JSCell::structureIDOffset()), GPRInfo::regT1); > jit.store32(GPRInfo::regT1, arrayProfile->addressOfLastSeenStructureID()); > >@@ -266,6 +276,9 @@ static void compileStub( > jit.lshift32(GPRInfo::regT1, GPRInfo::regT2); > storeArrayModes.link(&jit); > jit.or32(GPRInfo::regT2, MacroAssembler::AbsoluteAddress(arrayProfile->addressOfArrayModes())); >+ >+ if (skipProfile.isSet()) >+ skipProfile.link(&jit); > } > } > >Index: Source/JavaScriptCore/llint/LLIntData.h >=================================================================== >--- Source/JavaScriptCore/llint/LLIntData.h (revision 245472) >+++ Source/JavaScriptCore/llint/LLIntData.h (working copy) >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "GPRInfo.h" > #include "JSCJSValue.h" > #include "MacroAssemblerCodeRef.h" > #include "Opcode.h" >@@ -152,4 +153,21 @@ ALWAYS_INLINE void* getCodePtr(JSC::Enco > return bitwise_cast<void*>(glueHelper); > } > >+#if ENABLE(JIT) >+struct Registers { >+ static const GPRReg pcGPR = GPRInfo::regT4; >+ >+#if CPU(X86_64) && !OS(WINDOWS) >+ static const GPRReg metadataTableGPR = GPRInfo::regCS1; >+ static const GPRReg pbGPR = GPRInfo::regCS2; >+#elif CPU(X86_64) && OS(WINDOWS) >+ static const GPRReg metadataTableGPR = GPRInfo::regCS3; >+ static const GPRReg pbGPR = GPRInfo::regCS4; >+#elif CPU(ARM64) >+ static const GPRReg metadataTableGPR = GPRInfo::regCS6; >+ static const GPRReg pbGPR = GPRInfo::regCS7; >+#endif >+}; >+#endif >+ > } } // namespace JSC::LLInt >Index: Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm >=================================================================== >--- Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (revision 245472) >+++ Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm (working copy) >@@ -1850,7 +1850,7 @@ macro commonCallOp(opcodeName, slowPath, > storei CellTag, Callee + TagOffset[t3] > move t3, sp > prepareCall(%opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag) >- callTargetFunction(size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) >+ callTargetFunction(opcodeName, size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) > > .opCallSlow: > slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall) >Index: Source/JavaScriptCore/llint/LowLevelInterpreter64.asm >=================================================================== >--- Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (revision 245472) >+++ Source/JavaScriptCore/llint/LowLevelInterpreter64.asm (working copy) >@@ -1944,10 +1944,10 @@ macro commonCallOp(opcodeName, slowPath, > storei t2, ArgumentCount + PayloadOffset[t3] > move t3, sp > prepareCall(%opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], t2, t3, t4, JSEntryPtrTag) >- callTargetFunction(size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) >+ callTargetFunction(opcodeName, size, opcodeStruct, dispatch, %opcodeStruct%::Metadata::m_callLinkInfo.machineCodeTarget[t5], JSEntryPtrTag) > > .opCallSlow: >- slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall) >+ slowPathForCall(opcodeName, size, opcodeStruct, dispatch, slowPath, prepareCall) > end) > end > >Index: Source/JavaScriptCore/llint/LowLevelInterpreter.asm >=================================================================== >--- Source/JavaScriptCore/llint/LowLevelInterpreter.asm (revision 245472) >+++ Source/JavaScriptCore/llint/LowLevelInterpreter.asm (working copy) >@@ -898,12 +898,24 @@ macro traceExecution() > end > end > >-macro callTargetFunction(size, opcodeStruct, dispatch, callee, callPtrTag) >+macro callTargetFunction(opcodeName, size, opcodeStruct, dispatch, callee, callPtrTag) > if C_LOOP > cloopCallJSFunction callee > else > call callee, callPtrTag > end >+ >+ macro defineWide() >+ global _%opcodeName%_return_location_wide >+ _%opcodeName%_return_location_wide: >+ end >+ >+ macro defineNarrow() >+ global _%opcodeName%_return_location_narrow >+ _%opcodeName%_return_location_narrow: >+ end >+ >+ size(defineNarrow, defineWide, macro (f) f() end) > restoreStackPointerAfterCall() > dispatchAfterCall(size, opcodeStruct, dispatch) > end >@@ -973,7 +985,7 @@ macro prepareForTailCall(callee, temp1, > jmp callee, callPtrTag > end > >-macro slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall) >+macro slowPathForCall(opcodeName, size, opcodeStruct, dispatch, slowPath, prepareCall) > callCallSlowPath( > slowPath, > # Those are r0 and r1 >@@ -982,7 +994,7 @@ macro slowPathForCall(size, opcodeStruct > move calleeFramePtr, sp > prepareCall(callee, t2, t3, t4, SlowPathPtrTag) > .dontUpdateSP: >- callTargetFunction(size, opcodeStruct, dispatch, callee, SlowPathPtrTag) >+ callTargetFunction(%opcodeName%_slow, size, opcodeStruct, dispatch, callee, SlowPathPtrTag) > end) > end > >@@ -1687,7 +1699,7 @@ end) > callOp(construct, OpConstruct, prepareForRegularCall, macro (getu, metadata) end) > > >-macro doCallVarargs(size, opcodeStruct, dispatch, frameSlowPath, slowPath, prepareCall) >+macro doCallVarargs(opcodeName, size, opcodeStruct, dispatch, frameSlowPath, slowPath, prepareCall) > callSlowPath(frameSlowPath) > branchIfException(_llint_throw_from_slow_path_trampoline) > # calleeFrame in r1 >@@ -1702,19 +1714,19 @@ macro doCallVarargs(size, opcodeStruct, > subp r1, CallerFrameAndPCSize, sp > end > end >- slowPathForCall(size, opcodeStruct, dispatch, slowPath, prepareCall) >+ slowPathForCall(opcodeName, size, opcodeStruct, dispatch, slowPath, prepareCall) > end > > > llintOp(op_call_varargs, OpCallVarargs, macro (size, get, dispatch) >- doCallVarargs(size, OpCallVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_call_varargs, prepareForRegularCall) >+ doCallVarargs(op_call_varargs, size, OpCallVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_call_varargs, prepareForRegularCall) > end) > > llintOp(op_tail_call_varargs, OpTailCallVarargs, macro (size, get, dispatch) > checkSwitchToJITForEpilogue() > # We lie and perform the tail call instead of preparing it since we can't > # prepare the frame for a call opcode >- doCallVarargs(size, OpTailCallVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_tail_call_varargs, prepareForTailCall) >+ doCallVarargs(op_tail_call_varargs, size, OpTailCallVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_tail_call_varargs, prepareForTailCall) > end) > > >@@ -1722,12 +1734,12 @@ llintOp(op_tail_call_forward_arguments, > checkSwitchToJITForEpilogue() > # We lie and perform the tail call instead of preparing it since we can't > # prepare the frame for a call opcode >- doCallVarargs(size, OpTailCallForwardArguments, dispatch, _llint_slow_path_size_frame_for_forward_arguments, _llint_slow_path_tail_call_forward_arguments, prepareForTailCall) >+ doCallVarargs(op_tail_call_forward_arguments, size, OpTailCallForwardArguments, dispatch, _llint_slow_path_size_frame_for_forward_arguments, _llint_slow_path_tail_call_forward_arguments, prepareForTailCall) > end) > > > llintOp(op_construct_varargs, OpConstructVarargs, macro (size, get, dispatch) >- doCallVarargs(size, OpConstructVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_construct_varargs, prepareForRegularCall) >+ doCallVarargs(op_construct_varargs, size, OpConstructVarargs, dispatch, _llint_slow_path_size_frame_for_varargs, _llint_slow_path_construct_varargs, prepareForRegularCall) > end) > > >@@ -1766,6 +1778,7 @@ end) > > _llint_op_call_eval: > slowPathForCall( >+ op_call_eval_narrow, > narrow, > OpCallEval, > macro () dispatchOp(narrow, op_call_eval) end, >@@ -1774,6 +1787,7 @@ _llint_op_call_eval: > > _llint_op_call_eval_wide: > slowPathForCall( >+ op_call_eval_wide, > wide, > OpCallEval, > macro () dispatchOp(wide, op_call_eval) end, >Index: Source/JavaScriptCore/offlineasm/asm.rb >=================================================================== >--- Source/JavaScriptCore/offlineasm/asm.rb (revision 245472) >+++ Source/JavaScriptCore/offlineasm/asm.rb (working copy) >@@ -401,7 +401,7 @@ File.open(outputFlnm, "w") { > lowLevelAST = lowLevelAST.resolve(buildOffsetsMap(lowLevelAST, offsetsList)) > lowLevelAST.validate > emitCodeInConfiguration(concreteSettings, lowLevelAST, backend) { >- $currentSettings = concreteSettings >+ $currentSettings = concreteSettings > $asm.inAsm { > lowLevelAST.lower(backend) > } >Index: Source/JavaScriptCore/offlineasm/transform.rb >=================================================================== >--- Source/JavaScriptCore/offlineasm/transform.rb (revision 245472) >+++ Source/JavaScriptCore/offlineasm/transform.rb (working copy) >@@ -259,7 +259,11 @@ class Label > match > end > } >- Label.forName(codeOrigin, name, @definedInFile) >+ result = Label.forName(codeOrigin, name, @definedInFile) >+ if @global >+ result.setGlobal() >+ end >+ result > else > self > end >@@ -272,7 +276,11 @@ class Label > raise "Unknown variable `#{var.originalName}` in substitution at #{codeOrigin}" unless mapping[var] > mapping[var].name > } >- Label.forName(codeOrigin, name, @definedInFile) >+ result = Label.forName(codeOrigin, name, @definedInFile) >+ if @global >+ result.setGlobal() >+ end >+ result > else > self > end >Index: Source/JavaScriptCore/runtime/Options.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/Options.cpp (revision 245472) >+++ Source/JavaScriptCore/runtime/Options.cpp (working copy) >@@ -386,6 +386,8 @@ static void correctOptions() > > static void recomputeDependentOptions() > { >+ Options::forceOSRExitToLLInt() = true; >+ > #if !defined(NDEBUG) > Options::validateDFGExceptionHandling() = true; > #endif >Index: Source/JavaScriptCore/runtime/Options.h >=================================================================== >--- Source/JavaScriptCore/runtime/Options.h (revision 245472) >+++ Source/JavaScriptCore/runtime/Options.h (working copy) >@@ -518,6 +518,7 @@ constexpr bool enableWebAssemblyStreamin > v(bool, validateAbstractInterpreterState, false, Restricted, nullptr) \ > v(double, validateAbstractInterpreterStateProbability, 0.5, Normal, nullptr) \ > v(optionString, dumpJITMemoryPath, nullptr, Restricted, nullptr) \ >+ v(bool, forceOSRExitToLLInt, false, Restricted, "If true, we always exit to the LLInt. If false, we exit to whatever is most convenient.") \ > > > enum OptionEquivalence {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197993
:
370175
|
370227
|
370228
|
370229
|
370237
|
370238
|
370276
|
379977
|
380065
|
380066
|
380073
|
380168
|
380244
|
380246
|
380368