Ignore:
Timestamp:
Dec 6, 2013, 1:38:26 PM (12 years ago)
Author:
[email protected]
Message:

Split sizing of VarArgs frames from loading arguments for the frame
https://bugs.webkit.org/show_bug.cgi?id=125331

Reviewed by Filip Pizlo.

Split loadVarargs into sizeAndAllocFrameForVarargs() and loadVarargs() in
preparation for moving onto the C stack. sizeAndAllocFrameForVarargs() will
compute the size of the callee frame and allocate it, while loadVarargs()
actually loads the argument values.

As part of moving onto the C stack, sizeAndAllocFrameForVarargs() will be
changed to a function that just computes the size. The caller will use that
size to allocate the new frame on the stack before calling loadVargs() and
actually making the call.

  • interpreter/Interpreter.cpp:

(JSC::sizeAndAllocFrameForVarargs):
(JSC::loadVarargs):

  • interpreter/Interpreter.h:
  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileLoadVarargs):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileLoadVarargs):

  • jit/JITInlines.h:

(JSC::JIT::callOperation):

  • jit/JITOperations.cpp:
  • jit/JITOperations.h:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LLIntSlowPaths.h:
  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/VM.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r160208 r160244  
    15271527}
    15281528
    1529 CallFrame* JIT_OPERATION operationLoadVarargs(ExecState* exec, EncodedJSValue encodedThis, EncodedJSValue encodedArguments, int32_t firstFreeRegister)
     1529CallFrame* JIT_OPERATION operationSizeAndAllocFrameForVarargs(ExecState* exec, EncodedJSValue encodedArguments, int32_t firstFreeRegister)
    15301530{
    15311531    VM& vm = exec->vm();
    15321532    NativeCallFrameTracer tracer(&vm, exec);
    15331533    JSStack* stack = &exec->interpreter()->stack();
     1534    JSValue arguments = JSValue::decode(encodedArguments);
     1535    CallFrame* newCallFrame = sizeAndAllocFrameForVarargs(exec, stack, arguments, firstFreeRegister);
     1536    return newCallFrame;
     1537}
     1538
     1539CallFrame* JIT_OPERATION operationLoadVarargs(ExecState* exec, CallFrame* newCallFrame, EncodedJSValue encodedThis, EncodedJSValue encodedArguments)
     1540{
     1541    VM& vm = exec->vm();
     1542    NativeCallFrameTracer tracer(&vm, exec);
    15341543    JSValue thisValue = JSValue::decode(encodedThis);
    15351544    JSValue arguments = JSValue::decode(encodedArguments);
    1536     CallFrame* newCallFrame = loadVarargs(exec, stack, thisValue, arguments, firstFreeRegister);
     1545    loadVarargs(exec, newCallFrame, thisValue, arguments);
    15371546    return newCallFrame;
    15381547}
Note: See TracChangeset for help on using the changeset viewer.