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

Unified Diff: src/objects-inl.h

Issue 1224853003: Partially revert r29468 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/objects.cc ('k') | src/transitions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 0e43e1d3a0fbd434bf311fa3dffc579b3b73a3ee..120ca988431a99dde0471883cd51b172573e77d6 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6946,12 +6946,13 @@ void Map::ClearCodeCache(Heap* heap) {
}
-int Map::SlackForArraySize(bool is_prototype_map, int old_size,
- int size_limit) {
+int Map::SlackForArraySize(int old_size, int size_limit) {
const int max_slack = size_limit - old_size;
CHECK_LE(0, max_slack);
- if (old_size < 4) return Min(max_slack, 1);
- if (is_prototype_map) return Min(max_slack, 4);
+ if (old_size < 4) {
+ DCHECK_LE(1, max_slack);
+ return 1;
+ }
return Min(max_slack, old_size / 4);
}
« no previous file with comments | « src/objects.cc ('k') | src/transitions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698