Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1152)

Unified Diff: runtime/vm/simulator_arm64.cc

Issue 395233002: Move some isolate state setup from C++ code to JumpToExceptionHandler stub (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/simulator_arm64.h ('k') | runtime/vm/simulator_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 39af0e75819178ac02394cfc6ecaadb5700d3401..f9339c5737e3c5f8db7e16a7756af448a72a6316 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -3025,7 +3025,8 @@ void Simulator::Longjmp(uword pc,
uword sp,
uword fp,
RawObject* raw_exception,
- RawObject* raw_stacktrace) {
+ RawObject* raw_stacktrace,
+ Isolate* isolate) {
// Walk over all setjmp buffers (simulated --> C++ transitions)
// and try to find the setjmp associated with the simulated stack pointer.
SimulatorSetjmpBuffer* buf = last_setjmp_buffer();
@@ -3038,7 +3039,6 @@ void Simulator::Longjmp(uword pc,
// Prepare for unwinding frames by destroying all the stack resources
// in the previous C++ frames.
uword native_sp = buf->native_sp();
- Isolate* isolate = Isolate::Current();
while (isolate->top_resource() != NULL &&
(reinterpret_cast<uword>(isolate->top_resource()) < native_sp)) {
isolate->top_resource()->~StackResource();
@@ -3048,6 +3048,10 @@ void Simulator::Longjmp(uword pc,
set_pc(static_cast<int64_t>(pc));
set_register(NULL, SP, static_cast<int64_t>(sp));
set_register(NULL, FP, static_cast<int64_t>(fp));
+ // Set the tag.
+ isolate->set_vm_tag(VMTag::kScriptTagId);
+ // Clear top exit frame.
+ isolate->set_top_exit_frame_info(0);
ASSERT(raw_exception != Object::null());
set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception));
« no previous file with comments | « runtime/vm/simulator_arm64.h ('k') | runtime/vm/simulator_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698