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

Side by Side Diff: runtime/vm/compiler.cc

Issue 11312105: Do not inline static calls that have not been executed in unoptimized code: the inlined function do… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/code_generator.h" 10 #include "vm/code_generator.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 FlowGraphOptimizer optimizer(flow_graph); 176 FlowGraphOptimizer optimizer(flow_graph);
177 optimizer.ApplyICData(); 177 optimizer.ApplyICData();
178 178
179 // Compute the use lists. 179 // Compute the use lists.
180 flow_graph->ComputeUseLists(); 180 flow_graph->ComputeUseLists();
181 181
182 // Inlining (mutates the flow graph) 182 // Inlining (mutates the flow graph)
183 if (FLAG_use_inlining) { 183 if (FLAG_use_inlining) {
184 TimerScope timer(FLAG_compiler_stats, 184 TimerScope timer(FLAG_compiler_stats,
185 &CompilerStats::graphinliner_timer); 185 &CompilerStats::graphinliner_timer);
186 FlowGraphInliner inliner(flow_graph); 186 const Code& unoptimized_code =
187 Code::Handle(parsed_function.function().unoptimized_code());
188 GrowableArray<intptr_t> uncalled_static_calls_deopt_ids;
189 unoptimized_code.ExtractUncalledStaticCallDeoptIds(
190 &uncalled_static_calls_deopt_ids);
191 FlowGraphInliner inliner(flow_graph, uncalled_static_calls_deopt_ids);
187 inliner.Inline(); 192 inliner.Inline();
188 // Use lists are maintained and validated by the inliner. 193 // Use lists are maintained and validated by the inliner.
189 } 194 }
190 195
191 // Propagate types and eliminate more type tests. 196 // Propagate types and eliminate more type tests.
192 if (FLAG_propagate_types) { 197 if (FLAG_propagate_types) {
193 FlowGraphTypePropagator propagator(flow_graph); 198 FlowGraphTypePropagator propagator(flow_graph);
194 propagator.PropagateTypes(); 199 propagator.PropagateTypes();
195 } 200 }
196 201
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 result = isolate->object_store()->sticky_error(); 609 result = isolate->object_store()->sticky_error();
605 isolate->object_store()->clear_sticky_error(); 610 isolate->object_store()->clear_sticky_error();
606 isolate->set_long_jump_base(base); 611 isolate->set_long_jump_base(base);
607 return result.raw(); 612 return result.raw();
608 } 613 }
609 UNREACHABLE(); 614 UNREACHABLE();
610 return Object::null(); 615 return Object::null();
611 } 616 }
612 617
613 } // namespace dart 618 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_inliner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698