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

Unified Diff: src/builtins/builtins.h

Issue 2728763006: Migrate some case conversion functions from JS to CPP builtins (Closed)
Patch Set: make V8_I18N_SUPPORT logic work for gn/ninja and gyp/make at the same time 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 side-by-side diff with in-line comments
Download patch
Index: src/builtins/builtins.h
diff --git a/src/builtins/builtins.h b/src/builtins/builtins.h
index 2137129d759a0d302e2ab73ac57f9ea357238505..d7378da91d8b15d698448daa581e50d29daefb7c 100644
--- a/src/builtins/builtins.h
+++ b/src/builtins/builtins.h
@@ -51,7 +51,7 @@ class Isolate;
// DBG: Builtin in platform-dependent assembly, used by the debugger.
// Args: name
-#define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
+#define BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
ASM(Abort) \
/* Code aging */ \
CODE_AGE_LIST_WITH_ARG(DECLARE_CODE_AGE_BUILTIN, ASM) \
@@ -791,13 +791,10 @@ class Isolate;
CPP(StringPrototypeStartsWith) \
/* ES6 section 21.1.3.25 String.prototype.toString () */ \
TFJ(StringPrototypeToString, 0) \
- /* ES #sec-string.prototype.tolocalelowercase */ \
+ /* (obsolete) Unibrow string functions */ \
CPP(StringPrototypeToLocaleLowerCase) \
- /* ES #sec-string.prototype.tolocaleuppercase */ \
CPP(StringPrototypeToLocaleUpperCase) \
- /* ES #sec-string.prototype.tolowercase */ \
CPP(StringPrototypeToLowerCase) \
- /* ES #sec-string.prototype.touppercase */ \
CPP(StringPrototypeToUpperCase) \
CPP(StringPrototypeTrim) \
CPP(StringPrototypeTrimLeft) \
@@ -876,6 +873,24 @@ class Isolate;
/* proposal-async-iteration/#sec-async-iterator-value-unwrap-functions */ \
TFJ(AsyncIteratorValueUnwrap, 1)
+#ifdef V8_I18N_SUPPORT
+#define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
+ BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
+ \
+ /* TODO(jwolfe): implement the *Locale* variants like below */ \
+ /* ES #sec-string.prototype.tolocalelowercase */ \
+ /* CPP(StringPrototypeToLocaleLowerCaseI18N) */ \
+ /* ES #sec-string.prototype.tolocaleuppercase */ \
+ /* CPP(StringPrototypeToLocaleUpperCaseI18N) */ \
+ /* ES #sec-string.prototype.tolowercase */ \
+ CPP(StringPrototypeToLowerCaseI18N) \
+ /* ES #sec-string.prototype.touppercase */ \
+ CPP(StringPrototypeToUpperCaseI18N)
+#else
+#define BUILTIN_LIST(CPP, API, TFJ, TFS, ASM, ASH, DBG) \
+ BUILTIN_LIST_BASE(CPP, API, TFJ, TFS, ASM, ASH, DBG)
+#endif // V8_I18N_SUPPORT
+
#define BUILTIN_PROMISE_REJECTION_PREDICTION_LIST(V) \
V(AsyncFromSyncIteratorPrototypeNext) \
V(AsyncFromSyncIteratorPrototypeReturn) \

Powered by Google App Engine
This is Rietveld 408576698