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

Unified Diff: runtime/vm/class_finalizer.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/lib/stacktrace.cc ('k') | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 13ac6751d3612cac1c4d2e1a3ea87e1228f3a7be..dccc31a91f44da92e7996b231a71c1ac9255ac57 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -2422,7 +2422,7 @@ void ClassFinalizer::ApplyMixinMembers(const Class& cls) {
cloned_funcs.Add(func);
}
}
- functions = Array::MakeArray(cloned_funcs);
+ functions = Array::MakeFixedLength(cloned_funcs);
cls.SetFunctions(functions);
// Now clone the fields from the mixin class. There should be no
@@ -2657,7 +2657,8 @@ void ClassFinalizer::FinalizeClass(const Class& cls) {
const Class& mixin_cls = Class::Handle(mixin_type.type_class());
CreateForwardingConstructors(cls, mixin_cls, cloned_funcs);
- const Array& functions = Array::Handle(Array::MakeArray(cloned_funcs));
+ const Array& functions =
+ Array::Handle(Array::MakeFixedLength(cloned_funcs));
cls.SetFunctions(functions);
}
// Every class should have at least a constructor, unless it is a top level
« no previous file with comments | « runtime/lib/stacktrace.cc ('k') | runtime/vm/clustered_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698