Ignore:
Timestamp:
Apr 27, 2010, 11:17:35 AM (15 years ago)
Author:
[email protected]
Message:

2010-04-26 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Add specialized thunks for a char code related string functions
https://bugs.webkit.org/show_bug.cgi?id=38177

This is a simple extension to my prior patch. Basically hoist the
existing character loading logic from the charCodeAt thunk and into
a helper function, then add a helper to load strings from the small
string cache. This allows trivial implementations of fromCharCode
and charAt.

  • create_hash_table:
  • jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::returnJSCell): (JSC::SpecializedThunkJIT::tagReturnAsJSCell):
  • jit/ThunkGenerators.cpp: (JSC::stringCharLoad): (JSC::charToString): (JSC::charCodeAtThunkGenerator): (JSC::charAtThunkGenerator): (JSC::fromCharCodeThunkGenerator):
  • jit/ThunkGenerators.h:
  • runtime/SmallStrings.h: (JSC::SmallStrings::singleCharacterStrings):
  • runtime/StringConstructor.cpp: (JSC::StringConstructor::StringConstructor):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/SmallStrings.h

    r54574 r58317  
    6161
    6262        unsigned count() const;
    63 
     63#if ENABLE(JIT)
     64        JSString** singleCharacterStrings() { return m_singleCharacterStrings; }
     65#endif
    6466    private:
    6567        void createEmptyString(JSGlobalData*);
Note: See TracChangeset for help on using the changeset viewer.