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

Unified Diff: src/transitions-inl.h

Issue 676393002: Reland "Limit the number of transitions allowed per hidden class." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make sure TransitionArray::Insert() is called only when it is allowed Created 6 years, 1 month 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/transitions.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/transitions-inl.h
diff --git a/src/transitions-inl.h b/src/transitions-inl.h
index cc4d4b11d4165bac0ebab6d06317f8e902566ba5..6ed86a1407e120b7f5ae279650b01d9c2fd665f5 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -160,6 +160,15 @@ void TransitionArray::NoIncrementalWriteBarrierSet(int transition_number,
}
+void TransitionArray::SetNumberOfTransitions(int number_of_transitions) {
+ if (IsFullTransitionArray()) {
+ DCHECK(number_of_transitions <= number_of_transitions_storage());
+ WRITE_FIELD(this, kTransitionLengthOffset,
+ Smi::FromInt(number_of_transitions));
+ }
+}
+
+
#undef FIELD_ADDR
#undef WRITE_FIELD
#undef CONDITIONAL_WRITE_BARRIER
« no previous file with comments | « src/transitions.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698