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

Unified Diff: runtime/vm/object_test.cc

Issue 2949803002: New growth strategy for growable arrays (Closed)
Patch Set: Branch-free grow size computation. Renamed function names to be clearer. Created 3 years, 6 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 6e8de6bbc95b272e6a257b5bf659a5b052e0e86f..8d172fd2ecb78e0d02337c027a2abdf616a19ca7 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 MakeArray functionality to make sure the resulting array
+ // Test the MakeFixedLength 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::MakeArray(array);
+ new_array = Array::MakeFixedLength(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::MakeArray(array);
+ new_array = Array::MakeFixedLength(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::MakeArray(array);
+ new_array = Array::MakeFixedLength(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::MakeArray(array);
+ new_array = Array::MakeFixedLength(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