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
qv4runtimeapi_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 QV4RUNTIMEAPI_P_H
4#define QV4RUNTIMEAPI_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 <private/qv4global_p.h>
18#include <private/qv4staticvalue_p.h>
19
21
22namespace QV4 {
23
24typedef uint Bool;
25
26struct Q_QML_EXPORT Runtime {
28 typedef ReturnedValue (*BinaryOperation)(const Value &left, const Value &right);
30
31 enum class Throws { No, Yes };
32 enum class ChangesContext { No, Yes };
33 enum class Pure { No, Yes };
35
38 struct Method
39 {
40 static constexpr bool throws = t == Throws::Yes;
41 static constexpr bool changesContext = c == ChangesContext::Yes;
42 static constexpr bool pure = p == Pure::Yes;
44 };
48
49 /* call */
59 {
60 static ReturnedValue call(ExecutionEngine *, int, Value[], int);
61 };
63 {
64 static ReturnedValue call(ExecutionEngine *, const Value &, int, Value[], int);
65 };
67 {
68 static ReturnedValue call(ExecutionEngine *, const Value &, uint, Value[], int);
69 };
71 {
72 static ReturnedValue call(ExecutionEngine *, const Value &, Value[], int);
73 };
75 {
76 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &, Value[], int);
77 };
83 {
84 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &, Value[], int);
85 };
90
91 /* construct */
93 {
94 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &, Value[], int);
95 };
97 {
98 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &, Value[], int);
99 };
100
101 /* load & store */
103 {
104 static void call(ExecutionEngine *, int, const Value &);
105 };
107 {
108 static void call(ExecutionEngine *, int, const Value &);
109 };
111 {
112 static void call(ExecutionEngine *, const Value &, int, const Value &);
113 };
115 {
116 static void call(ExecutionEngine *, const Value &, const Value &, const Value &);
117 };
119 {
120 static ReturnedValue call(ExecutionEngine *, const Value &, int);
121 };
123 {
124 static ReturnedValue call(ExecutionEngine *, int);
125 };
127 {
128 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &);
129 };
131 {
132 static ReturnedValue call(ExecutionEngine *, const Value &);
133 };
135 {
136 static void call(ExecutionEngine *, const Value &, const Value &);
137 };
151 {
152 static ReturnedValue call(ExecutionEngine *, Function *, const Value &, int);
153 };
155 {
156 static void call(Function *, const Value &, int, const Value &);
157 };
159 {
160 static void call(Function *, const Value &, int, const Value &);
161 };
162
163 /* typeof */
165 {
166 static ReturnedValue call(ExecutionEngine *, const Value &);
167 };
169 {
170 static ReturnedValue call(ExecutionEngine *, int);
171 };
172
173 /* delete */
175 {
176 static Bool call(ExecutionEngine *, const Value &, const Value &);
177 };
179 {
180 static ReturnedValue call(ExecutionEngine *, Function *, const Value &, const Value &);
181 };
183 {
184 static Bool call(ExecutionEngine *, int);
185 };
187 {
188 static ReturnedValue call(ExecutionEngine *, Function *, int);
189 };
190
191 /* exceptions & scopes */
193 {
194 static void call(ExecutionEngine *, const Value &);
195 };
197 {
198 static void call(JSTypesStackFrame *);
199 };
205 {
206 static void call(ExecutionEngine *, int, int);
207 };
209 {
210 static void call(ExecutionEngine *, int);
211 };
213 {
214 static void call(ExecutionEngine *);
215 };
217 {
218 static void call(ExecutionEngine *, int);
219 };
221 {
222 static void call(ExecutionEngine *);
223 };
225 {
226 static void call(ExecutionEngine *, int);
227 };
229 {
230 static void call(ExecutionEngine *, const Value &);
231 };
232
233 /* garbage collection */
235 {
236 static void call(const Value &toBeMarked);
237 };
238
239 /* closures */
241 {
242 static ReturnedValue call(ExecutionEngine *, int);
243 };
244
245 /* Function header */
247 {
248 static ReturnedValue call(ExecutionEngine *, const Value &);
249 };
251 {
252 static void call(ExecutionEngine *, Bool, int);
253 };
266
267 /* literals */
273 {
274 static ReturnedValue call(ExecutionEngine *, int, Value[], int);
275 };
277 {
278 static ReturnedValue call(ExecutionEngine *, int, const Value &, Value[]);
279 };
280
281 /* for-in, for-of and array destructuring */
283 {
284 static ReturnedValue call(ExecutionEngine *, const Value &, int);
285 };
287 {
288 static ReturnedValue call(ExecutionEngine *, const Value &, Value *);
289 };
291 {
292 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &, Value *);
293 };
295 {
296 static ReturnedValue call(ExecutionEngine *, const Value &);
297 };
302
303 /* conversions */
305 {
306 static ReturnedValue call(ExecutionEngine *, const Value &);
307 };
309 {
310 static Bool call(const Value &);
311 };
313 {
314 static ReturnedValue call(ExecutionEngine *, const Value &);
315 };
316 /* unary operators */
318 {
319 static ReturnedValue call(const Value &);
320 };
321
322 /* binary operators */
324 {
325 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &);
326 };
328 {
329 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &);
330 };
332 {
333 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &);
334 };
336 {
337 static ReturnedValue call(ExecutionEngine *, const Value &, const Value &);
338 };
340 {
341 static ReturnedValue call(const Value &, const Value &);
342 };
344 {
345 static ReturnedValue call(const Value &, const Value &);
346 };
348 {
349 static ReturnedValue call(const Value &, const Value &);
350 };
352 {
353 static ReturnedValue call(const Value &, const Value &);
354 };
356 {
357 static ReturnedValue call(const Value &, const Value &);
358 };
360 {
361 static ReturnedValue call(const Value &, const Value &);
362 };
364 {
365 static ReturnedValue call(const Value &, const Value &);
366 };
368 {
369 static ReturnedValue call(const Value &, const Value &);
370 };
372 {
373 static ReturnedValue call(const Value &, const Value &);
374 };
376 {
377 static ReturnedValue call(const Value &, const Value &);
378 };
380 {
381 static ReturnedValue call(const Value &, const Value &);
382 };
384 {
385 static ReturnedValue call(const Value &, const Value &);
386 };
388 {
389 static ReturnedValue call(const Value &, const Value &);
390 };
392 {
393 static ReturnedValue call(const Value &, const Value &);
394 };
396 {
397 static ReturnedValue call(const Value &, const Value &);
398 };
400 {
401 static ReturnedValue call(const Value &, const Value &);
402 };
404 {
405 static ReturnedValue call(const Value &, const Value &);
406 };
408 {
409 static ReturnedValue call(const Value &, const Value &);
410 };
412 {
413 static ReturnedValue call(const Value &, const Value &);
414 };
415
416 /* comparisons */
418 {
419 static Bool call(const Value &, const Value &);
420 };
422 {
423 static Bool call(const Value &, const Value &);
424 };
426 {
427 static Bool call(const Value &, const Value &);
428 };
430 {
431 static Bool call(const Value &, const Value &);
432 };
434 {
435 static Bool call(const Value &, const Value &);
436 };
438 {
439 static Bool call(const Value &, const Value &);
440 };
442 {
443 static Bool call(const Value &, const Value &);
444 };
446 {
447 static Bool call(const Value &, const Value &);
448 };
449
451 {
452 static Bool call(ExecutionEngine *, const Value &, const Value &);
453 };
455 {
456 static Bool call(ExecutionEngine *, const Value &, const Value &);
457 };
458
460 {
461 static ReturnedValue call(ExecutionEngine *, int);
462 };
464 {
465 static ReturnedValue call(Function *, int);
466 };
467
469 static const int tailCall_function = -1;
470 static const int tailCall_thisObject = -2;
471 static const int tailCall_argv = -3;
472 static const int tailCall_argc = -4;
473 };
474
475 static QHash<const void *, const char *> symbolTable();
476};
477
478static_assert(std::is_standard_layout<Runtime>::value, "Runtime needs to be standard layout in order for us to be able to use offsetof");
479static_assert(sizeof(Runtime::BinaryOperation) == sizeof(void*), "JIT expects a function pointer to fit into a regular pointer, for cross-compilation offset translation");
480
481} // namespace QV4
482
483QT_END_NAMESPACE
484
485#endif // QV4RUNTIMEAPI_P_H
\inmodule QtQml
bool isString() const
Returns true if the type of this QJSManagedValue is string, or false otherwise.
QJSEngine * engine() const
Returns the QJSEngine this QJSManagedValue belongs to.
bool deleteProperty(quint32 arrayIndex)
Deletes the value stored at arrayIndex from this QJSManagedValue.
friend class QJSEngine
QJSValue toJSValue() const
Copies this QJSManagedValue into a new QJSValue.
QJSManagedValue jsMetaType() const
bool isBoolean() const
Returns true if the type of this QJSManagedValue is boolean, or false otherwise.
const QMetaObject * toQMetaObject() const
If this QJSManagedValue holds a QMetaObject pointer, returns it.
QStringList jsMetaMembers() const
bool isArray() const
Returns true if this value represents a JavaScript Array object, or false otherwise.
bool isError() const
Returns true if this value represents a JavaScript Error object, or false otherwise.
bool strictlyEquals(const QJSManagedValue &other) const
Invokes the JavaScript '===' operator on this QJSManagedValue and other, and returns the result.
bool hasProperty(const QString &name) const
Returns true if this QJSManagedValue has a property name, otherwise returns false.
QJSValue call(const QJSValueList &arguments={}) const
If this QJSManagedValue represents a JavaScript FunctionObject, calls it with the given arguments,...
QObject * toQObject() const
If this QJSManagedValue holds a QObject pointer, returns it.
bool isRegularExpression() const
Returns true if this value represents a JavaScript regular expression object, or false otherwise.
QJSValue property(const QString &name) const
Returns the property name of this QJSManagedValue.
QJSManagedValue jsMetaInstantiate(const QJSValueList &values={}) const
bool hasOwnProperty(quint32 arrayIndex) const
Returns true if this QJSManagedValue has an array index arrayIndex, otherwise returns false.
QVariant toVariant() const
Copies this QJSManagedValue into a new QVariant.
bool hasProperty(quint32 arrayIndex) const
Returns true if this QJSManagedValue has an array index arrayIndex, otherwise returns false.
double toNumber() const
Converts the manged value to a number.
QJSManagedValue & operator=(QJSManagedValue &&other)
Move-assigns a QJSManagedValue from other.
QJSValue callAsConstructor(const QJSValueList &arguments={}) const
If this QJSManagedValue represents a JavaScript FunctionObject, calls it as constructor with the give...
bool isVariant() const
Returns true if this value represents a QVariant managed on the JavaScript heap, or false otherwise.
bool isFunction() const
Returns true if the type of this QJSManagedValue is function, false otherwise.
QRegularExpression toRegularExpression() const
If this QJSManagedValue holds a JavaScript regular expression object, returns an equivalent QRegularE...
QJSManagedValue prototype() const
Returns the prototype for this QJSManagedValue.
bool isUndefined() const
Returns true if the type of this QJSManagedValue is undefined, or false otherwise.
bool isDate() const
Returns true if this value represents a JavaScript Date object, or false otherwise.
bool equals(const QJSManagedValue &other) const
Invokes the JavaScript '==' operator on this QJSManagedValue and other, and returns the result.
~QJSManagedValue()
Destroys the QJSManagedValue.
QJSPrimitiveValue toPrimitive() const
Converts the manged value to a QJSPrimitiveValue.
bool deleteProperty(const QString &name)
Deletes the property name from this QJSManagedValue.
bool isQMetaObject() const
Returns true if this value represents a QMetaObject pointer managed on the JavaScript heap,...
QDateTime toDateTime() const
If this QJSManagedValue holds a JavaScript Date object, returns an equivalent QDateTime.
int toInteger() const
Converts the manged value to an integer.
QString toString() const
Converts the manged value to a string.
QUrl toUrl() const
If this QJSManagedValue holds a JavaScript Url object, returns an equivalent QUrl.
bool isQObject() const
Returns true if this value represents a QObject pointer managed on the JavaScript heap,...
bool hasOwnProperty(const QString &name) const
Returns true if this QJSManagedValue has a property name, otherwise returns false.
void setPrototype(const QJSManagedValue &prototype)
Sets the prototype of this QJSManagedValue to prototype.
bool isUrl() const
Returns true if this value represents a JavaScript Url object, or false otherwise.
bool isInteger() const
Returns true if this QJSManagedValue holds an integer value, or false otherwise.
bool isNumber() const
Returns true if the type of this QJSManagedValue is number, or false otherwise.
bool isNull() const
Returns true if this QJSManagedValue holds the JavaScript null value, or false otherwise.
bool isSymbol() const
Returns true if the type of this QJSManagedValue is symbol, or false otherwise.
bool isObject() const
Returns true if the type of this QJSManagedValue is object, or false otherwise.
void setProperty(const QString &name, const QJSValue &value)
Sets the property name to value on this QJSManagedValue.
void setProperty(quint32 arrayIndex, const QJSValue &value)
Stores the value at arrayIndex in this QJSManagedValue.
bool toBoolean() const
Converts the manged value to a boolean.
QJSValue callWithInstance(const QJSValue &instance, const QJSValueList &arguments={}) const
If this QJSManagedValue represents a JavaScript FunctionObject, calls it on instance with the given a...
bool isJsMetaType() const
The QJSPrimitiveValue class operates on primitive types in JavaScript semantics.
static QV4::ExecutionEngine * engine(const QJSValue *jsval)
Definition qjsvalue_p.h:321
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
virtual Type type() const =0
Reimplement this function to return the paint engine \l{Type}.
virtual QVariant property(QPrintDevice::PrintDevicePropertyKey key) const
static void operator delete(void *ptr)
@ hasAttachedProperties
Definition qqmlprivate.h:75
ArrayElementLessThan(ExecutionEngine *engine, const Value &comparefn)
bool operator()(Value v1, Value v2) const
ReturnedValue operator*() const
Definition qv4value_p.h:476
OptionalReturnedValue(ReturnedValue v)
Definition qv4value_p.h:469
ReturnedValue operator->() const
Definition qv4value_p.h:475
constexpr QtPrivate::QMetaTypeInterface metaTypeForNamespace(const QtPrivate::QMetaTypeInterface::MetaObjectFn &metaObjectFunction, const char *name)
void createInto(void *memory, void *)
Q_QML_EXPORT void qmlRegistrationWarning(QmlRegistrationWarning warning, QMetaType type)
Definition qqml.cpp:170
@ CompositeSingletonRegistration
@ SingletonRegistration
@ SequentialContainerRegistration
@ SequentialContainerAndRevisionsRegistration
@ QmlUnitCacheHookRegistration
@ CompositeRegistration
@ SingletonAndRevisionsRegistration
@ InterfaceRegistration
@ AutoParentRegistration
@ TypeAndRevisionsRegistration
void Q_QML_EXPORT qmlRegisterTypeAndRevisions< QQmlTypeNotAvailable, void >(const char *uri, int versionMajor, const QMetaObject *classInfoMetaObject, QVector< int > *qmlTypeIds, const QMetaObject *, bool)
Definition qqml.cpp:1115
QQmlAttachedPropertiesFunc< QObject > attachedPropertiesFunc()
@ UnconstructibleSingleton
constexpr SingletonConstructionMode singletonConstructionMode()
Combined button and popup list for selecting options.
DECLARE_HEAP_OBJECT(CallContext, ExecutionContext)
DECLARE_HEAP_OBJECT(ExecutionContext, Base)
DECLARE_HEAP_OBJECT(ReferenceObject, Object)
DECLARE_EXPORTED_HEAP_OBJECT(Object, Base)
Definition qv4object_p.h:36
DECLARE_HEAP_OBJECT(MemberData, Base)
DECLARE_HEAP_OBJECT(BoundFunction, JavaScriptFunctionObject)
DECLARE_HEAP_OBJECT(ConstructorFunction, ScriptFunction)
DECLARE_HEAP_OBJECT(FunctionObject, Object)
DECLARE_HEAP_OBJECT(ArrayData, Base)
DECLARE_HEAP_OBJECT(RegExpCtor, FunctionObject)
Q_STATIC_ASSERT(std::is_trivial_v< ArrayData >)
DECLARE_HEAP_OBJECT(JavaScriptFunctionObject, FunctionObject)
DECLARE_HEAP_OBJECT(DateObject, ReferenceObject)
DECLARE_HEAP_OBJECT(MemberFunction, ArrowFunction)
DECLARE_HEAP_OBJECT(ScriptFunction, ArrowFunction)
CallResultDestination
Definition qjsvalue.h:23
@ STRING_HINT
@ PREFERREDTYPE_HINT
@ NUMBER_HINT
bool ReferenceObject::readReference< Heap::DateObject >(Heap::DateObject *ref)
Scoped< FunctionObject > ScopedFunctionObject
void sortHelper(RandomAccessIterator start, RandomAccessIterator end, LessThan lessThan)
QVector< StackFrame > StackTrace
int qYouForgotTheQ_MANAGED_Macro(T, T)
uint Bool
bool hasExceptionOrIsInterrupted(ExecutionEngine *engine)
Scoped< Object > ScopedObject
ReturnedValue value_convert(ExecutionEngine *e, const Value &v)
Scoped< ArrayObject > ScopedArrayObject
ReturnedValue checkedResult(QV4::ExecutionEngine *v4, ReturnedValue result)
Scoped< String > ScopedString
Scoped< StringOrSymbol > ScopedStringOrSymbol
void qYouForgotTheQ_MANAGED_Macro(T1, T2)
PropertyFlag
@ Attr_Invalid
@ Attr_NotConfigurable
@ Attr_Data
@ Attr_NotEnumerable
@ Attr_ReadOnly
@ Attr_NotWritable
@ Attr_ReadOnly_ButConfigurable
@ Attr_Accessor
bool ReferenceObject::writeBack< Heap::DateObject >(Heap::DateObject *ref, int internalIndex)
Q_STATIC_ASSERT(std::is_trivial_v< Value >)
Scoped< ExecutionContext > ScopedContext
void(* IRLoaderFunction)(Document *, const QQmlPrivate::CachedQmlUnit *)
Definition qqmlprivate.h:60
size_t qHash(QByteArrayView key, size_t seed) noexcept
Definition qhash.cpp:875
T caughtResult(const QJSValue *v, T(QV4::Value::*convert)() const)
Definition qjsvalue.cpp:514
static bool js_equal(const QString &string, const QV4::Value &value)
Definition qjsvalue.cpp:972
QDataStream & operator<<(QDataStream &stream, const QJSValue &jsv)
QDataStream & operator>>(QDataStream &stream, QJSValue &jsv)
QList< QJSValue > QJSValueList
Definition qjsvalue.h:22
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
QQmlCustomParser * qmlCreateCustomParser()
Definition qqmlprivate.h:90
#define V4_ARRAYDATA(DataClass)
#define V4_MANAGED(DataClass, superClass)
#define V4_MANAGED_SIZE_TEST
#define V4_NEEDS_DESTROY
#define V4_MANAGED_ITSELF(DataClass, superClass)
#define Q_MANAGED_TYPE(type)
#define V4_INTERNALCLASS(c)
#define Q_MANAGED_CHECK
double d
[1]
void(* functionPtr)(const AOTCompiledContext *context, void **argv)
void(* signature)(QV4::ExecutableCompilationUnit *unit, QMetaType *argTypes)
const AOTCompiledFunction * aotCompiledFunctions
const QV4::CompiledData::Unit * qmlData
static const QMetaObject * staticMetaObject()
static constexpr const CreateParentFunction createParent
static constexpr bool value
static constexpr bool Value
static QQmlAttachedPropertiesFunc< QObject > attachedPropertiesFunc()
static const QMetaObject * staticMetaObject()
static Func attachedPropertiesFunc()
static const QMetaObject * staticMetaObject()
static constexpr const QMetaObject * metaObject()
static constexpr bool Value
static constexpr QMetaSequence sequence()
static constexpr QMetaType self()
static constexpr bool hasAcceptableCtors()
static constexpr QMetaType list()
static constexpr int size()
static constexpr QMetaType list()
static constexpr QMetaSequence sequence()
static constexpr QMetaType self()
static constexpr bool hasAcceptableCtors()
static constexpr int size()
static constexpr bool Value
static constexpr bool Value
static constexpr bool Value
QmlUnitCacheLookupFunction lookupCachedQmlUnit
std::function< QObject *(QQmlEngine *, QJSEngine *)> qObjectApi
std::function< QObject *(QQmlEngine *, QJSEngine *)> qObjectApi
QObject *(* extensionObjectCreate)(QObject *)
std::function< QJSValue(QQmlEngine *, QJSEngine *)> scriptApi
const QMetaObject * extensionMetaObject
const QMetaObject * instanceMetaObject
QObject *(* extensionObjectCreate)(QObject *)
QQmlAttachedPropertiesFunc< QObject > attachedPropertiesFunction
QVariant(* createValueType)(const QJSValue &)
const QMetaObject * extensionMetaObject
const QMetaObject * classInfoMetaObject
const QMetaObject * attachedPropertiesMetaObject
QQmlCustomParser * customParser
void(* create)(void *, void *)
QQmlAttachedPropertiesFunc< QObject > attachedPropertiesFunction
QVariant(* createValueType)(const QJSValue &)
const QMetaObject * extensionMetaObject
QObject *(* extensionObjectCreate)(QObject *)
const QMetaObject * metaObject
const QMetaObject * attachedPropertiesMetaObject
bool has(StructVersion v) const
ValueTypeCreationMethod creationMethod
static no_type checkType(...)
static yes_type checkType(To *)
static const QMetaObject * staticMetaObject()
static constexpr const CreateValueTypeFunction create
static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *p, PropertyAttributes attrs)
static qint64 virtualGetLength(const Managed *m)
QStringList toQStringList() const
void(* setAttribute)(Object *o, uint index, PropertyAttributes attrs)
bool(* putArray)(Object *o, uint index, const Value *values, uint n)
bool(* put)(Object *o, uint index, const Value &value)
void(* push_front)(Object *o, const Value *values, uint n)
ReturnedValue(* get)(const Heap::ArrayData *d, uint index)
bool(* del)(Object *o, uint index)
ReturnedValue(* pop_front)(Object *o)
static ReturnedValue virtualCall(const QV4::FunctionObject *f, const QV4::Value *thisObject, const QV4::Value *argv, int argc)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int)
static QDate dateTimeToDate(const QDateTime &dateTime)
static QString dateTimeToString(const QDateTime &dateTime, ExecutionEngine *engine)
static QDateTime timestampToDateTime(double timestamp, QTimeZone zone=QTimeZone::LocalTime)
static QDateTime stringToDateTime(const QString &string, ExecutionEngine *engine)
static double dateTimeToNumber(const QDateTime &dateTime)
QString toString() const
static double componentsToTimestamp(double year, double month, double day, double hours, double mins, double secs, double ms, ExecutionEngine *v4)
static ReturnedValue method_setMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_UTC(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toTimeString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getTimezoneOffset(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toLocaleDateString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getDay(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toLocaleTimeString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCDay(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setTime(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toISOString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static void timezoneUpdated(ExecutionEngine *e)
static ReturnedValue method_setUTCFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toDateString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCMonth(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_symbolToPrimitive(const FunctionObject *f, const Value *thisObject, const Value *, int)
static ReturnedValue method_getTime(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_valueOf(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_parse(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toJSON(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toUTCString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toLocaleString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getDate(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getUTCFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getFullYear(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_now(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getMilliseconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_getHours(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_setUTCMinutes(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static double getThisDate(ExecutionEngine *v4, const Value *thisObject)
static ReturnedValue method_setSeconds(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
QDate toQDate() const
operator double() const
bool withReadonlyStoragePointer(Function function)
QVariant toVariant() const
bool withWriteonlyStoragePointer(Function function, ExecutionEngine *engine)
void init(QTime time, ExecutionEngine *engine)
static constexpr quint64 MaxDateVal
void init(QDate date)
void init(const QDateTime &dateTime)
Date & operator=(double value)
QTime toQTime() const
QDateTime toQDateTime() const
void init(double value)
void init(Date date)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static QQmlRefPointer< ExecutableCompilationUnit > parse(ExecutionEngine *engine, const Value *argv, int argc, Type t=Type_Function)
static ReturnedValue method_bind(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_call(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_hasInstance(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue virtualCall(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_apply(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static ReturnedValue method_toString(const FunctionObject *, const Value *thisObject, const Value *argv, int argc)
static constexpr size_t offset
Definition qv4value_p.h:407
void set(EngineBase *e, HeapBasePtr b)
Definition qv4value_p.h:417
HeapBasePtr base()
Definition qv4value_p.h:408
void set(EngineBase *e, const Value &newVal)
Definition qv4value_p.h:414
void init(const QStringList &list)
void init(QV4::ExecutionContext *scope, Function *function, QV4::String *name=nullptr)
void init(QV4::ExecutionEngine *engine)
void init(QV4::ExecutionEngine *engine)
void init(QV4::ExecutionEngine *engine, qsizetype index, VTable::Call call)
void init(InternalClass *other)
IndexAndAttribute findValueOrSetter(const PropertyKey id)
void init(ExecutionEngine *engine)
static void addMember(QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry)
InternalClassEntry find(const PropertyKey id)
bool verifyIndex(const PropertyKey id, uint index)
QVarLengthArray< Transition, 1 > transitions
SharedInternalClassData< PropertyKey > nameMap
IndexAndAttribute findValueOrGetter(const PropertyKey id)
InternalClassTransition Transition
uint indexOfValueOrGetter(const PropertyKey id)
InternalClassTransition & lookupOrInsertTransition(const InternalClassTransition &t)
static void markObjects(Heap::Base *ic, MarkStack *stack)
static void removeMember(QV4::Object *object, PropertyKey identifier)
static void changeMember(QV4::Object *object, PropertyKey id, PropertyAttributes data, InternalClassEntry *entry=nullptr)
PropertyHash::Entry * findEntry(const PropertyKey id)
SharedInternalClassData< PropertyAttributes > propertyData
void init(double val)
ReferenceObjectEndpoint(ReferenceObject *reference)
PropertyAttributes attributes(uint i) const
uint mappedIndex(uint index) const
void setData(EngineBase *e, uint index, Value newVal)
const Value & data(uint index) const
uint mappedIndex(uint index) const
PropertyAttributes attributes(uint i) const
PropertyAttributes attributes
bool operator<(const InternalClassTransition &other) const
bool operator==(const InternalClassTransition &other) const
static Heap::MemberData * allocate(QV4::ExecutionEngine *e, uint n, Heap::MemberData *old=nullptr)
const Value * data() const
void set(EngineBase *e, uint index, Value v)
const Value & operator[](uint idx) const
void set(EngineBase *e, uint index, Heap::Base *b)
uint size() const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
PropertyHash::Entry * entries
void addEntry(const Entry &entry, int classSize)
PropertyHash(const PropertyHash &other)
PropertyHashData * d
PropertyHash & operator=(const PropertyHash &other)
void detach(bool grow, int classSize)
Entry * lookup(PropertyKey identifier) const
const Value * operator->() const
bool isNull() const
const Value & operator*() const
void set(EngineBase *e, Value newVal)
bool isStringOrSymbol() const
bool isValid() const
bool isArrayIndex() const
static PropertyKey fromId(quint64 id)
Heap::StringOrSymbol * toStringOrSymbol(ExecutionEngine *e)
bool isCanonicalNumericIndexString() const
Q_QML_EXPORT bool isSymbol() const
bool operator<(const PropertyKey &other) const
Q_QML_EXPORT bool isString() const
StringOrSymbol * asStringOrSymbol() const
uint asArrayIndex() const
bool operator==(const PropertyKey &other) const
static PropertyKey invalid()
static PropertyKey fromStringOrSymbol(Engine *engine, StringOrSymbol *b)
friend size_t qHash(const PropertyKey &key, size_t seed=0)
static PropertyKey fromArrayIndex(uint idx)
Heap::String * asFunctionName(ExecutionEngine *e, FunctionNamePrefix prefix) const
quint64 id() const
bool operator!=(const PropertyKey &other) const
void setGetter(FunctionObject *g)
Heap::FunctionObject * getter() const
bool isSubset(const PropertyAttributes &attrs, const Property *other, PropertyAttributes otherAttrs) const
void setSetter(FunctionObject *s)
void fullyPopulated(PropertyAttributes *attrs)
bool isCompatible(PropertyAttributes &attrs, const Property *other, PropertyAttributes otherAttrs) const
void copy(const Property *other, PropertyAttributes attrs)
void completed(PropertyAttributes *attrs)
Property(Heap::FunctionObject *getter, Heap::FunctionObject *setter)
Heap::FunctionObject * setter() const
void merge(PropertyAttributes &attrs, const Property *other, PropertyAttributes otherAttrs)
An object that keeps track of the provenance of its owned value, allowing to reflect mutations on the...
static bool writeBack(HeapObject *ref, int internalIndex=AllProperties)
static constexpr const int AllProperties
static bool readReference(HeapObject *ref)
static HeapObject * detached(HeapObject *ref)
Value * alloc(qint64 nValues) const =delete
Scope(const Managed *m)
Scope(ExecutionEngine *e)
Scope(ExecutionContext *ctx)
ScopedPropertyKey & operator=(const PropertyKey &other)
ScopedPropertyKey(const Scope &scope)
ScopedPropertyKey(const Scope &scope, const PropertyKey &v)
bool operator==(const PropertyKey &other) const
bool operator==(const ScopedPropertyKey &other) const
bool operator!=(const ScopedPropertyKey &other) const
bool operator!=(const PropertyKey &other) const
ScopedProperty(Scope &scope)
ScopedValue(const Scope &scope, Managed *m)
ScopedValue & operator=(Managed *m)
ScopedValue & operator=(const Value &v)
ScopedValue(const Scope &scope, const Value &v)
ScopedValue(ScopedValue &&)=default
ScopedValue(const Scope &scope)
ScopedValue(const ScopedValue &)=default
ScopedValue(const Scope &scope, const ReturnedValue &v)
ScopedValue & operator=(const ScopedValue &other)
const Value * operator->() const
ScopedValue(const Scope &scope, Heap::Base *o)
ScopedValue & operator=(const ReturnedValue &v)
ScopedValue & operator=(Heap::Base *o)
Scoped< T > & operator=(typename T::Data *t)
operator bool() const
Scoped< T > & operator=(Value *v)
Scoped< T > & operator=(const ReturnedValue &v)
operator const Value &() const
Scoped< T > & operator=(Heap::Base *o)
Scoped< T > & operator=(const Value &v)
QML_NEARLY_ALWAYS_INLINE void setPointer(const Managed *p)
const T * getPointer() const
const T * operator->() const
Scoped< T > & operator=(T *t)
Heap::InternalClass * classForConstructor() const
SharedInternalClassDataPrivate(const SharedInternalClassDataPrivate &other, uint pos, PropertyKey value)
SharedInternalClassDataPrivate(const SharedInternalClassDataPrivate &other)
void set(uint pos, T value)
SharedInternalClassData(ExecutionEngine *e)
void add(uint pos, T value)
SharedInternalClassData & operator=(const SharedInternalClassData &other)
SharedInternalClassData(const SharedInternalClassData &other)
SparseArrayNode * right
SparseArrayNode * left
SparseArrayNode * copy(SparseArray *d) const
SparseArrayNode * lowerBound(uint key)
const SparseArrayNode * previousNode() const
SparseArrayNode * parent() const
SparseArrayNode * nextNode()
SparseArrayNode * upperBound(uint key)
const SparseArrayNode * nextNode() const
SparseArrayNode * previousNode()
void setParent(SparseArrayNode *pp)
SparseArrayNode * upperBound(uint key)
SparseArrayNode * erase(SparseArrayNode *n)
void push_back(uint at, uint len)
SparseArrayNode * lowerBound(uint key)
const SparseArrayNode * begin() const
SparseArrayNode * insert(uint akey)
void push_front(uint at)
uint pop_back(uint len)
QList< int > keys() const
SparseArrayNode * findNode(uint akey) const
void freeTree(SparseArrayNode *root, int alignment)
const SparseArrayNode * end() const
uint nEntries() const
const Value * data() const
Definition qv4value_p.h:449
Value values[1]
Definition qv4value_p.h:430
void set(EngineBase *e, uint index, Value v)
Definition qv4value_p.h:439
void set(EngineBase *e, uint index, Value::HeapBasePtr b)
Definition qv4value_p.h:442
void mark(MarkStack *markStack)
Definition qv4value_p.h:453
Value::HeapBasePtr base()
Definition qv4value_p.h:432
const Value & operator[](uint index) const
Definition qv4value_p.h:445
static constexpr size_t offset
Definition qv4value_p.h:427