v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
debug-objects-inl.h
Go to the documentation of this file.
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
9// Include the non-inl header before the rest of the headers.
10
17#include "src/objects/string.h"
20
21// Has to be the last include (doesn't have include guards):
23
24namespace v8 {
25namespace internal {
26
27#include "torque-generated/src/objects/debug-objects-tq-inl.inc"
28
30TQ_OBJECT_CONSTRUCTORS_IMPL(BreakPointInfo)
33
35
37 DebugInfo::SideEffectStateBits)
39 DebugInfo::DebugIsBlackboxedBit)
40BIT_FIELD_ACCESSORS(DebugInfo, debugger_hints, computed_debug_is_blackboxed,
41 DebugInfo::ComputedDebugIsBlackboxedBit)
43 DebugInfo::DebuggingIdBits)
44
45bool DebugInfo::HasInstrumentedBytecodeArray() {
46 return has_debug_bytecode_array();
47}
48
53
56 Tagged<BytecodeArray> result = debug_bytecode_array(isolate, kAcquireLoad);
57 DCHECK_EQ(shared()->GetActiveBytecodeArray(isolate), result);
58 return result;
59}
60
62 kDebugBytecodeArrayOffset,
63 kBytecodeArrayIndirectPointerTag)
66 kBytecodeArrayIndirectPointerTag)
67
70
71Tagged<Script> StackFrameInfo::script() const {
72 Tagged<HeapObject> object = shared_or_script();
73 if (IsSharedFunctionInfo(object)) {
74 object = Cast<SharedFunctionInfo>(object)->script();
75 }
76 return Cast<Script>(object);
77}
78
79BIT_FIELD_ACCESSORS(StackFrameInfo, flags, bytecode_offset_or_source_position,
80 StackFrameInfo::BytecodeOffsetOrSourcePositionBits)
82 StackFrameInfo::IsConstructorBit)
83
86
89
90bool ErrorStackData::HasFormattedStack() const {
91 return !IsFixedArray(call_site_infos_or_formatted_stack());
92}
93
95 kCallSiteInfosOrFormattedStackOffset,
96 HasFormattedStack(), true)
97
98bool ErrorStackData::HasCallSiteInfos() const { return !HasFormattedStack(); }
99
100DEF_GETTER(ErrorStackData, call_site_infos, Tagged<FixedArray>) {
101 DCHECK(HasCallSiteInfos());
102 return Cast<FixedArray>(call_site_infos_or_formatted_stack());
103}
104
105} // namespace internal
106} // namespace v8
107
109
110#endif // V8_OBJECTS_DEBUG_OBJECTS_INL_H_
Tagged< BytecodeArray > OriginalBytecodeArray(Isolate *isolate)
Tagged< BytecodeArray > DebugBytecodeArray(Isolate *isolate)
SharedFunctionInfoRef shared
ZoneVector< RpoNumber > & result
kStaticElementsTemplateOffset kInstancePropertiesTemplateOffset Tagged< FixedArray >
DebugInfo::DebugIsBlackboxedBit debugging_id
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
Definition casting.h:150
static constexpr AcquireLoadTag kAcquireLoad
Definition globals.h:2908
#define TRUSTED_POINTER_ACCESSORS(holder, name, type, offset, tag)
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
#define BIT_FIELD_ACCESSORS(holder, field, name, BitField)
#define ACCESSORS_RELAXED_CHECKED2(holder, name, type, offset, get_condition, set_condition)
#define NEVER_READ_ONLY_SPACE_IMPL(Type)
#define DEF_GETTER(Camel, Lower, Bit)
#define DCHECK(condition)
Definition logging.h:482
#define DCHECK_EQ(v1, v2)
Definition logging.h:485