| 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/debug/debug.h" |    7 #include "src/debug/debug.h" | 
|    8  |    8  | 
|    9 #include "src/assembler.h" |    9 #include "src/assembler.h" | 
|   10 #include "src/codegen.h" |   10 #include "src/codegen.h" | 
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  122   // We do not know our frame height, but set rsp based on rbp. |  122   // We do not know our frame height, but set rsp based on rbp. | 
|  123   __ leap(rsp, Operand(rbp, FrameDropperFrameConstants::kFunctionOffset)); |  123   __ leap(rsp, Operand(rbp, FrameDropperFrameConstants::kFunctionOffset)); | 
|  124   __ Pop(rdi);  // Function. |  124   __ Pop(rdi);  // Function. | 
|  125   __ addp(rsp, |  125   __ addp(rsp, | 
|  126           Immediate(-FrameDropperFrameConstants::kCodeOffset));  // INTERNAL |  126           Immediate(-FrameDropperFrameConstants::kCodeOffset));  // INTERNAL | 
|  127                                                                  // frame marker |  127                                                                  // frame marker | 
|  128                                                                  // and code |  128                                                                  // and code | 
|  129   __ popq(rbp); |  129   __ popq(rbp); | 
|  130  |  130  | 
|  131   ParameterCount dummy(0); |  131   ParameterCount dummy(0); | 
|  132   __ FloodFunctionIfStepping(rdi, no_reg, dummy, dummy); |  132   __ CheckDebugHook(rdi, no_reg, dummy, dummy); | 
|  133  |  133  | 
|  134   // Load context from the function. |  134   // Load context from the function. | 
|  135   __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |  135   __ movp(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 
|  136  |  136  | 
|  137   // Clear new.target as a safety measure. |  137   // Clear new.target as a safety measure. | 
|  138   __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |  138   __ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); | 
|  139  |  139  | 
|  140   // Get function code. |  140   // Get function code. | 
|  141   __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |  141   __ movp(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 
|  142   __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset)); |  142   __ movp(rbx, FieldOperand(rbx, SharedFunctionInfo::kCodeOffset)); | 
|  143   __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize)); |  143   __ leap(rbx, FieldOperand(rbx, Code::kHeaderSize)); | 
|  144  |  144  | 
|  145   // Re-run JSFunction, rdi is function, rsi is context. |  145   // Re-run JSFunction, rdi is function, rsi is context. | 
|  146   __ jmp(rbx); |  146   __ jmp(rbx); | 
|  147 } |  147 } | 
|  148  |  148  | 
|  149 const bool LiveEdit::kFrameDropperSupported = true; |  149 const bool LiveEdit::kFrameDropperSupported = true; | 
|  150  |  150  | 
|  151 #undef __ |  151 #undef __ | 
|  152  |  152  | 
|  153 }  // namespace internal |  153 }  // namespace internal | 
|  154 }  // namespace v8 |  154 }  // namespace v8 | 
|  155  |  155  | 
|  156 #endif  // V8_TARGET_ARCH_X64 |  156 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |