Ignore:
Timestamp:
Feb 9, 2011, 9:21:33 PM (14 years ago)
Author:
[email protected]
Message:

Bug 54164 - Optimize global_var accesses on JSVALUE64

Reviewed by Sam Weinig.

Directly embed the pointer to d->registers, optimize out the load
from the variable object, as we do already in JSVALUE32_64.

This is a ~1.5% win on sunspidey.

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

(JSC::JIT::emit_op_get_global_var):
(JSC::JIT::emit_op_put_global_var):
(JSC::JIT::emit_op_get_scoped_var):
(JSC::JIT::emit_op_put_scoped_var):

File:
1 edited

Legend:

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

    r76369 r78174  
    588588}
    589589
    590 #if USE(JSVALUE64)
    591 void JIT::emitGetVariableObjectRegister(RegisterID variableObject, int index, RegisterID dst)
    592 {
    593     loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject, d)), dst);
    594     loadPtr(Address(dst, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), dst);
    595     loadPtr(Address(dst, index * sizeof(Register)), dst);
    596 }
    597 
    598 void JIT::emitPutVariableObjectRegister(RegisterID src, RegisterID variableObject, int index)
    599 {
    600     loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject, d)), variableObject);
    601     loadPtr(Address(variableObject, OBJECT_OFFSETOF(JSVariableObject::JSVariableObjectData, registers)), variableObject);
    602     storePtr(src, Address(variableObject, index * sizeof(Register)));
    603 }
    604 #endif
    605 
    606590#if ENABLE(JIT_OPTIMIZE_CALL)
    607591void JIT::unlinkCallOrConstruct(CallLinkInfo* callLinkInfo)
Note: See TracChangeset for help on using the changeset viewer.