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

Unified Diff: src/bootstrapper.cc

Issue 2375953002: [regexp] Port RegExp.prototype.exec to TurboFan (Closed)
Patch Set: Handle smi this values Created 4 years, 3 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/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 2852e8f4152d9665d9d2eda137f2e12e6b7dff40..d31c7d9c6ff07cc641c9b60fa44766a1bb411df1 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1663,6 +1663,19 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
initial_map->set_unused_property_fields(0);
initial_map->set_instance_size(initial_map->instance_size() +
num_fields * kPointerSize);
+
+ {
+ // RegExp.prototype setup.
+
+ Handle<JSObject> proto =
+ factory->NewJSObject(isolate->object_function(), TENURED);
+ JSObject::AddProperty(proto, factory->constructor_string(), regexp_fun,
+ DONT_ENUM);
+ Accessors::FunctionSetPrototype(regexp_fun, proto).Assert();
Igor Sheludko 2016/09/29 12:55:28 I think you can pass the right prototype object to
jgruber 2016/09/29 14:40:26 Done.
+
+ SimpleInstallFunction(proto, "exec", Builtins::kRegExpPrototypeExec, 1,
+ true, DONT_ENUM);
+ }
}
{ // -- E r r o r
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins.h » ('j') | src/builtins/builtins-regexp.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698