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

Unified Diff: src/builtins/setup-builtins-internal.cc

Issue 2777203007: [builtins] Introduce new TFC macro and auto-generate TFS descriptors (Closed)
Patch Set: Rebase Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins/builtins-regexp-gen.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/setup-builtins-internal.cc
diff --git a/src/builtins/setup-builtins-internal.cc b/src/builtins/setup-builtins-internal.cc
index c96f07b0e43c95465e5e6e0820916303d9035968..ca88e6332b54796917e4ae7a212a5f837dcba883 100644
--- a/src/builtins/setup-builtins-internal.cc
+++ b/src/builtins/setup-builtins-internal.cc
@@ -137,12 +137,18 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
code = BuildWithCodeStubAssemblerJS(isolate, &Builtins::Generate_##Name, \
Argc, kBuiltinFlags, #Name); \
AddBuiltin(builtins, index++, code);
-#define BUILD_TFS(Name, InterfaceDescriptor, result_size) \
+#define BUILD_TFC(Name, InterfaceDescriptor, result_size) \
{ InterfaceDescriptor##Descriptor descriptor(isolate); } \
code = BuildWithCodeStubAssemblerCS(isolate, &Builtins::Generate_##Name, \
CallDescriptors::InterfaceDescriptor, \
kBuiltinFlags, #Name, result_size); \
AddBuiltin(builtins, index++, code);
+#define BUILD_TFS(Name, ...) \
+ /* Return size for generic TF builtins (stub linkage) is always 1. */ \
+ code = BuildWithCodeStubAssemblerCS(isolate, &Builtins::Generate_##Name, \
+ CallDescriptors::Name, kBuiltinFlags, \
+ #Name, 1); \
+ AddBuiltin(builtins, index++, code);
#define BUILD_TFH(Name, Kind, Extra, InterfaceDescriptor) \
{ InterfaceDescriptor##Descriptor descriptor(isolate); } \
/* Return size for IC builtins/handlers is always 1. */ \
@@ -156,12 +162,13 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
kBuiltinFlags, #Name); \
AddBuiltin(builtins, index++, code);
- BUILTIN_LIST(BUILD_CPP, BUILD_API, BUILD_TFJ, BUILD_TFS, BUILD_TFH, BUILD_ASM,
- BUILD_ASM);
+ BUILTIN_LIST(BUILD_CPP, BUILD_API, BUILD_TFJ, BUILD_TFC, BUILD_TFS, BUILD_TFH,
+ BUILD_ASM, BUILD_ASM);
#undef BUILD_CPP
#undef BUILD_API
#undef BUILD_TFJ
+#undef BUILD_TFC
#undef BUILD_TFS
#undef BUILD_TFH
#undef BUILD_ASM
« no previous file with comments | « src/builtins/builtins-regexp-gen.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698