Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_compiler.cc (revision 21574) |
| +++ runtime/vm/flow_graph_compiler.cc (working copy) |
| @@ -160,6 +160,8 @@ |
| pc_descriptors_list_ = new DescriptorList(64); |
| exception_handlers_list_ = new ExceptionHandlerList(); |
| block_info_.Clear(); |
| + bool is_leaf = !parsed_function().function().IsClosureFunction() && |
| + is_optimizing(); |
| for (int i = 0; i < block_order_.length(); ++i) { |
| block_info_.Add(new BlockInfo()); |
| if (is_optimizing()) { |
| @@ -185,9 +187,24 @@ |
| may_reoptimize_ = true; |
| break; |
| } |
| + if (is_leaf && !current->IsCheckStackOverflow()) { |
| + // Note that we do no care if the code contains instructions that |
| + // can deoptimize. |
| + LocationSummary* locs = current->locs(); |
| + if (locs != NULL && locs->can_call()) { |
| + is_leaf = false; |
| + } |
| + } |
| } |
| } |
| } |
| + if (is_leaf) { |
| + BlockEntryInstr* entry = block_order_[1]; |
|
Kevin Millikin (Google)
2013/04/18 10:05:28
I don't think we should rely on properties of the
srdjan
2013/04/18 18:15:57
Yes, using: flow_graph_.graph_entry()->normal_entr
|
| + ASSERT(entry != NULL); |
| + CheckStackOverflowInstr* check = entry->next()->AsCheckStackOverflow(); |
| + ASSERT(check != NULL); |
| + check->RemoveFromGraph(); |
| + } |
| } |