OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #if defined(TARGET_ARCH_DBC) | 9 #if defined(TARGET_ARCH_DBC) |
10 | 10 |
(...skipping 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3708 | 3708 |
3709 // Set the tag. | 3709 // Set the tag. |
3710 thread->set_vm_tag(VMTag::kDartTagId); | 3710 thread->set_vm_tag(VMTag::kDartTagId); |
3711 // Clear top exit frame. | 3711 // Clear top exit frame. |
3712 thread->set_top_exit_frame_info(0); | 3712 thread->set_top_exit_frame_info(0); |
3713 | 3713 |
3714 sp_ = reinterpret_cast<RawObject**>(sp); | 3714 sp_ = reinterpret_cast<RawObject**>(sp); |
3715 fp_ = reinterpret_cast<RawObject**>(fp); | 3715 fp_ = reinterpret_cast<RawObject**>(fp); |
3716 | 3716 |
3717 if (pc == StubCode::RunExceptionHandler_entry()->EntryPoint()) { | 3717 if (pc == StubCode::RunExceptionHandler_entry()->EntryPoint()) { |
3718 // Instead of executing the RunException stub, we implement its | 3718 // The RunExceptionHandler stub is a placeholder. We implement |
3719 // behavior here. | 3719 // its behavior here. |
3720 RawObject* raw_exception = thread->active_exception(); | 3720 RawObject* raw_exception = thread->active_exception(); |
3721 RawObject* raw_stacktrace = thread->active_stacktrace(); | 3721 RawObject* raw_stacktrace = thread->active_stacktrace(); |
3722 ASSERT(raw_exception != Object::null()); | 3722 ASSERT(raw_exception != Object::null()); |
3723 special_[kExceptionSpecialIndex] = raw_exception; | 3723 special_[kExceptionSpecialIndex] = raw_exception; |
3724 special_[kStacktraceSpecialIndex] = raw_stacktrace; | 3724 special_[kStacktraceSpecialIndex] = raw_stacktrace; |
3725 pc_ = thread->resume_pc(); | 3725 pc_ = thread->resume_pc(); |
| 3726 } else if (pc == StubCode::DeoptForRewind_entry()->EntryPoint()) { |
| 3727 // The DeoptForRewind stub is a placeholder. We will eventually |
| 3728 // implement its behavior here. |
| 3729 // |
| 3730 // TODO(turnidge): Refactor the Deopt bytecode so that we can use |
| 3731 // the implementation here too. The deopt pc is stored in |
| 3732 // Thread::resume_pc(). After invoking deoptimization, we usually |
| 3733 // call into Debugger::RewindPostDeopt(), but I need to figure out |
| 3734 // if that makes any sense (it would JumpToFrame during a |
| 3735 // JumpToFrame, which seems wrong). |
| 3736 UNIMPLEMENTED(); |
3726 } else { | 3737 } else { |
3727 pc_ = pc; | 3738 pc_ = pc; |
3728 } | 3739 } |
3729 | 3740 |
3730 buf->Longjmp(); | 3741 buf->Longjmp(); |
3731 UNREACHABLE(); | 3742 UNREACHABLE(); |
3732 } | 3743 } |
3733 | 3744 |
3734 } // namespace dart | 3745 } // namespace dart |
3735 | 3746 |
3736 #endif // defined TARGET_ARCH_DBC | 3747 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |