Ignore:
Timestamp:
Dec 10, 2009, 2:13:15 PM (15 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=32367
Add support for short Ropes (up to 3 entries) inline within JSString.
(rather than externally allocating an object to hold the rope).
Switch jsAdd of (JSString* + JSString*) to now make use of Ropes.

Reviewed by Oliver Hunt & Mark Rowe.

~1% progression on Sunspidey.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/JSString.cpp:

(JSC::JSString::resolveRope):
(JSC::JSString::toBoolean):
(JSC::JSString::getStringPropertyDescriptor):

  • runtime/JSString.h:

(JSC::JSString::Rope::Fiber::deref):
(JSC::JSString::Rope::Fiber::ref):
(JSC::JSString::Rope::Fiber::refAndGetLength):
(JSC::JSString::Rope::append):
(JSC::JSString::JSString):
(JSC::JSString::~JSString):
(JSC::JSString::value):
(JSC::JSString::tryGetValue):
(JSC::JSString::length):
(JSC::JSString::canGetIndex):
(JSC::JSString::appendStringInConstruct):
(JSC::JSString::appendValueInConstructAndIncrementLength):
(JSC::JSString::isRope):
(JSC::JSString::string):
(JSC::JSString::ropeLength):
(JSC::JSString::getStringPropertySlot):

  • runtime/Operations.h:

(JSC::jsString):
(JSC::jsAdd):
(JSC::resolveBase):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITOpcodes.cpp

    r51765 r51964  
    5353
    5454    // Checks out okay! - get the length from the Ustring.
    55     load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT2);
     55    load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT2);
    5656
    5757    Jump string_failureCases3 = branch32(Above, regT2, Imm32(INT_MAX));
     
    16371637
    16381638    // Checks out okay! - get the length from the Ustring.
    1639     load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT0);
     1639    load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT0);
    16401640
    16411641    Jump string_failureCases3 = branch32(Above, regT0, Imm32(JSImmediate::maxImmediateInt));
Note: See TracChangeset for help on using the changeset viewer.