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
#
include
<
private
/
qv4value_p
.
h
>
4
#
include
<
private
/
qv4mm_p
.
h
>
5
6
QT_BEGIN_NAMESPACE
7
8
namespace
{
9
void
markHeapBase
(QV4::MarkStack* markStack, QV4::Heap::Base *base){
10
if
(!base)
11
return
;
12
base->mark(markStack);
13
}
14
}
15
namespace
QV4
{
16
17
void
WriteBarrier
::
write_slowpath
(
EngineBase
*
engine
,
Heap
::
Base
*
base
,
ReturnedValue
*
slot
,
ReturnedValue
value
)
18
{
19
Q_UNUSED
(
base
);
20
Q_UNUSED
(
slot
);
21
MarkStack
*
markStack
=
engine
->
memoryManager
->
markStack
();
22
if
constexpr
(
isInsertionBarrier
)
23
markHeapBase
(
markStack
,
Value
::
fromReturnedValue
(
value
).
heapObject
());
24
}
25
26
void
WriteBarrier
::
write_slowpath
(
EngineBase
*
engine
,
Heap
::
Base
*
base
,
Heap
::
Base
**
slot
,
Heap
::
Base
*
value
)
27
{
28
Q_UNUSED
(
base
);
29
Q_UNUSED
(
slot
);
30
MarkStack
*
markStack
=
engine
->
memoryManager
->
markStack
();
31
if
constexpr
(
isInsertionBarrier
)
32
markHeapBase
(
markStack
,
value
);
33
}
34
35
}
36
QT_END_NAMESPACE
QT_BEGIN_NAMESPACE::markHeapBase
void markHeapBase(QV4::MarkStack *markStack, QV4::Heap::Base *base)
Definition
qv4writebarrier.cpp:9
QV4
Definition
qjsvalue.h:23
qtdeclarative
src
qml
memory
qv4writebarrier.cpp
Generated on
for Qt by
1.14.0