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

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

Issue 10377104: Compute assigned variables and dominance frontiers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
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 #ifndef VM_FLOW_GRAPH_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 26 matching lines...) Expand all
37 intptr_t AllocateTryIndex() { return ++last_used_try_index_; } 37 intptr_t AllocateTryIndex() { return ++last_used_try_index_; }
38 38
39 // Manage the currently active try index. 39 // Manage the currently active try index.
40 void set_try_index(intptr_t value) { try_index_ = value; } 40 void set_try_index(intptr_t value) { try_index_ = value; }
41 intptr_t try_index() const { return try_index_; } 41 intptr_t try_index() const { return try_index_; }
42 42
43 void AddCatchEntry(intptr_t try_index, Instruction* entry); 43 void AddCatchEntry(intptr_t try_index, Instruction* entry);
44 44
45 private: 45 private:
46 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder, 46 void ComputeDominators(GrowableArray<BlockEntryInstr*>* preorder,
47 GrowableArray<intptr_t>* parent); 47 GrowableArray<intptr_t>* parent,
48 GrowableArray<BitVector*>* dominance_frontier);
49
48 void CompressPath(intptr_t start_index, 50 void CompressPath(intptr_t start_index,
49 intptr_t current_index, 51 intptr_t current_index,
50 GrowableArray<intptr_t>* parent, 52 GrowableArray<intptr_t>* parent,
51 GrowableArray<intptr_t>* label); 53 GrowableArray<intptr_t>* label);
52 54
53 const ParsedFunction& parsed_function_; 55 const ParsedFunction& parsed_function_;
54 GrowableArray<BlockEntryInstr*> preorder_block_entries_; 56 GrowableArray<BlockEntryInstr*> preorder_block_entries_;
55 GrowableArray<BlockEntryInstr*> postorder_block_entries_; 57 GrowableArray<BlockEntryInstr*> postorder_block_entries_;
56 intptr_t context_level_; 58 intptr_t context_level_;
57 intptr_t last_used_try_index_; 59 intptr_t last_used_try_index_;
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 // Output parameters. 287 // Output parameters.
286 TargetEntryInstr** true_successor_address_; 288 TargetEntryInstr** true_successor_address_;
287 TargetEntryInstr** false_successor_address_; 289 TargetEntryInstr** false_successor_address_;
288 290
289 intptr_t condition_token_index_; 291 intptr_t condition_token_index_;
290 }; 292 };
291 293
292 } // namespace dart 294 } // namespace dart
293 295
294 #endif // VM_FLOW_GRAPH_BUILDER_H_ 296 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698