| Index: runtime/vm/flow_graph_builder.cc
|
| diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
|
| index a736ab9ca89700e3b68bb64d83035a14df68a182..e9ff37ce15fb8da9f8f9514575b43b69bd21a544 100644
|
| --- a/runtime/vm/flow_graph_builder.cc
|
| +++ b/runtime/vm/flow_graph_builder.cc
|
| @@ -2605,7 +2605,10 @@ FlowGraph* FlowGraphBuilder::BuildGraph(InliningContext context) {
|
| }
|
| // TODO(kmillikin): We can eliminate stack checks in some cases (e.g., the
|
| // stack check on entry for leaf routines).
|
| - for_effect.Do(new CheckStackOverflowInstr(function.token_pos()));
|
| + Definition* check = new CheckStackOverflowInstr(function.token_pos());
|
| + // If we are inlining don't actually attach the stack check. We must still
|
| + // create the stack check inorder to allocate a deopt id.
|
| + if (!InInliningContext()) for_effect.Do(check);
|
| parsed_function().node_sequence()->Visit(&for_effect);
|
| AppendFragment(normal_entry, for_effect);
|
| // Check that the graph is properly terminated.
|
|
|