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

Unified Diff: runtime/vm/code_generator_test.cc

Issue 1307943008: Make default_parameter_values a ZoneGrowableArray instead of an array in new space (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: r Created 5 years, 4 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/code_descriptors_test.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator_test.cc
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index 90c1360d6f5a2e0d4e4e3dbd7f44d3ad4b241504..aac931182efef3aaf06d2dee6e4ee46e50fc83b1 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -209,8 +209,9 @@ CODEGEN_TEST_GENERATE(NativeDecCodegen, test) {
local_scope->InsertParameterAt(0, NewTestLocalVariable("a"));
local_scope->InsertParameterAt(1, NewTestLocalVariable("b"));
ASSERT(local_scope->num_variables() == num_params);
- const Array& default_values = Array::ZoneHandle(Array::New(num_opt_params));
- default_values.SetAt(0, Smi::ZoneHandle(Smi::New(1))); // b = 1.
+ ZoneGrowableArray<const Instance*>* default_values =
+ new ZoneGrowableArray<const Instance*>(num_opt_params);
+ default_values->Add(&Smi::ZoneHandle(Smi::New(1))); // b = 1.
test->set_default_parameter_values(default_values);
const Function& function = test->function();
function.set_is_native(true);
@@ -383,10 +384,11 @@ CODEGEN_TEST_GENERATE(NativeSumCodegen, test) {
local_scope->InsertParameterAt(3, NewTestLocalVariable("d"));
local_scope->InsertParameterAt(4, NewTestLocalVariable("e"));
ASSERT(local_scope->num_variables() == num_params);
- const Array& default_values = Array::ZoneHandle(Array::New(num_opt_params));
- default_values.SetAt(0, Smi::ZoneHandle(Smi::New(10)));
- default_values.SetAt(1, Smi::ZoneHandle(Smi::New(21)));
- default_values.SetAt(2, Smi::ZoneHandle(Smi::New(-32)));
+ ZoneGrowableArray<const Instance*>* default_values =
+ new ZoneGrowableArray<const Instance*>(num_opt_params);
+ default_values->Add(&Smi::ZoneHandle(Smi::New(10)));
+ default_values->Add(&Smi::ZoneHandle(Smi::New(21)));
+ default_values->Add(&Smi::ZoneHandle(Smi::New(-32)));
test->set_default_parameter_values(default_values);
const Function& function = test->function();
function.set_is_native(true);
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698