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

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

Issue 10916139: Fix a small but embarassing braino. (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 | no next file » | 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/dart_entry.h" 8 #include "vm/dart_entry.h"
9 #include "vm/flow_graph_allocator.h" 9 #include "vm/flow_graph_allocator.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 Value* current = env_use_list_; 414 Value* current = env_use_list_;
415 env_use_list_ = env_use_list_->next_use(); 415 env_use_list_ = env_use_list_->next_use();
416 current->set_definition(other); 416 current->set_definition(other);
417 current->AddToEnvUseList(); 417 current->AddToEnvUseList();
418 } 418 }
419 } 419 }
420 420
421 421
422 void Definition::ReplaceWith(Definition* other, 422 void Definition::ReplaceWith(Definition* other,
423 ForwardInstructionIterator* iterator) { 423 ForwardInstructionIterator* iterator) {
424 if ((iterator != NULL) && (other == iterator->Current())) { 424 if ((iterator != NULL) && (this == iterator->Current())) {
425 iterator->ReplaceCurrentWith(other); 425 iterator->ReplaceCurrentWith(other);
426 } else { 426 } else {
427 ReplaceUsesWith(other); 427 ReplaceUsesWith(other);
428 ASSERT(other->env() == NULL); 428 ASSERT(other->env() == NULL);
429 other->set_env(env()); 429 other->set_env(env());
430 set_env(NULL); 430 set_env(NULL);
431 ASSERT(!other->HasSSATemp()); 431 ASSERT(!other->HasSSATemp());
432 if (HasSSATemp()) other->set_ssa_temp_index(ssa_temp_index()); 432 if (HasSSATemp()) other->set_ssa_temp_index(ssa_temp_index());
433 433
434 other->set_previous(previous()); 434 other->set_previous(previous());
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 value->set_use_index(i); 1597 value->set_use_index(i);
1598 value->AddToEnvUseList(); 1598 value->AddToEnvUseList();
1599 } 1599 }
1600 instr->set_env(copy); 1600 instr->set_env(copy);
1601 } 1601 }
1602 1602
1603 1603
1604 #undef __ 1604 #undef __
1605 1605
1606 } // namespace dart 1606 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698