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 :
12 : // Has to be the last include (doesn't have include guards):
13 : #include "src/objects/object-macros.h"
14 :
15 : namespace v8 {
16 : namespace internal {
17 :
18 : CAST_ACCESSOR(BreakPointInfo)
19 : CAST_ACCESSOR(DebugInfo)
20 : CAST_ACCESSOR(CoverageInfo)
21 : CAST_ACCESSOR(BreakPoint)
22 :
23 668217 : SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
24 74681737 : ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
25 214026 : SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
26 16396787 : ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
27 2444026 : ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
28 248335 : ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
29 :
30 100053 : SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
31 176629 : ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsOffset)
32 :
33 12645 : SMI_ACCESSORS(BreakPoint, id, kIdOffset)
34 22519 : ACCESSORS(BreakPoint, condition, String, kConditionOffset)
35 :
36 950666 : bool DebugInfo::HasDebugBytecodeArray() {
37 950666 : return debug_bytecode_array()->IsBytecodeArray();
38 : }
39 :
40 : BytecodeArray* DebugInfo::OriginalBytecodeArray() {
41 : DCHECK(HasDebugBytecodeArray());
42 : return shared()->bytecode_array();
43 : }
44 :
45 : BytecodeArray* DebugInfo::DebugBytecodeArray() {
46 : DCHECK(HasDebugBytecodeArray());
47 : return BytecodeArray::cast(debug_bytecode_array());
48 : }
49 :
50 : } // namespace internal
51 : } // namespace v8
52 :
53 : #include "src/objects/object-macros-undef.h"
54 :
55 : #endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_
|