Changeset 65099 in webkit for trunk/JavaScriptCore/runtime/JSString.cpp
- Timestamp:
- Aug 10, 2010, 3:32:19 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSString.cpp
r62367 r65099 38 38 // (since appending to the string is likely more common) - and as such resolving 39 39 // in this fashion should minimize work queue size. (If we built the queue forwards 40 // we would likely have to place all of the constituent UStringImpls into the40 // we would likely have to place all of the constituent StringImpls into the 41 41 // Vector before performing any concatenation, but by working backwards we likely 42 42 // only fill the queue with the number of substrings at any given level in a … … 48 48 // Allocate the buffer to hold the final string, position initially points to the end. 49 49 UChar* buffer; 50 if (PassRefPtr< UStringImpl> newImpl = UStringImpl::tryCreateUninitialized(m_length, buffer))50 if (PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) 51 51 m_value = newImpl; 52 52 else { … … 80 80 currentFiber = rope->fibers()[fiberCountMinusOne]; 81 81 } else { 82 UStringImpl* string = static_cast<UStringImpl*>(currentFiber);82 StringImpl* string = static_cast<StringImpl*>(currentFiber); 83 83 unsigned length = string->length(); 84 84 position -= length; 85 UStringImpl::copyChars(position, string->characters(), length);85 StringImpl::copyChars(position, string->characters(), length); 86 86 87 87 // Was this the last item in the work queue? … … 119 119 // Count total fibers and find matching string. 120 120 size_t fiberCount = 0; 121 UStringImpl* matchString = 0;121 StringImpl* matchString = 0; 122 122 int matchPosition = -1; 123 123 for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) { … … 126 126 continue; 127 127 128 UStringImpl* string = *it;128 StringImpl* string = *it; 129 129 matchPosition = string->find(character); 130 130 if (matchPosition == -1) … … 141 141 142 142 for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) { 143 UStringImpl* string = *it;143 StringImpl* string = *it; 144 144 if (string != matchString) { 145 145 builder.append(UString(string));
Note:
See TracChangeset
for help on using the changeset viewer.