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> // 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_MIPS) | 9 #if defined(TARGET_ARCH_MIPS) |
10 | 10 |
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2469 // in the previous C++ frames. | 2469 // in the previous C++ frames. |
2470 Isolate* isolate = thread->isolate(); | 2470 Isolate* isolate = thread->isolate(); |
2471 StackResource::Unwind(thread); | 2471 StackResource::Unwind(thread); |
2472 | 2472 |
2473 // Unwind the C++ stack and continue simulation in the target frame. | 2473 // Unwind the C++ stack and continue simulation in the target frame. |
2474 set_pc(static_cast<int32_t>(pc)); | 2474 set_pc(static_cast<int32_t>(pc)); |
2475 set_register(SP, static_cast<int32_t>(sp)); | 2475 set_register(SP, static_cast<int32_t>(sp)); |
2476 set_register(FP, static_cast<int32_t>(fp)); | 2476 set_register(FP, static_cast<int32_t>(fp)); |
2477 set_register(THR, reinterpret_cast<int32_t>(thread)); | 2477 set_register(THR, reinterpret_cast<int32_t>(thread)); |
2478 // Set the tag. | 2478 // Set the tag. |
2479 isolate->set_vm_tag(VMTag::kDartTagId); | 2479 thread->set_vm_tag(VMTag::kDartTagId); |
2480 // Clear top exit frame. | 2480 // Clear top exit frame. |
2481 isolate->set_top_exit_frame_info(0); | 2481 isolate->set_top_exit_frame_info(0); |
2482 | 2482 |
2483 ASSERT(raw_exception != Object::null()); | 2483 ASSERT(raw_exception != Object::null()); |
2484 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2484 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
2485 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2485 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
2486 buf->Longjmp(); | 2486 buf->Longjmp(); |
2487 } | 2487 } |
2488 | 2488 |
2489 } // namespace dart | 2489 } // namespace dart |
2490 | 2490 |
2491 #endif // defined(USING_SIMULATOR) | 2491 #endif // defined(USING_SIMULATOR) |
2492 | 2492 |
2493 #endif // defined TARGET_ARCH_MIPS | 2493 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |