Ignore:
Timestamp:
Sep 10, 2012, 10:05:53 PM (13 years ago)
Author:
[email protected]
Message:

Remove m_classInfo from JSCell
https://bugs.webkit.org/show_bug.cgi?id=96311

Reviewed by Oliver Hunt.

Now that no one is using the ClassInfo in JSCell, we can remove it for the greater good. This is a 1.5% win on v8v7 and
a 1.7% win on kraken, and is an overall performance progression.

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Had to rearrange the order of when we take things off the free list
and when we store the Structure in the object because we would clobber the free list otherwise. This made it not okay for
the structure argument and the scratch register to alias one another. Also removed the store of the ClassInfo pointer in the
object. Yay!
(SpeculativeJIT):

  • dfg/DFGSpeculativeJIT32_64.cpp: Since it's no longer okay for for the scratch register and structure register to alias

one another as stated above, had to add an extra temporary for passing the Structure.
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp: Ditto.

(JSC::DFG::SpeculativeJIT::compile):

  • jit/JITInlineMethods.h:

(JSC::JIT::emitAllocateBasicJSObject): Similar changes to DFG's inline allocation except that it removed the object from
the free list first, so no changes were necessary there.

  • llint/LowLevelInterpreter.asm: Change the constants for amount of inline storage to match PropertyOffset.h and remove

the store of the ClassInfo pointer during inline allocation.

  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/JSCell.h: Remove the m_classInfo field and associated methods.

(JSCell):

  • runtime/JSObject.h:

(JSObject):

  • runtime/PropertyOffset.h: Expand the number of inline storage properties to take up the extra space that we're freeing

with the removal of the ClassInfo pointer.
(JSC):

  • runtime/Structure.h:

(JSC):
(JSC::JSCell::JSCell):
(JSC::JSCell::finishCreation):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r128141 r128146  
    555555    }
    556556
    557     inline const ClassInfo* JSCell::validatedClassInfo() const
    558     {
    559 #if ENABLE(GC_VALIDATION)
    560         ASSERT(m_structure.unvalidatedGet()->classInfo() == m_classInfo);
    561 #else
    562         ASSERT(m_structure->classInfo() == m_classInfo);
    563 #endif
    564         return m_classInfo;
    565     }
    566 
    567557    ALWAYS_INLINE void SlotVisitor::internalAppend(JSCell* cell)
    568558    {
     
    604594
    605595    inline JSCell::JSCell(JSGlobalData& globalData, Structure* structure)
    606         : m_classInfo(structure->classInfo())
    607         , m_structure(globalData, this, structure)
     596        : m_structure(globalData, this, structure)
    608597    {
    609598    }
     
    617606#endif
    618607            m_structure.setEarlyValue(globalData, this, structure);
    619         m_classInfo = structure->classInfo();
    620608        // Very first set of allocations won't have a real structure.
    621609        ASSERT(m_structure || !globalData.structureStructure);
Note: See TracChangeset for help on using the changeset viewer.