Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
21
22namespace QV4 {
23
24namespace Heap {
25
26#define ProxyObjectMembers(class, Member) \
27 Member(class, Pointer, Object *, target) \
28 Member(class, Pointer, Object *, handler)
29
35
37 void init(const QV4::FunctionObject *target, const QV4::Object *handler);
38};
39
41
42#define ProxyMembers(class, Member) \
43 Member(class, Pointer, Symbol *, revokableProxySymbol) \
44
50
51}
52
53/*
54 * The inheritance from FunctionObject is a hack. Regular proxy objects are no function objects.
55 * But this helps implement the proxy for function objects, where we need this and thus gives us
56 * all the virtual methods from ProxyObject without having to duplicate them.
57 *
58 * But it does require a few hacks to make sure we don't recognize regular proxy objects as function
59 * objects in the runtime.
60 */
65
66 static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty);
67 static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver);
69 static bool virtualHasProperty(const Managed *m, PropertyKey id);
72 static bool virtualIsExtensible(const Managed *m);
73 static bool virtualPreventExtensions(Managed *);
74 static Heap::Object *virtualGetPrototypeOf(const Managed *);
75 static bool virtualSetPrototypeOf(Managed *, const Object *);
76 static OwnPropertyKeyIterator *virtualOwnPropertyKeys(const Object *m, Value *iteratorTarget);
77};
78
86
92
94{
96
97 static ReturnedValue virtualCallAsConstructor(const FunctionObject *f, const Value *argv, int argc, const Value *);
98 static ReturnedValue virtualCall(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
99
100 static ReturnedValue method_revocable(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
101
102 static ReturnedValue method_revoke(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
103};
104
105}
106
108
109#endif // QV4ECMAOBJECTS_P_H
Combined button and popup list for selecting options.
quint64 ReturnedValue
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLfloat GLfloat f
GLenum target
GLfloat GLfloat p
[1]
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
#define Q_MANAGED_TYPE(type)
#define V4_INTERNALCLASS(c)
#define DECLARE_HEAP_OBJECT(name, base)
#define DECLARE_MARKOBJECTS(class)
#define V4_OBJECT2(DataClass, superClass)
QJSEngine engine
[0]
void init(const QV4::FunctionObject *target, const QV4::Object *handler)
Definition qv4proxy.cpp:26
bool hasProperty(PropertyKey id) const
static ReturnedValue method_revocable(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
Definition qv4proxy.cpp:753
static ReturnedValue method_revoke(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
Definition qv4proxy.cpp:776
static constexpr VTable::SetPrototypeOf virtualSetPrototypeOf
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
static constexpr VTable::CallAsConstructor virtualCallAsConstructor
static constexpr VTable::Call virtualCall
static constexpr VTable::PreventExtensions virtualPreventExtensions
static constexpr VTable::GetPrototypeOf virtualGetPrototypeOf
static constexpr VTable::DeleteProperty virtualDeleteProperty
static constexpr VTable::Get virtualGet
static constexpr VTable::HasProperty virtualHasProperty
static constexpr VTable::Put virtualPut
static constexpr VTable::IsExtensible virtualIsExtensible