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

Unified Diff: src/bootstrapper.cc

Issue 2663803002: [string] Migrate String.prototype.{split,replace} to TF (Closed)
Patch Set: Remove debug-evaluate whitelisting Created 3 years, 11 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 | « BUILD.gn ('k') | src/builtins/builtins.h » ('j') | no next file with comments »
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 95a7f419b6253d05d15b2a79c395c8d892d30c92..da25d060ff14446258a2760ec2dc8b9dc2379130 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1587,6 +1587,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Builtins::kStringPrototypeLocaleCompare, 1, true);
SimpleInstallFunction(prototype, "normalize",
Builtins::kStringPrototypeNormalize, 0, false);
+ SimpleInstallFunction(prototype, "split", Builtins::kStringPrototypeSplit,
+ 2, true);
+ SimpleInstallFunction(prototype, "replace",
+ Builtins::kStringPrototypeReplace, 2, true);
SimpleInstallFunction(prototype, "substr", Builtins::kStringPrototypeSubstr,
2, true);
SimpleInstallFunction(prototype, "substring",
@@ -3800,7 +3804,7 @@ bool Genesis::InstallNatives(GlobalContextType context_type) {
DCHECK(JSObject::cast(
string_function->initial_map()->prototype())->HasFastProperties());
native_context()->set_string_function_prototype_map(
- HeapObject::cast(string_function->initial_map()->prototype())->map());
+ HeapObject::cast(string_function->map()->prototype())->map());
Handle<JSGlobalObject> global_object =
handle(native_context()->global_object());
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698