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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
6 | 6 |
7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
8 | 8 |
9 #include "vm/cha.h" | 9 #include "vm/cha.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 // FlowGraphCompiler::SaveLiveRegisters | 585 // FlowGraphCompiler::SaveLiveRegisters |
586 // MaterializeObjectInstr::RemapRegisters | 586 // MaterializeObjectInstr::RemapRegisters |
587 // | 587 // |
588 Environment* FlowGraphCompiler::SlowPathEnvironmentFor( | 588 Environment* FlowGraphCompiler::SlowPathEnvironmentFor( |
589 Instruction* instruction) { | 589 Instruction* instruction) { |
590 if (instruction->env() == NULL) { | 590 if (instruction->env() == NULL) { |
591 ASSERT(!is_optimizing()); | 591 ASSERT(!is_optimizing()); |
592 return NULL; | 592 return NULL; |
593 } | 593 } |
594 | 594 |
595 Environment* env = instruction->env()->DeepCopy(); | 595 Environment* env = instruction->env()->DeepCopy(isolate()); |
596 // 1. Iterate the registers in the order they will be spilled to compute | 596 // 1. Iterate the registers in the order they will be spilled to compute |
597 // the slots they will be spilled to. | 597 // the slots they will be spilled to. |
598 intptr_t next_slot = StackSize(); | 598 intptr_t next_slot = StackSize(); |
599 RegisterSet* regs = instruction->locs()->live_registers(); | 599 RegisterSet* regs = instruction->locs()->live_registers(); |
600 intptr_t fpu_reg_slots[kNumberOfFpuRegisters]; | 600 intptr_t fpu_reg_slots[kNumberOfFpuRegisters]; |
601 intptr_t cpu_reg_slots[kNumberOfCpuRegisters]; | 601 intptr_t cpu_reg_slots[kNumberOfCpuRegisters]; |
602 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize; | 602 const intptr_t kFpuRegisterSpillFactor = kFpuRegisterSize / kWordSize; |
603 // FPU registers are spilled first from highest to lowest register number. | 603 // FPU registers are spilled first from highest to lowest register number. |
604 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { | 604 for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) { |
605 FpuRegister reg = static_cast<FpuRegister>(i); | 605 FpuRegister reg = static_cast<FpuRegister>(i); |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1349 |
1350 for (int i = 0; i < len; i++) { | 1350 for (int i = 0; i < len; i++) { |
1351 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1351 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
1352 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1352 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
1353 ic_data.GetCountAt(i))); | 1353 ic_data.GetCountAt(i))); |
1354 } | 1354 } |
1355 sorted->Sort(HighestCountFirst); | 1355 sorted->Sort(HighestCountFirst); |
1356 } | 1356 } |
1357 | 1357 |
1358 } // namespace dart | 1358 } // namespace dart |
OLD | NEW |