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_MIPS) | 9 #if defined(TARGET_ARCH_MIPS) |
10 | 10 |
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 while (isolate->top_resource() != NULL && | 2233 while (isolate->top_resource() != NULL && |
2234 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) { | 2234 (reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) { |
2235 isolate->top_resource()->~StackResource(); | 2235 isolate->top_resource()->~StackResource(); |
2236 } | 2236 } |
2237 | 2237 |
2238 // Unwind the C++ stack and continue simulation in the target frame. | 2238 // Unwind the C++ stack and continue simulation in the target frame. |
2239 set_pc(static_cast<int32_t>(pc)); | 2239 set_pc(static_cast<int32_t>(pc)); |
2240 set_register(SP, static_cast<int32_t>(sp)); | 2240 set_register(SP, static_cast<int32_t>(sp)); |
2241 set_register(FP, static_cast<int32_t>(fp)); | 2241 set_register(FP, static_cast<int32_t>(fp)); |
2242 // Set the tag. | 2242 // Set the tag. |
2243 isolate->set_vm_tag(VMTag::kScriptTagId); | 2243 isolate->set_vm_tag(VMTag::kDartTagId); |
2244 // Clear top exit frame. | 2244 // Clear top exit frame. |
2245 isolate->set_top_exit_frame_info(0); | 2245 isolate->set_top_exit_frame_info(0); |
2246 | 2246 |
2247 ASSERT(raw_exception != Object::null()); | 2247 ASSERT(raw_exception != Object::null()); |
2248 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2248 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
2249 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2249 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
2250 buf->Longjmp(); | 2250 buf->Longjmp(); |
2251 } | 2251 } |
2252 | 2252 |
2253 } // namespace dart | 2253 } // namespace dart |
2254 | 2254 |
2255 #endif // !defined(HOST_ARCH_MIPS) | 2255 #endif // !defined(HOST_ARCH_MIPS) |
2256 | 2256 |
2257 #endif // defined TARGET_ARCH_MIPS | 2257 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |