[cleanup] Factor out BUILTIN_LIST_INTL macro
Small clean up to create a BUILTIN_LIST_INTL to include in BUILTIN_LIST
rather than having two definitions of BUILTIN_LIST depending on whether
V8_INTL_SUPPORT is enabled.
Change-Id: I05ce83fe478049398392c5204b22961d29eb3622
Reviewed-on: https://chromium-review.googlesource.com/1180967
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55209}
diff --git a/src/builtins/builtins-definitions.h b/src/builtins/builtins-definitions.h
index ad04d0e..ae93c07 100644
--- a/src/builtins/builtins-definitions.h
+++ b/src/builtins/builtins-definitions.h
@@ -1319,10 +1319,7 @@
CPP(Trace)
#ifdef V8_INTL_SUPPORT
-#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
- BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
- BUILTIN_LIST_FROM_DSL(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
- \
+#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
/* ecma402 #sec-intl.collator */ \
CPP(CollatorConstructor) \
TFS(StringToLowerCaseIntl, kString) \
@@ -1387,21 +1384,23 @@
/* ecma 402 #sec-collator-compare-functions*/ \
CPP(CollatorInternalCompare)
#else
+#define BUILTIN_LIST_INTL(CPP, TFJ, TFS) \
+ /* no-op fallback version */ \
+ CPP(StringPrototypeNormalize) \
+ /* same as toLowercase; fallback version */ \
+ CPP(StringPrototypeToLocaleLowerCase) \
+ /* same as toUppercase; fallback version */ \
+ CPP(StringPrototypeToLocaleUpperCase) \
+ /* (obsolete) Unibrow version */ \
+ CPP(StringPrototypeToLowerCase) \
+ /* (obsolete) Unibrow version */ \
+ CPP(StringPrototypeToUpperCase)
+#endif // V8_INTL_SUPPORT
+
#define BUILTIN_LIST(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
BUILTIN_LIST_BASE(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
BUILTIN_LIST_FROM_DSL(CPP, API, TFJ, TFC, TFS, TFH, ASM) \
- \
- /* no-op fallback version */ \
- CPP(StringPrototypeNormalize) \
- /* same as toLowercase; fallback version */ \
- CPP(StringPrototypeToLocaleLowerCase) \
- /* same as toUppercase; fallback version */ \
- CPP(StringPrototypeToLocaleUpperCase) \
- /* (obsolete) Unibrow version */ \
- CPP(StringPrototypeToLowerCase) \
- /* (obsolete) Unibrow version */ \
- CPP(StringPrototypeToUpperCase)
-#endif // V8_INTL_SUPPORT
+ BUILTIN_LIST_INTL(CPP, TFJ, TFS)
// The exception thrown in the following builtins are caught
// internally and result in a promise rejection.