Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qv4debuginstructions_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant
4
5
#
ifndef
QV4DEBUGINSTRUCTIONS_P_H
6
#
define
QV4DEBUGINSTRUCTIONS_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
private
/
qv4bytecodegenerator_p
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
namespace
QV4
{
24
namespace
Moth
{
25
26
// Inserts Debug instructions into the generated code, so that the debugger can check for
27
// breakpoints when it executes them.
28
class
DebugInstructions
29
{
30
public
:
31
static
void
insert
(BytecodeGenerator *generator);
32
33
private
:
34
using
I
=
BytecodeGenerator
::
I
;
35
36
DebugInstructions(BytecodeGenerator *generator) : m_generator(generator) {}
37
void
run();
38
void
appendDebug(
int
line,
const
I &before);
39
void
appendJumpOverDebug(
const
I &before);
40
41
template
<
typename
Data>
42
static
I makeInstruction(
const
Data &data,
int
line,
int
statement)
43
{
44
return
BytecodeGenerator::makeInstruction(Data::type, Instr::Factory<Data>::create(data),
45
-1, line, statement);
46
}
47
48
template
<
typename
Data>
49
static
I makeJumpInstruction(
const
Data &data,
int
line,
int
statement)
50
{
51
return
BytecodeGenerator::makeInstruction(Data::type, Instr::Factory<Data>::create(data),
52
offsetof(Data, offset), line, statement);
53
}
54
55
BytecodeGenerator *m_generator;
56
};
57
58
}
// namespace Moth
59
}
// namespace QV4
60
61
QT_END_NAMESPACE
62
63
#
endif
// QV4DEBUGINSTRUCTIONS_P_H
QV4::Moth::DebugInstructions
Definition
qv4debuginstructions_p.h:29
QV4::Moth::DebugInstructions::insert
static void insert(BytecodeGenerator *generator)
Definition
qv4debuginstructions.cpp:28
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QV4::Moth
Definition
qv4debuginstructions.cpp:10
QV4::Moth::isFromOtherLine
static bool isFromOtherLine(int jumpLine, int line)
Definition
qv4debuginstructions.cpp:23
QV4::Moth::NoJumpLine
@ NoJumpLine
Definition
qv4debuginstructions.cpp:12
QV4::Moth::MultipleJumpLines
@ MultipleJumpLines
Definition
qv4debuginstructions.cpp:12
QV4::Moth::mergeJumpLines
static int mergeJumpLines(int a, int b)
Definition
qv4debuginstructions.cpp:14
QV4
Definition
qjsvalue.h:24
qtdeclarative
src
plugins
qmltooling
debuginstructions
qv4debuginstructions_p.h
Generated on
for Qt by
1.18.0