X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/2d39b0e377c0896910ee49ae70082ba665faf986..refs/heads/master:/llint/LLIntThunks.cpp diff --git a/llint/LLIntThunks.cpp b/llint/LLIntThunks.cpp index e8f8a17..8ab96b3 100644 --- a/llint/LLIntThunks.cpp +++ b/llint/LLIntThunks.cpp @@ -37,6 +37,7 @@ #include "LinkBuffer.h" #include "LowLevelInterpreter.h" #include "ProtoCallFrame.h" +#include "StackAlignment.h" #include "VM.h" namespace JSC { @@ -93,18 +94,27 @@ MacroAssemblerCodeRef programEntryThunkGenerator(VM* vm) // Non-JIT (i.e. C Loop LLINT) case: -EncodedJSValue callToJavaScript(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame) +EncodedJSValue vmEntryToJavaScript(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame) { - JSValue result = CLoop::execute(llint_call_to_javascript, executableAddress, vm, protoCallFrame); + JSValue result = CLoop::execute(llint_vm_entry_to_javascript, executableAddress, vm, protoCallFrame); return JSValue::encode(result); } -EncodedJSValue callToNativeFunction(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame) +EncodedJSValue vmEntryToNative(void* executableAddress, VM* vm, ProtoCallFrame* protoCallFrame) { - JSValue result = CLoop::execute(llint_call_to_native_function, executableAddress, vm, protoCallFrame); + JSValue result = CLoop::execute(llint_vm_entry_to_native, executableAddress, vm, protoCallFrame); return JSValue::encode(result); } +extern "C" VMEntryRecord* vmEntryRecord(VMEntryFrame* entryFrame) +{ + // The C Loop doesn't have any callee save registers, so the VMEntryRecord is allocated at the base of the frame. + intptr_t stackAlignment = stackAlignmentBytes(); + intptr_t VMEntryTotalFrameSize = (sizeof(VMEntryRecord) + (stackAlignment - 1)) & ~(stackAlignment - 1); + return reinterpret_cast(static_cast(entryFrame) - VMEntryTotalFrameSize); +} + + #endif // ENABLE(JIT) } // namespace JSC