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

Unified Diff: src/bootstrapper.cc

Issue 2870013004: [builtins] String.prototype.slice as a CSA builtin. (Closed)
Patch Set: Flags for SubString. Created 3 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 | « no previous file | src/builtins/builtins-definitions.h » ('j') | src/builtins/builtins-string-gen.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index a1d720797cb7b4fe34a4edbdfd3b5db21b7565f5..9be4fb53b6b3d92b8119e89a56d7beefc483bcd2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1810,6 +1810,8 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
#endif // V8_INTL_SUPPORT
SimpleInstallFunction(prototype, "replace",
Builtins::kStringPrototypeReplace, 2, true);
+ SimpleInstallFunction(prototype, "slice", Builtins::kStringPrototypeSlice,
+ 2, true);
jgruber 2017/05/11 08:57:40 We could also omit argument adaption for this one
mvstanton 2017/05/12 11:00:42 Great idea - I've made the necessary adaptations..
SimpleInstallFunction(prototype, "split", Builtins::kStringPrototypeSplit,
2, true);
SimpleInstallFunction(prototype, "substr", Builtins::kStringPrototypeSubstr,
« no previous file with comments | « no previous file | src/builtins/builtins-definitions.h » ('j') | src/builtins/builtins-string-gen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698