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

Unified Diff: src/bootstrapper.cc

Issue 2307863003: [regexp] Port RegExpMatch, RegExpSearch, and RegExpTest (Closed)
Patch Set: Rebase 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
« no previous file with comments | « no previous file | 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 e3932e5c008b883f7c4b5f9e9393cd05bcdc30fd..f3b45766aee79063e5d9654b123134c7e4963505 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1642,6 +1642,25 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(proto, factory->toString_string(),
Builtins::kRegExpPrototypeToString, 0, false,
DONT_ENUM);
+ SimpleInstallFunction(proto, factory->exec_string(),
+ Builtins::kRegExpPrototypeExec, 1, false,
+ DONT_ENUM);
+ SimpleInstallFunction(proto, "test", Builtins::kRegExpPrototypeTest, 1,
+ false, DONT_ENUM);
+
+ {
+ Handle<JSFunction> fun = SimpleCreateFunction(
+ isolate, factory->InternalizeUtf8String("[Symbol.match]"),
+ Builtins::kRegExpPrototypeMatch, 1, false);
+ InstallFunction(proto, fun, factory->match_symbol(), DONT_ENUM);
+ }
+
+ {
+ Handle<JSFunction> fun = SimpleCreateFunction(
+ isolate, factory->InternalizeUtf8String("[Symbol.search]"),
+ Builtins::kRegExpPrototypeSearch, 1, false);
+ InstallFunction(proto, fun, factory->search_symbol(), DONT_ENUM);
+ }
}
{
@@ -1721,8 +1740,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
#undef INSTALL_CAPTURE_GETTER
}
- // TODO(jgruber): shared->set_force_inline on getters.
-
DCHECK(regexp_fun->has_initial_map());
Handle<Map> initial_map(regexp_fun->initial_map());
@@ -1733,7 +1750,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
// ECMA-262, section 15.10.7.5.
PropertyAttributes writable =
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
- DataDescriptor field(factory->last_index_string(),
+ DataDescriptor field(factory->lastIndex_string(),
JSRegExp::kLastIndexFieldIndex, writable,
Representation::Tagged());
initial_map->AppendDescriptor(&field);
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698