aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-24 15:38:41 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-12-11 15:52:13 +0100
commit8afc1f7fe24c625cdb84406cc7665f1dcabf88c4 (patch)
tree04c5d73167544182e509ce7e40bd18c29909d0a7 /src/qml/jsruntime/qv4engine_p.h
parent4322c8d7686c7cbbdf348146d32d705007b21d56 (diff)
Move prototype back from the vtable into Object
This is the only way we can support a GC that moves objects around in memory. Change-Id: I1d168fae4aa9f575b730e469e762bc5b5549b886 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index ad9fde3d86..dc75d37a86 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -141,16 +141,36 @@ public:
Value syntaxErrorCtor;
Value typeErrorCtor;
Value uRIErrorCtor;
- Value sequencePrototype;
Value arrayBufferCtor;
Value dataViewCtor;
enum { NTypedArrayTypes = 9 }; // avoid header dependency
Value typedArrayCtors[NTypedArrayTypes];
+ Value objectPrototype;
+ Value arrayPrototype;
+ Value stringPrototype;
+ Value numberPrototype;
+ Value booleanPrototype;
+ Value datePrototype;
+ Value functionPrototype;
+ Value regExpPrototype;
+ Value errorPrototype;
+ Value evalErrorPrototype;
+ Value rangeErrorPrototype;
+ Value referenceErrorPrototype;
+ Value syntaxErrorPrototype;
+ Value typeErrorPrototype;
+ Value uRIErrorPrototype;
+ Value variantPrototype;
+ Value sequencePrototype;
+
+ Value arrayBufferPrototype;
+ Value dataViewPrototype;
+ Value typedArrayPrototype[NTypedArrayTypes]; // TypedArray::NValues, avoid including the header here
+
InternalClassPool *classPool;
InternalClass *emptyClass;
InternalClass *executionContextClass;
- InternalClass *constructClass;
InternalClass *stringClass;
InternalClass *objectClass;
@@ -264,7 +284,7 @@ public:
ExecutionContext *popContext();
Heap::Object *newObject();
- Heap::Object *newObject(InternalClass *internalClass);
+ Heap::Object *newObject(InternalClass *internalClass, Object *prototype);
Heap::String *newString(const QString &s);
Heap::String *newIdentifier(const QString &text);
@@ -275,7 +295,7 @@ public:
Heap::ArrayObject *newArrayObject(int count = 0);
Heap::ArrayObject *newArrayObject(const QStringList &list);
- Heap::ArrayObject *newArrayObject(InternalClass *ic);
+ Heap::ArrayObject *newArrayObject(InternalClass *ic, Object *prototype);
Heap::DateObject *newDateObject(const ValueRef value);
Heap::DateObject *newDateObject(const QDateTime &dt);