Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 44 // Args: name, arguments count | 44 // Args: name, arguments count |
| 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 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 784 TFJ(StringPrototypeSplit, 2) \ | 784 TFJ(StringPrototypeSplit, 2) \ |
| 785 /* ES6 section B.2.3.1 String.prototype.substr ( start, length ) */ \ | 785 /* ES6 section B.2.3.1 String.prototype.substr ( start, length ) */ \ |
| 786 TFJ(StringPrototypeSubstr, 2) \ | 786 TFJ(StringPrototypeSubstr, 2) \ |
| 787 /* ES6 section 21.1.3.19 String.prototype.substring ( start, end ) */ \ | 787 /* ES6 section 21.1.3.19 String.prototype.substring ( start, end ) */ \ |
| 788 TFJ(StringPrototypeSubstring, 2) \ | 788 TFJ(StringPrototypeSubstring, 2) \ |
| 789 /* ES6 section 21.1.3.20 */ \ | 789 /* ES6 section 21.1.3.20 */ \ |
| 790 /* String.prototype.startsWith ( searchString [ , position ] ) */ \ | 790 /* String.prototype.startsWith ( searchString [ , position ] ) */ \ |
| 791 CPP(StringPrototypeStartsWith) \ | 791 CPP(StringPrototypeStartsWith) \ |
| 792 /* ES6 section 21.1.3.25 String.prototype.toString () */ \ | 792 /* ES6 section 21.1.3.25 String.prototype.toString () */ \ |
| 793 TFJ(StringPrototypeToString, 0) \ | 793 TFJ(StringPrototypeToString, 0) \ |
| 794 /* ES #sec-string.prototype.tolocalelowercase */ \ | 794 /* (obsolete) Unibrow string functions */ \ |
| 795 CPP(StringPrototypeToLocaleLowerCase) \ | 795 CPP(StringPrototypeToLocaleLowerCase) \ |
| 796 /* ES #sec-string.prototype.tolocaleuppercase */ \ | |
| 797 CPP(StringPrototypeToLocaleUpperCase) \ | 796 CPP(StringPrototypeToLocaleUpperCase) \ |
| 798 /* ES #sec-string.prototype.tolowercase */ \ | |
| 799 CPP(StringPrototypeToLowerCase) \ | 797 CPP(StringPrototypeToLowerCase) \ |
| 800 /* ES #sec-string.prototype.touppercase */ \ | |
| 801 CPP(StringPrototypeToUpperCase) \ | 798 CPP(StringPrototypeToUpperCase) \ |
| 802 CPP(StringPrototypeTrim) \ | 799 CPP(StringPrototypeTrim) \ |
| 803 CPP(StringPrototypeTrimLeft) \ | 800 CPP(StringPrototypeTrimLeft) \ |
| 804 CPP(StringPrototypeTrimRight) \ | 801 CPP(StringPrototypeTrimRight) \ |
| 805 /* ES6 section 21.1.3.28 String.prototype.valueOf () */ \ | 802 /* ES6 section 21.1.3.28 String.prototype.valueOf () */ \ |
| 806 TFJ(StringPrototypeValueOf, 0) \ | 803 TFJ(StringPrototypeValueOf, 0) \ |
| 807 /* ES6 #sec-string.prototype-@@iterator */ \ | 804 /* ES6 #sec-string.prototype-@@iterator */ \ |
| 808 TFJ(StringPrototypeIterator, 0) \ | 805 TFJ(StringPrototypeIterator, 0) \ |
| 809 \ | 806 \ |
| 810 /* StringIterator */ \ | 807 /* StringIterator */ \ |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 869 \ | 866 \ |
| 870 /* %AsyncFromSyncIteratorPrototype% */ \ | 867 /* %AsyncFromSyncIteratorPrototype% */ \ |
| 871 /* (proposal-async-iteration/#sec-%asyncfromsynciteratorprototype%-object)*/ \ | 868 /* (proposal-async-iteration/#sec-%asyncfromsynciteratorprototype%-object)*/ \ |
| 872 TFJ(AsyncFromSyncIteratorPrototypeNext, 1) \ | 869 TFJ(AsyncFromSyncIteratorPrototypeNext, 1) \ |
| 873 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1) \ | 870 TFJ(AsyncFromSyncIteratorPrototypeThrow, 1) \ |
| 874 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1) \ | 871 TFJ(AsyncFromSyncIteratorPrototypeReturn, 1) \ |
| 875 \ | 872 \ |
| 876 /* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \ | 873 /* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \ |
| 877 TFJ(AsyncIteratorValueUnwrap, 1) | 874 TFJ(AsyncIteratorValueUnwrap, 1) |
| 878 | 875 |
| 876 #ifdef V8_I18N_SUPPORT | |
| 877 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 878 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 879 \ | |
| 880 /* TODO(jwolfe): implement the *Locale* variants like below */ \ | |
| 881 /* ES #sec-string.prototype.tolocalelowercase */ \ | |
| 882 /* CPP(StringPrototypeToLocaleLowerCaseI18N) */ \ | |
| 883 /* ES #sec-string.prototype.tolocaleuppercase */ \ | |
| 884 /* CPP(StringPrototypeToLocaleUpperCaseI18N) */ \ | |
|
Dan Ehrenberg
2017/03/21 09:31:17
Nit: Could you not check in these lines? I think t
| |
| 885 /* ES #sec-string.prototype.tolowercase */ \ | |
| 886 CPP(StringPrototypeToLowerCaseI18N) \ | |
| 887 /* ES #sec-string.prototype.touppercase */ \ | |
| 888 CPP(StringPrototypeToUpperCaseI18N) | |
| 889 #else | |
| 890 #define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \ | |
| 891 BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) | |
| 892 #endif // V8_I18N_SUPPORT | |
| 893 | |
| 879 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ | 894 #define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \ |
| 880 V(AsyncFromSyncIteratorPrototypeNext) \ | 895 V(AsyncFromSyncIteratorPrototypeNext) \ |
| 881 V(AsyncFromSyncIteratorPrototypeReturn) \ | 896 V(AsyncFromSyncIteratorPrototypeReturn) \ |
| 882 V(AsyncFromSyncIteratorPrototypeThrow) \ | 897 V(AsyncFromSyncIteratorPrototypeThrow) \ |
| 883 V(AsyncFunctionAwaitCaught) \ | 898 V(AsyncFunctionAwaitCaught) \ |
| 884 V(AsyncFunctionAwaitUncaught) \ | 899 V(AsyncFunctionAwaitUncaught) \ |
| 885 V(PromiseConstructor) \ | 900 V(PromiseConstructor) \ |
| 886 V(PromiseHandle) \ | 901 V(PromiseHandle) \ |
| 887 V(PromiseResolve) \ | 902 V(PromiseResolve) \ |
| 888 V(PromiseResolveClosure) \ | 903 V(PromiseResolveClosure) \ |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1042 | 1057 |
| 1043 friend class Isolate; | 1058 friend class Isolate; |
| 1044 | 1059 |
| 1045 DISALLOW_COPY_AND_ASSIGN(Builtins); | 1060 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 1046 }; | 1061 }; |
| 1047 | 1062 |
| 1048 } // namespace internal | 1063 } // namespace internal |
| 1049 } // namespace v8 | 1064 } // namespace v8 |
| 1050 | 1065 |
| 1051 #endif // V8_BUILTINS_BUILTINS_H_ | 1066 #endif // V8_BUILTINS_BUILTINS_H_ |
| OLD | NEW |