Ignore:
Timestamp:
Oct 1, 2011, 2:46:51 PM (14 years ago)
Author:
[email protected]
Message:

Support string length in the DFG
https://bugs.webkit.org/show_bug.cgi?id=69215

Reviewed by Geoff Garen.

Adds a GetStringLength node to the DFG so that we can support
string.length inline.

  • dfg/DFGNode.h:
  • dfg/DFGPropagator.cpp:

(JSC::DFG::Propagator::propagateNodePredictions):
(JSC::DFG::Propagator::fixupNode):
(JSC::DFG::Propagator::performNodeCSE):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::isKnownString):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • runtime/JSString.h:

(JSC::JSString::offsetOfLength):

File:
1 edited

Legend:

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

    r96381 r96461  
    446446            return Structure::create(globalData, globalObject, proto, TypeInfo(StringType, OverridesGetOwnPropertySlot), &s_info);
    447447        }
    448        
     448
     449        static size_t offsetOfLength() { return OBJECT_OFFSETOF(JSString, m_length); }
     450
    449451        static const ClassInfo s_info;
    450452
Note: See TracChangeset for help on using the changeset viewer.