| OLD | NEW |
| 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/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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 ASSERT(other != NULL); | 521 ASSERT(other != NULL); |
| 522 ASSERT(this != other); | 522 ASSERT(this != other); |
| 523 | 523 |
| 524 Value* current = NULL; | 524 Value* current = NULL; |
| 525 Value* next = input_use_list(); | 525 Value* next = input_use_list(); |
| 526 if (next != NULL) { | 526 if (next != NULL) { |
| 527 // Change all the definitions. | 527 // Change all the definitions. |
| 528 while (next != NULL) { | 528 while (next != NULL) { |
| 529 current = next; | 529 current = next; |
| 530 current->set_definition(other); | 530 current->set_definition(other); |
| 531 // Do not discard some useful inferred types. |
| 532 if (current->Type() == this->Type()) { |
| 533 current->SetReachingType(NULL); |
| 534 } |
| 531 next = current->next_use(); | 535 next = current->next_use(); |
| 532 } | 536 } |
| 533 | 537 |
| 534 // Concatenate the lists. | 538 // Concatenate the lists. |
| 535 next = other->input_use_list(); | 539 next = other->input_use_list(); |
| 536 current->set_next_use(next); | 540 current->set_next_use(next); |
| 537 if (next != NULL) next->set_previous_use(current); | 541 if (next != NULL) next->set_previous_use(current); |
| 538 other->set_input_use_list(input_use_list()); | 542 other->set_input_use_list(input_use_list()); |
| 539 set_input_use_list(NULL); | 543 set_input_use_list(NULL); |
| 540 } | 544 } |
| (...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2338 default: | 2342 default: |
| 2339 UNREACHABLE(); | 2343 UNREACHABLE(); |
| 2340 } | 2344 } |
| 2341 return kPowRuntimeEntry; | 2345 return kPowRuntimeEntry; |
| 2342 } | 2346 } |
| 2343 | 2347 |
| 2344 | 2348 |
| 2345 #undef __ | 2349 #undef __ |
| 2346 | 2350 |
| 2347 } // namespace dart | 2351 } // namespace dart |
| OLD | NEW |