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

Unified Diff: runtime/vm/code_generator_test.cc

Issue 11360116: Pass closure object as first implicit argument to closure functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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_generator.cc ('k') | runtime/vm/code_patcher_ia32_test.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
===================================================================
--- runtime/vm/code_generator_test.cc (revision 14694)
+++ runtime/vm/code_generator_test.cc (working copy)
@@ -216,20 +216,18 @@
default_values.SetAt(0, Smi::ZoneHandle(Smi::New(1))); // b = 1.
test->set_default_parameter_values(default_values);
const Function& function = test->function();
+ function.set_is_native(true);
function.set_num_fixed_parameters(num_fixed_params);
function.SetNumOptionalParameters(num_opt_params, true);
- const bool has_opt_params = true;
const String& native_name =
String::ZoneHandle(Symbols::New("TestSmiSub"));
NativeFunction native_function =
reinterpret_cast<NativeFunction>(TestSmiSub);
node_seq->Add(new ReturnNode(kPos,
new NativeBodyNode(kPos,
+ function,
native_name,
- native_function,
- num_params,
- has_opt_params,
- false)));
+ native_function)));
}
@@ -392,6 +390,7 @@
default_values.SetAt(2, Smi::ZoneHandle(Smi::New(-32)));
test->set_default_parameter_values(default_values);
const Function& function = test->function();
+ function.set_is_native(true);
function.set_num_fixed_parameters(num_fixed_params);
function.SetNumOptionalParameters(num_opt_params, true);
function.set_parameter_types(Array::Handle(Array::New(num_params)));
@@ -400,18 +399,15 @@
for (int i = 0; i < num_params - 1; i++) {
function.SetParameterTypeAt(i, param_type);
}
- const bool has_opt_params = true;
const String& native_name =
String::ZoneHandle(Symbols::New("TestSmiSum"));
NativeFunction native_function =
reinterpret_cast<NativeFunction>(TestSmiSum);
node_seq->Add(new ReturnNode(kPos,
new NativeBodyNode(kPos,
+ function,
native_name,
- native_function,
- num_params,
- has_opt_params,
- false)));
+ native_function)));
}
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_patcher_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698