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

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

Issue 12335063: Add functions for setting an environment and rebinding a use. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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) 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 #include "vm/flow_graph_allocator.h" 5 #include "vm/flow_graph_allocator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/il_printer.h" 9 #include "vm/il_printer.h"
10 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 continue; 113 continue;
114 } 114 }
115 115
116 PhiInstr* phi = def->AsPhi(); 116 PhiInstr* phi = def->AsPhi();
117 if ((phi != NULL) && !phi->is_alive()) { 117 if ((phi != NULL) && !phi->is_alive()) {
118 it.SetCurrentValue(new Value(constant_null)); 118 it.SetCurrentValue(new Value(constant_null));
119 continue; 119 continue;
120 } 120 }
121 } 121 }
122 } else { 122 } else {
123 current->set_env(NULL); 123 current->RemoveEnvironment();
124 } 124 }
125 } 125 }
126 } 126 }
127 } 127 }
128 128
129 129
130 void FlowGraphAllocator::ComputeInitialSets() { 130 void FlowGraphAllocator::ComputeInitialSets() {
131 const intptr_t block_count = postorder_.length(); 131 const intptr_t block_count = postorder_.length();
132 for (intptr_t i = 0; i < block_count; i++) { 132 for (intptr_t i = 0; i < block_count; i++) {
133 BlockEntryInstr* block = postorder_[i]; 133 BlockEntryInstr* block = postorder_[i];
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2511 OS::Print("-- [after ssa allocator] ir [%s] -------------\n", 2511 OS::Print("-- [after ssa allocator] ir [%s] -------------\n",
2512 function.ToFullyQualifiedCString()); 2512 function.ToFullyQualifiedCString());
2513 FlowGraphPrinter printer(flow_graph_, true); 2513 FlowGraphPrinter printer(flow_graph_, true);
2514 printer.PrintBlocks(); 2514 printer.PrintBlocks();
2515 OS::Print("----------------------------------------------\n"); 2515 OS::Print("----------------------------------------------\n");
2516 } 2516 }
2517 } 2517 }
2518 2518
2519 2519
2520 } // namespace dart 2520 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698