Ignore:
Timestamp:
May 9, 2009, 1:35:57 AM (16 years ago)
Author:
[email protected]
Message:

2009-05-09 Maciej Stachowiak <[email protected]>

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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/assembler/X86Assembler.h

    r43220 r43432  
    938938    }
    939939
     940    void movq_EAXm(void* addr)
     941    {
     942        m_formatter.oneByteOp64(OP_MOV_OvEAX);
     943        m_formatter.immediate64(reinterpret_cast<int64_t>(addr));
     944    }
     945
    940946    void movq_mr(int offset, RegisterID base, RegisterID dst)
    941947    {
     
    972978   
    973979#else
     980    void movl_rm(RegisterID src, void* addr)
     981    {
     982        if (src == X86::eax)
     983            movl_EAXm(addr);
     984        else
     985            m_formatter.oneByteOp(OP_MOV_EvGv, src, addr);
     986    }
     987   
    974988    void movl_mr(void* addr, RegisterID dst)
    975989    {
     
    12871301        ASSERT(linkOffset == static_cast<int>(linkOffset));
    12881302        reinterpret_cast<int*>(reinterpret_cast<ptrdiff_t>(code) + from.m_offset)[-1] = linkOffset;
     1303    }
     1304
     1305    static void patchLoadToLEA(intptr_t where)
     1306    {
     1307        char* ptr = reinterpret_cast<char*>(where);
     1308        ptr[0] = OP_LEA;
    12891309    }
    12901310   
Note: See TracChangeset for help on using the changeset viewer.