Reviewers: Igor Sheludko,
Description:
Do not cache object literal maps during bootstrapping.
We do not expect to share maps for object literals created by builtin
Javascript code.
[email protected]
Please review this at https://codereview.chromium.org/1127693009/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -1 lines):
M src/factory.cc
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);
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.