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

Unified Diff: src/builtins/builtins-intl.cc

Issue 2728763006: Migrate some case conversion functions from JS to CPP builtins (Closed)
Patch Set: flatten strings 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
« no previous file with comments | « src/builtins/builtins.h ('k') | src/i18n.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-intl.cc
diff --git a/src/builtins/builtins-intl.cc b/src/builtins/builtins-intl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..91f2375917d86a729537a20a29746b9301a238b0
--- /dev/null
+++ b/src/builtins/builtins-intl.cc
@@ -0,0 +1,28 @@
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/builtins/builtins-utils.h"
+#include "src/builtins/builtins.h"
+#include "src/code-stub-assembler.h"
+#include "src/i18n.h"
caitp 2017/03/15 23:27:12 I think you need to wrap this whole file in `#ifde
caitp 2017/03/15 23:28:38 ah, having re-read your IRC messages I see you alr
+
+namespace v8 {
+namespace internal {
+
+BUILTIN(StringPrototypeToLowerCaseI18N) {
+ HandleScope scope(isolate);
+ TO_THIS_STRING(string, "String.prototype.toLowerCase");
+ string = String::Flatten(string);
+ return ConvertCase(string, false, isolate);
+}
+
+BUILTIN(StringPrototypeToUpperCaseI18N) {
+ HandleScope scope(isolate);
+ TO_THIS_STRING(string, "String.prototype.toUpperCase");
+ string = String::Flatten(string);
+ return ConvertCase(string, true, isolate);
+}
+
+} // namespace internal
+} // namespace v8
« no previous file with comments | « src/builtins/builtins.h ('k') | src/i18n.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698