| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 return DeoptSuffixInstr::SuffixLength::decode(from_index); | 735 return DeoptSuffixInstr::SuffixLength::decode(from_index); |
| 736 } | 736 } |
| 737 | 737 |
| 738 | 738 |
| 739 uword DeoptInstr::GetRetAddress(DeoptInstr* instr, | 739 uword DeoptInstr::GetRetAddress(DeoptInstr* instr, |
| 740 const Array& object_table, | 740 const Array& object_table, |
| 741 Function* func) { | 741 Function* func) { |
| 742 ASSERT(instr->kind() == kRetAddress); | 742 ASSERT(instr->kind() == kRetAddress); |
| 743 DeoptRetAddressInstr* ret_address_instr = | 743 DeoptRetAddressInstr* ret_address_instr = |
| 744 static_cast<DeoptRetAddressInstr*>(instr); | 744 static_cast<DeoptRetAddressInstr*>(instr); |
| 745 // TODO(regis): The following assert may trigger when displaying a backtrace |
| 746 // from the simulator. |
| 745 ASSERT(Isolate::IsDeoptAfter(ret_address_instr->deopt_id())); | 747 ASSERT(Isolate::IsDeoptAfter(ret_address_instr->deopt_id())); |
| 746 ASSERT(!object_table.IsNull()); | 748 ASSERT(!object_table.IsNull()); |
| 747 ASSERT(func != NULL); | 749 ASSERT(func != NULL); |
| 748 *func ^= object_table.At(ret_address_instr->object_table_index()); | 750 *func ^= object_table.At(ret_address_instr->object_table_index()); |
| 749 const Code& code = Code::Handle(func->unoptimized_code()); | 751 const Code& code = Code::Handle(func->unoptimized_code()); |
| 750 ASSERT(!code.IsNull()); | 752 ASSERT(!code.IsNull()); |
| 751 uword res = code.GetPcForDeoptId(ret_address_instr->deopt_id(), | 753 uword res = code.GetPcForDeoptId(ret_address_instr->deopt_id(), |
| 752 PcDescriptors::kDeopt); | 754 PcDescriptors::kDeopt); |
| 753 ASSERT(res != 0); | 755 ASSERT(res != 0); |
| 754 return res; | 756 return res; |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 Smi* offset, | 1096 Smi* offset, |
| 1095 DeoptInfo* info, | 1097 DeoptInfo* info, |
| 1096 Smi* reason) { | 1098 Smi* reason) { |
| 1097 intptr_t i = index * kEntrySize; | 1099 intptr_t i = index * kEntrySize; |
| 1098 *offset ^= table.At(i); | 1100 *offset ^= table.At(i); |
| 1099 *info ^= table.At(i + 1); | 1101 *info ^= table.At(i + 1); |
| 1100 *reason ^= table.At(i + 2); | 1102 *reason ^= table.At(i + 2); |
| 1101 } | 1103 } |
| 1102 | 1104 |
| 1103 } // namespace dart | 1105 } // namespace dart |
| OLD | NEW |