21#include <private/qv4heap_p.h>
22#include <private/qv4vtable_p.h>
28#define Q_MANAGED_CHECK
29 template <typename Type> inline void qt_check_for_QMANAGED_macro(const Type *_q_argument) const
30 { int i = qYouForgotTheQ_MANAGED_Macro(this, _q_argument); i = i + 1
; }
35template <
typename T1,
typename T2>
38#define V4_MANAGED_SIZE_TEST void __dataTest() { static_assert (sizeof(*this) == sizeof(Managed), "Classes derived from Managed can't have own data members."); }
40#define V4_NEEDS_DESTROY static void virtualDestroy(QV4::Heap::Base *b) { static_cast<Data *>(b)->destroy(); }
43#define V4_MANAGED_ITSELF(DataClass, superClass)
46 typedef QV4::Heap::DataClass Data;
47 typedef superClass SuperClass;
48 static const QV4::VTable static_vtbl;
49 static inline const QV4::VTable *staticVTable() { return &static_vtbl; }
51 QV4::Heap::DataClass *d_unchecked() const { return static_cast<QV4::Heap::DataClass *>(m()); }
52 QV4::Heap::DataClass *d() const {
53 QV4::Heap::DataClass *dptr = d_unchecked();
54 dptr->_checkIsInitialized();
58#define V4_MANAGED(DataClass, superClass)
61 Q_DISABLE_COPY(DataClass)
63 Q_STATIC_ASSERT(std::is_trivial_v<QV4::Heap::DataClass>);
65#define Q_MANAGED_TYPE(type)
67 enum { MyType = Type_##type };
69#define V4_INTERNALCLASS(c)
70 static Heap::InternalClass *defaultInternalClass(QV4::EngineBase *e)
71 { return e->internalClasses(QV4::EngineBase::Class_##c); }
165 return static_cast<
T *>(
this);
167 template<
typename T>
inline const T *
cast()
const {
168 return static_cast<
const T *>(
this);
DECLARE_HEAP_OBJECT(StrictArgumentsObject, Object)
DECLARE_EXPORTED_HEAP_OBJECT(Object, Base)
DECLARE_HEAP_OBJECT(ArgumentsObject, Object)
int qYouForgotTheQ_MANAGED_Macro(T, T)
void qYouForgotTheQ_MANAGED_Macro(T1, T2)
DEFINE_OBJECT_VTABLE(StrictArgumentsObject)
DEFINE_OBJECT_VTABLE(ArgumentsObject)
#define V4_MANAGED_SIZE_TEST
#define V4_MANAGED_ITSELF(DataClass, superClass)
#define Q_MANAGED_TYPE(type)
#define V4_INTERNALCLASS(c)
static qint64 virtualGetLength(const Managed *m)
static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *desc, PropertyAttributes attrs)
Heap::CallContext * context() const
static ReturnedValue virtualGet(const Managed *m, PropertyKey id, const Value *receiver, bool *hasProperty)
static OwnPropertyKeyIterator * virtualOwnPropertyKeys(const Object *m, Value *target)
static bool isNonStrictArgumentsObject(Managed *m)
static bool virtualDeleteProperty(Managed *m, PropertyKey id)
bool fullyCreated() const
void removeMapping(uint arg)
static PropertyAttributes virtualGetOwnProperty(const Managed *m, PropertyKey id, Property *p)
bool isMapped(uint arg) const
static bool virtualPut(Managed *m, PropertyKey id, const Value &value, Value *receiver)
static bool virtualDefineOwnProperty(Managed *m, PropertyKey id, const Property *p, PropertyAttributes attrs)
static qint64 virtualGetLength(const Managed *m)
QStringList toQStringList() const
void init(const QStringList &list)
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override