5 #ifndef V8_OBJECTS_DEBUG_OBJECTS_INL_H_ 6 #define V8_OBJECTS_DEBUG_OBJECTS_INL_H_ 8 #include "src/objects/debug-objects.h" 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" 16 #include "src/objects/object-macros.h" 21 OBJECT_CONSTRUCTORS_IMPL(CoverageInfo, FixedArray)
23 CAST_ACCESSOR(BreakPointInfo)
24 CAST_ACCESSOR(DebugInfo)
25 CAST_ACCESSOR2(CoverageInfo)
26 CAST_ACCESSOR(BreakPoint)
28 SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset)
29 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset)
30 SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset)
31 ACCESSORS(DebugInfo, script, Object, kScriptOffset)
32 ACCESSORS(DebugInfo, original_bytecode_array, Object,
33 kOriginalBytecodeArrayOffset)
34 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset)
35 ACCESSORS2(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset)
36 ACCESSORS(DebugInfo, coverage_info, Object, kCoverageInfoOffset)
38 BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, side_effect_state,
39 DebugInfo::SideEffectStateBits)
40 BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debug_is_blackboxed,
41 DebugInfo::DebugIsBlackboxedBit)
42 BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, computed_debug_is_blackboxed,
43 DebugInfo::ComputedDebugIsBlackboxedBit)
44 BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, debugging_id,
45 DebugInfo::DebuggingIdBits)
47 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset)
48 ACCESSORS(BreakPointInfo, break_points, Object, kBreakPointsOffset)
50 SMI_ACCESSORS(BreakPoint,
id, kIdOffset)
51 ACCESSORS2(BreakPoint, condition, String, kConditionOffset)
53 bool DebugInfo::HasInstrumentedBytecodeArray() {
54 DCHECK_EQ(debug_bytecode_array()->IsBytecodeArray(),
55 original_bytecode_array()->IsBytecodeArray());
56 return debug_bytecode_array()->IsBytecodeArray();
59 BytecodeArray DebugInfo::OriginalBytecodeArray() {
60 DCHECK(HasInstrumentedBytecodeArray());
61 return BytecodeArray::cast(original_bytecode_array());
64 BytecodeArray DebugInfo::DebugBytecodeArray() {
65 DCHECK(HasInstrumentedBytecodeArray());
66 DCHECK_EQ(shared()->GetDebugBytecodeArray(), debug_bytecode_array());
67 return BytecodeArray::cast(debug_bytecode_array());
73 #include "src/objects/object-macros-undef.h" 75 #endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_