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

Unified Diff: runtime/vm/flow_graph_compiler_arm.cc

Issue 517383005: VM: Clean up generated code for NoSuchMethod invocation of closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
Index: runtime/vm/flow_graph_compiler_arm.cc
===================================================================
--- runtime/vm/flow_graph_compiler_arm.cc (revision 39693)
+++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
@@ -895,17 +895,9 @@
__ Bind(&wrong_num_arguments);
if (function.IsClosureFunction()) {
- // Invoke noSuchMethod function passing "call" as the original name.
- StubCode* stub_code = isolate()->stub_code();
- const int kNumArgsChecked = 1;
- const ICData& ic_data = ICData::ZoneHandle(
- ICData::New(function, Symbols::Call(), Object::empty_array(),
- Isolate::kNoDeoptId, kNumArgsChecked));
- __ LoadObject(R5, ic_data);
__ LeaveDartFrame(); // The arguments are still on the stack.
- __ Branch(&stub_code->CallNoSuchMethodFunctionLabel());
+ __ Branch(&isolate()->stub_code()->CallNoSuchMethodFunctionLabel());
// The noSuchMethod call may return to the caller, but not here.
- __ bkpt(0);
} else if (check_correct_named_args) {
__ Stop("Wrong arguments");
}
@@ -1057,21 +1049,9 @@
__ b(&correct_num_arguments, EQ);
__ Bind(&wrong_num_arguments);
if (function.IsClosureFunction()) {
- // Invoke noSuchMethod function passing the original function name.
- // For closure functions, use "call" as the original name.
- const String& name =
- String::Handle(function.IsClosureFunction()
- ? Symbols::Call().raw()
- : function.name());
- const int kNumArgsChecked = 1;
- const ICData& ic_data = ICData::ZoneHandle(
- ICData::New(function, name, Object::empty_array(),
- Isolate::kNoDeoptId, kNumArgsChecked));
- __ LoadObject(R5, ic_data);
__ LeaveDartFrame(); // The arguments are still on the stack.
- __ Branch(&stub_code->CallNoSuchMethodFunctionLabel());
+ __ Branch(&isolate()->stub_code()->CallNoSuchMethodFunctionLabel());
// The noSuchMethod call may return to the caller, but not here.
- __ bkpt(0);
} else {
__ Stop("Wrong number of arguments");
}

Powered by Google App Engine
This is Rietveld 408576698