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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 39693)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -918,17 +918,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(ECX, ic_data);
__ LeaveFrame(); // The arguments are still on the stack.
- __ jmp(&stub_code->CallNoSuchMethodFunctionLabel());
+ __ jmp(&isolate()->stub_code()->CallClosureNoSuchMethodLabel());
// The noSuchMethod call may return to the caller, but not here.
- __ int3();
} else if (check_correct_named_args) {
__ Stop("Wrong arguments");
}
@@ -1063,21 +1055,9 @@
__ 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(ECX, ic_data);
__ LeaveFrame(); // The arguments are still on the stack.
- __ jmp(&stub_code->CallNoSuchMethodFunctionLabel());
+ __ jmp(&stub_code->CallClosureNoSuchMethodLabel());
// The noSuchMethod call may return to the caller, but not here.
- __ int3();
} else {
__ Stop("Wrong number of arguments");
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm64.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698