Ignore:
Timestamp:
Dec 10, 2009, 7:42:33 PM (15 years ago)
Author:
[email protected]
Message:

2009-12-10 Adam Barth <[email protected]>

No review, rolling out r51975.
http://trac.webkit.org/changeset/51975

  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
  • runtime/JSString.h: (JSC::JSString::JSString): (JSC::JSString::appendStringInConstruct):
  • runtime/Operations.cpp: (JSC::jsAddSlowCase):
  • runtime/Operations.h: (JSC::jsString): (JSC::jsAdd):
File:
1 edited

Legend:

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

    r51975 r51978  
    204204            ASSERT(ropeLength == index);
    205205        }
    206         // This constructor constructs a new string by concatenating s1 & s2.
    207         // This should only be called with ropeLength <= 3.
    208         JSString(JSGlobalData* globalData, unsigned ropeLength, JSString* s1, const UString& u2)
    209             : JSCell(globalData->stringStructure.get())
    210             , m_stringLength(s1->length() + u2.size())
    211             , m_ropeLength(ropeLength)
    212         {
    213             ASSERT(ropeLength <= s_maxInternalRopeLength);
    214             unsigned index = 0;
    215             appendStringInConstruct(index, s1);
    216             appendStringInConstruct(index, u2);
    217             ASSERT(ropeLength == index);
    218         }
    219         // This constructor constructs a new string by concatenating s1 & s2.
    220         // This should only be called with ropeLength <= 3.
    221         JSString(JSGlobalData* globalData, unsigned ropeLength, const UString& u1, JSString* s2)
    222             : JSCell(globalData->stringStructure.get())
    223             , m_stringLength(u1.size() + s2->length())
    224             , m_ropeLength(ropeLength)
    225         {
    226             ASSERT(ropeLength <= s_maxInternalRopeLength);
    227             unsigned index = 0;
    228             appendStringInConstruct(index, u1);
    229             appendStringInConstruct(index, s2);
    230             ASSERT(ropeLength == index);
    231         }
    232206        // This constructor constructs a new string by concatenating v1, v2 & v3.
    233207        // This should only be called with ropeLength <= 3 ... which since every
     
    285259        void resolveRope(ExecState*) const;
    286260
    287         void appendStringInConstruct(unsigned& index, const UString& string)
    288         {
    289             m_fibers[index++] = Rope::Fiber(string.rep()->ref());
    290         }
    291 
    292261        void appendStringInConstruct(unsigned& index, JSString* jsString)
    293262        {
     
    296265                    m_fibers[index++] = jsString->m_fibers[i].ref();
    297266            } else
    298                 appendStringInConstruct(index, jsString->string());
     267                m_fibers[index++] = Rope::Fiber(jsString->string().rep()->ref());
    299268        }
    300269
     
    343312
    344313        friend JSValue jsString(ExecState* exec, JSString* s1, JSString* s2);
    345         friend JSValue jsString(ExecState* exec, const UString& u1, JSString* s2);
    346         friend JSValue jsString(ExecState* exec, JSString* s1, const UString& u2);
    347314        friend JSValue jsString(ExecState* exec, Register* strings, unsigned count);
    348315    };
Note: See TracChangeset for help on using the changeset viewer.