Changeset 29508 in webkit for trunk/JavaScriptCore/kjs/string_object.cpp
- Timestamp:
- Jan 15, 2008, 10:43:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/string_object.cpp
r29503 r29508 135 135 /* Source for string_object.lut.h 136 136 @begin stringTable 26 137 toString & StringProtoFuncToString::createDontEnum|Function 0138 valueOf & StringProtoFuncValueOf::createDontEnum|Function 0139 charAt & StringProtoFuncCharAt::createDontEnum|Function 1140 charCodeAt & StringProtoFuncCharCodeAt::createDontEnum|Function 1141 concat & StringProtoFuncConcat::createDontEnum|Function 1142 indexOf & StringProtoFuncIndexOf::createDontEnum|Function 1143 lastIndexOf & StringProtoFuncLastIndexOf::createDontEnum|Function 1144 match & StringProtoFuncMatch::createDontEnum|Function 1145 replace & StringProtoFuncReplace::create DontEnum|Function 2146 search & StringProtoFuncSearch::createDontEnum|Function 1147 slice & StringProtoFuncSlice::create DontEnum|Function 2148 split & StringProtoFuncSplit::createDontEnum|Function 2149 substr & StringProtoFuncSubstr::createDontEnum|Function 2150 substring & StringProtoFuncSubstring::createDontEnum|Function 2151 toLowerCase & StringProtoFuncToLowerCase::create DontEnum|Function 0152 toUpperCase & StringProtoFuncToUpperCase::create DontEnum|Function 0153 toLocaleLowerCase & StringProtoFuncToLocaleLowerCase::create DontEnum|Function 0154 toLocaleUpperCase & StringProtoFuncToLocaleUpperCase::create DontEnum|Function 0155 localeCompare & StringProtoFuncLocaleCompare::create DontEnum|Function 1137 toString &stringProtoFuncToString DontEnum|Function 0 138 valueOf &stringProtoFuncValueOf DontEnum|Function 0 139 charAt &stringProtoFuncCharAt DontEnum|Function 1 140 charCodeAt &stringProtoFuncCharCodeAt DontEnum|Function 1 141 concat &stringProtoFuncConcat DontEnum|Function 1 142 indexOf &stringProtoFuncIndexOf DontEnum|Function 1 143 lastIndexOf &stringProtoFuncLastIndexOf DontEnum|Function 1 144 match &stringProtoFuncMatch DontEnum|Function 1 145 replace &stringProtoFuncReplace DontEnum|Function 2 146 search &stringProtoFuncSearch DontEnum|Function 1 147 slice &stringProtoFuncSlice DontEnum|Function 2 148 split &stringProtoFuncSplit DontEnum|Function 2 149 substr &stringProtoFuncSubstr DontEnum|Function 2 150 substring &stringProtoFuncSubstring DontEnum|Function 2 151 toLowerCase &stringProtoFuncToLowerCase DontEnum|Function 0 152 toUpperCase &stringProtoFuncToUpperCase DontEnum|Function 0 153 toLocaleLowerCase &stringProtoFuncToLocaleLowerCase DontEnum|Function 0 154 toLocaleUpperCase &stringProtoFuncToLocaleUpperCase DontEnum|Function 0 155 localeCompare &stringProtoFuncLocaleCompare DontEnum|Function 1 156 156 # 157 157 # Under here: html extension, should only exist if KJS_PURE_ECMA is not defined 158 158 # I guess we need to generate two hashtables in the .lut.h file, and use #ifdef 159 159 # to select the right one... TODO. ##### 160 big & StringProtoFuncBig::createDontEnum|Function 0161 small & StringProtoFuncSmall::createDontEnum|Function 0162 blink & StringProtoFuncBlink::createDontEnum|Function 0163 bold & StringProtoFuncBold::createDontEnum|Function 0164 fixed & StringProtoFuncFixed::createDontEnum|Function 0165 italics & StringProtoFuncItalics::createDontEnum|Function 0166 strike & StringProtoFuncStrike::create DontEnum|Function 0167 sub & StringProtoFuncSub::createDontEnum|Function 0168 sup & StringProtoFuncSup::createDontEnum|Function 0169 fontcolor & StringProtoFuncFontcolor::createDontEnum|Function 1170 fontsize & StringProtoFuncFontsize::create DontEnum|Function 1171 anchor & StringProtoFuncAnchor::createDontEnum|Function 1172 link & StringProtoFuncLink::createDontEnum|Function 1160 big &stringProtoFuncBig DontEnum|Function 0 161 small &stringProtoFuncSmall DontEnum|Function 0 162 blink &stringProtoFuncBlink DontEnum|Function 0 163 bold &stringProtoFuncBold DontEnum|Function 0 164 fixed &stringProtoFuncFixed DontEnum|Function 0 165 italics &stringProtoFuncItalics DontEnum|Function 0 166 strike &stringProtoFuncStrike DontEnum|Function 0 167 sub &stringProtoFuncSub DontEnum|Function 0 168 sup &stringProtoFuncSup DontEnum|Function 0 169 fontcolor &stringProtoFuncFontcolor DontEnum|Function 1 170 fontsize &stringProtoFuncFontsize DontEnum|Function 1 171 anchor &stringProtoFuncAnchor DontEnum|Function 1 172 link &stringProtoFuncLink DontEnum|Function 1 173 173 @end 174 174 */ … … 433 433 } 434 434 435 JSValue* StringProtoFuncToString::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)435 JSValue* stringProtoFuncToString(ExecState* exec, JSObject* thisObj, const List&) 436 436 { 437 437 if (!thisObj->inherits(&StringInstance::info)) … … 441 441 } 442 442 443 JSValue* StringProtoFuncValueOf::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)443 JSValue* stringProtoFuncValueOf(ExecState* exec, JSObject* thisObj, const List&) 444 444 { 445 445 if (!thisObj->inherits(&StringInstance::info)) … … 449 449 } 450 450 451 JSValue* StringProtoFuncCharAt::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)451 JSValue* stringProtoFuncCharAt(ExecState* exec, JSObject* thisObj, const List& args) 452 452 { 453 453 // This optimizes the common case that thisObj is a StringInstance … … 465 465 } 466 466 467 JSValue* StringProtoFuncCharCodeAt::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)467 JSValue* stringProtoFuncCharCodeAt(ExecState* exec, JSObject* thisObj, const List& args) 468 468 { 469 469 // This optimizes the common case that thisObj is a StringInstance … … 482 482 } 483 483 484 JSValue* StringProtoFuncConcat::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)484 JSValue* stringProtoFuncConcat(ExecState* exec, JSObject* thisObj, const List& args) 485 485 { 486 486 // This optimizes the common case that thisObj is a StringInstance … … 494 494 } 495 495 496 JSValue* StringProtoFuncIndexOf::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)496 JSValue* stringProtoFuncIndexOf(ExecState* exec, JSObject* thisObj, const List& args) 497 497 { 498 498 // This optimizes the common case that thisObj is a StringInstance … … 511 511 } 512 512 513 JSValue* StringProtoFuncLastIndexOf::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)513 JSValue* stringProtoFuncLastIndexOf(ExecState* exec, JSObject* thisObj, const List& args) 514 514 { 515 515 // This optimizes the common case that thisObj is a StringInstance … … 529 529 } 530 530 531 JSValue* StringProtoFuncMatch::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)531 JSValue* stringProtoFuncMatch(ExecState* exec, JSObject* thisObj, const List& args) 532 532 { 533 533 // This optimizes the common case that thisObj is a StringInstance … … 586 586 } 587 587 588 JSValue* StringProtoFuncSearch::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)588 JSValue* stringProtoFuncSearch(ExecState* exec, JSObject* thisObj, const List& args) 589 589 { 590 590 // This optimizes the common case that thisObj is a StringInstance … … 614 614 } 615 615 616 JSValue* StringProtoFuncReplace::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)616 JSValue* stringProtoFuncReplace(ExecState* exec, JSObject* thisObj, const List& args) 617 617 { 618 618 // This optimizes the common case that thisObj is a StringInstance … … 629 629 } 630 630 631 JSValue* StringProtoFuncSlice::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)631 JSValue* stringProtoFuncSlice(ExecState* exec, JSObject* thisObj, const List& args) 632 632 { 633 633 // This optimizes the common case that thisObj is a StringInstance … … 654 654 } 655 655 656 JSValue* StringProtoFuncSplit::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)656 JSValue* stringProtoFuncSplit(ExecState* exec, JSObject* thisObj, const List& args) 657 657 { 658 658 // This optimizes the common case that thisObj is a StringInstance … … 703 703 if (u.isEmpty()) { 704 704 // empty separator matches empty string -> empty array 705 put(exec, exec->propertyNames().length, jsNumber(0));705 res->put(exec, exec->propertyNames().length, jsNumber(0)); 706 706 return result; 707 707 } else { … … 724 724 } 725 725 726 JSValue* StringProtoFuncSubstr::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)726 JSValue* stringProtoFuncSubstr(ExecState* exec, JSObject* thisObj, const List& args) 727 727 { 728 728 // This optimizes the common case that thisObj is a StringInstance … … 749 749 } 750 750 751 JSValue* StringProtoFuncSubstring::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)751 JSValue* stringProtoFuncSubstring(ExecState* exec, JSObject* thisObj, const List& args) 752 752 { 753 753 // This optimizes the common case that thisObj is a StringInstance … … 782 782 } 783 783 784 JSValue* StringProtoFuncToLowerCase::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)784 JSValue* stringProtoFuncToLowerCase(ExecState* exec, JSObject* thisObj, const List&) 785 785 { 786 786 // This optimizes the common case that thisObj is a StringInstance … … 807 807 } 808 808 809 JSValue* StringProtoFuncToUpperCase::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)809 JSValue* stringProtoFuncToUpperCase(ExecState* exec, JSObject* thisObj, const List&) 810 810 { 811 811 // This optimizes the common case that thisObj is a StringInstance … … 832 832 } 833 833 834 JSValue* StringProtoFuncToLocaleLowerCase::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)834 JSValue* stringProtoFuncToLocaleLowerCase(ExecState* exec, JSObject* thisObj, const List&) 835 835 { 836 836 // This optimizes the common case that thisObj is a StringInstance … … 858 858 } 859 859 860 JSValue* StringProtoFuncToLocaleUpperCase::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)860 JSValue* stringProtoFuncToLocaleUpperCase(ExecState* exec, JSObject* thisObj, const List&) 861 861 { 862 862 // This optimizes the common case that thisObj is a StringInstance … … 883 883 } 884 884 885 JSValue* StringProtoFuncLocaleCompare::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)885 JSValue* stringProtoFuncLocaleCompare(ExecState* exec, JSObject* thisObj, const List& args) 886 886 { 887 887 if (args.size() < 1) … … 896 896 #ifndef KJS_PURE_ECMA 897 897 898 JSValue* StringProtoFuncBig::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)898 JSValue* stringProtoFuncBig(ExecState* exec, JSObject* thisObj, const List&) 899 899 { 900 900 // This optimizes the common case that thisObj is a StringInstance … … 903 903 } 904 904 905 JSValue* StringProtoFuncSmall::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)905 JSValue* stringProtoFuncSmall(ExecState* exec, JSObject* thisObj, const List&) 906 906 { 907 907 // This optimizes the common case that thisObj is a StringInstance … … 910 910 } 911 911 912 JSValue* StringProtoFuncBlink::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)912 JSValue* stringProtoFuncBlink(ExecState* exec, JSObject* thisObj, const List&) 913 913 { 914 914 // This optimizes the common case that thisObj is a StringInstance … … 917 917 } 918 918 919 JSValue* StringProtoFuncBold::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)919 JSValue* stringProtoFuncBold(ExecState* exec, JSObject* thisObj, const List&) 920 920 { 921 921 // This optimizes the common case that thisObj is a StringInstance … … 924 924 } 925 925 926 JSValue* StringProtoFuncFixed::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)926 JSValue* stringProtoFuncFixed(ExecState* exec, JSObject* thisObj, const List&) 927 927 { 928 928 // This optimizes the common case that thisObj is a StringInstance … … 931 931 } 932 932 933 JSValue* StringProtoFuncItalics::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)933 JSValue* stringProtoFuncItalics(ExecState* exec, JSObject* thisObj, const List&) 934 934 { 935 935 // This optimizes the common case that thisObj is a StringInstance … … 938 938 } 939 939 940 JSValue* StringProtoFuncStrike::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)940 JSValue* stringProtoFuncStrike(ExecState* exec, JSObject* thisObj, const List&) 941 941 { 942 942 // This optimizes the common case that thisObj is a StringInstance … … 945 945 } 946 946 947 JSValue* StringProtoFuncSub::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)947 JSValue* stringProtoFuncSub(ExecState* exec, JSObject* thisObj, const List&) 948 948 { 949 949 // This optimizes the common case that thisObj is a StringInstance … … 952 952 } 953 953 954 JSValue* StringProtoFuncSup::callAsFunction(ExecState* exec, JSObject* thisObj, const List&)954 JSValue* stringProtoFuncSup(ExecState* exec, JSObject* thisObj, const List&) 955 955 { 956 956 // This optimizes the common case that thisObj is a StringInstance … … 959 959 } 960 960 961 JSValue* StringProtoFuncFontcolor::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)961 JSValue* stringProtoFuncFontcolor(ExecState* exec, JSObject* thisObj, const List& args) 962 962 { 963 963 // This optimizes the common case that thisObj is a StringInstance … … 967 967 } 968 968 969 JSValue* StringProtoFuncFontsize::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)969 JSValue* stringProtoFuncFontsize(ExecState* exec, JSObject* thisObj, const List& args) 970 970 { 971 971 // This optimizes the common case that thisObj is a StringInstance … … 975 975 } 976 976 977 JSValue* StringProtoFuncAnchor::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)977 JSValue* stringProtoFuncAnchor(ExecState* exec, JSObject* thisObj, const List& args) 978 978 { 979 979 // This optimizes the common case that thisObj is a StringInstance … … 983 983 } 984 984 985 JSValue* StringProtoFuncLink::callAsFunction(ExecState* exec, JSObject* thisObj, const List& args)985 JSValue* stringProtoFuncLink(ExecState* exec, JSObject* thisObj, const List& args) 986 986 { 987 987 // This optimizes the common case that thisObj is a StringInstance
Note:
See TracChangeset
for help on using the changeset viewer.