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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 uword continue_at_pc = code.GetPcForDeoptId(deopt_id_, | 273 uword continue_at_pc = code.GetPcForDeoptId(deopt_id_, |
274 PcDescriptors::kDeopt); | 274 PcDescriptors::kDeopt); |
275 ASSERT(continue_at_pc != 0); | 275 ASSERT(continue_at_pc != 0); |
276 *to_addr = continue_at_pc; | 276 *to_addr = continue_at_pc; |
277 | 277 |
278 uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall); | 278 uword pc = code.GetPcForDeoptId(deopt_id_, PcDescriptors::kIcCall); |
279 if (pc != 0) { | 279 if (pc != 0) { |
280 // If the deoptimization happened at an IC call, update the IC data | 280 // If the deoptimization happened at an IC call, update the IC data |
281 // to avoid repeated deoptimization at the same site next time around. | 281 // to avoid repeated deoptimization at the same site next time around. |
282 ICData& ic_data = ICData::Handle(); | 282 ICData& ic_data = ICData::Handle(); |
283 CodePatcher::GetInstanceCallAt(pc, code, &ic_data, NULL); | 283 CodePatcher::GetInstanceCallAt(pc, code, &ic_data); |
284 if (!ic_data.IsNull()) { | 284 if (!ic_data.IsNull()) { |
285 ic_data.set_deopt_reason(deopt_context->deopt_reason()); | 285 ic_data.set_deopt_reason(deopt_context->deopt_reason()); |
286 } | 286 } |
287 } | 287 } |
288 } | 288 } |
289 | 289 |
290 intptr_t object_table_index() const { return object_table_index_; } | 290 intptr_t object_table_index() const { return object_table_index_; } |
291 intptr_t deopt_id() const { return deopt_id_; } | 291 intptr_t deopt_id() const { return deopt_id_; } |
292 | 292 |
293 private: | 293 private: |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 Smi* offset, | 1098 Smi* offset, |
1099 DeoptInfo* info, | 1099 DeoptInfo* info, |
1100 Smi* reason) { | 1100 Smi* reason) { |
1101 intptr_t i = index * kEntrySize; | 1101 intptr_t i = index * kEntrySize; |
1102 *offset ^= table.At(i); | 1102 *offset ^= table.At(i); |
1103 *info ^= table.At(i + 1); | 1103 *info ^= table.At(i + 1); |
1104 *reason ^= table.At(i + 2); | 1104 *reason ^= table.At(i + 2); |
1105 } | 1105 } |
1106 | 1106 |
1107 } // namespace dart | 1107 } // namespace dart |
OLD | NEW |