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

Side by Side Diff: runtime/vm/flow_graph.h

Issue 617933003: Iterative graph traversal in FlowGraph::DiscoverBlocks() (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #ifndef VM_FLOW_GRAPH_H_ 5 #ifndef VM_FLOW_GRAPH_H_
6 #define VM_FLOW_GRAPH_H_ 6 #define VM_FLOW_GRAPH_H_
7 7
8 #include "vm/growable_array.h" 8 #include "vm/growable_array.h"
9 #include "vm/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/intermediate_language.h" 10 #include "vm/intermediate_language.h"
(...skipping 24 matching lines...) Expand all
35 bool Done() const { return current_ >= block_order_.length(); } 35 bool Done() const { return current_ >= block_order_.length(); }
36 36
37 BlockEntryInstr* Current() const { return block_order_[current_]; } 37 BlockEntryInstr* Current() const { return block_order_[current_]; }
38 38
39 private: 39 private:
40 const GrowableArray<BlockEntryInstr*>& block_order_; 40 const GrowableArray<BlockEntryInstr*>& block_order_;
41 intptr_t current_; 41 intptr_t current_;
42 }; 42 };
43 43
44 44
45 struct BlockEntryEdge {
46 BlockEntryEdge(BlockEntryInstr* parent, BlockEntryInstr* child)
47 : parent(parent),
48 child(child) { }
49 BlockEntryInstr* parent;
50 BlockEntryInstr* child;
51
52 DISALLOW_ALLOCATION();
53 };
54
55
45 struct ConstantPoolTrait { 56 struct ConstantPoolTrait {
46 typedef ConstantInstr* Value; 57 typedef ConstantInstr* Value;
47 typedef const Object& Key; 58 typedef const Object& Key;
48 typedef ConstantInstr* Pair; 59 typedef ConstantInstr* Pair;
49 60
50 static Key KeyOf(Pair kv) { 61 static Key KeyOf(Pair kv) {
51 return kv->value(); 62 return kv->value();
52 } 63 }
53 64
54 static Value ValueOf(Pair kv) { 65 static Value ValueOf(Pair kv) {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 // Per block sets of available blocks. Block A is available at the block B if 450 // Per block sets of available blocks. Block A is available at the block B if
440 // and only if A dominates B and all paths from A to B are free of side 451 // and only if A dominates B and all paths from A to B are free of side
441 // effects. 452 // effects.
442 GrowableArray<BitVector*> available_at_; 453 GrowableArray<BitVector*> available_at_;
443 }; 454 };
444 455
445 456
446 } // namespace dart 457 } // namespace dart
447 458
448 #endif // VM_FLOW_GRAPH_H_ 459 #endif // VM_FLOW_GRAPH_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | runtime/vm/flow_graph.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698