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

Unified Diff: src/objects-inl.h

Issue 661583004: Revert "Limit the number of transitions allowed per hidden class." Due to crashes in ClearMapTransi… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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.h » ('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 10aaabfeb6b1ad993217f4d80f1b8192cdb56ec4..33363238c4d28a056421c19d32e1e3935c13bb64 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -5203,8 +5203,9 @@ Map* Map::elements_transition_map() {
bool Map::CanHaveMoreTransitions() {
if (!HasTransitionArray()) return true;
- return transitions()->number_of_transitions() <=
- TransitionArray::kMaxNumberOfTransitions;
+ return FixedArray::SizeFor(transitions()->length() +
+ TransitionArray::kTransitionSize)
+ <= Page::kMaxRegularHeapObjectSize;
}
@@ -6994,14 +6995,6 @@ void Map::ClearCodeCache(Heap* heap) {
}
-int Map::SlackForArraySize(int old_size, int size_limit) {
- const int max_slack = size_limit - old_size;
- DCHECK(max_slack >= 0);
- if (old_size < 4) return Min(max_slack, 1);
- return Min(max_slack, old_size / 2);
-}
-
-
void JSArray::EnsureSize(Handle<JSArray> array, int required_size) {
DCHECK(array->HasFastSmiOrObjectElements());
Handle<FixedArray> elts = handle(FixedArray::cast(array->elements()));
« no previous file with comments | « src/objects.cc ('k') | src/transitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698