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

Unified Diff: runtime/vm/precompiler.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/parser.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 40f150b75111c37f1b06e2e186f0b146f3429459..cc527012e08b09d83ea187d8e5f641c05ada2ed2 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -1772,7 +1772,7 @@ void Precompiler::DropFunctions() {
}
if (retained_functions.Length() > 0) {
- functions = Array::MakeArray(retained_functions);
+ functions = Array::MakeFixedLength(retained_functions);
cls.SetFunctions(functions);
} else {
cls.SetFunctions(Object::empty_array());
@@ -1834,7 +1834,7 @@ void Precompiler::DropFields() {
}
if (retained_fields.Length() > 0) {
- fields = Array::MakeArray(retained_fields);
+ fields = Array::MakeFixedLength(retained_fields);
cls.SetFields(fields);
} else {
cls.SetFields(Object::empty_array());
@@ -1988,7 +1988,7 @@ void Precompiler::TraceTypesFromRetainedClasses() {
intptr_t cid = cls.id();
if ((cid == kMintCid) || (cid == kBigintCid) || (cid == kDoubleCid)) {
// Constants stored as a plain list, no rehashing needed.
- constants = Array::MakeArray(retained_constants);
+ constants = Array::MakeFixedLength(retained_constants);
cls.set_constants(constants);
} else {
// Rehash.
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698