| Index: runtime/vm/flow_graph_compiler_ia32.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
|
| index 6c45f5938ce2eab4b928f36aebb9542553c1db3b..8580816c0abb120ce96d3765eccfbe1e260f8668 100644
|
| --- a/runtime/vm/flow_graph_compiler_ia32.cc
|
| +++ b/runtime/vm/flow_graph_compiler_ia32.cc
|
| @@ -884,7 +884,7 @@ void FlowGraphCompiler::CopyParameters() {
|
| }
|
|
|
| __ Bind(&wrong_num_arguments);
|
| - if (function.IsClosureFunction()) {
|
| + if (function.IsClosureFunction() || function.IsConvertedClosureFunction()) {
|
| __ LeaveFrame(); // The arguments are still on the stack.
|
| __ Jmp(*StubCode::CallClosureNoSuchMethod_entry());
|
| // The noSuchMethod call may return to the caller, but not here.
|
| @@ -991,8 +991,9 @@ void FlowGraphCompiler::CompileGraph() {
|
| // No such checking code is generated if only fixed parameters are declared,
|
| // unless we are in debug mode or unless we are compiling a closure.
|
| if (num_copied_params == 0) {
|
| - const bool check_arguments =
|
| - function.IsClosureFunction() && !flow_graph().IsCompiledForOsr();
|
| + const bool check_arguments = (function.IsClosureFunction() ||
|
| + function.IsConvertedClosureFunction()) &&
|
| + !flow_graph().IsCompiledForOsr();
|
| if (check_arguments) {
|
| __ Comment("Check argument count");
|
| // Check that exactly num_fixed arguments are passed in.
|
|
|