Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 0007b37ca99a85ebc7643c9309e7a78834847e5d..0e43e1d3a0fbd434bf311fa3dffc579b3b73a3ee 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5092,6 +5092,7 @@ ACCESSORS(CallHandlerInfo, callback, Object, kCallbackOffset) |
ACCESSORS(CallHandlerInfo, data, Object, kDataOffset) |
ACCESSORS(TemplateInfo, tag, Object, kTagOffset) |
+SMI_ACCESSORS(TemplateInfo, number_of_properties, kNumberOfProperties) |
ACCESSORS(TemplateInfo, property_list, Object, kPropertyListOffset) |
ACCESSORS(TemplateInfo, property_accessors, Object, kPropertyAccessorsOffset) |
@@ -6945,11 +6946,13 @@ void Map::ClearCodeCache(Heap* heap) { |
} |
-int Map::SlackForArraySize(int old_size, int size_limit) { |
+int Map::SlackForArraySize(bool is_prototype_map, int old_size, |
+ int size_limit) { |
const int max_slack = size_limit - old_size; |
- CHECK(max_slack >= 0); |
+ CHECK_LE(0, max_slack); |
if (old_size < 4) return Min(max_slack, 1); |
- return Min(max_slack, old_size / 2); |
+ if (is_prototype_map) return Min(max_slack, 4); |
+ return Min(max_slack, old_size / 4); |
} |