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

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

Issue 12374024: Fix factory name to result cid mapping, run type propagation once more after constant propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 months 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_builder.cc » ('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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 209 DEBUG_ASSERT(flow_graph->VerifyUseLists());
210 210
211 if (FLAG_constant_propagation) { 211 if (FLAG_constant_propagation) {
212 ConstantPropagator::Optimize(flow_graph); 212 ConstantPropagator::Optimize(flow_graph);
213 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 213 DEBUG_ASSERT(flow_graph->VerifyUseLists());
214 // A canonicalization pass to remove e.g. smi checks on smi constants. 214 // A canonicalization pass to remove e.g. smi checks on smi constants.
215 optimizer.Canonicalize(); 215 optimizer.Canonicalize();
216 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 216 DEBUG_ASSERT(flow_graph->VerifyUseLists());
217 } 217 }
218 218
219 // Propagate types and eliminate even more type tests.
220 if (FLAG_propagate_types) {
221 FlowGraphTypePropagator propagator(flow_graph);
222 propagator.Propagate();
223 DEBUG_ASSERT(flow_graph->VerifyUseLists());
224 }
225
219 // Unbox doubles. Performed after constant propagation to minimize 226 // Unbox doubles. Performed after constant propagation to minimize
220 // interference from phis merging double values and tagged 227 // interference from phis merging double values and tagged
221 // values comming from dead paths. 228 // values comming from dead paths.
222 optimizer.SelectRepresentations(); 229 optimizer.SelectRepresentations();
223 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 230 DEBUG_ASSERT(flow_graph->VerifyUseLists());
224 231
225 if (FLAG_common_subexpression_elimination) { 232 if (FLAG_common_subexpression_elimination) {
226 if (DominatorBasedCSE::Optimize(flow_graph)) { 233 if (DominatorBasedCSE::Optimize(flow_graph)) {
227 DEBUG_ASSERT(flow_graph->VerifyUseLists()); 234 DEBUG_ASSERT(flow_graph->VerifyUseLists());
228 // Do another round of CSE to take secondary effects into account: 235 // Do another round of CSE to take secondary effects into account:
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 Object::Handle(isolate->object_store()->sticky_error()); 658 Object::Handle(isolate->object_store()->sticky_error());
652 isolate->object_store()->clear_sticky_error(); 659 isolate->object_store()->clear_sticky_error();
653 isolate->set_long_jump_base(base); 660 isolate->set_long_jump_base(base);
654 return result.raw(); 661 return result.raw();
655 } 662 }
656 UNREACHABLE(); 663 UNREACHABLE();
657 return Object::null(); 664 return Object::null();
658 } 665 }
659 666
660 } // namespace dart 667 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698