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

Side by Side Diff: src/debug/arm64/debug-arm64.cc

Issue 1818873003: [Interpreter] Adds support to fetch return value on break at return. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed the bugs in earlier implementation. Changed full-codegen to match ignition for fetching the r… Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 FrameScope scope(masm, StackFrame::INTERNAL); 87 FrameScope scope(masm, StackFrame::INTERNAL);
88 88
89 // Load padding words on stack. 89 // Load padding words on stack.
90 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue)); 90 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingValue));
91 __ PushMultipleTimes(scratch, LiveEdit::kFramePaddingInitialSize); 91 __ PushMultipleTimes(scratch, LiveEdit::kFramePaddingInitialSize);
92 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize)); 92 __ Mov(scratch, Smi::FromInt(LiveEdit::kFramePaddingInitialSize));
93 __ Push(scratch); 93 __ Push(scratch);
94 94
95 if (mode == SAVE_RESULT_REGISTER) __ Push(x0); 95 if (mode == SAVE_RESULT_REGISTER) __ Push(x0);
96 96
97 __ Mov(x0, 0); // No arguments. 97 // One argument. The hole in FCG. Value of accumulator in interpreter.
98 __ Mov(x0, 1);
99 __ Push(masm->isolate()->factory()->the_hole_value());
98 __ Mov(x1, ExternalReference(Runtime::FunctionForId(Runtime::kDebugBreak), 100 __ Mov(x1, ExternalReference(Runtime::FunctionForId(Runtime::kDebugBreak),
99 masm->isolate())); 101 masm->isolate()));
100 102
101 CEntryStub stub(masm->isolate(), 1); 103 CEntryStub stub(masm->isolate(), 1);
102 __ CallStub(&stub); 104 __ CallStub(&stub);
103 105
104 if (FLAG_debug_code) { 106 if (FLAG_debug_code) {
105 for (int i = 0; i < kNumJSCallerSaved; i++) { 107 for (int i = 0; i < kNumJSCallerSaved; i++) {
106 Register reg = Register::XRegFromCode(JSCallerSavedCode(i)); 108 Register reg = Register::XRegFromCode(JSCallerSavedCode(i));
107 __ Mov(reg, Operand(kDebugZapValue)); 109 __ Mov(reg, Operand(kDebugZapValue));
108 } 110 }
109 } 111 }
110 112
111 // Restore the register values from the expression stack. 113 // Restore the register values from the expression stack.
112 if (mode == SAVE_RESULT_REGISTER) __ Pop(x0); 114 if (mode == SAVE_RESULT_REGISTER) __ Pop(x0);
Yang 2016/03/22 12:22:57 I thought we are going to use the return value of
mythria 2016/03/22 15:11:44 Done. I am sorry, did not port it to arm earlier.
113 115
114 // Don't bother removing padding bytes pushed on the stack 116 // Don't bother removing padding bytes pushed on the stack
115 // as the frame is going to be restored right away. 117 // as the frame is going to be restored right away.
116 118
117 // Leave the internal frame. 119 // Leave the internal frame.
118 } 120 }
119 121
120 // Now that the break point has been handled, resume normal execution by 122 // Now that the break point has been handled, resume normal execution by
121 // jumping to the target address intended by the caller and that was 123 // jumping to the target address intended by the caller and that was
122 // overwritten by the address of DebugBreakXXX. 124 // overwritten by the address of DebugBreakXXX.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 __ Br(scratch); 160 __ Br(scratch);
159 } 161 }
160 162
161 163
162 const bool LiveEdit::kFrameDropperSupported = true; 164 const bool LiveEdit::kFrameDropperSupported = true;
163 165
164 } // namespace internal 166 } // namespace internal
165 } // namespace v8 167 } // namespace v8
166 168
167 #endif // V8_TARGET_ARCH_ARM64 169 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/debug/arm/debug-arm.cc ('k') | src/debug/debug.h » ('j') | src/debug/debug.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698