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

Unified Diff: src/bootstrapper.cc

Issue 2415103002: [regexp] Turn last match info into a simple FixedArray (Closed)
Patch Set: Port architectures and move internal match info to context Created 4 years, 2 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 5c77aa4e95a8d2d22a112838e376cc1ee45039ba..6fba6956015a6569cfdf896a1ae793be79eb3729 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1699,6 +1699,7 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
shared->set_instance_class_name(isolate->heap()->RegExp_string());
shared->DontAdaptArguments();
shared->set_length(2);
+
{
// RegExp.prototype setup.
@@ -1875,6 +1876,13 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
function->shared()->set_native(true);
isolate->native_context()->set(Context::REGEXP_INTERNAL_MATCH, *function);
}
+
+ // Create the last match info. One for external use, and one for internal
+ // use when we don't want to modify the externally visible match info.
+ isolate->native_context()->set_regexp_last_match_info(
+ *factory->NewRegExpMatchInfo());
+ isolate->native_context()->set_regexp_internal_match_info(
+ *factory->NewRegExpMatchInfo());
}
{ // -- E r r o r

Powered by Google App Engine
This is Rietveld 408576698