Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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" | |
|
marja
2017/05/23 10:38:55
Unfortunately this ends up pulling in objects-inl.
jgruber
2017/05/23 10:50:52
Ah, yes :( Acknowledged.
| |
| 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 | |
| 21 ACCESSORS(DebugInfo, shared, SharedFunctionInfo, kSharedFunctionInfoIndex) | |
| 22 SMI_ACCESSORS(DebugInfo, debugger_hints, kDebuggerHintsIndex) | |
| 23 ACCESSORS(DebugInfo, debug_bytecode_array, Object, kDebugBytecodeArrayIndex) | |
| 24 ACCESSORS(DebugInfo, break_points, FixedArray, kBreakPointsStateIndex) | |
| 25 | |
| 26 SMI_ACCESSORS(BreakPointInfo, source_position, kSourcePositionIndex) | |
| 27 ACCESSORS(BreakPointInfo, break_point_objects, Object, kBreakPointObjectsIndex) | |
| 28 | |
| 29 bool DebugInfo::HasDebugBytecodeArray() { | |
| 30 return debug_bytecode_array()->IsBytecodeArray(); | |
| 31 } | |
| 32 | |
| 33 bool DebugInfo::HasDebugCode() { | |
| 34 Code* code = shared()->code(); | |
| 35 bool has = code->kind() == Code::FUNCTION; | |
| 36 DCHECK(!has || code->has_debug_break_slots()); | |
| 37 return has; | |
| 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 Code* DebugInfo::DebugCode() { | |
| 51 DCHECK(HasDebugCode()); | |
| 52 return shared()->code(); | |
| 53 } | |
| 54 | |
| 55 } // namespace internal | |
| 56 } // namespace v8 | |
| 57 | |
| 58 #include "src/objects/object-macros-undef.h" | |
| 59 | |
| 60 #endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_ | |
| OLD | NEW |