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

Unified Diff: src/bootstrapper.cc

Issue 2537483002: [regexp] Cache the correct initial prototype map (Closed)
Patch Set: Created 4 years, 1 month 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 | no next file » | 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 fefa4a7f2c8d535bbc1330332d5236a3288ec50d..2cf1e527155f9cc61801f395d94b61bb651ed826 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1882,9 +1882,12 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
InstallFunction(prototype, fun, factory->split_symbol(), DONT_ENUM);
}
+ Handle<Map> prototype_map(prototype->map());
+ Map::SetShouldBeFastPrototypeMap(prototype_map, true, isolate);
+
// Store the initial RegExp.prototype map. This is used in fast-path
// checks. Do not alter the prototype after this point.
- native_context()->set_regexp_prototype_map(prototype->map());
+ native_context()->set_regexp_prototype_map(*prototype_map);
}
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698