Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: src/builtins/builtins.h

Issue 2728763006: Migrate some case conversion functions from JS to CPP builtins (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/builtins/builtins-intl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_BUILTINS_BUILTINS_H_ 5 #ifndef V8_BUILTINS_BUILTINS_H_
6 #define V8_BUILTINS_BUILTINS_H_ 6 #define V8_BUILTINS_BUILTINS_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Args: name, arguments count, explicit argument names... 44 // Args: name, arguments count, explicit argument names...
45 // TFS: Builtin in Turbofan, with CodeStub linkage. 45 // TFS: Builtin in Turbofan, with CodeStub linkage.
46 // Args: name, code kind, extra IC state, interface descriptor, return_size 46 // Args: name, code kind, extra IC state, interface descriptor, return_size
47 // ASM: Builtin in platform-dependent assembly. 47 // ASM: Builtin in platform-dependent assembly.
48 // Args: name 48 // Args: name
49 // ASH: Handlers implemented in platform-dependent assembly. 49 // ASH: Handlers implemented in platform-dependent assembly.
50 // Args: name, code kind, extra IC state 50 // Args: name, code kind, extra IC state
51 // DBG: Builtin in platform-dependent assembly, used by the debugger. 51 // DBG: Builtin in platform-dependent assembly, used by the debugger.
52 // Args: name 52 // Args: name
53 53
54 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ 54 #define BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
55 ASM(Abort) \ 55 ASM(Abort) \
56 /* Code aging */ \ 56 /* Code aging */ \
57 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \ 57 CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \
58 \ 58 \
59 /* Declared first for dependency reasons */ \ 59 /* Declared first for dependency reasons */ \
60 ASM(CompileLazy) \ 60 ASM(CompileLazy) \
61 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \ 61 TFS(ToObject, BUILTIN, kNoExtraICState, TypeConversion, 1) \
62 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \ 62 TFS(FastNewObject, BUILTIN, kNoExtraICState, FastNewObject, 1) \
63 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \ 63 TFS(HasProperty, BUILTIN, kNoExtraICState, HasProperty, 1) \
64 \ 64 \
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 /* ES6 #sec-string.prototype.substring */ \ 836 /* ES6 #sec-string.prototype.substring */ \
837 TFJ(StringPrototypeSubstring, 2, kStart, kEnd) \ 837 TFJ(StringPrototypeSubstring, 2, kStart, kEnd) \
838 /* ES6 #sec-string.prototype.startswith */ \ 838 /* ES6 #sec-string.prototype.startswith */ \
839 CPP(StringPrototypeStartsWith) \ 839 CPP(StringPrototypeStartsWith) \
840 /* ES6 #sec-string.prototype.tostring */ \ 840 /* ES6 #sec-string.prototype.tostring */ \
841 TFJ(StringPrototypeToString, 0) \ 841 TFJ(StringPrototypeToString, 0) \
842 /* ES #sec-string.prototype.tolocalelowercase */ \ 842 /* ES #sec-string.prototype.tolocalelowercase */ \
843 CPP(StringPrototypeToLocaleLowerCase) \ 843 CPP(StringPrototypeToLocaleLowerCase) \
844 /* ES #sec-string.prototype.tolocaleuppercase */ \ 844 /* ES #sec-string.prototype.tolocaleuppercase */ \
845 CPP(StringPrototypeToLocaleUpperCase) \ 845 CPP(StringPrototypeToLocaleUpperCase) \
846 /* ES #sec-string.prototype.tolowercase */ \ 846 /* (obsolete) Unibrow version */ \
847 CPP(StringPrototypeToLowerCase) \ 847 CPP(StringPrototypeToLowerCase) \
848 /* ES #sec-string.prototype.touppercase */ \ 848 /* (obsolete) Unibrow version */ \
849 CPP(StringPrototypeToUpperCase) \ 849 CPP(StringPrototypeToUpperCase) \
850 CPP(StringPrototypeTrim) \ 850 CPP(StringPrototypeTrim) \
851 CPP(StringPrototypeTrimLeft) \ 851 CPP(StringPrototypeTrimLeft) \
852 CPP(StringPrototypeTrimRight) \ 852 CPP(StringPrototypeTrimRight) \
853 /* ES6 #sec-string.prototype.valueof */ \ 853 /* ES6 #sec-string.prototype.valueof */ \
854 TFJ(StringPrototypeValueOf, 0) \ 854 TFJ(StringPrototypeValueOf, 0) \
855 /* ES6 #sec-string.prototype-@@iterator */ \ 855 /* ES6 #sec-string.prototype-@@iterator */ \
856 TFJ(StringPrototypeIterator, 0) \ 856 TFJ(StringPrototypeIterator, 0) \
857 \ 857 \
858 /* StringIterator */ \ 858 /* StringIterator */ \
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 /* See tc39.github.io/proposal-async-iteration/ */ \ 927 /* See tc39.github.io/proposal-async-iteration/ */ \
928 /* #sec-%asyncfromsynciteratorprototype%-object) */ \ 928 /* #sec-%asyncfromsynciteratorprototype%-object) */ \
929 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \ 929 TFJ(AsyncFromSyncIteratorPrototypeNext, 1, kValue) \
930 /* #sec-%asyncfromsynciteratorprototype%.throw */ \ 930 /* #sec-%asyncfromsynciteratorprototype%.throw */ \
931 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \ 931 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1, kReason) \
932 /* #sec-%asyncfromsynciteratorprototype%.return */ \ 932 /* #sec-%asyncfromsynciteratorprototype%.return */ \
933 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \ 933 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1, kValue) \
934 /* #sec-async-iterator-value-unwrap-functions */ \ 934 /* #sec-async-iterator-value-unwrap-functions */ \
935 TFJ(AsyncIteratorValueUnwrap, 1, kValue) 935 TFJ(AsyncIteratorValueUnwrap, 1, kValue)
936 936
937 #ifdef V8_I18N_SUPPORT
938 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
939 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
940 \
941 /* ES #sec-string.prototype.tolowercase */ \
942 CPP(StringPrototypeToLowerCaseI18N) \
943 /* ES #sec-string.prototype.touppercase */ \
944 CPP(StringPrototypeToUpperCaseI18N)
945 #else
946 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
947 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG)
948 #endif // V8_I18N_SUPPORT
949
937 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ 950 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \
938 V(AsyncFromSyncIteratorPrototypeNext) \ 951 V(AsyncFromSyncIteratorPrototypeNext) \
939 V(AsyncFromSyncIteratorPrototypeReturn) \ 952 V(AsyncFromSyncIteratorPrototypeReturn) \
940 V(AsyncFromSyncIteratorPrototypeThrow) \ 953 V(AsyncFromSyncIteratorPrototypeThrow) \
941 V(AsyncFunctionAwaitCaught) \ 954 V(AsyncFunctionAwaitCaught) \
942 V(AsyncFunctionAwaitUncaught) \ 955 V(AsyncFunctionAwaitUncaught) \
943 V(PromiseConstructor) \ 956 V(PromiseConstructor) \
944 V(PromiseHandle) \ 957 V(PromiseHandle) \
945 V(PromiseResolve) \ 958 V(PromiseResolve) \
946 V(PromiseResolveClosure) \ 959 V(PromiseResolveClosure) \
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 1112
1100 friend class Isolate; 1113 friend class Isolate;
1101 1114
1102 DISALLOW_COPY_AND_ASSIGN(Builtins); 1115 DISALLOW_COPY_AND_ASSIGN(Builtins);
1103 }; 1116 };
1104 1117
1105 } // namespace internal 1118 } // namespace internal
1106 } // namespace v8 1119 } // namespace v8
1107 1120
1108 #endif // V8_BUILTINS_BUILTINS_H_ 1121 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/builtins/builtins-intl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698