Changeset 93378 in webkit for trunk/Source/JavaScriptCore/runtime/JSString.h
- Timestamp:
- Aug 18, 2011, 5:58:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSString.h
r92706 r93378 268 268 , m_fiberCount(s_maxInternalRopeLength) 269 269 { 270 constructorBody(exec, v1, v2, v3); 271 } 272 273 // This constructor constructs a new string by concatenating u1 & u2. 274 JSString(JSGlobalData& globalData, const UString& u1, const UString& u2) 275 : JSCell(globalData, globalData.stringStructure.get()) 276 , m_length(u1.length() + u2.length()) 277 , m_fiberCount(2) 278 { 279 unsigned index = 0; 280 appendStringInConstruct(index, u1); 281 appendStringInConstruct(index, u2); 282 ASSERT(index <= s_maxInternalRopeLength); 283 } 284 285 // This constructor constructs a new string by concatenating u1, u2 & u3. 286 JSString(JSGlobalData& globalData, const UString& u1, const UString& u2, const UString& u3) 287 : JSCell(globalData, globalData.stringStructure.get()) 288 , m_length(u1.length() + u2.length() + u3.length()) 289 , m_fiberCount(s_maxInternalRopeLength) 290 { 291 unsigned index = 0; 292 appendStringInConstruct(index, u1); 293 appendStringInConstruct(index, u2); 294 appendStringInConstruct(index, u3); 295 ASSERT(index <= s_maxInternalRopeLength); 296 } 297 298 protected: 299 void constructorBody(ExecState* exec, JSValue v1, JSValue v2, JSValue v3) 300 { 270 301 unsigned index = 0; 271 302 appendValueInConstructAndIncrementLength(exec, index, v1); … … 273 304 appendValueInConstructAndIncrementLength(exec, index, v3); 274 305 ASSERT(index == s_maxInternalRopeLength); 275 }276 277 // This constructor constructs a new string by concatenating u1 & u2.278 JSString(JSGlobalData& globalData, const UString& u1, const UString& u2)279 : JSCell(globalData, globalData.stringStructure.get())280 , m_length(u1.length() + u2.length())281 , m_fiberCount(2)282 {283 unsigned index = 0;284 appendStringInConstruct(index, u1);285 appendStringInConstruct(index, u2);286 ASSERT(index <= s_maxInternalRopeLength);287 }288 289 // This constructor constructs a new string by concatenating u1, u2 & u3.290 JSString(JSGlobalData& globalData, const UString& u1, const UString& u2, const UString& u3)291 : JSCell(globalData, globalData.stringStructure.get())292 , m_length(u1.length() + u2.length() + u3.length())293 , m_fiberCount(s_maxInternalRopeLength)294 {295 unsigned index = 0;296 appendStringInConstruct(index, u1);297 appendStringInConstruct(index, u2);298 appendStringInConstruct(index, u3);299 ASSERT(index <= s_maxInternalRopeLength);300 306 } 301 307
Note:
See TracChangeset
for help on using the changeset viewer.