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
qv4argumentsobject_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QV4ARGUMENTSOBJECTS_H
4#define QV4ARGUMENTSOBJECTS_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
20
21namespace QV4 {
22
23namespace Heap {
24
25#define ArgumentsObjectMembers(class, Member) \
26 Member(class, Pointer, CallContext *, context) \
27 Member(class, NoMark, bool, fullyCreated) \
28 Member(class, NoMark, uint, argCount) \
29 Member(class, NoMark, quint64, mapped)
30
33 enum {
34 LengthPropertyIndex = 0,
35 SymbolIteratorPropertyIndex = 1,
36 CalleePropertyIndex = 2
37 };
39};
40
41#define StrictArgumentsObjectMembers(class, Member)
42
44 enum {
45 LengthPropertyIndex = 0,
46 SymbolIteratorPropertyIndex = 1,
47 CalleePropertyIndex = 2,
48 CalleeSetterPropertyIndex = 3
49 };
51};
52
53}
54
58
59 Heap::CallContext *context() const { return d()->context; }
60 bool fullyCreated() const { return d()->fullyCreated; }
61
63 return m->vtable() == staticVTable();
64 }
65
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);
71 static qint64 virtualGetLength(const Managed *m);
73
74 void fullyCreate();
75
76 // There's a slight hack here, as this limits the amount of mapped arguments to 64, but that should be
77 // more than enough for all practical uses of arguments
78 bool isMapped(uint arg) const {
79 return arg < 64 && (d()->mapped & (1ull << arg));
80 }
81
83 if (arg < 64)
84 (d()->mapped &= ~(1ull << arg));
85 }
86
87};
88
93
94}
95
97
98#endif
99
Combined button and popup list for selecting options.
quint64 ReturnedValue
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const GLfloat * m
GLenum target
GLfloat GLfloat p
[1]
SSL_CTX int void * arg
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
unsigned int uint
Definition qtypes.h:34
long long qint64
Definition qtypes.h:60
#define Q_MANAGED_TYPE(type)
#define DECLARE_HEAP_OBJECT(name, base)
#define DECLARE_MARKOBJECTS(class)
#define V4_OBJECT2(DataClass, superClass)
QFrame frame
[0]
Heap::CallContext * context() const
static bool isNonStrictArgumentsObject(Managed *m)
bool isMapped(uint arg) const
bool hasProperty(PropertyKey id) const
static constexpr VTable::DefineOwnProperty virtualDefineOwnProperty
static constexpr VTable::OwnPropertyKeys virtualOwnPropertyKeys
static constexpr VTable::GetOwnProperty virtualGetOwnProperty
static constexpr VTable::DeleteProperty virtualDeleteProperty
static constexpr VTable::Get virtualGet
static constexpr VTable::GetLength virtualGetLength
static constexpr VTable::Put virtualPut