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

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

Issue 2752213002: [csa] Add CSA::CallBuiltin and Builtins::CallableFor (Closed)
Patch Set: Remove unused variable again 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
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
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 class Callable;
14 template <typename T> 15 template <typename T>
15 class Handle; 16 class Handle;
16 class Isolate; 17 class Isolate;
17 18
18 #define CODE_AGE_LIST_WITH_ARG(V, A) \ 19 #define CODE_AGE_LIST_WITH_ARG(V, A) \
19 V(Quadragenarian, A) \ 20 V(Quadragenarian, A) \
20 V(Quinquagenarian, A) \ 21 V(Quinquagenarian, A) \
21 V(Sexagenarian, A) \ 22 V(Sexagenarian, A) \
22 V(Septuagenarian, A) \ 23 V(Septuagenarian, A) \
23 V(Octogenarian, A) 24 V(Octogenarian, A)
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 V(PromiseResolve) \ 880 V(PromiseResolve) \
880 V(PromiseResolveClosure) \ 881 V(PromiseResolveClosure) \
881 V(ResolvePromise) 882 V(ResolvePromise)
882 883
883 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject) 884 #define BUILTIN_EXCEPTION_CAUGHT_PREDICTION_LIST(V) V(PromiseHandleReject)
884 885
885 #define IGNORE_BUILTIN(...) 886 #define IGNORE_BUILTIN(...)
886 887
887 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V) 888 #define BUILTIN_LIST_ALL(V) BUILTIN_LIST(V, V, V, V, V, V, V)
888 889
890 #define BUILTIN_LIST_TFS(V) \
891 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, V, \
892 IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN)
893
889 #define BUILTIN_LIST_C(V) \ 894 #define BUILTIN_LIST_C(V) \
890 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 895 BUILTIN_LIST(V, V, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
891 IGNORE_BUILTIN, IGNORE_BUILTIN) 896 IGNORE_BUILTIN, IGNORE_BUILTIN)
892 897
893 #define BUILTIN_LIST_A(V) \ 898 #define BUILTIN_LIST_A(V) \
894 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 899 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
895 V, V, V) 900 V, V, V)
896 901
897 #define BUILTIN_LIST_DBG(V) \ 902 #define BUILTIN_LIST_DBG(V) \
898 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \ 903 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, IGNORE_BUILTIN, \
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 Code* builtin(Name name) { 957 Code* builtin(Name name) {
953 // Code::cast cannot be used here since we access builtins 958 // Code::cast cannot be used here since we access builtins
954 // during the marking phase of mark sweep. See IC::Clear. 959 // during the marking phase of mark sweep. See IC::Clear.
955 return reinterpret_cast<Code*>(builtins_[name]); 960 return reinterpret_cast<Code*>(builtins_[name]);
956 } 961 }
957 962
958 Address builtin_address(Name name) { 963 Address builtin_address(Name name) {
959 return reinterpret_cast<Address>(&builtins_[name]); 964 return reinterpret_cast<Address>(&builtins_[name]);
960 } 965 }
961 966
967 static Callable CallableFor(Isolate* isolate, Name name);
968
962 static const char* name(int index); 969 static const char* name(int index);
963 970
964 // Returns the C++ entry point for builtins implemented in C++, and the null 971 // Returns the C++ entry point for builtins implemented in C++, and the null
965 // Address otherwise. 972 // Address otherwise.
966 static Address CppEntryOf(int index); 973 static Address CppEntryOf(int index);
967 974
968 static bool IsCpp(int index); 975 static bool IsCpp(int index);
969 static bool IsApi(int index); 976 static bool IsApi(int index);
970 static bool HasCppImplementation(int index); 977 static bool HasCppImplementation(int index);
971 978
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1032
1026 friend class Isolate; 1033 friend class Isolate;
1027 1034
1028 DISALLOW_COPY_AND_ASSIGN(Builtins); 1035 DISALLOW_COPY_AND_ASSIGN(Builtins);
1029 }; 1036 };
1030 1037
1031 } // namespace internal 1038 } // namespace internal
1032 } // namespace v8 1039 } // namespace v8
1033 1040
1034 #endif // V8_BUILTINS_BUILTINS_H_ 1041 #endif // V8_BUILTINS_BUILTINS_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins.cc » ('j') | src/builtins/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698