Ignore:
Timestamp:
May 24, 2010, 9:32:45 PM (15 years ago)
Author:
[email protected]
Message:

Bug 39643 - Clean up code generation in the JIT of stub function calls for op_call.

Reviewed by Sam Weinig.

Presently, as soon as op-call strays off the hot path we set up a set of values on
the stack to be passed as arguments to cti functions, in case any should be called.

Instead, hoist the setup of the callframe to happen slightly sooner, and make the
cti functions to compile & check arity read these values from the callframe. This
allows up to remove the deprecated methods to manually set up cti arguments, rather
than using JITStubCall.h.

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

(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCallVarargs):
(JSC::JIT::compileOpCallVarargsSlowCase):
(JSC::JIT::compileOpCall):
(JSC::JIT::compileOpCallSlowCase):

  • jit/JITInlineMethods.h:
  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • jit/JITStubs.h:

(JSC::):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/CallFrame.h

    r59860 r60125  
    140140        CallFrame* removeHostCallFrameFlag() { return reinterpret_cast<CallFrame*>(reinterpret_cast<intptr_t>(this) & ~HostCallFrameFlag); }
    141141
    142     private:
    143142        void setArgumentCount(int count) { static_cast<Register*>(this)[RegisterFile::ArgumentCount] = Register::withInt(count); }
    144143        void setCallee(JSFunction* callee) { static_cast<Register*>(this)[RegisterFile::Callee] = callee; }
    145144        void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[RegisterFile::CodeBlock] = codeBlock; }
    146145
     146    private:
    147147        static const intptr_t HostCallFrameFlag = 1;
    148148
Note: See TracChangeset for help on using the changeset viewer.