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

Unified Diff: runtime/vm/object.cc

Issue 275633002: Grow a class's field array into old space when bulk adding. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index ee749542c7fa05f7076f98638671ad35a7b75f7d..57200006a7ab6f7d512fd35971398f15181b3997 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2807,8 +2807,8 @@ void Class::AddFields(const GrowableObjectArray& new_fields) const {
if (num_new_fields == 0) return;
const Array& arr = Array::Handle(fields());
const intptr_t num_old_fields = arr.Length();
- const Array& new_arr =
- Array::Handle(Array::Grow(arr, num_old_fields + num_new_fields));
+ const Array& new_arr = Array::Handle(
+ Array::Grow(arr, num_old_fields + num_new_fields, Heap::kOld));
Field& field = Field::Handle();
for (intptr_t i = 0; i < num_new_fields; i++) {
field ^= new_fields.At(i);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698