| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_S390 | 7 #if V8_TARGET_ARCH_S390 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 // overwritten by the address of DebugBreakXXX. | 118 // overwritten by the address of DebugBreakXXX. |
| 119 ExternalReference after_break_target = | 119 ExternalReference after_break_target = |
| 120 ExternalReference::debug_after_break_target_address(masm->isolate()); | 120 ExternalReference::debug_after_break_target_address(masm->isolate()); |
| 121 __ mov(ip, Operand(after_break_target)); | 121 __ mov(ip, Operand(after_break_target)); |
| 122 __ LoadP(ip, MemOperand(ip)); | 122 __ LoadP(ip, MemOperand(ip)); |
| 123 __ JumpToJSEntry(ip); | 123 __ JumpToJSEntry(ip); |
| 124 } | 124 } |
| 125 | 125 |
| 126 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 126 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |
| 127 // Load the function pointer off of our current stack frame. | 127 // Load the function pointer off of our current stack frame. |
| 128 __ LoadP(r3, MemOperand(fp, StandardFrameConstants::kConstantPoolOffset - | 128 __ LoadP(r3, MemOperand(fp, FrameDropperFrameConstants::kFunctionOffset)); |
| 129 kPointerSize)); | |
| 130 | 129 |
| 131 // Pop return address and frame | 130 // Pop return address and frame |
| 132 __ LeaveFrame(StackFrame::INTERNAL); | 131 __ LeaveFrame(StackFrame::INTERNAL); |
| 133 | 132 |
| 134 ParameterCount dummy(0); | 133 ParameterCount dummy(0); |
| 135 __ FloodFunctionIfStepping(r3, no_reg, dummy, dummy); | 134 __ FloodFunctionIfStepping(r3, no_reg, dummy, dummy); |
| 136 | 135 |
| 137 // Load context from the function. | 136 // Load context from the function. |
| 138 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); | 137 __ LoadP(cp, FieldMemOperand(r3, JSFunction::kContextOffset)); |
| 139 | 138 |
| 140 // Clear new.target as a safety measure. | 139 // Clear new.target as a safety measure. |
| 141 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); | 140 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); |
| 142 | 141 |
| 143 // Get function code. | 142 // Get function code. |
| 144 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); | 143 __ LoadP(ip, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset)); |
| 145 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); | 144 __ LoadP(ip, FieldMemOperand(ip, SharedFunctionInfo::kCodeOffset)); |
| 146 __ AddP(ip, Operand(Code::kHeaderSize - kHeapObjectTag)); | 145 __ AddP(ip, Operand(Code::kHeaderSize - kHeapObjectTag)); |
| 147 | 146 |
| 148 // Re-run JSFunction, r3 is function, cp is context. | 147 // Re-run JSFunction, r3 is function, cp is context. |
| 149 __ Jump(ip); | 148 __ Jump(ip); |
| 150 } | 149 } |
| 151 | 150 |
| 152 const bool LiveEdit::kFrameDropperSupported = true; | 151 const bool LiveEdit::kFrameDropperSupported = true; |
| 153 | 152 |
| 154 #undef __ | 153 #undef __ |
| 155 } // namespace internal | 154 } // namespace internal |
| 156 } // namespace v8 | 155 } // namespace v8 |
| 157 | 156 |
| 158 #endif // V8_TARGET_ARCH_S390 | 157 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |