Ignore:
Timestamp:
Apr 9, 2012, 12:48:08 AM (13 years ago)
Author:
[email protected]
Message:

DFG should not load the property storage if it is inline.
https://bugs.webkit.org/show_bug.cgi?id=83455

Reviewed by Gavin Barraclough.

We had previously decided to have all property storage accesses go through
the property storage pointer even if they don't "really" have to, because
we were thinking this would help GC barriers somehow. Well, we never ended
up doing anything with that. Hence, doing these wasted loads of the
property storage pointer when the storage is inline is just a waste of CPU
cycles.

This change makes the DFG's inline property accesses (GetByOffset and
PutByOffset) go directly to the inline property storage if the structure(s)
tell us that it's OK.

This looks like an across-the-board 1% win.

  • bytecode/StructureSet.h:

(JSC):
(JSC::StructureSet::allAreUsingInlinePropertyStorage):
(StructureSet):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::fillStorage):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/StructureSet.h

    r105581 r113557  
    2828
    2929#include "PredictedType.h"
     30#include "Structure.h"
    3031#include <stdio.h>
    3132#include <wtf/Vector.h>
    3233
    3334namespace JSC {
    34 
    35 class Structure;
    3635
    3736namespace DFG {
     
    108107    size_t size() const { return m_structures.size(); }
    109108   
     109    bool allAreUsingInlinePropertyStorage() const
     110    {
     111        for (size_t i = 0; i < m_structures.size(); ++i) {
     112            if (!m_structures[i]->isUsingInlineStorage())
     113                return false;
     114        }
     115        return true;
     116    }
     117   
    110118    Structure* at(size_t i) const { return m_structures.at(i); }
    111119   
Note: See TracChangeset for help on using the changeset viewer.