Changeset 57904 in webkit for trunk/JavaScriptCore
- Timestamp:
- Apr 20, 2010, 12:28:41 PM (15 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 10 edited
- 7 copied
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/Android.mk
r57879 r57904 173 173 wtf/android/MainThreadAndroid.cpp \ 174 174 \ 175 wtf/text/AtomicString.cpp \ 175 176 wtf/text/CString.cpp \ 177 wtf/text/StringImpl.cpp \ 178 wtf/text/WTFString.cpp \ 176 179 \ 177 180 wtf/unicode/CollatorDefault.cpp \ -
trunk/JavaScriptCore/Android.v8.wtf.mk
r57879 r57904 48 48 wtf/WTFThreadData.cpp \ 49 49 \ 50 wtf/TypeTraits.cpp \ 51 wtf/dtoa.cpp \ 52 \ 50 53 wtf/android/MainThreadAndroid.cpp \ 51 54 \ 52 wtf/TypeTraits.cpp \ 53 wtf/dtoa.cpp \ 55 wtf/text/AtomicString.cpp \ 56 wtf/text/CString.cpp \ 57 wtf/text/StringImpl.cpp \ 58 wtf/text/WTFString.cpp \ 54 59 \ 55 60 wtf/unicode/CollatorDefault.cpp \ -
trunk/JavaScriptCore/ChangeLog
r57885 r57904 1 2010-04-20 Gavin Barraclough <[email protected]> 2 3 Reviewed by Geoff Garen. 4 5 Bug 37828 - Move WebCore's String classes to WTF 6 7 Move these classes up to WTF so they are available to all clients of WTF (in 8 particular JSC). 9 10 As a first patch, making the most minimal change possible, since this patch 11 could easily grow rather large since we'll have to change every class forward 12 declaration ( e.g. every "namespace WebCore { class String; }" much change to 13 "namespace WTF { class String; }"). 14 15 Moving the files, but leaving the classes logically in the WebCore namespace - 16 which is technically a layering violation - I'll come back and fix this up in a 17 subsequent patch. 18 19 * Android.mk: 20 * Android.v8.wtf.mk: 21 * GNUmakefile.am: 22 * JavaScriptCore.exp: 23 * JavaScriptCore.gypi: 24 * JavaScriptCore.pro: 25 * JavaScriptCore.vcproj/WTF/WTF.vcproj: 26 * JavaScriptCore.xcodeproj/project.pbxproj: 27 * config.h: 28 * wtf/StaticConstructors.h: Copied from WebCore/platform/StaticConstructors.h. 29 * wtf/text/AtomicString.cpp: Copied from WebCore/platform/text/AtomicString.cpp. 30 * wtf/text/AtomicString.h: Copied from WebCore/platform/text/AtomicString.h. 31 * wtf/text/AtomicStringImpl.h: Copied from WebCore/platform/text/AtomicStringImpl.h. 32 * wtf/text/StringBuffer.h: Copied from WebCore/platform/text/StringBuffer.h. 33 * wtf/text/StringHash.h: Copied from WebCore/platform/text/StringHash.h. 34 * wtf/text/StringImpl.cpp: Copied from WebCore/platform/text/StringImpl.cpp. 35 * wtf/text/StringImpl.h: Copied from WebCore/platform/text/StringImpl.h. 36 * wtf/text/WTFString.cpp: Copied from WebCore/platform/text/String.cpp. 37 (WebCore::charactersToFloat): 38 * wtf/text/WTFString.h: Copied from WebCore/platform/text/PlatformString.h. 39 1 40 2010-04-20 Csaba Osztrogonác <[email protected]> 2 41 -
trunk/JavaScriptCore/GNUmakefile.am
r57879 r57904 267 267 JavaScriptCore/wtf/RetainPtr.h \ 268 268 JavaScriptCore/wtf/SegmentedVector.h \ 269 JavaScriptCore/wtf/StaticConstructors.h \ 269 270 JavaScriptCore/wtf/StdLibExtras.h \ 270 271 JavaScriptCore/wtf/StringExtras.h \ … … 293 294 JavaScriptCore/wtf/gtk/MainThreadGtk.cpp \ 294 295 JavaScriptCore/wtf/gtk/ThreadingGtk.cpp \ 296 JavaScriptCore/wtf/text/AtomicString.cpp \ 297 JavaScriptCore/wtf/text/AtomicString.h \ 298 JavaScriptCore/wtf/text/AtomicStringImpl.h \ 295 299 JavaScriptCore/wtf/text/CString.cpp \ 296 300 JavaScriptCore/wtf/text/CString.h \ 301 JavaScriptCore/wtf/text/StringHash.h \ 302 JavaScriptCore/wtf/text/StringImpl.cpp \ 303 JavaScriptCore/wtf/text/StringImpl.h \ 304 JavaScriptCore/wtf/text/WTFString.cpp \ 305 JavaScriptCore/wtf/text/WTFString.h \ 297 306 JavaScriptCore/wtf/unicode/Collator.h \ 298 307 JavaScriptCore/wtf/unicode/CollatorDefault.cpp \ -
trunk/JavaScriptCore/JavaScriptCore.exp
r57879 r57904 372 372 __ZN3WTF9dayInYearEdi 373 373 __ZN3WTFeqERKNS_7CStringES2_ 374 __ZN7WebCore10StringImpl11reverseFindEPS0_ib 375 __ZN7WebCore10StringImpl11reverseFindEti 376 __ZN7WebCore10StringImpl12sharedBufferEv 377 __ZN7WebCore10StringImpl18simplifyWhiteSpaceEv 378 __ZN7WebCore10StringImpl19characterStartingAtEj 379 __ZN7WebCore10StringImpl19createUninitializedEjRPt 380 __ZN7WebCore10StringImpl22containsOnlyWhitespaceEv 381 __ZN7WebCore10StringImpl23defaultWritingDirectionEv 382 __ZN7WebCore10StringImpl37createStrippingNullCharactersSlowCaseEPKtj 383 __ZN7WebCore10StringImpl4findEPFbtEi 384 __ZN7WebCore10StringImpl4findEPKcib 385 __ZN7WebCore10StringImpl4findEPS0_ib 386 __ZN7WebCore10StringImpl4findEti 387 __ZN7WebCore10StringImpl5adoptERNS_12StringBufferE 388 __ZN7WebCore10StringImpl5emptyEv 389 __ZN7WebCore10StringImpl5lowerEv 390 __ZN7WebCore10StringImpl5toIntEPb 391 __ZN7WebCore10StringImpl5upperEv 392 __ZN7WebCore10StringImpl6createEPKc 393 __ZN7WebCore10StringImpl6createEPKtj 394 __ZN7WebCore10StringImpl6createEPKtjN3WTF10PassRefPtrINS3_21CrossThreadRefCountedINS3_16OwnFastMallocPtrIS1_EEEEEE 395 __ZN7WebCore10StringImpl6secureEt 396 __ZN7WebCore10StringImpl7replaceEPS0_S1_ 397 __ZN7WebCore10StringImpl7replaceEjjPS0_ 398 __ZN7WebCore10StringImpl7replaceEtPS0_ 399 __ZN7WebCore10StringImpl7replaceEtt 400 __ZN7WebCore10StringImpl8endsWithEPS0_b 401 __ZN7WebCore10StringImpl9substringEjj 402 __ZN7WebCore10StringImplD1Ev 403 __ZN7WebCore11commentAtomE 404 __ZN7WebCore12AtomicString3addEPKc 405 __ZN7WebCore12AtomicString3addEPKt 406 __ZN7WebCore12AtomicString3addEPKtj 407 __ZN7WebCore12AtomicString3addEPKtjj 408 __ZN7WebCore12AtomicString3addEPNS_10StringImplE 409 __ZN7WebCore12AtomicString4findEPKtjj 410 __ZN7WebCore12AtomicString4initEv 411 __ZN7WebCore15charactersToIntEPKtmPb 412 __ZN7WebCore17charactersToFloatEPKtmPb 413 __ZN7WebCore17equalIgnoringCaseEPKtPKcj 414 __ZN7WebCore17equalIgnoringCaseEPNS_10StringImplEPKc 415 __ZN7WebCore17equalIgnoringCaseEPNS_10StringImplES1_ 416 __ZN7WebCore18charactersToDoubleEPKtmPb 417 __ZN7WebCore20equalIgnoringNullityEPNS_10StringImplES1_ 418 __ZN7WebCore21charactersToIntStrictEPKtmPbi 419 __ZN7WebCore22charactersToUIntStrictEPKtmPbi 420 __ZN7WebCore5equalEPNS_10StringImplEPKc 421 __ZN7WebCore5equalEPNS_10StringImplES1_ 422 __ZN7WebCore6String26fromUTF8WithLatin1FallbackEPKcm 423 __ZN7WebCore6String29charactersWithNullTerminationEv 424 __ZN7WebCore6String6appendEPKtj 425 __ZN7WebCore6String6appendERKS0_ 426 __ZN7WebCore6String6appendEc 427 __ZN7WebCore6String6appendEt 428 __ZN7WebCore6String6formatEPKcz 429 __ZN7WebCore6String6insertERKS0_j 430 __ZN7WebCore6String6numberEd 431 __ZN7WebCore6String6numberEi 432 __ZN7WebCore6String6numberEj 433 __ZN7WebCore6String6numberEl 434 __ZN7WebCore6String6numberEm 435 __ZN7WebCore6String6numberEt 436 __ZN7WebCore6String6numberEx 437 __ZN7WebCore6String6numberEy 438 __ZN7WebCore6String6removeEji 439 __ZN7WebCore6String8fromUTF8EPKc 440 __ZN7WebCore6String8fromUTF8EPKcm 441 __ZN7WebCore6String8truncateEj 442 __ZN7WebCore6StringC1EPKc 443 __ZN7WebCore6StringC1EPKcj 444 __ZN7WebCore6StringC1EPKt 445 __ZN7WebCore6StringC1EPKtj 446 __ZN7WebCore7xmlAtomE 447 __ZN7WebCore8nullAtomE 448 __ZN7WebCore8starAtomE 449 __ZN7WebCore8textAtomE 450 __ZN7WebCore9emptyAtomE 451 __ZN7WebCore9xmlnsAtomE 452 __ZN7WebCoreeqERKNS_12AtomicStringEPKc 453 __ZN7WebCoreplEPKcRKNS_6StringE 454 __ZN7WebCoreplERKNS_6StringEPKc 455 __ZN7WebCoreplERKNS_6StringES2_ 374 456 __ZNK3JSC10JSFunction23isHostFunctionNonInlineEv 375 457 __ZNK3JSC11Interpreter14retrieveCallerEPNS_9ExecStateEPNS_16InternalFunctionE … … 432 514 __ZNK3WTF7CString6lengthEv 433 515 __ZNK3WTF8Collator7collateEPKtmS2_m 516 __ZNK7WebCore12AtomicString5lowerEv 517 __ZNK7WebCore6String10charactersEv 518 __ZNK7WebCore6String11toIntStrictEPbi 519 __ZNK7WebCore6String12toUIntStrictEPbi 520 __ZNK7WebCore6String14threadsafeCopyEv 521 __ZNK7WebCore6String15stripWhiteSpaceEv 522 __ZNK7WebCore6String16removeCharactersEPFbtE 523 __ZNK7WebCore6String17crossThreadStringEv 524 __ZNK7WebCore6String18simplifyWhiteSpaceEv 525 __ZNK7WebCore6String19characterStartingAtEj 526 __ZNK7WebCore6String4utf8Ev 527 __ZNK7WebCore6String5asciiEv 528 __ZNK7WebCore6String5lowerEv 529 __ZNK7WebCore6String5splitERKS0_RN3WTF6VectorIS0_Lm0EEE 530 __ZNK7WebCore6String5splitERKS0_bRN3WTF6VectorIS0_Lm0EEE 531 __ZNK7WebCore6String5splitEtRN3WTF6VectorIS0_Lm0EEE 532 __ZNK7WebCore6String5splitEtbRN3WTF6VectorIS0_Lm0EEE 533 __ZNK7WebCore6String5toIntEPb 534 __ZNK7WebCore6String5upperEv 535 __ZNK7WebCore6String6latin1Ev 536 __ZNK7WebCore6String6lengthEv 537 __ZNK7WebCore6String6toUIntEPb 538 __ZNK7WebCore6String7isEmptyEv 539 __ZNK7WebCore6String7toFloatEPb 540 __ZNK7WebCore6String8foldCaseEv 541 __ZNK7WebCore6String8toDoubleEPb 542 __ZNK7WebCore6String8toIntPtrEPb 543 __ZNK7WebCore6String8toUInt64EPb 544 __ZNK7WebCore6String9substringEjj 545 __ZNK7WebCore6StringixEj 434 546 __ZTVN3JSC12StringObjectE 435 547 __ZTVN3JSC14JSGlobalObjectE -
trunk/JavaScriptCore/JavaScriptCore.gypi
r57879 r57904 397 397 'wtf/RetainPtr.h', 398 398 'wtf/SegmentedVector.h', 399 'wtf/StaticConstructors.h', 399 400 'wtf/StdLibExtras.h', 400 401 'wtf/StringExtras.h', … … 418 419 'wtf/TypeTraits.cpp', 419 420 'wtf/TypeTraits.h', 421 'wtf/text/AtomicString.cpp', 422 'wtf/text/AtomicString.h', 423 'wtf/text/AtomicStringImpl.h', 420 424 'wtf/text/CString.cpp', 421 425 'wtf/text/CString.h', 426 'wtf/text/StringHash.h', 427 'wtf/text/StringImpl.cpp', 428 'wtf/text/StringImpl.h', 429 'wtf/text/WTFString.cpp', 430 'wtf/text/WTFString.h', 422 431 'wtf/unicode/Collator.h', 423 432 'wtf/unicode/CollatorDefault.cpp', -
trunk/JavaScriptCore/JavaScriptCore.pro
r57879 r57904 205 205 wtf/TypeTraits.cpp \ 206 206 wtf/WTFThreadData.cpp \ 207 wtf/text/AtomicString.cpp \ 207 208 wtf/text/CString.cpp \ 209 wtf/text/StringImpl.cpp \ 210 wtf/text/WTFString.cpp \ 208 211 wtf/unicode/CollatorDefault.cpp \ 209 212 wtf/unicode/icu/CollatorICU.cpp \ -
trunk/JavaScriptCore/JavaScriptCore.vcproj/WTF/WTF.vcproj
r57879 r57904 538 538 </File> 539 539 <File 540 RelativePath="..\..\wtf\text\AtomicString.cpp" 541 > 542 </File> 543 <File 544 RelativePath="..\..\wtf\text\AtomicString.h" 545 > 546 </File> 547 <File 548 RelativePath="..\..\wtf\text\AtomicStringImpl.h" 549 > 550 </File> 551 <File 540 552 RelativePath="..\..\wtf\text\CString.cpp" 541 553 > … … 543 555 <File 544 556 RelativePath="..\..\wtf\text\CString.h" 557 > 558 </File> 559 <File 560 RelativePath="..\..\wtf\text\StringHash.h" 561 > 562 </File> 563 <File 564 RelativePath="..\..\wtf\text\StringImpl.cpp" 565 > 566 </File> 567 <File 568 RelativePath="..\..\wtf\text\StringImpl.h" 569 > 570 </File> 571 <File 572 RelativePath="..\..\wtf\text\WTFString.cpp" 573 > 574 </File> 575 <File 576 RelativePath="..\..\wtf\text\WTFString.h" 545 577 > 546 578 </File> -
trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r57879 r57904 199 199 86565743115BE3DA00291F40 /* CString.h in Headers */ = {isa = PBXBuildFile; fileRef = 86565741115BE3DA00291F40 /* CString.h */; settings = {ATTRIBUTES = (Private, ); }; }; 200 200 865F408810E7D56300947361 /* APIShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 865F408710E7D56300947361 /* APIShims.h */; }; 201 868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA00117CEFD100B908B1 /* AtomicString.cpp */; }; 202 868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA01117CEFD100B908B1 /* AtomicString.h */; settings = {ATTRIBUTES = (Private, ); }; }; 203 868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; 204 868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA05117CEFD100B908B1 /* StringHash.h */; settings = {ATTRIBUTES = (Private, ); }; }; 205 868BFA0E117CEFD100B908B1 /* StringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA06117CEFD100B908B1 /* StringImpl.cpp */; }; 206 868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA07117CEFD100B908B1 /* StringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; 207 868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 868BFA15117CF19900B908B1 /* WTFString.cpp */; }; 208 868BFA18117CF19900B908B1 /* WTFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA16117CF19900B908B1 /* WTFString.h */; settings = {ATTRIBUTES = (Private, ); }; }; 209 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 868BFA5F117D048200B908B1 /* StaticConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; }; 201 210 8698B86910D44D9400D8D01B /* StringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698B86810D44D9400D8D01B /* StringBuilder.h */; settings = {ATTRIBUTES = (Private, ); }; }; 202 211 8698BB3910D86BAF00D8D01B /* UStringImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 8698BB3710D86BAF00D8D01B /* UStringImpl.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 561 570 088FA5BA0EF76D4300578E6F /* RandomNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumber.h; sourceTree = "<group>"; }; 562 571 08E279E80EF83B10007DB523 /* RandomNumberSeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumberSeed.h; sourceTree = "<group>"; }; 563 0B1F921B0F17502D0036468E /* PtrAndFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PtrAndFlags.h; sourceTree = "<group>"; };564 572 0B330C260F38C62300692DE3 /* TypeTraits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypeTraits.cpp; sourceTree = "<group>"; }; 565 573 0B4D7E620F319AC800AD7E58 /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = "<group>"; }; … … 730 738 86565741115BE3DA00291F40 /* CString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CString.h; path = text/CString.h; sourceTree = "<group>"; }; 731 739 865F408710E7D56300947361 /* APIShims.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIShims.h; sourceTree = "<group>"; }; 740 868BFA00117CEFD100B908B1 /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicString.cpp; path = text/AtomicString.cpp; sourceTree = "<group>"; }; 741 868BFA01117CEFD100B908B1 /* AtomicString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicString.h; path = text/AtomicString.h; sourceTree = "<group>"; }; 742 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicStringImpl.h; path = text/AtomicStringImpl.h; sourceTree = "<group>"; }; 743 868BFA05117CEFD100B908B1 /* StringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringHash.h; path = text/StringHash.h; sourceTree = "<group>"; }; 744 868BFA06117CEFD100B908B1 /* StringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringImpl.cpp; path = text/StringImpl.cpp; sourceTree = "<group>"; }; 745 868BFA07117CEFD100B908B1 /* StringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringImpl.h; path = text/StringImpl.h; sourceTree = "<group>"; }; 746 868BFA15117CF19900B908B1 /* WTFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WTFString.cpp; path = text/WTFString.cpp; sourceTree = "<group>"; }; 747 868BFA16117CF19900B908B1 /* WTFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WTFString.h; path = text/WTFString.h; sourceTree = "<group>"; }; 748 868BFA5F117D048200B908B1 /* StaticConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticConstructors.h; sourceTree = "<group>"; }; 732 749 8698B86810D44D9400D8D01B /* StringBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringBuilder.h; sourceTree = "<group>"; }; 733 750 8698BB3710D86BAF00D8D01B /* UStringImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UStringImpl.h; sourceTree = "<group>"; }; … … 1357 1374 65D6D87E09B5A32E0002E4D7 /* Platform.h */, 1358 1375 A7D649A91015224E009B2E1B /* PossiblyNull.h */, 1359 0B1F921B0F17502D0036468E /* PtrAndFlags.h */,1360 1376 088FA5B90EF76D4300578E6F /* RandomNumber.cpp */, 1361 1377 088FA5BA0EF76D4300578E6F /* RandomNumber.h */, … … 1368 1384 51F648D60BB4E2CA0033D760 /* RetainPtr.h */, 1369 1385 969A07290ED1CE6900F1F681 /* SegmentedVector.h */, 1386 868BFA5F117D048200B908B1 /* StaticConstructors.h */, 1370 1387 FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */, 1371 1388 E11D51750B2E798D0056C188 /* StringExtras.h */, … … 1646 1663 isa = PBXGroup; 1647 1664 children = ( 1665 868BFA00117CEFD100B908B1 /* AtomicString.cpp */, 1666 868BFA01117CEFD100B908B1 /* AtomicString.h */, 1667 868BFA02117CEFD100B908B1 /* AtomicStringImpl.h */, 1648 1668 86565740115BE3DA00291F40 /* CString.cpp */, 1649 1669 86565741115BE3DA00291F40 /* CString.h */, 1670 868BFA05117CEFD100B908B1 /* StringHash.h */, 1671 868BFA06117CEFD100B908B1 /* StringImpl.cpp */, 1672 868BFA07117CEFD100B908B1 /* StringImpl.h */, 1673 868BFA15117CF19900B908B1 /* WTFString.cpp */, 1674 868BFA16117CF19900B908B1 /* WTFString.h */, 1650 1675 ); 1651 1676 name = text; … … 2043 2068 A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */, 2044 2069 86D08D5411793613006E5ED0 /* WTFThreadData.h in Headers */, 2070 868BFA09117CEFD100B908B1 /* AtomicString.h in Headers */, 2071 868BFA0A117CEFD100B908B1 /* AtomicStringImpl.h in Headers */, 2072 868BFA0D117CEFD100B908B1 /* StringHash.h in Headers */, 2073 868BFA0F117CEFD100B908B1 /* StringImpl.h in Headers */, 2074 868BFA18117CF19900B908B1 /* WTFString.h in Headers */, 2075 868BFA60117D048200B908B1 /* StaticConstructors.h in Headers */, 2045 2076 ); 2046 2077 runOnlyForDeploymentPostprocessing = 0; … … 2487 2518 A7482B9411671147003B0712 /* JSWeakObjectMapRefPrivate.cpp in Sources */, 2488 2519 86D08D5311793613006E5ED0 /* WTFThreadData.cpp in Sources */, 2520 868BFA08117CEFD100B908B1 /* AtomicString.cpp in Sources */, 2521 868BFA0E117CEFD100B908B1 /* StringImpl.cpp in Sources */, 2522 868BFA17117CF19900B908B1 /* WTFString.cpp in Sources */, 2489 2523 ); 2490 2524 runOnlyForDeploymentPostprocessing = 0; -
trunk/JavaScriptCore/config.h
r57884 r57904 76 76 #endif 77 77 78 #if COMPILER(MSVC) 79 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1 80 #else 81 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1 82 #endif 83 78 84 #if PLATFORM(CHROMIUM) 79 85 #if !defined(WTF_USE_V8) -
trunk/JavaScriptCore/wtf/StaticConstructors.h
r57828 r57904 22 22 #define StaticConstructors_h 23 23 24 // For WebCore we need to avoid having static constructors. We achieve this24 // We need to avoid having static constructors. We achieve this 25 25 // with two separate methods for GCC and MSVC. Both methods prevent the static 26 26 // initializers from being registered and called on program startup. On GCC, we -
trunk/JavaScriptCore/wtf/text/AtomicString.h
r57828 r57904 23 23 24 24 #include "AtomicStringImpl.h" 25 #include " PlatformString.h"25 #include "WTFString.h" 26 26 27 27 // Define 'NO_IMPLICIT_ATOMICSTRING' before including this header, … … 33 33 #endif 34 34 35 // FIXME: This is a temporary layering violation while we move string code to WTF. 36 // Landing the file moves in one patch, will follow on with patches to change the namespaces. 35 37 namespace WebCore { 36 38 -
trunk/JavaScriptCore/wtf/text/AtomicStringImpl.h
r57828 r57904 24 24 #include "StringImpl.h" 25 25 26 // FIXME: This is a temporary layering violation while we move string code to WTF. 27 // Landing the file moves in one patch, will follow on with patches to change the namespaces. 26 28 namespace WebCore { 27 29 -
trunk/JavaScriptCore/wtf/text/StringHash.h
r57828 r57904 24 24 25 25 #include "AtomicString.h" 26 #include " PlatformString.h"26 #include "WTFString.h" 27 27 #include <wtf/HashTraits.h> 28 28 #include <wtf/StringHashFunctions.h> 29 29 #include <wtf/unicode/Unicode.h> 30 30 31 // FIXME: This is a temporary layering violation while we move string code to WTF. 32 // Landing the file moves in one patch, will follow on with patches to change the namespaces. 31 33 namespace WebCore { 32 34 -
trunk/JavaScriptCore/wtf/text/StringImpl.h
r57828 r57904 42 42 #endif 43 43 44 // FIXME: This is a temporary layering violation while we move string code to WTF. 45 // Landing the file moves in one patch, will follow on with patches to change the namespaces. 44 46 namespace WebCore { 45 47 -
trunk/JavaScriptCore/wtf/text/WTFString.cpp
r57828 r57904 21 21 22 22 #include "config.h" 23 #include "PlatformString.h" 24 25 #include "FloatConversion.h" 26 #include "SharedBuffer.h" 27 #include "StringBuffer.h" 28 #include "TextBreakIterator.h" 23 #include "WTFString.h" 24 29 25 #include <limits> 30 26 #include <stdarg.h> … … 641 637 } 642 638 643 #ifndef NDEBUG644 639 Vector<char> String::ascii() const 645 640 { … … 655 650 return buffer; 656 651 } 657 #endif658 652 659 653 CString String::latin1() const … … 951 945 { 952 946 // FIXME: This will return ok even when the string fits into a double but not a float. 953 return narrowPrecisionToFloat(charactersToDouble(data, length, ok)); 954 } 955 956 PassRefPtr<SharedBuffer> utf8Buffer(const String& string) 957 { 958 // Allocate a buffer big enough to hold all the characters. 959 const int length = string.length(); 960 Vector<char> buffer(length * 3); 961 962 // Convert to runs of 8-bit characters. 963 char* p = buffer.data(); 964 const UChar* d = string.characters(); 965 ConversionResult result = convertUTF16ToUTF8(&d, d + length, &p, p + buffer.size(), true); 966 if (result != conversionOK) 967 return 0; 968 969 buffer.shrink(p - buffer.data()); 970 return SharedBuffer::adoptVector(buffer); 971 } 972 973 unsigned numGraphemeClusters(const String& s) 974 { 975 TextBreakIterator* it = characterBreakIterator(s.characters(), s.length()); 976 if (!it) 977 return s.length(); 978 979 unsigned num = 0; 980 while (textBreakNext(it) != TextBreakDone) 981 ++num; 982 return num; 983 } 984 985 unsigned numCharactersInGraphemeClusters(const String& s, unsigned numGraphemeClusters) 986 { 987 TextBreakIterator* it = characterBreakIterator(s.characters(), s.length()); 988 if (!it) 989 return min(s.length(), numGraphemeClusters); 990 991 for (unsigned i = 0; i < numGraphemeClusters; ++i) { 992 if (textBreakNext(it) == TextBreakDone) 993 return s.length(); 994 } 995 return textBreakCurrent(it); 947 return static_cast<float>(charactersToDouble(data, length, ok)); 996 948 } 997 949 -
trunk/JavaScriptCore/wtf/text/WTFString.h
r57828 r57904 20 20 */ 21 21 22 #ifndef PlatformString_h23 #define PlatformString_h22 #ifndef WTFString_h 23 #define WTFString_h 24 24 25 25 // This file would be called String.h, but that conflicts with <string.h> … … 56 56 using WTF::CString; 57 57 58 // FIXME: This is a temporary layering violation while we move string code to WTF. 59 // Landing the file moves in one patch, will follow on with patches to change the namespaces. 58 60 namespace WebCore { 59 61 … … 247 249 #endif 248 250 249 #ifndef NDEBUG250 251 Vector<char> ascii() const; 251 #endif252 252 253 253 CString latin1() const; … … 384 384 } 385 385 386 387 388 PassRefPtr<SharedBuffer> utf8Buffer(const String&);389 // Counts the number of grapheme clusters. A surrogate pair or a sequence390 // of a non-combining character and following combining characters is391 // counted as 1 grapheme cluster.392 unsigned numGraphemeClusters(const String& s);393 // Returns the number of characters which will be less than or equal to394 // the specified grapheme cluster length.395 unsigned numCharactersInGraphemeClusters(const String& s, unsigned);396 397 386 } // namespace WebCore 398 387
Note:
See TracChangeset
for help on using the changeset viewer.