diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-04-30 20:50:42 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:49:10 +0200 |
commit | d44cac4028df512b37b161e9f3fc9f7ba1c504bc (patch) | |
tree | 2ac4f9c95095863928faf450d9e48d1b3c7c7d87 /src/qml/jsruntime | |
parent | 38b58be83a5cbc65f9c3d7e3d14788e7d6837d7d (diff) |
Rename V4_OBJECT_NEW back to V4_OBJECT
The _NEW variant was there only temporarily to aid converting
to the new data layout.
Change-Id: I1d126ee0999c8f0a49f5a08c2e8c090497dd6dd5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
22 files changed, 45 insertions, 48 deletions
diff --git a/src/qml/jsruntime/qv4argumentsobject_p.h b/src/qml/jsruntime/qv4argumentsobject_p.h index f3bd290aa0..50eb776359 100644 --- a/src/qml/jsruntime/qv4argumentsobject_p.h +++ b/src/qml/jsruntime/qv4argumentsobject_p.h @@ -56,7 +56,7 @@ struct ArgumentsGetterFunction: FunctionObject struct { uint index; } __data; - V4_OBJECT_NEW + V4_OBJECT uint index() const { return d()->index; } @@ -78,7 +78,7 @@ struct ArgumentsSetterFunction: FunctionObject struct { uint index; } __data; - V4_OBJECT_NEW + V4_OBJECT uint index() const { return d()->index; } @@ -104,7 +104,7 @@ struct ArgumentsObject: Object { bool fullyCreated; Members mappedArguments; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(ArgumentsObject) CallContext *context() const { return d()->context; } diff --git a/src/qml/jsruntime/qv4arrayobject_p.h b/src/qml/jsruntime/qv4arrayobject_p.h index 3feb0232d6..e7f8ba711f 100644 --- a/src/qml/jsruntime/qv4arrayobject_p.h +++ b/src/qml/jsruntime/qv4arrayobject_p.h @@ -51,7 +51,7 @@ namespace QV4 { struct ArrayCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT ArrayCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); diff --git a/src/qml/jsruntime/qv4booleanobject_p.h b/src/qml/jsruntime/qv4booleanobject_p.h index 77573cd40e..617f7f6b01 100644 --- a/src/qml/jsruntime/qv4booleanobject_p.h +++ b/src/qml/jsruntime/qv4booleanobject_p.h @@ -51,7 +51,7 @@ namespace QV4 { struct BooleanCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT BooleanCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *, CallData *callData); diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h index a60f503915..505891b2c6 100644 --- a/src/qml/jsruntime/qv4dateobject_p.h +++ b/src/qml/jsruntime/qv4dateobject_p.h @@ -58,7 +58,7 @@ struct DateObject: Object { struct { Value value; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(DateObject) @@ -84,7 +84,7 @@ protected: struct DateCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT DateCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *, CallData *callData); diff --git a/src/qml/jsruntime/qv4errorobject_p.h b/src/qml/jsruntime/qv4errorobject_p.h index 7b812ca909..bf8a90fac4 100644 --- a/src/qml/jsruntime/qv4errorobject_p.h +++ b/src/qml/jsruntime/qv4errorobject_p.h @@ -60,7 +60,7 @@ struct ErrorObject: Object { String *stack; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(ErrorObject) enum { IsErrorObject = true @@ -109,7 +109,7 @@ struct ReferenceErrorObject: ErrorObject { }; struct SyntaxErrorObject: ErrorObject { - V4_OBJECT_NEW + V4_OBJECT SyntaxErrorObject(ExecutionEngine *engine, const ValueRef msg); SyntaxErrorObject(ExecutionEngine *engine, const QString &msg, const QString &fileName, int lineNumber, int columnNumber); }; @@ -125,7 +125,7 @@ struct URIErrorObject: ErrorObject { struct ErrorCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT ErrorCtor(ExecutionContext *scope); ErrorCtor(ExecutionContext *scope, const QString &name); @@ -135,7 +135,7 @@ struct ErrorCtor: FunctionObject struct EvalErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT EvalErrorCtor(ExecutionContext *scope); @@ -144,7 +144,7 @@ struct EvalErrorCtor: ErrorCtor struct RangeErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT RangeErrorCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); @@ -152,7 +152,7 @@ struct RangeErrorCtor: ErrorCtor struct ReferenceErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT ReferenceErrorCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); @@ -160,7 +160,7 @@ struct ReferenceErrorCtor: ErrorCtor struct SyntaxErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT SyntaxErrorCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); @@ -168,7 +168,7 @@ struct SyntaxErrorCtor: ErrorCtor struct TypeErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT TypeErrorCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); @@ -176,7 +176,7 @@ struct TypeErrorCtor: ErrorCtor struct URIErrorCtor: ErrorCtor { - V4_OBJECT_NEW + V4_OBJECT URIErrorCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h index ac61c86213..75f003e2eb 100644 --- a/src/qml/jsruntime/qv4functionobject_p.h +++ b/src/qml/jsruntime/qv4functionobject_p.h @@ -104,7 +104,7 @@ struct Q_QML_EXPORT FunctionObject: Object { Function *function; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(FunctionObject) enum { IsFunctionObject = true @@ -170,7 +170,7 @@ DEFINE_REF(FunctionObject, Object); struct FunctionCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT FunctionCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *that, CallData *callData); @@ -195,7 +195,7 @@ struct BuiltinFunction: FunctionObject { struct { ReturnedValue (*code)(CallContext *); } __data; - V4_OBJECT_NEW + V4_OBJECT BuiltinFunction(ExecutionContext *scope, const StringRef name, ReturnedValue (*code)(CallContext *)); @@ -213,7 +213,7 @@ struct IndexedBuiltinFunction: FunctionObject ReturnedValue (*code)(CallContext *, uint index); uint index; } __data; - V4_OBJECT_NEW + V4_OBJECT IndexedBuiltinFunction(ExecutionContext *scope, uint index, ReturnedValue (*code)(CallContext *ctx, uint index)) : FunctionObject(scope) @@ -233,7 +233,7 @@ struct IndexedBuiltinFunction: FunctionObject struct SimpleScriptFunction: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT SimpleScriptFunction(ExecutionContext *scope, Function *function, bool createProto); static ReturnedValue construct(Managed *, CallData *callData); @@ -243,7 +243,7 @@ struct SimpleScriptFunction: FunctionObject { }; struct ScriptFunction: SimpleScriptFunction { - V4_OBJECT_NEW + V4_OBJECT ScriptFunction(ExecutionContext *scope, Function *function); static ReturnedValue construct(Managed *, CallData *callData); @@ -262,7 +262,7 @@ struct BoundFunction: FunctionObject { Value boundThis; Members boundArgs; } __data; - V4_OBJECT_NEW + V4_OBJECT FunctionObject *target() { return d()->target; } Value boundThis() const { return d()->boundThis; } diff --git a/src/qml/jsruntime/qv4globalobject_p.h b/src/qml/jsruntime/qv4globalobject_p.h index 0e07d1eca4..63823acc19 100644 --- a/src/qml/jsruntime/qv4globalobject_p.h +++ b/src/qml/jsruntime/qv4globalobject_p.h @@ -50,7 +50,7 @@ namespace QV4 { struct Q_QML_EXPORT EvalFunction : FunctionObject { - V4_OBJECT_NEW + V4_OBJECT EvalFunction(ExecutionContext *scope); ReturnedValue evalCall(CallData *callData, bool directCall); diff --git a/src/qml/jsruntime/qv4jsonobject_p.h b/src/qml/jsruntime/qv4jsonobject_p.h index 4067dc67a8..34a4f4dd4b 100644 --- a/src/qml/jsruntime/qv4jsonobject_p.h +++ b/src/qml/jsruntime/qv4jsonobject_p.h @@ -52,7 +52,7 @@ namespace QV4 { struct JsonObject : Object { Q_MANAGED_TYPE(JsonObject) - V4_OBJECT_NEW + V4_OBJECT private: typedef QSet<QV4::Object *> V4ObjectSet; public: diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index e6fdeee598..a491db69be 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -77,9 +77,6 @@ inline void qYouForgotTheQ_MANAGED_Macro(T1, T2) {} static inline const QV4::ManagedVTable *staticVTable() { return &static_vtbl.managedVTable; } \ template <typename T> \ QV4::Returned<T> *asReturned() { return QV4::Returned<T>::create(this); } \ - -#define V4_OBJECT_NEW \ - V4_OBJECT \ void __dataTest() { Q_STATIC_ASSERT(sizeof(*this) == sizeof(Data)); } \ const Data *d() const { return &static_cast<const Data &>(Managed::data); } \ Data *d() { return &static_cast<Data &>(Managed::data); } diff --git a/src/qml/jsruntime/qv4mathobject_p.h b/src/qml/jsruntime/qv4mathobject_p.h index e9159d1dc1..18a80c2ba0 100644 --- a/src/qml/jsruntime/qv4mathobject_p.h +++ b/src/qml/jsruntime/qv4mathobject_p.h @@ -49,7 +49,7 @@ namespace QV4 { struct MathObject: Object { - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(MathObject) MathObject(InternalClass *ic); diff --git a/src/qml/jsruntime/qv4numberobject_p.h b/src/qml/jsruntime/qv4numberobject_p.h index d4a6123f69..ccabcf6727 100644 --- a/src/qml/jsruntime/qv4numberobject_p.h +++ b/src/qml/jsruntime/qv4numberobject_p.h @@ -51,7 +51,7 @@ namespace QV4 { struct NumberCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT NumberCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *that, CallData *callData); diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index 3ab787325a..f86b709090 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -111,7 +111,7 @@ struct Q_QML_EXPORT Object: Managed { Members memberData; ArrayData *arrayData; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(Object) enum { @@ -322,7 +322,7 @@ struct BooleanObject: Object { struct { Value value; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(BooleanObject) Value value() const { return d()->value; } @@ -348,7 +348,7 @@ struct NumberObject: Object { struct { Value value; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(NumberObject) Value value() const { return d()->value; } @@ -366,7 +366,7 @@ protected: }; struct ArrayObject: Object { - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(ArrayObject) enum { LengthPropertyIndex = 0 diff --git a/src/qml/jsruntime/qv4objectiterator_p.h b/src/qml/jsruntime/qv4objectiterator_p.h index 05909742f7..7fb46344dc 100644 --- a/src/qml/jsruntime/qv4objectiterator_p.h +++ b/src/qml/jsruntime/qv4objectiterator_p.h @@ -95,7 +95,7 @@ struct ForEachIteratorObject: Object { ObjectIterator it; Value workArea[2]; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(ForeachIteratorObject) ForEachIteratorObject(ExecutionContext *ctx, const ObjectRef o) diff --git a/src/qml/jsruntime/qv4objectproto_p.h b/src/qml/jsruntime/qv4objectproto_p.h index ed0ea2dc1e..2b9974be06 100644 --- a/src/qml/jsruntime/qv4objectproto_p.h +++ b/src/qml/jsruntime/qv4objectproto_p.h @@ -51,7 +51,7 @@ namespace QV4 { struct ObjectCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT ObjectCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *that, CallData *callData); diff --git a/src/qml/jsruntime/qv4qobjectwrapper_p.h b/src/qml/jsruntime/qv4qobjectwrapper_p.h index 22385c701e..e1ec5be03a 100644 --- a/src/qml/jsruntime/qv4qobjectwrapper_p.h +++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h @@ -84,7 +84,7 @@ struct Q_QML_EXPORT QObjectWrapper : public QV4::Object QPointer<QObject> object; } __data; - V4_OBJECT_NEW + V4_OBJECT enum RevisionMode { IgnoreRevision, CheckRevision }; @@ -141,7 +141,7 @@ struct QObjectMethod : public QV4::FunctionObject QV4::PersistentValue qmlGlobal; } __data; - V4_OBJECT_NEW + V4_OBJECT enum { DestroyMethod = -1, ToStringMethod = -2 }; @@ -177,7 +177,7 @@ struct QmlSignalHandler : public QV4::Object int signalIndex; } __data; - V4_OBJECT_NEW + V4_OBJECT QmlSignalHandler(ExecutionEngine *engine, QObject *object, int signalIndex); diff --git a/src/qml/jsruntime/qv4regexpobject_p.h b/src/qml/jsruntime/qv4regexpobject_p.h index 2948dbda83..96519f64c8 100644 --- a/src/qml/jsruntime/qv4regexpobject_p.h +++ b/src/qml/jsruntime/qv4regexpobject_p.h @@ -75,7 +75,7 @@ struct RegExpObject: Object { bool global; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(RegExpObject) // needs to be compatible with the flags in qv4jsir_p.h @@ -126,7 +126,7 @@ struct RegExpCtor: FunctionObject int lastMatchEnd; } __data; - V4_OBJECT_NEW + V4_OBJECT RegExpCtor(ExecutionContext *scope); Value lastMatch() { return d()->lastMatch; } diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index 60f3df59cf..a9ce506263 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -174,7 +174,7 @@ struct CompilationUnitHolder : public Object QV4::CompiledData::CompilationUnit *unit; } __data; - V4_OBJECT_NEW + V4_OBJECT CompilationUnitHolder(ExecutionEngine *engine, CompiledData::CompilationUnit *unit) : Object(engine) diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 5427ebb704..8b15479f88 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -65,7 +65,7 @@ struct Q_QML_EXPORT QmlBindingWrapper : FunctionObject { CallContext *qmlContext; } __data; - V4_OBJECT_NEW + V4_OBJECT QmlBindingWrapper(ExecutionContext *scope, Function *f, ObjectRef qml); // Constructor for QML functions and signal handlers, resulting binding wrapper is not callable! diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp index 0cb1953c6f..17ec640244 100644 --- a/src/qml/jsruntime/qv4sequenceobject.cpp +++ b/src/qml/jsruntime/qv4sequenceobject.cpp @@ -178,7 +178,7 @@ class QQmlSequence : public QV4::Object bool isReference; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(QmlSequence) public: QQmlSequence(QV4::ExecutionEngine *engine, const Container &container) diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 9a74136f6a..1ad869d09f 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -80,7 +80,7 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed { uint len; } __data; // ### FIXME: Should this be a V4_OBJECT - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(String) enum { IsString = true diff --git a/src/qml/jsruntime/qv4stringobject_p.h b/src/qml/jsruntime/qv4stringobject_p.h index f434dd96d7..37090cf96a 100644 --- a/src/qml/jsruntime/qv4stringobject_p.h +++ b/src/qml/jsruntime/qv4stringobject_p.h @@ -59,7 +59,7 @@ struct StringObject: Object { Value value; mutable Property tmpProperty; } __data; - V4_OBJECT_NEW + V4_OBJECT Q_MANAGED_TYPE(StringObject) StringObject(ExecutionEngine *engine, const ValueRef value); @@ -76,7 +76,7 @@ protected: struct StringCtor: FunctionObject { - V4_OBJECT_NEW + V4_OBJECT StringCtor(ExecutionContext *scope); static ReturnedValue construct(Managed *m, CallData *callData); diff --git a/src/qml/jsruntime/qv4variantobject_p.h b/src/qml/jsruntime/qv4variantobject_p.h index ab2ef55e15..e02b921b30 100644 --- a/src/qml/jsruntime/qv4variantobject_p.h +++ b/src/qml/jsruntime/qv4variantobject_p.h @@ -75,7 +75,7 @@ struct VariantObject : Object int vmePropertyReferenceCount; } __data; - V4_OBJECT_NEW + V4_OBJECT VariantObject(InternalClass *ic); VariantObject(ExecutionEngine *engine, const QVariant &value); |