Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/objects/debug-objects-inl.h

Issue 2900713004: [objects] Extract DebugInfo and BreakPointInfo to own file (Closed)
Patch Set: Remove undefs from objects-inl.h Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects/debug-objects.cc ('k') | src/objects/object-macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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"
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_
OLDNEW
« no previous file with comments | « src/objects/debug-objects.cc ('k') | src/objects/object-macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698