| 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/deopt_instructions.h" | 5 #include "vm/deopt_instructions.h" |
| 6 | 6 |
| 7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/locations.h" | 10 #include "vm/locations.h" |
| (...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 DeoptInstr* deopt_instr = NULL; | 852 DeoptInstr* deopt_instr = NULL; |
| 853 if (from_loc.IsConstant()) { | 853 if (from_loc.IsConstant()) { |
| 854 intptr_t object_table_index = FindOrAddObjectInTable(from_loc.constant()); | 854 intptr_t object_table_index = FindOrAddObjectInTable(from_loc.constant()); |
| 855 deopt_instr = new DeoptConstantInstr(object_table_index); | 855 deopt_instr = new DeoptConstantInstr(object_table_index); |
| 856 } else if (from_loc.IsRegister()) { | 856 } else if (from_loc.IsRegister()) { |
| 857 ASSERT(value->definition()->representation() == kTagged); | 857 ASSERT(value->definition()->representation() == kTagged); |
| 858 deopt_instr = new DeoptRegisterInstr(from_loc.reg()); | 858 deopt_instr = new DeoptRegisterInstr(from_loc.reg()); |
| 859 } else if (from_loc.IsFpuRegister()) { | 859 } else if (from_loc.IsFpuRegister()) { |
| 860 if (value->definition()->representation() == kUnboxedDouble) { | 860 if (value->definition()->representation() == kUnboxedDouble) { |
| 861 deopt_instr = new DeoptFpuRegisterInstr(from_loc.fpu_reg()); | 861 deopt_instr = new DeoptFpuRegisterInstr(from_loc.fpu_reg()); |
| 862 } else if (value->definition()->representation() == kUnboxedMint) { |
| 863 deopt_instr = new DeoptInt64FpuRegisterInstr(from_loc.fpu_reg()); |
| 864 } else if (value->definition()->representation() == kUnboxedFloat32x4) { |
| 865 deopt_instr = new DeoptFloat32x4FpuRegisterInstr(from_loc.fpu_reg()); |
| 862 } else { | 866 } else { |
| 863 ASSERT(value->definition()->representation() == kUnboxedMint); | 867 ASSERT(value->definition()->representation() == kUnboxedUint32x4); |
| 864 deopt_instr = new DeoptInt64FpuRegisterInstr(from_loc.fpu_reg()); | 868 deopt_instr = new DeoptUint32x4FpuRegisterInstr(from_loc.fpu_reg()); |
| 865 } | 869 } |
| 866 } else if (from_loc.IsStackSlot()) { | 870 } else if (from_loc.IsStackSlot()) { |
| 867 ASSERT(value->definition()->representation() == kTagged); | 871 ASSERT(value->definition()->representation() == kTagged); |
| 868 intptr_t from_index = (from_loc.stack_index() < 0) ? | 872 intptr_t from_index = (from_loc.stack_index() < 0) ? |
| 869 from_loc.stack_index() + num_args_ : | 873 from_loc.stack_index() + num_args_ : |
| 870 from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1; | 874 from_loc.stack_index() + num_args_ - kFirstLocalSlotIndex + 1; |
| 871 deopt_instr = new DeoptStackSlotInstr(from_index); | 875 deopt_instr = new DeoptStackSlotInstr(from_index); |
| 872 } else if (from_loc.IsDoubleStackSlot()) { | 876 } else if (from_loc.IsDoubleStackSlot()) { |
| 873 intptr_t from_index = (from_loc.stack_index() < 0) ? | 877 intptr_t from_index = (from_loc.stack_index() < 0) ? |
| 874 from_loc.stack_index() + num_args_ : | 878 from_loc.stack_index() + num_args_ : |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 Smi* offset, | 977 Smi* offset, |
| 974 DeoptInfo* info, | 978 DeoptInfo* info, |
| 975 Smi* reason) { | 979 Smi* reason) { |
| 976 intptr_t i = index * kEntrySize; | 980 intptr_t i = index * kEntrySize; |
| 977 *offset ^= table.At(i); | 981 *offset ^= table.At(i); |
| 978 *info ^= table.At(i + 1); | 982 *info ^= table.At(i + 1); |
| 979 *reason ^= table.At(i + 2); | 983 *reason ^= table.At(i + 2); |
| 980 } | 984 } |
| 981 | 985 |
| 982 } // namespace dart | 986 } // namespace dart |
| OLD | NEW |