Ignore:
Timestamp:
Oct 7, 2011, 3:11:51 PM (14 years ago)
Author:
[email protected]
Message:

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

Reviewed by Gavin Barraclough.

Emit code to support inline indexing of strings

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileGetByValOnString):

Shared code to perform string indexing.

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

Use compileGetByValOnString if we predict that the base object
is a string in GetByVal.

  • runtime/JSString.h:

(JSC::JSString::offsetOfFiberCount):
(JSC::JSString::offsetOfValue):

File:
1 edited

Legend:

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

    r96461 r96983  
    448448
    449449        static size_t offsetOfLength() { return OBJECT_OFFSETOF(JSString, m_length); }
     450        static size_t offsetOfFiberCount() { return OBJECT_OFFSETOF(JSString, m_fiberCount); }
     451        static size_t offsetOfValue() { return OBJECT_OFFSETOF(JSString, m_value); }
    450452
    451453        static const ClassInfo s_info;
Note: See TracChangeset for help on using the changeset viewer.