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-02-19 Functions: 25 25 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       49228 : OBJECT_CONSTRUCTORS_IMPL(BreakPoint, Tuple2)
      22      269616 : OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo, Tuple2)
      23      410488 : OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
      24     9598498 : OBJECT_CONSTRUCTORS_IMPL(DebugInfo, Struct)
      25             : 
      26             : NEVER_READ_ONLY_SPACE_IMPL(DebugInfo)
      27             : 
      28      134808 : CAST_ACCESSOR(BreakPointInfo)
      29     4799249 : CAST_ACCESSOR(DebugInfo)
      30      205244 : CAST_ACCESSOR(CoverageInfo)
      31       24614 : CAST_ACCESSOR(BreakPoint)
      32             : 
      33    13797432 : SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
      34     6699785 : ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
      35     1069963 : SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
      36     2565289 : ACCESSORS(DebugInfo, script, Object, kScriptOffset)
      37    84752174 : ACCESSORS(DebugInfo, original_bytecode_array, Object,
      38             :           kOriginalBytecodeArrayOffset)
      39    23289517 : ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
      40     9256385 : ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
      41      213080 : ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
      42             : 
      43       48632 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
      44             :                     DebugInfo::SideEffectStateBits)
      45      565502 : BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debug_is_blackboxed,
      46             :                     DebugInfo::DebugIsBlackboxedBit)
      47      639142 : 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      222136 : SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
      53      225818 : ACCESSORS(BreakPointInfo, break_points, Object, kBreakPointsOffset)
      54             : 
      55       59316 : SMI_ACCESSORS(BreakPoint, id, kIdOffset)
      56       39422 : ACCESSORS(BreakPoint, condition, String, kConditionOffset)
      57             : 
      58     6286789 : bool DebugInfo::HasInstrumentedBytecodeArray() {
      59             :   DCHECK_EQ(debug_bytecode_array()->IsBytecodeArray(),
      60             :             original_bytecode_array()->IsBytecodeArray());
      61    12573578 :   return debug_bytecode_array()->IsBytecodeArray();
      62             : }
      63             : 
      64    84502774 : BytecodeArray DebugInfo::OriginalBytecodeArray() {
      65             :   DCHECK(HasInstrumentedBytecodeArray());
      66    84502774 :   return BytecodeArray::cast(original_bytecode_array());
      67             : }
      68             : 
      69    16754078 : BytecodeArray DebugInfo::DebugBytecodeArray() {
      70             :   DCHECK(HasInstrumentedBytecodeArray());
      71             :   DCHECK_EQ(shared()->GetDebugBytecodeArray(), debug_bytecode_array());
      72    16754078 :   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