Changeset 100208 in webkit
- Timestamp:
- Nov 14, 2011, 4:16:59 PM (15 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
runtime/JSString.cpp (modified) (6 diffs)
-
runtime/JSString.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r100205 r100208 1 2011-11-14 Michael Saboff <msaboff@apple.com> 2 3 Further changes and cleanup to JSString.h and cpp. 4 5 Reviewed by Darin Adler. 6 7 * runtime/JSString.cpp: 8 (JSC::JSString::resolveRope): Change PassRefPtr to RefPtr. Eliminated exec in slow case calls. 9 (JSC::JSString::resolveRopeSlowCase8): Darin and I agreed that this should have 8 in name. 10 (JSC::JSString::resolveRopeSlowCase): Removed exec parameter. 11 * runtime/JSString.h: 12 1 13 2011-11-14 Adam Barth <abarth@webkit.org> 2 14 -
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r100202 r100208 65 65 if (is8Bit()) { 66 66 LChar* buffer; 67 if ( PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer))68 m_value = newImpl ;67 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) 68 m_value = newImpl.release(); 69 69 else { 70 70 outOfMemory(exec); … … 74 74 for (size_t i = 0; i < s_maxInternalRopeLength && m_fibers[i]; ++i) { 75 75 if (m_fibers[i]->isRope()) 76 return resolveRopeSlowCase (exec,buffer);76 return resolveRopeSlowCase8(buffer); 77 77 } 78 78 … … 92 92 93 93 UChar* buffer; 94 if ( PassRefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer))95 m_value = newImpl ;94 if (RefPtr<StringImpl> newImpl = StringImpl::tryCreateUninitialized(m_length, buffer)) 95 m_value = newImpl.release(); 96 96 else { 97 97 outOfMemory(exec); … … 101 101 for (size_t i = 0; i < s_maxInternalRopeLength && m_fibers[i]; ++i) { 102 102 if (m_fibers[i]->isRope()) 103 return resolveRopeSlowCase( exec,buffer);103 return resolveRopeSlowCase(buffer); 104 104 } 105 105 … … 126 126 // only fill the queue with the number of substrings at any given level in a 127 127 // rope-of-ropes.) 128 void JSString::resolveRopeSlowCase(ExecState* exec, LChar* buffer) const 129 { 130 UNUSED_PARAM(exec); 131 128 void JSString::resolveRopeSlowCase8(LChar* buffer) const 129 { 132 130 LChar* position = buffer + m_length; // We will be working backwards over the rope. 133 131 Vector<JSString*, 32> workQueue; // Putting strings into a Vector is only OK because there are no GC points in this method. … … 159 157 } 160 158 161 void JSString::resolveRopeSlowCase(ExecState* exec, UChar* buffer) const 162 { 163 UNUSED_PARAM(exec); 164 159 void JSString::resolveRopeSlowCase(UChar* buffer) const 160 { 165 161 UChar* position = buffer + m_length; // We will be working backwards over the rope. 166 162 Vector<JSString*, 32> workQueue; // These strings are kept alive by the parent rope, so using a Vector is OK. -
trunk/Source/JavaScriptCore/runtime/JSString.h
r100202 r100208 249 249 250 250 void resolveRope(ExecState*) const; 251 void resolveRopeSlowCase (ExecState*,LChar*) const;252 void resolveRopeSlowCase( ExecState*,UChar*) const;251 void resolveRopeSlowCase8(LChar*) const; 252 void resolveRopeSlowCase(UChar*) const; 253 253 void outOfMemory(ExecState*) const; 254 254
Note:
See TracChangeset
for help on using the changeset viewer.