LCOV - code coverage report
Current view: top level - src/debug/x64 - debug-x64.cc (source / functions) Hit Total Coverage
Test: app.info Lines: 14 14 100.0 %
Date: 2019-03-21 Functions: 3 3 100.0 %

          Line data    Source code
       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
       3             : // found in the LICENSE file.
       4             : 
       5             : #if V8_TARGET_ARCH_X64
       6             : 
       7             : #include "src/debug/debug.h"
       8             : 
       9             : #include "src/assembler.h"
      10             : #include "src/debug/liveedit.h"
      11             : #include "src/frames-inl.h"
      12             : #include "src/macro-assembler.h"
      13             : #include "src/objects-inl.h"
      14             : 
      15             : namespace v8 {
      16             : namespace internal {
      17             : 
      18             : #define __ ACCESS_MASM(masm)
      19             : 
      20          56 : void DebugCodegen::GenerateHandleDebuggerStatement(MacroAssembler* masm) {
      21             :   {
      22          56 :     FrameScope scope(masm, StackFrame::INTERNAL);
      23             :     __ CallRuntime(Runtime::kHandleDebuggerStatement, 0);
      24             :   }
      25          56 :   __ MaybeDropFrames();
      26             : 
      27             :   // Return to caller.
      28          56 :   __ ret(0);
      29          56 : }
      30             : 
      31          56 : void DebugCodegen::GenerateFrameDropperTrampoline(MacroAssembler* masm) {
      32             :   // Frame is being dropped:
      33             :   // - Drop to the target frame specified by rbx.
      34             :   // - Look up current function on the frame.
      35             :   // - Leave the frame.
      36             :   // - Restart the frame by calling the function.
      37             : 
      38          56 :   __ movq(rbp, rbx);
      39         112 :   __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
      40          56 :   __ leave();
      41             : 
      42          56 :   __ LoadTaggedPointerField(
      43          56 :       rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
      44             :   __ movzxwq(
      45             :       rbx, FieldOperand(rbx, SharedFunctionInfo::kFormalParameterCountOffset));
      46             : 
      47             :   ParameterCount dummy(rbx);
      48          56 :   __ InvokeFunction(rdi, no_reg, dummy, dummy, JUMP_FUNCTION);
      49          56 : }
      50             : 
      51             : const bool LiveEdit::kFrameDropperSupported = true;
      52             : 
      53             : #undef __
      54             : 
      55             : }  // namespace internal
      56      120216 : }  // namespace v8
      57             : 
      58             : #endif  // V8_TARGET_ARCH_X64

Generated by: LCOV version 1.10