| 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_MIPS64 |    5 #if V8_TARGET_ARCH_MIPS64 | 
|    6  |    6  | 
|    7 #include "src/codegen.h" |    7 #include "src/codegen.h" | 
|    8 #include "src/debug/debug.h" |    8 #include "src/debug/debug.h" | 
|    9  |    9  | 
|   10 namespace v8 { |   10 namespace v8 { | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  103   // jumping to the target address intended by the caller and that was |  103   // jumping to the target address intended by the caller and that was | 
|  104   // overwritten by the address of DebugBreakXXX. |  104   // overwritten by the address of DebugBreakXXX. | 
|  105   ExternalReference after_break_target = |  105   ExternalReference after_break_target = | 
|  106       ExternalReference::debug_after_break_target_address(masm->isolate()); |  106       ExternalReference::debug_after_break_target_address(masm->isolate()); | 
|  107   __ li(t9, Operand(after_break_target)); |  107   __ li(t9, Operand(after_break_target)); | 
|  108   __ ld(t9, MemOperand(t9)); |  108   __ ld(t9, MemOperand(t9)); | 
|  109   __ Jump(t9); |  109   __ Jump(t9); | 
|  110 } |  110 } | 
|  111  |  111  | 
|  112  |  112  | 
|  113 void DebugCodegen::GeneratePlainReturnLiveEdit(MacroAssembler* masm) { |  | 
|  114   __ Ret(); |  | 
|  115 } |  | 
|  116  |  | 
|  117  |  | 
|  118 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { |  113 void DebugCodegen::GenerateFrameDropperLiveEdit(MacroAssembler* masm) { | 
|  119   ExternalReference restarter_frame_function_slot = |  | 
|  120       ExternalReference::debug_restarter_frame_function_pointer_address( |  | 
|  121           masm->isolate()); |  | 
|  122   __ li(at, Operand(restarter_frame_function_slot)); |  | 
|  123   __ sw(zero_reg, MemOperand(at, 0)); |  | 
|  124  |  | 
|  125   // We do not know our frame height, but set sp based on fp. |  114   // We do not know our frame height, but set sp based on fp. | 
|  126   __ Dsubu(sp, fp, Operand(kPointerSize)); |  115   __ Dsubu(sp, fp, Operand(kPointerSize)); | 
|  127  |  116  | 
|  128   __ Pop(ra, fp, a1);  // Return address, Frame, Function. |  117   __ Pop(ra, fp, a1);  // Return address, Frame, Function. | 
|  129  |  118  | 
 |  119   ParameterCount dummy(0); | 
 |  120   __ FloodFunctionIfStepping(a1, no_reg, dummy, dummy); | 
 |  121  | 
|  130   // Load context from the function. |  122   // Load context from the function. | 
|  131   __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); |  123   __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); | 
|  132  |  124  | 
|  133   // Clear new.target as a safety measure. |  125   // Clear new.target as a safety measure. | 
|  134   __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); |  126   __ LoadRoot(a3, Heap::kUndefinedValueRootIndex); | 
|  135  |  127  | 
|  136   // Get function code. |  128   // Get function code. | 
|  137   __ ld(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |  129   __ ld(at, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 
|  138   __ ld(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); |  130   __ ld(at, FieldMemOperand(at, SharedFunctionInfo::kCodeOffset)); | 
|  139   __ Daddu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); |  131   __ Daddu(t9, at, Operand(Code::kHeaderSize - kHeapObjectTag)); | 
|  140  |  132  | 
|  141   // Re-run JSFunction, a1 is function, cp is context. |  133   // Re-run JSFunction, a1 is function, cp is context. | 
|  142   __ Jump(t9); |  134   __ Jump(t9); | 
|  143 } |  135 } | 
|  144  |  136  | 
|  145  |  137  | 
|  146 const bool LiveEdit::kFrameDropperSupported = true; |  138 const bool LiveEdit::kFrameDropperSupported = true; | 
|  147  |  139  | 
|  148 #undef __ |  140 #undef __ | 
|  149  |  141  | 
|  150 }  // namespace internal |  142 }  // namespace internal | 
|  151 }  // namespace v8 |  143 }  // namespace v8 | 
|  152  |  144  | 
|  153 #endif  // V8_TARGET_ARCH_MIPS64 |  145 #endif  // V8_TARGET_ARCH_MIPS64 | 
| OLD | NEW |