Changeset 60376 in webkit for trunk/JavaScriptCore/interpreter


Ignore:
Timestamp:
May 28, 2010, 2:18:35 PM (15 years ago)
Author:
[email protected]
Message:

Bug 39898 - Move arity check into callee.

Reviewed by Sam Weinig.

We can reduce the size of the virtual call trampolines by moving the arity check
into the callee functions. As a following step we will be able to remove the
check for native function / codeblocks by performing translation in a lazy stub.

  • interpreter/CallFrame.h:

(JSC::ExecState::init):
(JSC::ExecState::setReturnPC):

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):
(JSC::JIT::linkCall):
(JSC::JIT::linkConstruct):

  • jit/JIT.h:

(JSC::JIT::compile):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/Executable.cpp:

(JSC::FunctionExecutable::generateJITCodeForCall):
(JSC::FunctionExecutable::generateJITCodeForConstruct):
(JSC::FunctionExecutable::reparseExceptionInfo):

  • runtime/Executable.h:

(JSC::NativeExecutable::NativeExecutable):
(JSC::FunctionExecutable::generatedJITCodeForCallWithArityCheck):
(JSC::FunctionExecutable::generatedJITCodeForConstructWithArityCheck):

File:
1 edited

Legend:

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

    r60125 r60376  
    126126            setScopeChain(scopeChain);
    127127            setCallerFrame(callerFrame);
    128             static_cast<Register*>(this)[RegisterFile::ReturnPC] = vPC; // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*.
     128            setReturnPC(vPC); // This is either an Instruction* or a pointer into JIT generated code stored as an Instruction*.
    129129            setArgumentCount(argc); // original argument count (for the sake of the "arguments" object)
    130130            setCallee(function);
     
    143143        void setCallee(JSFunction* callee) { static_cast<Register*>(this)[RegisterFile::Callee] = callee; }
    144144        void setCodeBlock(CodeBlock* codeBlock) { static_cast<Register*>(this)[RegisterFile::CodeBlock] = codeBlock; }
     145        void setReturnPC(void* value) { static_cast<Register*>(this)[RegisterFile::ReturnPC] = (Instruction*)value; }
    145146
    146147    private:
Note: See TracChangeset for help on using the changeset viewer.