Changeset 100202 in webkit for trunk/Source/JavaScriptCore/runtime/JSString.h
- Timestamp:
- Nov 14, 2011, 3:51:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSString.h
r99754 r100202 23 23 #ifndef JSString_h 24 24 #define JSString_h 25 26 25 #include "CallFrame.h" 27 26 #include "CommonIdentifiers.h" … … 86 85 m_jsString->m_fibers[m_index++].set(m_globalData, m_jsString, jsString); 87 86 m_jsString->m_length += jsString->m_length; 87 m_jsString->m_is8Bit = m_jsString->m_is8Bit && jsString->m_is8Bit; 88 88 } 89 89 … … 128 128 Base::finishCreation(globalData); 129 129 m_length = length; 130 m_is8Bit = m_value.impl()->is8Bit(); 130 131 } 131 132 … … 135 136 Base::finishCreation(globalData); 136 137 m_length = length; 138 m_is8Bit = m_value.impl()->is8Bit(); 137 139 Heap::heap(this)->reportExtraMemoryCost(cost); 138 140 } … … 142 144 Base::finishCreation(globalData); 143 145 m_length = s1->length() + s2->length(); 146 m_is8Bit = (s1->is8Bit() && s2->is8Bit()); 144 147 m_fibers[0].set(globalData, this, s1); 145 148 m_fibers[1].set(globalData, this, s2); … … 150 153 Base::finishCreation(globalData); 151 154 m_length = s1->length() + s2->length() + s3->length(); 155 m_is8Bit = (s1->is8Bit() && s2->is8Bit() && s3->is8Bit()); 152 156 m_fibers[0].set(globalData, this, s1); 153 157 m_fibers[1].set(globalData, this, s2); … … 245 249 246 250 void resolveRope(ExecState*) const; 251 void resolveRopeSlowCase(ExecState*, LChar*) const; 247 252 void resolveRopeSlowCase(ExecState*, UChar*) const; 248 253 void outOfMemory(ExecState*) const; … … 257 262 258 263 // A string is represented either by a UString or a rope of fibers. 264 bool m_is8Bit : 1; 259 265 unsigned m_length; 260 266 mutable UString m_value; … … 262 268 263 269 bool isRope() const { return m_value.isNull(); } 270 bool is8Bit() const { return m_is8Bit; } 264 271 UString& string() { ASSERT(!isRope()); return m_value; } 265 272
Note:
See TracChangeset
for help on using the changeset viewer.