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

Unified Diff: runtime/vm/debugger.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/dart_api_impl.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index c17028f2c0c83b1fa16a41686f440efb35a4d7f8..96eea3b9a8c72e516d3cd71e8225758be78a66e7 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -1375,8 +1375,9 @@ RawObject* ActivationFrame::Evaluate(const String& expr,
if (function().is_static()) {
const Class& cls = Class::Handle(function().Owner());
- return cls.Evaluate(expr, Array::Handle(Array::MakeArray(param_names)),
- Array::Handle(Array::MakeArray(param_values)));
+ return cls.Evaluate(expr,
+ Array::Handle(Array::MakeFixedLength(param_names)),
+ Array::Handle(Array::MakeFixedLength(param_values)));
} else {
const Object& receiver = Object::Handle(GetReceiver());
const Class& method_cls = Class::Handle(function().origin());
@@ -1386,8 +1387,8 @@ RawObject* ActivationFrame::Evaluate(const String& expr,
}
const Instance& inst = Instance::Cast(receiver);
return inst.Evaluate(method_cls, expr,
- Array::Handle(Array::MakeArray(param_names)),
- Array::Handle(Array::MakeArray(param_values)));
+ Array::Handle(Array::MakeFixedLength(param_names)),
+ Array::Handle(Array::MakeFixedLength(param_values)));
}
UNREACHABLE();
return Object::null();
@@ -3175,7 +3176,7 @@ RawArray* Debugger::GetInstanceFields(const Instance& obj) {
}
cls = cls.SuperClass();
}
- return Array::MakeArray(field_list);
+ return Array::MakeFixedLength(field_list);
}
@@ -3195,7 +3196,7 @@ RawArray* Debugger::GetStaticFields(const Class& cls) {
field_list.Add(field_value);
}
}
- return Array::MakeArray(field_list);
+ return Array::MakeFixedLength(field_list);
}
@@ -3243,7 +3244,7 @@ RawArray* Debugger::GetLibraryFields(const Library& lib) {
const GrowableObjectArray& field_list =
GrowableObjectArray::Handle(GrowableObjectArray::New(8));
CollectLibraryFields(field_list, lib, String::Handle(zone), true);
- return Array::MakeArray(field_list);
+ return Array::MakeFixedLength(field_list);
}
@@ -3272,7 +3273,7 @@ RawArray* Debugger::GetGlobalFields(const Library& lib) {
CollectLibraryFields(field_list, imported, prefix_name, false);
}
}
- return Array::MakeArray(field_list);
+ return Array::MakeFixedLength(field_list);
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698