Ignore:
Timestamp:
Feb 15, 2010, 5:32:06 PM (15 years ago)
Author:
[email protected]
Message:

Some general Rope related refactoring.

Reviewed by Oliver Hunt.

Rename Rope::m_ropeLength to m_fiberCount, to be more descriptive.
Rename Rope::m_stringLength to simply m_length (since this is the
more conventional name for the length of a string). Move append
behaviour out into a new RopeBuilder class, so that Rope no longer
needs any knowledge of the JSString or UString implementation.

Make Rope no longer be nested within JSString.
(Rope now no-longer need reside within JSString.h, but leaving
the change of moving this out to a different header as a separate
change from these renames).

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • runtime/JSString.cpp:

(JSC::Rope::destructNonRecursive):
(JSC::Rope::~Rope):
(JSC::JSString::resolveRope):
(JSC::JSString::toBoolean):
(JSC::JSString::getStringPropertyDescriptor):

  • runtime/JSString.h:

(JSC::Rope::Fiber::Fiber):
(JSC::Rope::Fiber::deref):
(JSC::Rope::Fiber::ref):
(JSC::Rope::Fiber::refAndGetLength):
(JSC::Rope::Fiber::isRope):
(JSC::Rope::Fiber::rope):
(JSC::Rope::Fiber::isString):
(JSC::Rope::Fiber::string):
(JSC::Rope::Fiber::nonFiber):
(JSC::Rope::tryCreateUninitialized):
(JSC::Rope::append):
(JSC::Rope::fiberCount):
(JSC::Rope::length):
(JSC::Rope::fibers):
(JSC::Rope::Rope):
(JSC::Rope::operator new):
(JSC::):
(JSC::RopeBuilder::JSString):
(JSC::RopeBuilder::~JSString):
(JSC::RopeBuilder::length):
(JSC::RopeBuilder::canGetIndex):
(JSC::RopeBuilder::appendStringInConstruct):
(JSC::RopeBuilder::appendValueInConstructAndIncrementLength):
(JSC::RopeBuilder::isRope):
(JSC::RopeBuilder::fiberCount):
(JSC::JSString::getStringPropertySlot):

  • runtime/Operations.h:

(JSC::jsString):

File:
1 edited

Legend:

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

    r54534 r54804  
    5757
    5858    // Checks out okay! - get the length from the Ustring.
    59     load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT2);
     59    load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT2);
    6060
    6161    Jump string_failureCases3 = branch32(Above, regT2, Imm32(INT_MAX));
     
    15181518
    15191519    // Checks out okay! - get the length from the Ustring.
    1520     load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_stringLength)), regT0);
     1520    load32(Address(regT0, OBJECT_OFFSETOF(JSString, m_length)), regT0);
    15211521
    15221522    Jump string_failureCases3 = branch32(Above, regT0, Imm32(JSImmediate::maxImmediateInt));
Note: See TracChangeset for help on using the changeset viewer.