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

Unified Diff: src/factory.cc

Issue 1127693009: Do not cache object literal maps during bootstrapping. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 3df71b19c3eff44a4da5f1ea59be9b492df33c4b..3632989675d812b58609bb13430f807b0a434280 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2399,7 +2399,9 @@ Handle<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context,
bool* is_result_from_cache) {
const int kMapCacheSize = 128;
- if (number_of_properties > kMapCacheSize) {
+ // We do not cache maps for too many properties or when running builtin code.
+ if (number_of_properties > kMapCacheSize ||
+ isolate()->bootstrapper()->IsActive()) {
*is_result_from_cache = false;
return Map::Create(isolate(), number_of_properties);
}
« 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