Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qv4writebarrier.cpp
Go to the documentation of this file.
1
// Copyright (C) 2023 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:critical reason:low-level-memory-management
4
#
include
<
private
/
qv4value_p
.
h
>
5
#
include
<
private
/
qv4mm_p
.
h
>
6
7
QT_BEGIN_NAMESPACE
8
9
namespace
{
10
void
markHeapBase
(QV4::MarkStack* markStack, QV4::Heap::Base *base){
11
if
(!base)
12
return
;
13
base->mark(markStack);
14
}
15
}
16
namespace
QV4
{
17
18
void
WriteBarrier
::
write_slowpath
(
EngineBase
*
engine
,
Heap
::
Base
*
base
,
ReturnedValue
*
slot
,
ReturnedValue
value
)
19
{
20
Q_UNUSED
(
base
);
21
Q_UNUSED
(
slot
);
22
MarkStack
*
markStack
=
engine
->
memoryManager
->
markStack
();
23
if
constexpr
(
isInsertionBarrier
)
24
markHeapBase
(
markStack
,
Value
::
fromReturnedValue
(
value
).
heapObject
());
25
}
26
27
void
WriteBarrier
::
write_slowpath
(
EngineBase
*
engine
,
Heap
::
Base
*
base
,
Heap
::
Base
**
slot
,
Heap
::
Base
*
value
)
28
{
29
Q_UNUSED
(
base
);
30
Q_UNUSED
(
slot
);
31
MarkStack
*
markStack
=
engine
->
memoryManager
->
markStack
();
32
if
constexpr
(
isInsertionBarrier
)
33
markHeapBase
(
markStack
,
value
);
34
}
35
36
}
37
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE::markHeapBase
void markHeapBase(QV4::MarkStack *markStack, QV4::Heap::Base *base)
Definition
qv4writebarrier.cpp:10
QV4
Definition
qjsvalue.h:24
qtdeclarative
src
qml
memory
qv4writebarrier.cpp
Generated on
for Qt by
1.16.1