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 <setjmp.h> | 5 #include <setjmp.h> |
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_ARM) | 9 #if defined(TARGET_ARCH_ARM) |
10 | 10 |
(...skipping 3696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3707 while (isolate->top_resource() != NULL && | 3707 while (isolate->top_resource() != NULL && |
3708 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) { | 3708 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) { |
3709 isolate->top_resource()->~StackResource(); | 3709 isolate->top_resource()->~StackResource(); |
3710 } | 3710 } |
3711 | 3711 |
3712 // Unwind the C++ stack and continue simulation in the target frame. | 3712 // Unwind the C++ stack and continue simulation in the target frame. |
3713 set_register(PC, static_cast<int32_t>(pc)); | 3713 set_register(PC, static_cast<int32_t>(pc)); |
3714 set_register(SP, static_cast<int32_t>(sp)); | 3714 set_register(SP, static_cast<int32_t>(sp)); |
3715 set_register(FP, static_cast<int32_t>(fp)); | 3715 set_register(FP, static_cast<int32_t>(fp)); |
3716 // Set the tag. | 3716 // Set the tag. |
3717 isolate->set_vm_tag(VMTag::kScriptTagId); | 3717 isolate->set_vm_tag(VMTag::kDartTagId); |
3718 // Clear top exit frame. | 3718 // Clear top exit frame. |
3719 isolate->set_top_exit_frame_info(0); | 3719 isolate->set_top_exit_frame_info(0); |
3720 | 3720 |
3721 ASSERT(raw_exception != Object::null()); | 3721 ASSERT(raw_exception != Object::null()); |
3722 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3722 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
3723 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3723 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
3724 buf->Longjmp(); | 3724 buf->Longjmp(); |
3725 } | 3725 } |
3726 | 3726 |
3727 } // namespace dart | 3727 } // namespace dart |
3728 | 3728 |
3729 #endif // !defined(HOST_ARCH_ARM) | 3729 #endif // !defined(HOST_ARCH_ARM) |
3730 | 3730 |
3731 #endif // defined TARGET_ARCH_ARM | 3731 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |