Changeset 44693 in webkit for trunk/JavaScriptCore/jit/JIT.cpp


Ignore:
Timestamp:
Jun 15, 2009, 1:17:50 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-15 Gavin Barraclough <[email protected]>

Reviewed by Geoff Hunt & Oliver Garen.

We are currently generating two copies of the slow path for op_call for no reason. Stop that.

Originally op_call used two slow paths since the first set up the pointer to the CallLinkInfo
for use when linking. However this is now looked up using the return address (as we do for
property accesses) so the two paths are now identical.

No performance impact, reduces memory footprint.

  • bytecode/CodeBlock.h:
  • jit/JIT.cpp: (JSC::JIT::privateCompile): (JSC::JIT::linkCall):
  • jit/JIT.h:
  • jit/JITCall.cpp: (JSC::JIT::compileOpCallSlowCase):
  • jit/JITStubs.cpp: (JSC::JITStubs::DEFINE_STUB_FUNCTION):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JIT.cpp

    r44523 r44693  
    490490        info.hotPathBegin = patchBuffer.locationOf(m_callStructureStubCompilationInfo[i].hotPathBegin);
    491491        info.hotPathOther = patchBuffer.locationOfNearCall(m_callStructureStubCompilationInfo[i].hotPathOther);
    492         info.coldPathOther = patchBuffer.locationOf(m_callStructureStubCompilationInfo[i].coldPathOther);
    493492    }
    494493#endif
     
    907906}
    908907
    909 void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount)
     908void JIT::linkCall(JSFunction* callee, CodeBlock* calleeCodeBlock, JITCode& code, CallLinkInfo* callLinkInfo, int callerArgCount, JSGlobalData* globalData)
    910909{
    911910    // Currently we only link calls with the exact number of arguments.
     
    921920    }
    922921
    923     // patch the instruction that jumps out to the cold path, so that we only try to link once.
    924     callLinkInfo->hotPathBegin.jumpAtOffset(patchOffsetOpCallCompareToJump).relink(callLinkInfo->coldPathOther);
     922    // patch the call so we do not continue to try to link.
     923    callLinkInfo->callReturnLocation.relink(globalData->jitStubs.ctiVirtualCall());
    925924}
    926925
Note: See TracChangeset for help on using the changeset viewer.