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

Unified Diff: runtime/vm/object_test.cc

Issue 2968003004: Revert "The current growth strategy for growable arrays allocates a backing array of size 2 at (emp… (Closed)
Patch Set: Created 3 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 | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 3a78c140ee201a9fb247c66b43b3070f6da08453..56051fdcf8dda5b79122e2e1fde080cb9ed1104a 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2148,7 +2148,7 @@ ISOLATE_UNIT_TEST_CASE(GrowableObjectArray) {
EXPECT(value.Equals(expected_value));
}
- // Test the MakeFixedLength functionality to make sure the resulting array
+ // Test the MakeArray functionality to make sure the resulting array
// object is properly setup.
// 1. Should produce an array of length 2 and a left over int8 array.
Array& new_array = Array::Handle();
@@ -2165,7 +2165,7 @@ ISOLATE_UNIT_TEST_CASE(GrowableObjectArray) {
array.Add(value);
}
used_size = Array::InstanceSize(array.Length());
- new_array = Array::MakeFixedLength(array);
+ new_array = Array::MakeArray(array);
addr = RawObject::ToAddr(new_array.raw());
obj = RawObject::FromAddr(addr);
EXPECT(obj.IsArray());
@@ -2186,7 +2186,7 @@ ISOLATE_UNIT_TEST_CASE(GrowableObjectArray) {
array.Add(value);
}
used_size = Array::InstanceSize(array.Length());
- new_array = Array::MakeFixedLength(array);
+ new_array = Array::MakeArray(array);
addr = RawObject::ToAddr(new_array.raw());
obj = RawObject::FromAddr(addr);
EXPECT(obj.IsArray());
@@ -2207,7 +2207,7 @@ ISOLATE_UNIT_TEST_CASE(GrowableObjectArray) {
array.Add(value);
}
used_size = Array::InstanceSize(array.Length());
- new_array = Array::MakeFixedLength(array);
+ new_array = Array::MakeArray(array);
addr = RawObject::ToAddr(new_array.raw());
obj = RawObject::FromAddr(addr);
EXPECT(obj.IsArray());
@@ -2229,7 +2229,7 @@ ISOLATE_UNIT_TEST_CASE(GrowableObjectArray) {
Heap* heap = Isolate::Current()->heap();
heap->CollectAllGarbage();
intptr_t capacity_before = heap->CapacityInWords(Heap::kOld);
- new_array = Array::MakeFixedLength(array);
+ new_array = Array::MakeArray(array);
EXPECT_EQ(1, new_array.Length());
heap->CollectAllGarbage();
intptr_t capacity_after = heap->CapacityInWords(Heap::kOld);
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698