2009-05-09 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 May 2009 08:35:57 +0000 (08:35 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 May 2009 08:35:57 +0000 (08:35 +0000)
commit9355370d16550399bac12c99bca6fc43e20bd967
tree1282aa5a799fed4b6bca30f057f00ce2cc617a54
parentceae66418b0fdeaeee2bdaa6590a4d9771a15f13
2009-05-09  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Gavin Barraclough.

        Original patch by John McCall. Updated by Cameron Zwarich. Further refined by me.

        - Assorted speedups to property access

        ~.3%-1% speedup on SunSpider

        1) When we know from the structure ID that an object is using inline storage, plant direct
        loads and stores against it; no need to indirect through storage pointer.

        2) Also because of the above, union the property storage pointer with the first inline property
        slot and add an extra inline property slot.

        * assembler/AbstractMacroAssembler.h:
        (JSC::AbstractMacroAssembler::CodeLocationInstruction::CodeLocationInstruction):
        (JSC::AbstractMacroAssembler::CodeLocationInstruction::patchLoadToLEA):
        (JSC::::CodeLocationCommon::instructionAtOffset):
        * assembler/MacroAssembler.h:
        (JSC::MacroAssembler::storePtr):
        * assembler/MacroAssemblerX86.h:
        (JSC::MacroAssemblerX86::store32):
        * assembler/MacroAssemblerX86_64.h:
        (JSC::MacroAssemblerX86_64::storePtr):
        * assembler/X86Assembler.h:
        (JSC::X86Assembler::movq_EAXm):
        (JSC::X86Assembler::movl_rm):
        (JSC::X86Assembler::patchLoadToLEA):
        * jit/JIT.cpp:
        (JSC::JIT::privateCompileMainPass):
        * jit/JIT.h:
        * jit/JITPropertyAccess.cpp:
        (JSC::JIT::compileGetByIdHotPath):
        (JSC::JIT::compilePutByIdHotPath):
        (JSC::JIT::compilePutDirectOffset):
        (JSC::JIT::compileGetDirectOffset):
        (JSC::JIT::privateCompilePutByIdTransition):
        (JSC::JIT::patchGetByIdSelf):
        (JSC::JIT::patchPutByIdReplace):
        (JSC::JIT::privateCompileGetByIdSelf):
        (JSC::JIT::privateCompileGetByIdProto):
        (JSC::JIT::privateCompileGetByIdSelfList):
        (JSC::JIT::privateCompileGetByIdProtoList):
        (JSC::JIT::privateCompileGetByIdChainList):
        (JSC::JIT::privateCompileGetByIdChain):
        (JSC::JIT::privateCompilePutByIdReplace):
        * runtime/JSObject.cpp:
        (JSC::JSObject::mark):
        (JSC::JSObject::removeDirect):
        * runtime/JSObject.h:
        (JSC::JSObject::propertyStorage):
        (JSC::JSObject::getDirect):
        (JSC::JSObject::getOffset):
        (JSC::JSObject::offsetForLocation):
        (JSC::JSObject::locationForOffset):
        (JSC::JSObject::getDirectOffset):
        (JSC::JSObject::putDirectOffset):
        (JSC::JSObject::isUsingInlineStorage):
        (JSC::JSObject::):
        (JSC::JSObject::JSObject):
        (JSC::JSObject::~JSObject):
        (JSC::Structure::isUsingInlineStorage):
        (JSC::JSObject::putDirect):
        (JSC::JSObject::putDirectWithoutTransition):
        (JSC::JSObject::allocatePropertyStorageInline):
        * runtime/Structure.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43432 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/assembler/AbstractMacroAssembler.h
JavaScriptCore/assembler/MacroAssembler.h
JavaScriptCore/assembler/MacroAssemblerX86.h
JavaScriptCore/assembler/MacroAssemblerX86_64.h
JavaScriptCore/assembler/X86Assembler.h
JavaScriptCore/jit/JIT.cpp
JavaScriptCore/jit/JIT.h
JavaScriptCore/jit/JITPropertyAccess.cpp
JavaScriptCore/runtime/JSObject.cpp
JavaScriptCore/runtime/JSObject.h
JavaScriptCore/runtime/Structure.h