| 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/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/intermediate_language.h" | 10 #include "vm/intermediate_language.h" |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { | 685 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { |
| 686 Function& function = Function::Handle(deopt_context->zone()); | 686 Function& function = Function::Handle(deopt_context->zone()); |
| 687 function ^= deopt_context->ObjectAt(object_table_index_); | 687 function ^= deopt_context->ObjectAt(object_table_index_); |
| 688 if (function.IsNull()) { | 688 if (function.IsNull()) { |
| 689 *reinterpret_cast<RawObject**>(dest_addr) = deopt_context->is_lazy_deopt() | 689 *reinterpret_cast<RawObject**>(dest_addr) = deopt_context->is_lazy_deopt() |
| 690 ? StubCode::DeoptimizeLazy_entry()->code() | 690 ? StubCode::DeoptimizeLazy_entry()->code() |
| 691 : StubCode::Deoptimize_entry()->code(); | 691 : StubCode::Deoptimize_entry()->code(); |
| 692 return; | 692 return; |
| 693 } | 693 } |
| 694 | 694 |
| 695 #if !defined(TARGET_ARCH_DBC) | |
| 696 // We don't always have the Code object for the frame's corresponding | 695 // We don't always have the Code object for the frame's corresponding |
| 697 // unoptimized code as it may have been collected. Use a stub as the pc | 696 // unoptimized code as it may have been collected. Use a stub as the pc |
| 698 // marker until we can recreate that Code object during deferred | 697 // marker until we can recreate that Code object during deferred |
| 699 // materialization to maintain the invariant that Dart frames always have | 698 // materialization to maintain the invariant that Dart frames always have |
| 700 // a pc marker. | 699 // a pc marker. |
| 701 *reinterpret_cast<RawObject**>(dest_addr) = | 700 *reinterpret_cast<RawObject**>(dest_addr) = |
| 702 StubCode::FrameAwaitingMaterialization_entry()->code(); | 701 StubCode::FrameAwaitingMaterialization_entry()->code(); |
| 703 #endif | |
| 704 deopt_context->DeferPcMarkerMaterialization(object_table_index_, dest_addr); | 702 deopt_context->DeferPcMarkerMaterialization(object_table_index_, dest_addr); |
| 705 } | 703 } |
| 706 | 704 |
| 707 private: | 705 private: |
| 708 intptr_t object_table_index_; | 706 intptr_t object_table_index_; |
| 709 | 707 |
| 710 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr); | 708 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr); |
| 711 }; | 709 }; |
| 712 | 710 |
| 713 | 711 |
| (...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 Smi* offset, | 1340 Smi* offset, |
| 1343 TypedData* info, | 1341 TypedData* info, |
| 1344 Smi* reason) { | 1342 Smi* reason) { |
| 1345 intptr_t i = index * kEntrySize; | 1343 intptr_t i = index * kEntrySize; |
| 1346 *offset ^= table.At(i); | 1344 *offset ^= table.At(i); |
| 1347 *info ^= table.At(i + 1); | 1345 *info ^= table.At(i + 1); |
| 1348 *reason ^= table.At(i + 2); | 1346 *reason ^= table.At(i + 2); |
| 1349 } | 1347 } |
| 1350 | 1348 |
| 1351 } // namespace dart | 1349 } // namespace dart |
| OLD | NEW |