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

Unified Diff: src/transitions-inl.h

Issue 635883003: Limit the number of transitions allowed per hidden class. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: Address Toon comments 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/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 a16eb4477cd60c1486ed5b697f257d619d9e1b05..08cb6476bf02df72bda4a1695e823a4147660f13 100644
--- a/src/transitions-inl.h
+++ b/src/transitions-inl.h
@@ -154,6 +154,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