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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 396463003: 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
« runtime/vm/stub_code_mips.cc ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index 7367a5ff836cb3965454f4d225608f311642e8fc..e7632e8ccf9540742630775ef40527b317cfc3e8 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -1718,6 +1718,7 @@ void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
// Arg3: frame_pointer
// Arg4: exception object
// Arg5: stacktrace object
+// Arg6: isolate
// No Result.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
ASSERT(kExceptionObjectReg == RAX);
@@ -1728,14 +1729,23 @@ void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
#if defined(_WIN64)
Register stacktrace_reg = RBX;
__ movq(stacktrace_reg, Address(RSP, 5 * kWordSize));
+ Register isolate_reg = CTX;
regis 2014/07/14 20:00:34 You could use RAX.
Cutch 2014/07/14 21:32:07 Can't use RAX because it's used by kExceptionObjec
+ __ movq(isolate_reg, Address(RSP, 6 * kWordSize));
#else
Register stacktrace_reg = CallingConventions::kArg5Reg;
+ Register isolate_reg = CallingConventions::kArg6Reg;
#endif
__ movq(RBP, CallingConventions::kArg3Reg);
__ movq(RSP, CallingConventions::kArg2Reg);
__ movq(kStackTraceObjectReg, stacktrace_reg);
__ movq(kExceptionObjectReg, CallingConventions::kArg4Reg);
+ // Set the tag.
+ __ movq(Address(isolate_reg, Isolate::vm_tag_offset()),
+ Immediate(VMTag::kScriptTagId));
+ // Clear top exit frame.
+ __ movq(Address(isolate_reg, Isolate::top_exit_frame_info_offset()),
+ Immediate(0));
__ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code.
}
« runtime/vm/stub_code_mips.cc ('K') | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698