LCOV - code coverage report
Current view: top level - src/objects - debug-objects-inl.h (source / functions) Hit Total Coverage
Test: app.info Lines: 30 30 100.0 %
Date: 2019-01-20 Functions: 30 30 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-inl.h"
      11             : #include "src/heap/heap-write-barrier.h"
      12             : #include "src/objects-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       51292 : OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
      22      271870 : OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
      23      510730 : OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
      24     9176620 : OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
      25             : 
      26             : NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
      27             : 
      28      135935 : CAST_ACCESSOR(BreakPointInfo)
      29     4588310 : CAST_ACCESSOR(DebugInfo)
      30      255365 : CAST_ACCESSOR(CoverageInfo)
      31       25646 : CAST_ACCESSOR(BreakPoint)
      32             : 
      33    13899714 : SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
      34     6709299 : ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
      35     1066482 : SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
      36     7317625 : ACCESSORS(DebugInfo, script, Object, kScriptOffset)
      37   254099525 : ACCESSORS(DebugInfo, original_bytecode_array, Object,
      38             :           kOriginalBytecodeArrayOffset)
      39    69100790 : ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
      40     9241010 : ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
      41      773655 : ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
      42             : 
      43       48752 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
      44             :                     DebugInfo::SideEffectStateBits)
      45      562312 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debug_is_blackboxed,
      46             :                     DebugInfo::DebugIsBlackboxedBit)
      47      635764 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, computed_debug_is_blackboxed,
      48             :                     DebugInfo::ComputedDebugIsBlackboxedBit)
      49         730 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debugging_id,
      50             :                     DebugInfo::DebuggingIdBits)
      51             : 
      52      223520 : SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
      53      610093 : ACCESSORS(BreakPointInfo, break_points, Object, kBreakPointsOffset)
      54             : 
      55       62778 : SMI_ACCESSORS(BreakPoint, id, kIdOffset)
      56       40166 : ACCESSORS(BreakPoint, condition, String, kConditionOffset)
      57             : 
      58     6179495 : bool DebugInfo::HasInstrumentedBytecodeArray() {
      59             :   DCHECK_EQ(debug_bytecode_array()->IsBytecodeArray(),
      60             :             original_bytecode_array()->IsBytecodeArray());
      61    12358990 :   return debug_bytecode_array()->IsBytecodeArray();
      62             : }
      63             : 
      64    84616525 : BytecodeArray DebugInfo::OriginalBytecodeArray() {
      65             :   DCHECK(HasInstrumentedBytecodeArray());
      66   169233050 :   return BytecodeArray::cast(original_bytecode_array());
      67             : }
      68             : 
      69    16771035 : BytecodeArray DebugInfo::DebugBytecodeArray() {
      70             :   DCHECK(HasInstrumentedBytecodeArray());
      71             :   DCHECK_EQ(shared()->GetDebugBytecodeArray(), debug_bytecode_array());
      72    33542070 :   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