OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_DEBUG_OBJECTS_INL_H_ | 5 #ifndef V8_OBJECTS_DEBUG_OBJECTS_INL_H_ |
6 #define V8_OBJECTS_DEBUG_OBJECTS_INL_H_ | 6 #define V8_OBJECTS_DEBUG_OBJECTS_INL_H_ |
7 | 7 |
8 #include "src/objects/debug-objects.h" | 8 #include "src/objects/debug-objects.h" |
9 | 9 |
10 #include "src/heap/heap-inl.h" | 10 #include "src/heap/heap-inl.h" |
11 | 11 |
12 // Has to be the last include (doesn't have include guards): | 12 // Has to be the last include (doesn't have include guards): |
13 #include "src/objects/object-macros.h" | 13 #include "src/objects/object-macros.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 CAST_ACCESSOR(BreakPointInfo) | 18 CAST_ACCESSOR(BreakPointInfo) |
19 CAST_ACCESSOR(DebugInfo) | 19 CAST_ACCESSOR(DebugInfo) |
20 | 20 |
21 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) | 21 SMI_ACCESSORS(DebugInfo, flags, kFlagsOffset) |
22 SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsIndex) | 22 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) |
23 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex) | 23 SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsOffset) |
24 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | 24 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayOffset) |
| 25 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateOffset) |
25 | 26 |
26 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) | 27 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionOffset) |
27 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | 28 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsOffset) |
28 | 29 |
29 bool DebugInfo::HasDebugBytecodeArray() { | 30 bool DebugInfo::HasDebugBytecodeArray() { |
30 return debug_bytecode_array()->IsBytecodeArray(); | 31 return debug_bytecode_array()->IsBytecodeArray(); |
31 } | 32 } |
32 | 33 |
33 bool DebugInfo::HasDebugCode() { | 34 bool DebugInfo::HasDebugCode() { |
34 Code* code = shared()->code(); | 35 Code* code = shared()->code(); |
35 bool has = code->kind() == Code::FUNCTION; | 36 bool has = code->kind() == Code::FUNCTION; |
36 DCHECK(!has || code->has_debug_break_slots()); | 37 DCHECK(!has || code->has_debug_break_slots()); |
37 return has; | 38 return has; |
(...skipping 13 matching lines...) Expand all Loading... |
51 DCHECK(HasDebugCode()); | 52 DCHECK(HasDebugCode()); |
52 return shared()->code(); | 53 return shared()->code(); |
53 } | 54 } |
54 | 55 |
55 } // namespace internal | 56 } // namespace internal |
56 } // namespace v8 | 57 } // namespace v8 |
57 | 58 |
58 #include "src/objects/object-macros-undef.h" | 59 #include "src/objects/object-macros-undef.h" |
59 | 60 |
60 #endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_ | 61 #endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_ |
OLD | NEW |