| 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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 void DeoptInfoBuilder::AddPcMarker(const Function& function, | 684 void DeoptInfoBuilder::AddPcMarker(const Function& function, |
| 685 intptr_t to_index) { | 685 intptr_t to_index) { |
| 686 // Function object was already added by AddReturnAddress, find it. | 686 // Function object was already added by AddReturnAddress, find it. |
| 687 intptr_t from_index = FindOrAddObjectInTable(function); | 687 intptr_t from_index = FindOrAddObjectInTable(function); |
| 688 ASSERT(to_index == instructions_.length()); | 688 ASSERT(to_index == instructions_.length()); |
| 689 instructions_.Add(new DeoptPcMarkerInstr(from_index)); | 689 instructions_.Add(new DeoptPcMarkerInstr(from_index)); |
| 690 } | 690 } |
| 691 | 691 |
| 692 | 692 |
| 693 void DeoptInfoBuilder::AddCopy(const Location& from_loc, | 693 void DeoptInfoBuilder::AddCopy(const Location& from_loc, |
| 694 const Value& from_value, | |
| 695 const intptr_t to_index) { | 694 const intptr_t to_index) { |
| 696 DeoptInstr* deopt_instr = NULL; | 695 DeoptInstr* deopt_instr = NULL; |
| 697 if (from_loc.IsConstant()) { | 696 if (from_loc.IsConstant()) { |
| 698 intptr_t object_table_index = FindOrAddObjectInTable(from_loc.constant()); | 697 intptr_t object_table_index = FindOrAddObjectInTable(from_loc.constant()); |
| 699 deopt_instr = new DeoptConstantInstr(object_table_index); | 698 deopt_instr = new DeoptConstantInstr(object_table_index); |
| 700 } else if (from_loc.IsRegister()) { | 699 } else if (from_loc.IsRegister()) { |
| 701 deopt_instr = new DeoptRegisterInstr(from_loc.reg()); | 700 deopt_instr = new DeoptRegisterInstr(from_loc.reg()); |
| 702 } else if (from_loc.IsFpuRegister()) { | 701 } else if (from_loc.IsFpuRegister()) { |
| 703 if (from_loc.representation() == Location::kDouble) { | 702 if (from_loc.representation() == Location::kDouble) { |
| 704 deopt_instr = new DeoptFpuRegisterInstr(from_loc.fpu_reg()); | 703 deopt_instr = new DeoptFpuRegisterInstr(from_loc.fpu_reg()); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 Smi* offset, | 813 Smi* offset, |
| 815 DeoptInfo* info, | 814 DeoptInfo* info, |
| 816 Smi* reason) { | 815 Smi* reason) { |
| 817 intptr_t i = index * kEntrySize; | 816 intptr_t i = index * kEntrySize; |
| 818 *offset ^= table.At(i); | 817 *offset ^= table.At(i); |
| 819 *info ^= table.At(i + 1); | 818 *info ^= table.At(i + 1); |
| 820 *reason ^= table.At(i + 2); | 819 *reason ^= table.At(i + 2); |
| 821 } | 820 } |
| 822 | 821 |
| 823 } // namespace dart | 822 } // namespace dart |
| OLD | NEW |