| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/assembler.h" | 7 #include "src/assembler.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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 // We do not know our frame height, but set rsp based on rbp. | 121 // We do not know our frame height, but set rsp based on rbp. |
| 122 __ leap(rsp, Operand(rbp, -1 * kPointerSize)); | 122 __ leap(rsp, Operand(rbp, -1 * kPointerSize)); |
| 123 | 123 |
| 124 __ Pop(rdi); // Function. | 124 __ Pop(rdi); // Function. |
| 125 __ popq(rbp); | 125 __ popq(rbp); |
| 126 | 126 |
| 127 // Load context from the function. | 127 // Load context from the function. |
| 128 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 128 __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
| 129 | 129 |
| 130 // Clear new.target as a safety measure. |
| 131 __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |
| 132 |
| 130 // Get function code. | 133 // Get function code. |
| 131 __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 134 __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| 132 __ movp(rdx, FieldOperand(rdx, SharedFunctionInfo::kCodeOffset)); | 135 __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset)); |
| 133 __ leap(rdx, FieldOperand(rdx, Code::kHeaderSize)); | 136 __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize)); |
| 134 | 137 |
| 135 // Re-run JSFunction, rdi is function, rsi is context. | 138 // Re-run JSFunction, rdi is function, rsi is context. |
| 136 __ jmp(rdx); | 139 __ jmp(rbx); |
| 137 } | 140 } |
| 138 | 141 |
| 139 const bool LiveEdit::kFrameDropperSupported = true; | 142 const bool LiveEdit::kFrameDropperSupported = true; |
| 140 | 143 |
| 141 #undef __ | 144 #undef __ |
| 142 | 145 |
| 143 } // namespace internal | 146 } // namespace internal |
| 144 } // namespace v8 | 147 } // namespace v8 |
| 145 | 148 |
| 146 #endif // V8_TARGET_ARCH_X64 | 149 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |