Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qv4proxy_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
#ifndef QV4PROXY_P_H
4
#define QV4PROXY_P_H
5
6
//
7
// W A R N I N G
8
// -------------
9
//
10
// This file is not part of the Qt API. It exists purely as an
11
// implementation detail. This header file may change from version to
12
// version without notice, or even be removed.
13
//
14
// We mean it.
15
//
16
17
#include "
qv4object_p.h
"
18
#include "
qv4functionobject_p.h
"
19
20
QT_BEGIN_NAMESPACE
21
22
namespace
QV4
{
23
24
namespace
Heap {
25
26
#define ProxyObjectMembers(class, Member) \
27
Member(class, Pointer, Object *, target) \
28
Member(class, Pointer, Object *, handler)
29
30
DECLARE_HEAP_OBJECT
(
ProxyObject
,
FunctionObject
) {
31
DECLARE_MARKOBJECTS
(
ProxyObject
)
32
33
void
init
(
const
QV4::Object
*
target
,
const
QV4::Object
*handler);
34
};
35
36
struct
ProxyFunctionObject
:
ProxyObject
{
37
void
init
(
const
QV4::FunctionObject
*
target
,
const
QV4::Object
*handler);
38
};
39
40
#define ProxyMembers(class, Member) \
41
Member(class, Pointer, Symbol *, revokableProxySymbol) \
42
43
DECLARE_HEAP_OBJECT
(
Proxy
,
FunctionObject
) {
44
DECLARE_MARKOBJECTS
(
Proxy
)
45
46
void
init
(
QV4::ExecutionContext
*
ctx
);
47
};
48
49
}
50
51
/*
52
* The inheritance from FunctionObject is a hack. Regular proxy objects are no function objects.
53
* But this helps implement the proxy for function objects, where we need this and thus gives us
54
* all the virtual methods from ProxyObject without having to duplicate them.
55
*
56
* But it does require a few hacks to make sure we don't recognize regular proxy objects as function
57
* objects in the runtime.
58
*/
59
struct
ProxyObject
:
FunctionObject
{
60
V4_OBJECT2
(
ProxyObject
,
Object
)
61
Q_MANAGED_TYPE
(
ProxyObject
)
62
V4_INTERNALCLASS
(
ProxyObject
)
63
enum
{
64
IsFunctionObject
=
false
65
};
66
67
static
ReturnedValue
virtualGet
(
const
Managed
*
m
,
PropertyKey
id
,
const
Value
*receiver,
bool
*
hasProperty
);
68
static
bool
virtualPut
(
Managed
*
m
,
PropertyKey
id
,
const
Value
&
value
,
Value
*receiver);
69
static
bool
virtualDeleteProperty
(
Managed
*
m
,
PropertyKey
id
);
70
static
bool
virtualHasProperty
(
const
Managed
*
m
,
PropertyKey
id
);
71
static
PropertyAttributes
virtualGetOwnProperty
(
const
Managed
*
m
,
PropertyKey
id
,
Property
*
p
);
72
static
bool
virtualDefineOwnProperty
(
Managed
*
m
,
PropertyKey
id
,
const
Property
*
p
,
PropertyAttributes
attrs
);
73
static
bool
virtualIsExtensible
(
const
Managed
*
m
);
74
static
bool
virtualPreventExtensions
(
Managed
*);
75
static
Heap::Object *
virtualGetPrototypeOf
(
const
Managed
*);
76
static
bool
virtualSetPrototypeOf
(
Managed
*,
const
Object
*);
77
static
OwnPropertyKeyIterator
*
virtualOwnPropertyKeys
(
const
Object
*
m
,
Value
*iteratorTarget);
78
};
79
80
struct
ProxyFunctionObject
:
ProxyObject
{
81
V4_OBJECT2
(
ProxyFunctionObject
,
FunctionObject
)
82
Q_MANAGED_TYPE
(
ProxyObject
)
83
V4_INTERNALCLASS
(
ProxyFunctionObject
)
84
enum
{
85
IsFunctionObject
=
true
86
};
87
88
static
ReturnedValue
virtualCallAsConstructor
(
const
FunctionObject
*
f
,
const
Value
*argv,
int
argc,
const
Value
*);
89
static
ReturnedValue
virtualCall
(
const
FunctionObject
*
f
,
const
Value
*thisObject,
const
Value
*argv,
int
argc);
90
};
91
92
struct
Proxy
:
FunctionObject
93
{
94
V4_OBJECT2
(
Proxy
,
FunctionObject
)
95
96
static
ReturnedValue
virtualCallAsConstructor
(
const
FunctionObject
*
f
,
const
Value
*argv,
int
argc,
const
Value
*);
97
static
ReturnedValue
virtualCall
(
const
FunctionObject
*,
const
Value
*thisObject,
const
Value
*argv,
int
argc);
98
99
static
ReturnedValue
method_revocable
(
const
FunctionObject
*,
const
Value
*thisObject,
const
Value
*argv,
int
argc);
100
101
static
ReturnedValue
method_revoke
(
const
FunctionObject
*,
const
Value
*thisObject,
const
Value
*argv,
int
argc);
102
};
103
104
}
105
106
QT_END_NAMESPACE
107
108
#endif
// QV4ECMAOBJECTS_P_H
ctx
EGLContext ctx
Definition
dmabufserverbufferintegration.h:20
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
QV4
\qmltype Particle \inqmlmodule QtQuick.Particles
Definition
qquickv4particledata.cpp:234
QV4::ReturnedValue
quint64 ReturnedValue
Definition
qv4staticvalue_p.h:38
attrs
static struct AttrInfo attrs[]
Definition
qeglconvenience.cpp:394
value
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
Definition
qeglstreamconvenience_p.h:46
m
const GLfloat * m
Definition
qopengles2ext.h:3203
f
GLfloat GLfloat f
Definition
qopengles2ext.h:795
target
GLenum target
Definition
qopengles2ext.h:751
p
GLfloat GLfloat p
[1]
Definition
qopenglext.h:12698
init
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
Definition
qtextboundaryfinder.cpp:10
qv4functionobject_p.h
Q_MANAGED_TYPE
#define Q_MANAGED_TYPE(type)
Definition
qv4managed_p.h:64
V4_INTERNALCLASS
#define V4_INTERNALCLASS(c)
Definition
qv4managed_p.h:68
DECLARE_HEAP_OBJECT
#define DECLARE_HEAP_OBJECT(name, base)
Definition
qv4mmdefs_p.h:313
DECLARE_MARKOBJECTS
#define DECLARE_MARKOBJECTS(class)
Definition
qv4mmdefs_p.h:320
qv4object_p.h
V4_OBJECT2
#define V4_OBJECT2(DataClass, superClass)
Definition
qv4vtable_p.h:237
QV4::ExecutionContext
Definition
qv4context_p.h:107
QV4::FunctionObject
Definition
qv4functionobject_p.h:137
QV4::Heap::ProxyFunctionObject
Definition
qv4proxy_p.h:36
QV4::Heap::ProxyFunctionObject::init
void init(const QV4::FunctionObject *target, const QV4::Object *handler)
Definition
qv4proxy.cpp:25
QV4::Managed
Definition
qv4managed_p.h:73
QV4::Object
Definition
qv4object_p.h:104
QV4::Object::hasProperty
bool hasProperty(PropertyKey id) const
Definition
qv4object_p.h:140
QV4::OwnPropertyKeyIterator
Definition
qv4vtable_p.h:27
QV4::PropertyAttributes
Definition
qv4global_p.h:193
QV4::PropertyKey
Definition
qv4propertykey_p.h:28
QV4::Property
Definition
qv4property_p.h:26
QV4::ProxyFunctionObject
Definition
qv4proxy_p.h:80
QV4::ProxyFunctionObject::IsFunctionObject
@ IsFunctionObject
Definition
qv4proxy_p.h:85
QV4::ProxyObject
Definition
qv4proxy_p.h:59
QV4::ProxyObject::IsFunctionObject
@ IsFunctionObject
Definition
qv4proxy_p.h:64
QV4::Proxy
Definition
qv4proxy_p.h:93
QV4::Proxy::method_revocable
static ReturnedValue method_revocable(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
Definition
qv4proxy.cpp:747
QV4::Proxy::method_revoke
static ReturnedValue method_revoke(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
Definition
qv4proxy.cpp:767
QV4::VTableBase::virtualSetPrototypeOf
static constexpr VTable::SetPrototypeOf virtualSetPrototypeOf
Definition
qv4vtable_p.h:169
QV4::VTableBase::virtualDefineOwnProperty
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
Definition
qv4vtable_p.h:165
QV4::VTableBase::virtualOwnPropertyKeys
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
Definition
qv4vtable_p.h:171
QV4::VTableBase::virtualGetOwnProperty
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
Definition
qv4vtable_p.h:164
QV4::VTableBase::virtualCallAsConstructor
static constexpr VTable::CallAsConstructor virtualCallAsConstructor
Definition
qv4vtable_p.h:175
QV4::VTableBase::virtualCall
static constexpr VTable::Call virtualCall
Definition
qv4vtable_p.h:174
QV4::VTableBase::virtualPreventExtensions
static constexpr VTable::PreventExtensions virtualPreventExtensions
Definition
qv4vtable_p.h:167
QV4::VTableBase::virtualGetPrototypeOf
static constexpr VTable::GetPrototypeOf virtualGetPrototypeOf
Definition
qv4vtable_p.h:168
QV4::VTableBase::virtualDeleteProperty
static constexpr VTable::DeleteProperty virtualDeleteProperty
Definition
qv4vtable_p.h:162
QV4::VTableBase::virtualGet
static constexpr VTable::Get virtualGet
Definition
qv4vtable_p.h:160
QV4::VTableBase::virtualHasProperty
static constexpr VTable::HasProperty virtualHasProperty
Definition
qv4vtable_p.h:163
QV4::VTableBase::virtualPut
static constexpr VTable::Put virtualPut
Definition
qv4vtable_p.h:161
QV4::VTableBase::virtualIsExtensible
static constexpr VTable::IsExtensible virtualIsExtensible
Definition
qv4vtable_p.h:166
QV4::Value
Definition
qv4value_p.h:38
qtdeclarative
src
qml
jsruntime
qv4proxy_p.h
Generated by
1.9.7