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

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

Issue 10879041: Validate well-formedness of the use lists in debug mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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.h » ('j') | runtime/vm/flow_graph.cc » ('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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 FlowGraphOptimizer optimizer(flow_graph); 186 FlowGraphOptimizer optimizer(flow_graph);
187 optimizer.ApplyICData(); 187 optimizer.ApplyICData();
188 188
189 // Compute the use lists. 189 // Compute the use lists.
190 flow_graph->ComputeUseLists(); 190 flow_graph->ComputeUseLists();
191 191
192 // Propagate types and eliminate more type tests. 192 // Propagate types and eliminate more type tests.
193 FlowGraphTypePropagator propagator(*flow_graph); 193 FlowGraphTypePropagator propagator(*flow_graph);
194 propagator.PropagateTypes(); 194 propagator.PropagateTypes();
195 195
196 // TODO(zerny): Here we assume that the use lists remain valid after 196 // Verify that the use lists are still valid.
197 // type propagation. We should construct a use-list validator to make 197 DEBUG_ASSERT(flow_graph->ValidateUseLists());
198 // this explicit in DEBUG mode.
199 198
200 // Do optimizations that depend on the propagated type information. 199 // Do optimizations that depend on the propagated type information.
201 optimizer.OptimizeComputations(); 200 optimizer.OptimizeComputations();
202 201
203 if (FLAG_cse) { 202 if (FLAG_cse) {
204 DominatorBasedCSE::Optimize(flow_graph->graph_entry()); 203 DominatorBasedCSE::Optimize(flow_graph->graph_entry());
205 } 204 }
206 205
207 // Perform register allocation on the SSA graph. 206 // Perform register allocation on the SSA graph.
208 FlowGraphAllocator allocator(*flow_graph); 207 FlowGraphAllocator allocator(*flow_graph);
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 result = isolate->object_store()->sticky_error(); 560 result = isolate->object_store()->sticky_error();
562 isolate->object_store()->clear_sticky_error(); 561 isolate->object_store()->clear_sticky_error();
563 isolate->set_long_jump_base(base); 562 isolate->set_long_jump_base(base);
564 return result.raw(); 563 return result.raw();
565 } 564 }
566 UNREACHABLE(); 565 UNREACHABLE();
567 return Object::null(); 566 return Object::null();
568 } 567 }
569 568
570 } // namespace dart 569 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.h » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698