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

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

Issue 10828319: Cleanup handling of NullType in type propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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') | runtime/vm/flow_graph_optimizer.h » ('J')
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 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // generated code. 164 // generated code.
165 intptr_t length = graph_builder.postorder_block_entries().length(); 165 intptr_t length = graph_builder.postorder_block_entries().length();
166 for (intptr_t i = length - 1; i >= 0; --i) { 166 for (intptr_t i = length - 1; i >= 0; --i) {
167 block_order.Add(graph_builder.postorder_block_entries()[i]); 167 block_order.Add(graph_builder.postorder_block_entries()[i]);
168 } 168 }
169 if (optimized) { 169 if (optimized) {
170 FlowGraphOptimizer optimizer(block_order); 170 FlowGraphOptimizer optimizer(block_order);
171 optimizer.ApplyICData(); 171 optimizer.ApplyICData();
172 172
173 // Propagate types and eliminate more type tests. 173 // Propagate types and eliminate more type tests.
174 FlowGraphTypePropagator propagator(parsed_function, block_order); 174 FlowGraphTypePropagator propagator(parsed_function,
175 block_order,
176 optimized && use_ssa);
175 propagator.PropagateTypes(); 177 propagator.PropagateTypes();
176 178
177 // Do optimizations that depend on the propagated type information. 179 // Do optimizations that depend on the propagated type information.
178 optimizer.OptimizeComputations(); 180 optimizer.OptimizeComputations();
179 181
180 if (use_ssa) { 182 if (use_ssa) {
181 // Perform register allocation on the SSA graph. 183 // Perform register allocation on the SSA graph.
182 FlowGraphAllocator allocator(block_order, &graph_builder); 184 FlowGraphAllocator allocator(block_order, &graph_builder);
183 allocator.AllocateRegisters(); 185 allocator.AllocateRegisters();
184 } 186 }
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 result = isolate->object_store()->sticky_error(); 533 result = isolate->object_store()->sticky_error();
532 isolate->object_store()->clear_sticky_error(); 534 isolate->object_store()->clear_sticky_error();
533 isolate->set_long_jump_base(base); 535 isolate->set_long_jump_base(base);
534 return result.raw(); 536 return result.raw();
535 } 537 }
536 UNREACHABLE(); 538 UNREACHABLE();
537 return Object::null(); 539 return Object::null();
538 } 540 }
539 541
540 } // namespace dart 542 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/flow_graph_optimizer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698