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

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

Issue 10964012: Revert "A simpler scheme for garbage collection of ureachable phi inputs." (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_builder.h » ('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/flow_graph.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 graph_entry_->DiscoverBlocks(NULL, // Entry block predecessor. 44 graph_entry_->DiscoverBlocks(NULL, // Entry block predecessor.
45 &preorder_, 45 &preorder_,
46 &postorder_, 46 &postorder_,
47 &parent_, 47 &parent_,
48 &assigned_vars_, 48 &assigned_vars_,
49 variable_count(), 49 variable_count(),
50 num_non_copied_params()); 50 num_non_copied_params());
51 // Number blocks in reverse postorder. 51 // Number blocks in reverse postorder.
52 intptr_t block_count = postorder_.length(); 52 intptr_t block_count = postorder_.length();
53 for (intptr_t i = 0; i < block_count; ++i) { 53 for (intptr_t i = 0; i < block_count; ++i) {
54 postorder_[i]->set_block_id(block_count - i - 1);
54 reverse_postorder_.Add(postorder_[block_count - i - 1]); 55 reverse_postorder_.Add(postorder_[block_count - i - 1]);
55 } 56 }
56 // Link instructions backwards for optimized compilation. 57 // Link instructions backwards for optimized compilation.
57 // TODO(zerny): The builder should do this at construction time. 58 // TODO(zerny): The builder should do this at construction time.
58 for (intptr_t i = 0; i < block_count; ++i) { 59 for (intptr_t i = 0; i < block_count; ++i) {
59 BlockEntryInstr* entry = postorder_[i]; 60 BlockEntryInstr* entry = postorder_[i];
60 Instruction* previous = entry; 61 Instruction* previous = entry;
61 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) { 62 for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
62 Instruction* current = it.Current(); 63 Instruction* current = it.Current();
63 current->set_previous(previous); 64 current->set_previous(previous);
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 // TODO(zerny): Support multiple exits. 790 // TODO(zerny): Support multiple exits.
790 UNREACHABLE(); 791 UNREACHABLE();
791 } 792 }
792 793
793 // TODO(zerny): Adjust pre/post orders. 794 // TODO(zerny): Adjust pre/post orders.
794 // TODO(zerny): Update dominator tree. 795 // TODO(zerny): Update dominator tree.
795 } 796 }
796 797
797 798
798 } // namespace dart 799 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698