LCOV - code coverage report
Current view: top level - src/objects - debug-objects-inl.h (source / functions) Hit Total Coverage
Test: app.info Lines: 18 18 100.0 %
Date: 2019-03-21 Functions: 13 13 100.0 %

          Line data    Source code
       1             : // Copyright 2017 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             : #ifndef V8_OBJECTS_DEBUG_OBJECTS_INL_H_
       6             : #define V8_OBJECTS_DEBUG_OBJECTS_INL_H_
       7             : 
       8             : #include "src/objects/debug-objects.h"
       9             : 
      10             : #include "src/heap/heap-write-barrier-inl.h"
      11             : #include "src/objects-inl.h"
      12             : #include "src/objects/code-inl.h"
      13             : #include "src/objects/shared-function-info.h"
      14             : 
      15             : // Has to be the last include (doesn't have include guards):
      16             : #include "src/objects/object-macros.h"
      17             : 
      18             : namespace v8 {
      19             : namespace internal {
      20             : 
      21             : OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
      22             : OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
      23             : OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
      24             : OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
      25             : 
      26             : NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
      27             : 
      28             : CAST_ACCESSOR(BreakPointInfo)
      29             : CAST_ACCESSOR(DebugInfo)
      30             : CAST_ACCESSOR(CoverageInfo)
      31             : CAST_ACCESSOR(BreakPoint)
      32             : 
      33     7584157 : SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
      34     2330216 : ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
      35      528043 : SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
      36     2568547 : ACCESSORS(DebugInfo, script, Object, kScriptOffset)
      37    84812985 : ACCESSORS(DebugInfo, original_bytecode_array, Object,
      38             :           kOriginalBytecodeArrayOffset)
      39    23461126 : ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
      40     2522808 : ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
      41      214124 : ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
      42             : 
      43       48912 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
      44             :                     DebugInfo::SideEffectStateBits)
      45      223445 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debug_is_blackboxed,
      46             :                     DebugInfo::DebugIsBlackboxedBit)
      47      296945 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, computed_debug_is_blackboxed,
      48             :                     DebugInfo::ComputedDebugIsBlackboxedBit)
      49         390 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debugging_id,
      50             :                     DebugInfo::DebuggingIdBits)
      51             : 
      52      112374 : SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
      53      142390 : ACCESSORS(BreakPointInfo, break_points, Object, kBreakPointsOffset)
      54             : 
      55       32131 : SMI_ACCESSORS(BreakPoint, id, kIdOffset)
      56       28405 : ACCESSORS(BreakPoint, condition, String, kConditionOffset)
      57             : 
      58     6469603 : bool DebugInfo::HasInstrumentedBytecodeArray() {
      59             :   DCHECK_EQ(debug_bytecode_array()->IsBytecodeArray(),
      60             :             original_bytecode_array()->IsBytecodeArray());
      61     6469603 :   return debug_bytecode_array()->IsBytecodeArray();
      62             : }
      63             : 
      64             : BytecodeArray DebugInfo::OriginalBytecodeArray() {
      65             :   DCHECK(HasInstrumentedBytecodeArray());
      66             :   return BytecodeArray::cast(original_bytecode_array());
      67             : }
      68             : 
      69             : BytecodeArray DebugInfo::DebugBytecodeArray() {
      70             :   DCHECK(HasInstrumentedBytecodeArray());
      71             :   DCHECK_EQ(shared()->GetDebugBytecodeArray(), debug_bytecode_array());
      72             :   return BytecodeArray::cast(debug_bytecode_array());
      73             : }
      74             : 
      75             : }  // namespace internal
      76             : }  // namespace v8
      77             : 
      78             : #include "src/objects/object-macros-undef.h"
      79             : 
      80             : #endif  // V8_OBJECTS_DEBUG_OBJECTS_INL_H_

Generated by: LCOV version 1.10