3#ifndef QV4SCOPEDVALUE_P_H
4#define QV4SCOPEDVALUE_P_H
23#include <valgrind/memcheck.h>
28#define SAVE_JS_STACK(ctx) Value *__jsStack = ctx->engine->jsStackTop
29#define CHECK_JS_STACK(ctx) Q_ASSERT(__jsStack == ctx->engine->jsStackTop)
40#define CHECK_EXCEPTION() \
42 if (hasExceptionOrIsInterrupted(scope.engine)) { \
43 return QV4::Encode::undefined(); \
47#define RETURN_UNDEFINED() \
48 return QV4::Encode::undefined()
50#define RETURN_RESULT(r) \
53#define THROW_TYPE_ERROR() \
54 return scope.engine->throwTypeError()
56#define THROW_GENERIC_ERROR(str) \
57 return scope.engine->throwError(QString::fromUtf8(str))
97 template <AllocMode mode = Undefined>
100 template <AllocMode mode = Undefined>
106 for (
int i = 0;
i < nValues; ++
i)
110 for (
int i = 0;
i < nValues; ++
i)
118 template <AllocMode mode = Undefined>
143 Q_DISABLE_COPY(
Scope)
270 ptr->setM(
p ?
p->m() :
nullptr);
380 explicit operator bool()
const {
385 return reinterpret_cast<T *
>(
ptr);
389 return reinterpret_cast<T *
>(
ptr);
405 _val =
v.ptr->rawValue();
412 _val =
t.ptr->rawValue();
bool isInterrupted() const
Combined button and popup list for selecting options.
\qmltype Particle \inqmlmodule QtQuick.Particles
bool hasExceptionOrIsInterrupted(ExecutionEngine *engine)
static ControlElement< T > * ptr(QWidget *widget)
GLsizei const GLfloat * v
[13]
#define QML_NEARLY_ALWAYS_INLINE
QML_NEARLY_ALWAYS_INLINE Value * jsAlloca(int nValues)
static PropertyKey invalid()
Value * alloc(qint64 nValues) const =delete
bool hasException() const
QML_NEARLY_ALWAYS_INLINE Value * alloc() const
QML_NEARLY_ALWAYS_INLINE Value * alloc(int nValues) const
Scope(ExecutionEngine *e)
Scope(ExecutionContext *ctx)
PropertyKey * operator->()
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)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ScopedValue &v)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value &v)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, T *t)
Scoped< T > & operator=(Value *v)
Scoped< T > & operator=(const ReturnedValue &v)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value &v, ConvertType)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ReturnedValue &v, ConvertType)
Scoped< T > & operator=(Heap::Base *o)
Scoped< T > & operator=(const Value &v)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const T *t)
QML_NEARLY_ALWAYS_INLINE void setPointer(const Managed *p)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const Value *v)
const T * getPointer() const
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, const ReturnedValue &v)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope)
const T * operator->() const
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, typename T::Data *t)
QML_NEARLY_ALWAYS_INLINE Scoped(const Scope &scope, Heap::Base *o)
Scoped< T > & operator=(T *t)
QML_NEARLY_ALWAYS_INLINE ReturnedValue asReturnedValue() const
QV4_NEARLY_ALWAYS_INLINE constexpr quint64 rawValue() const
QV4_NEARLY_ALWAYS_INLINE constexpr void setRawValue(quint64 raw)
QML_NEARLY_ALWAYS_INLINE ManagedPtr managed() const
static constexpr Value undefinedValue()
Value & operator=(const ScopedValue &v)
static Value fromHeapObject(HeapBasePtr m)
static constexpr Value fromReturnedValue(ReturnedValue val)
static constexpr Value emptyValue()