Changeset 36413


Ignore:
Timestamp:
09/14/08 17:35:40 (6 years ago)
Author:
barraclough@apple.com
Message:

2008-09-14 Gavin Barraclough <barraclough@apple.com>

Reviewed by Sam Weinig.

Remove unnecessary virtual function call from cti_op_call_JSFunction -
~5% on richards, ~2.5% on v8-tests, ~0.5% on sunspider.

  • VM/Machine.cpp: (JSC::Machine::cti_op_call_JSFunction):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r36412 r36413  
     12008-09-14  Gavin Barraclough  <barraclough@apple.com> 
     2 
     3        Reviewed by Sam Weinig. 
     4 
     5        Remove unnecessary virtual function call from cti_op_call_JSFunction - 
     6        ~5% on richards, ~2.5% on v8-tests, ~0.5% on sunspider. 
     7 
     8        * VM/Machine.cpp: 
     9        (JSC::Machine::cti_op_call_JSFunction): 
     10 
    1112008-09-14  Cameron Zwarich  <cwzwarich@uwaterloo.ca> 
    212 
  • trunk/JavaScriptCore/VM/Machine.cpp

    r36412 r36413  
    42334233    int argCount = ARG_int4; 
    42344234 
     4235    // In the JIT code before entering this function we wil have checked the vptr, 
     4236    // and know this is an object of type JSFunction. 
     4237#ifndef NDEBUG 
    42354238    CallData callData; 
    4236 #ifndef NDEBUG 
    4237     CallType callType = 
    42384239#endif 
    4239         funcVal->getCallData(callData); 
    4240  
    4241     ASSERT(callType == CallTypeJS); 
     4240    ASSERT(funcVal->getCallData(callData) == CallTypeJS); 
    42424241 
    42434242    if (*ARG_profilerReference) 
    42444243        (*ARG_profilerReference)->willExecute(exec, static_cast<JSObject*>(funcVal)); 
    42454244 
    4246     ScopeChainNode* callDataScopeChain = callData.js.scopeChain; 
    4247     FunctionBodyNode* functionBodyNode = callData.js.functionBody; 
     4245    ScopeChainNode* callDataScopeChain = static_cast<JSFunction*>(funcVal)->m_scopeChain.node(); 
     4246    FunctionBodyNode* functionBodyNode = static_cast<JSFunction*>(funcVal)->m_body.get(); 
     4247 
    42484248    CodeBlock* newCodeBlock = &functionBodyNode->byteCode(callDataScopeChain); 
    42494249 
Note: See TracChangeset for help on using the changeset viewer.