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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 63093003: Fix for issue 14790 - Crash when using dartium devtools (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 30084)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -2667,17 +2667,11 @@
}
-void Assembler::LeaveFrameWithPP() {
- movq(PP, Address(RBP, -2 * kWordSize));
- LeaveFrame();
-}
-
-
void Assembler::ReturnPatchable() {
// This sequence must have a fixed size so that it can be patched by the
// debugger.
intptr_t start = buffer_.GetPosition();
- LeaveFrameWithPP();
+ LeaveDartFrame();
ret();
nop(4);
ASSERT((buffer_.GetPosition() - start) == 13);
@@ -2825,6 +2819,13 @@
}
+void Assembler::LeaveDartFrame() {
+ // Restore caller's PP register that was pushed in EnterDartFrame.
+ movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize)));
+ LeaveFrame();
+}
+
+
// On entry to a function compiled for OSR, the caller's frame pointer, the
// stack locals, and any copied parameters are already in place. The frame
// pointer is already set up. The PC marker is not correct for the
@@ -2862,17 +2863,20 @@
}
-void Assembler::EnterStubFrame() {
+void Assembler::EnterStubFrame(bool load_pp) {
EnterFrame(0);
pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames.
+ pushq(PP); // Save caller's pool pointer
+ if (load_pp) {
+ LoadPoolPointer(PP);
+ }
}
-void Assembler::EnterStubFrameWithPP() {
- EnterFrame(0);
- pushq(Immediate(0)); // Push 0 in the saved PC area for stub frames.
- pushq(PP); // Save caller's pool pointer
- LoadPoolPointer(PP);
+void Assembler::LeaveStubFrame() {
+ // Restore caller's PP register that was pushed in EnterStubFrame.
+ movq(PP, Address(RBP, (kSavedCallerPpSlotFromFp * kWordSize)));
+ LeaveFrame();
}
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698