| 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 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 // Add object. | 810 // Add object. |
| 811 const intptr_t result = object_table_.Length(); | 811 const intptr_t result = object_table_.Length(); |
| 812 object_table_.Add(obj); | 812 object_table_.Add(obj); |
| 813 return result; | 813 return result; |
| 814 } | 814 } |
| 815 | 815 |
| 816 | 816 |
| 817 void DeoptInfoBuilder::AddReturnAddressBefore(const Function& function, | 817 void DeoptInfoBuilder::AddReturnAddressBefore(const Function& function, |
| 818 intptr_t deopt_id, | 818 intptr_t deopt_id, |
| 819 intptr_t to_index) { | 819 intptr_t to_index) { |
| 820 // Check that deopt_id exists. |
| 821 ASSERT(Code::Handle(function.unoptimized_code()). |
| 822 GetDeoptBeforePcAtDeoptId(deopt_id) != 0); |
| 820 const intptr_t object_table_index = FindOrAddObjectInTable(function); | 823 const intptr_t object_table_index = FindOrAddObjectInTable(function); |
| 821 ASSERT(to_index == instructions_.length()); | 824 ASSERT(to_index == instructions_.length()); |
| 822 instructions_.Add(new DeoptRetBeforeAddressInstr(object_table_index, | 825 instructions_.Add(new DeoptRetBeforeAddressInstr(object_table_index, |
| 823 deopt_id)); | 826 deopt_id)); |
| 824 } | 827 } |
| 825 | 828 |
| 826 | 829 |
| 827 void DeoptInfoBuilder::AddReturnAddressAfter(const Function& function, | 830 void DeoptInfoBuilder::AddReturnAddressAfter(const Function& function, |
| 828 intptr_t deopt_id, | 831 intptr_t deopt_id, |
| 829 intptr_t to_index) { | 832 intptr_t to_index) { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 Smi* offset, | 972 Smi* offset, |
| 970 DeoptInfo* info, | 973 DeoptInfo* info, |
| 971 Smi* reason) { | 974 Smi* reason) { |
| 972 intptr_t i = index * kEntrySize; | 975 intptr_t i = index * kEntrySize; |
| 973 *offset ^= table.At(i); | 976 *offset ^= table.At(i); |
| 974 *info ^= table.At(i + 1); | 977 *info ^= table.At(i + 1); |
| 975 *reason ^= table.At(i + 2); | 978 *reason ^= table.At(i + 2); |
| 976 } | 979 } |
| 977 | 980 |
| 978 } // namespace dart | 981 } // namespace dart |
| OLD | NEW |