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/runtime/Executable.cpp

    r59339 r60376  
    189189{
    190190    CodeBlock* codeBlock = &bytecodeForCall(exec, scopeChainNode);
    191     m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock);
     191    m_jitCodeForCall = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForCallWithArityCheck);
    192192
    193193#if !ENABLE(OPCODE_SAMPLING)
     
    200200{
    201201    CodeBlock* codeBlock = &bytecodeForConstruct(exec, scopeChainNode);
    202     m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, codeBlock);
     202    m_jitCodeForConstruct = JIT::compile(scopeChainNode->globalData, codeBlock, &m_jitCodeForConstructWithArityCheck);
    203203
    204204#if !ENABLE(OPCODE_SAMPLING)
Note: See TracChangeset for help on using the changeset viewer.