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

Unified Diff: runtime/vm/stub_code_ia32.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/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 33f280392c867923b367e76b3ebb5731da777a25..1e5d28bdb259e05ce87218df7fd3e15d9d54f995 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -1786,15 +1786,22 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
// TOS + 3: frame_pointer
// TOS + 4: exception object
// TOS + 5: stacktrace object
+// TOS + 6: isolate
// No Result.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
ASSERT(kExceptionObjectReg == EAX);
ASSERT(kStackTraceObjectReg == EDX);
+ __ movl(EDI, Address(ESP, 6 * kWordSize)); // Load target isolate.
__ movl(kStackTraceObjectReg, Address(ESP, 5 * kWordSize));
__ movl(kExceptionObjectReg, Address(ESP, 4 * kWordSize));
__ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer.
__ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX.
__ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer.
+ // Set tag.
+ __ movl(Address(EDI, Isolate::vm_tag_offset()),
+ Immediate(VMTag::kScriptTagId));
+ // Clear top exit frame.
+ __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), Immediate(0));
__ jmp(EBX); // Jump to the exception handler code.
}
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698