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/flow_graph_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 insert_before = | 595 insert_before = |
596 phi->block()->PredecessorAt(use->use_index())->last_instruction(); | 596 phi->block()->PredecessorAt(use->use_index())->last_instruction(); |
597 deopt_target = NULL; | 597 deopt_target = NULL; |
598 } else { | 598 } else { |
599 deopt_target = insert_before = use->instruction(); | 599 deopt_target = insert_before = use->instruction(); |
600 } | 600 } |
601 | 601 |
602 Definition* converted = NULL; | 602 Definition* converted = NULL; |
603 if ((from == kTagged) && (to == kUnboxedMint)) { | 603 if ((from == kTagged) && (to == kUnboxedMint)) { |
604 ASSERT((deopt_target != NULL) || | 604 ASSERT((deopt_target != NULL) || |
605 (use->Type()->ToCid() == kDoubleCid)); | 605 (use->Type()->ToCid() == kUnboxedMint)); |
606 const intptr_t deopt_id = (deopt_target != NULL) ? | 606 const intptr_t deopt_id = (deopt_target != NULL) ? |
607 deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId; | 607 deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId; |
608 converted = new UnboxIntegerInstr(use->CopyWithType(), deopt_id); | 608 converted = new UnboxIntegerInstr(use->CopyWithType(), deopt_id); |
609 | 609 |
610 } else if ((from == kUnboxedMint) && (to == kTagged)) { | 610 } else if ((from == kUnboxedMint) && (to == kTagged)) { |
611 converted = new BoxIntegerInstr(use->CopyWithType()); | 611 converted = new BoxIntegerInstr(use->CopyWithType()); |
612 | 612 |
613 } else if (from == kUnboxedMint && to == kUnboxedDouble) { | 613 } else if (from == kUnboxedMint && to == kUnboxedDouble) { |
614 ASSERT(CanUnboxDouble()); | 614 ASSERT(CanUnboxDouble()); |
615 // Convert by boxing/unboxing. | 615 // Convert by boxing/unboxing. |
(...skipping 9082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9698 } | 9698 } |
9699 | 9699 |
9700 // Insert materializations at environment uses. | 9700 // Insert materializations at environment uses. |
9701 for (intptr_t i = 0; i < exits.length(); i++) { | 9701 for (intptr_t i = 0; i < exits.length(); i++) { |
9702 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *slots); | 9702 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *slots); |
9703 } | 9703 } |
9704 } | 9704 } |
9705 | 9705 |
9706 | 9706 |
9707 } // namespace dart | 9707 } // namespace dart |
OLD | NEW |