| Index: runtime/vm/flow_graph_compiler_arm.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_arm.cc (revision 24189)
|
| +++ runtime/vm/flow_graph_compiler_arm.cc (working copy)
|
| @@ -1067,7 +1067,8 @@
|
| ASSERT(!parsed_function().function().HasOptionalParameters());
|
| const bool check_arguments = true;
|
| #else
|
| - const bool check_arguments = function.IsClosureFunction();
|
| + const bool check_arguments =
|
| + function.IsClosureFunction() || function.IsNoSuchMethodDispatcher();
|
| #endif
|
| if (check_arguments) {
|
| __ Comment("Check argument count");
|
| @@ -1081,7 +1082,7 @@
|
| __ cmp(R0, ShifterOperand(R1));
|
| __ b(&correct_num_arguments, EQ);
|
| __ Bind(&wrong_num_arguments);
|
| - if (function.IsClosureFunction()) {
|
| + if (function.IsClosureFunction() || function.IsNoSuchMethodDispatcher()) {
|
| if (StackSize() != 0) {
|
| // We need to unwind the space we reserved for locals and copied
|
| // parameters. The NoSuchMethodFunction stub does not expect to see
|
| @@ -1092,11 +1093,15 @@
|
| // dropped the spill slots.
|
| BitmapBuilder* empty_stack_bitmap = new BitmapBuilder();
|
|
|
| - // Invoke noSuchMethod function passing "call" as the function name.
|
| + // 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, Symbols::Call(),
|
| - Isolate::kNoDeoptId, kNumArgsChecked));
|
| + ICData::New(function, name, Isolate::kNoDeoptId, kNumArgsChecked));
|
| __ LoadObject(R5, ic_data);
|
| // FP - 4 : saved PP, object pool pointer of caller.
|
| // FP + 0 : previous frame pointer.
|
|
|