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

Unified Diff: src/builtins.cc

Issue 2018983002: [builtins] Also migrate String.prototype.toLowerCase/toUpperCase to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringTrim
Patch Set: REBASE Created 4 years, 7 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.h ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index b2cf4861ec0ed6f7cb462e6173807f1b70d311cd..d5745773d897a17d39971b39b7db8e23a28a1eda 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -4554,6 +4554,24 @@ void Builtins::Generate_StringPrototypeCharCodeAt(
assembler->Return(result);
}
+// ES6 section 21.1.3.22 String.prototype.toLowerCase ( )
+BUILTIN(StringPrototypeToLowerCase) {
+ HandleScope scope(isolate);
+ TO_THIS_STRING(string, "String.prototype.toLowerCase");
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, string,
+ String::ToLowerCase(string));
+ return *string;
+}
+
+// ES6 section 21.1.3.24 String.prototype.toUpperCase ( )
+BUILTIN(StringPrototypeToUpperCase) {
+ HandleScope scope(isolate);
+ TO_THIS_STRING(string, "String.prototype.toUpperCase");
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, string,
+ String::ToUpperCase(string));
+ return *string;
+}
+
// ES6 section 21.1.3.25 String.prototype.trim ()
BUILTIN(StringPrototypeTrim) {
HandleScope scope(isolate);
« no previous file with comments | « src/builtins.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698