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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 | 644 |
645 virtual intptr_t source_index() const { return object_table_index_; } | 645 virtual intptr_t source_index() const { return object_table_index_; } |
646 virtual DeoptInstr::Kind kind() const { return kPcMarker; } | 646 virtual DeoptInstr::Kind kind() const { return kPcMarker; } |
647 | 647 |
648 virtual const char* ArgumentsToCString() const { | 648 virtual const char* ArgumentsToCString() const { |
649 return Thread::Current()->zone()->PrintToString( | 649 return Thread::Current()->zone()->PrintToString( |
650 "%" Pd "", object_table_index_); | 650 "%" Pd "", object_table_index_); |
651 } | 651 } |
652 | 652 |
653 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { | 653 void Execute(DeoptContext* deopt_context, intptr_t* dest_addr) { |
654 Function& function = Function::Handle(deopt_context->zone()); | 654 *dest_addr = Smi::RawValue(0); |
655 function ^= deopt_context->ObjectAt(object_table_index_); | |
656 if (function.IsNull()) { | |
657 // Callee's PC marker is not used (pc of Deoptimize stub). Set to 0. | |
658 *dest_addr = Smi::RawValue(0); | |
659 return; | |
660 } | |
661 deopt_context->DeferPcMarkerMaterialization( | 655 deopt_context->DeferPcMarkerMaterialization( |
662 object_table_index_, dest_addr); | 656 object_table_index_, dest_addr); |
663 } | 657 } |
664 | 658 |
665 private: | 659 private: |
666 intptr_t object_table_index_; | 660 intptr_t object_table_index_; |
667 | 661 |
668 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr); | 662 DISALLOW_COPY_AND_ASSIGN(DeoptPcMarkerInstr); |
669 }; | 663 }; |
670 | 664 |
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 Smi* offset, | 1294 Smi* offset, |
1301 TypedData* info, | 1295 TypedData* info, |
1302 Smi* reason) { | 1296 Smi* reason) { |
1303 intptr_t i = index * kEntrySize; | 1297 intptr_t i = index * kEntrySize; |
1304 *offset ^= table.At(i); | 1298 *offset ^= table.At(i); |
1305 *info ^= table.At(i + 1); | 1299 *info ^= table.At(i + 1); |
1306 *reason ^= table.At(i + 2); | 1300 *reason ^= table.At(i + 2); |
1307 } | 1301 } |
1308 | 1302 |
1309 } // namespace dart | 1303 } // namespace dart |
OLD | NEW |