| 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_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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 } | 656 } |
| 657 } | 657 } |
| 658 | 658 |
| 659 | 659 |
| 660 void FlowGraphAllocator::ProcessInitialDefinition(Definition* defn, | 660 void FlowGraphAllocator::ProcessInitialDefinition(Definition* defn, |
| 661 LiveRange* range, | 661 LiveRange* range, |
| 662 BlockEntryInstr* block) { | 662 BlockEntryInstr* block) { |
| 663 #if defined(TARGET_ARCH_DBC) | 663 #if defined(TARGET_ARCH_DBC) |
| 664 if (block->IsCatchBlockEntry()) { | 664 if (block->IsCatchBlockEntry()) { |
| 665 if (defn->IsParameter()) { | 665 if (defn->IsParameter()) { |
| 666 // This must be in sync with FlowGraphCompiler::CatchEntryRegForVariable. |
| 666 ParameterInstr* param = defn->AsParameter(); | 667 ParameterInstr* param = defn->AsParameter(); |
| 667 intptr_t slot_index = param->index(); | 668 intptr_t slot_index = param->index(); |
| 668 AssignSafepoints(defn, range); | 669 AssignSafepoints(defn, range); |
| 669 range->finger()->Initialize(range); | 670 range->finger()->Initialize(range); |
| 670 slot_index = kNumberOfCpuRegisters - 1 - slot_index; | 671 slot_index = kNumberOfCpuRegisters - 1 - slot_index; |
| 671 range->set_assigned_location(Location::RegisterLocation(slot_index)); | 672 range->set_assigned_location(Location::RegisterLocation(slot_index)); |
| 672 SplitInitialDefinitionAt(range, block->lifetime_position() + 2); | 673 SplitInitialDefinitionAt(range, block->lifetime_position() + 2); |
| 673 ConvertAllUses(range); | 674 ConvertAllUses(range); |
| 674 BlockLocation(Location::RegisterLocation(slot_index), 0, kMaxPosition); | 675 BlockLocation(Location::RegisterLocation(slot_index), 0, kMaxPosition); |
| 675 } else { | 676 } else { |
| (...skipping 2412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3088 FlowGraphPrinter printer(flow_graph_, true); | 3089 FlowGraphPrinter printer(flow_graph_, true); |
| 3089 printer.PrintBlocks(); | 3090 printer.PrintBlocks(); |
| 3090 #endif | 3091 #endif |
| 3091 } | 3092 } |
| 3092 THR_Print("----------------------------------------------\n"); | 3093 THR_Print("----------------------------------------------\n"); |
| 3093 } | 3094 } |
| 3094 } | 3095 } |
| 3095 | 3096 |
| 3096 | 3097 |
| 3097 } // namespace dart | 3098 } // namespace dart |
| OLD | NEW |