OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/debug/debug.h" | 7 #include "src/debug/debug.h" |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/liveedit.h" | 10 #include "src/debug/liveedit.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // We do not know our frame height, but set esp based on ebp. | 122 // We do not know our frame height, but set esp based on ebp. |
123 __ lea(esp, Operand(ebp, FrameDropperFrameConstants::kFunctionOffset)); | 123 __ lea(esp, Operand(ebp, FrameDropperFrameConstants::kFunctionOffset)); |
124 __ pop(edi); // Function. | 124 __ pop(edi); // Function. |
125 __ add(esp, Immediate(-FrameDropperFrameConstants::kCodeOffset)); // INTERNAL | 125 __ add(esp, Immediate(-FrameDropperFrameConstants::kCodeOffset)); // INTERNAL |
126 // frame | 126 // frame |
127 // marker | 127 // marker |
128 // and code | 128 // and code |
129 __ pop(ebp); | 129 __ pop(ebp); |
130 | 130 |
131 ParameterCount dummy(0); | 131 ParameterCount dummy(0); |
132 __ FloodFunctionIfStepping(edi, no_reg, dummy, dummy); | 132 __ CheckDebugHook(edi, no_reg, dummy, dummy); |
133 | 133 |
134 // Load context from the function. | 134 // Load context from the function. |
135 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 135 __ mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
136 | 136 |
137 // Clear new.target register as a safety measure. | 137 // Clear new.target register as a safety measure. |
138 __ mov(edx, masm->isolate()->factory()->undefined_value()); | 138 __ mov(edx, masm->isolate()->factory()->undefined_value()); |
139 | 139 |
140 // Get function code. | 140 // Get function code. |
141 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 141 __ mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
142 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); | 142 __ mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kCodeOffset)); |
143 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); | 143 __ lea(ebx, FieldOperand(ebx, Code::kHeaderSize)); |
144 | 144 |
145 // Re-run JSFunction, edi is function, esi is context. | 145 // Re-run JSFunction, edi is function, esi is context. |
146 __ jmp(ebx); | 146 __ jmp(ebx); |
147 } | 147 } |
148 | 148 |
149 | 149 |
150 const bool LiveEdit::kFrameDropperSupported = true; | 150 const bool LiveEdit::kFrameDropperSupported = true; |
151 | 151 |
152 #undef __ | 152 #undef __ |
153 | 153 |
154 } // namespace internal | 154 } // namespace internal |
155 } // namespace v8 | 155 } // namespace v8 |
156 | 156 |
157 #endif // V8_TARGET_ARCH_X87 | 157 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |