aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4internalclass_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-01-05 13:20:27 +0100
committerLars Knoll <lars.knoll@qt.io>2018-04-12 13:58:30 +0000
commitc7bac1588e0e6a65187042afbde072afa6b8cd9b (patch)
treeed9ebe3c03cf959111e6c7e422febb2dde2a89a7 /src/qml/jsruntime/qv4internalclass_p.h
parent340819e81cf36c01bd21a170fd1a932202257899 (diff)
Remove the pool allocator from InternalClass
Makes it easier to transition it over to be controlled by the GC. Change-Id: I6bea738b3852abfc7870b71e639efc595eeb28fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4internalclass_p.h')
-rw-r--r--src/qml/jsruntime/qv4internalclass_p.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/qml/jsruntime/qv4internalclass_p.h b/src/qml/jsruntime/qv4internalclass_p.h
index 53fc25e42b..168ed6c950 100644
--- a/src/qml/jsruntime/qv4internalclass_p.h
+++ b/src/qml/jsruntime/qv4internalclass_p.h
@@ -53,7 +53,6 @@
#include "qv4global_p.h"
#include <QHash>
-#include <private/qqmljsmemorypool_p.h>
#include <private/qv4identifier_p.h>
QT_BEGIN_NAMESPACE
@@ -259,7 +258,7 @@ struct InternalClassTransition
{ return id < other.id || (id == other.id && flags < other.flags); }
};
-struct InternalClass : public QQmlJS::Managed {
+struct InternalClass {
int id = 0; // unique across the engine, gets changed also when proto chain changes
ExecutionEngine *engine;
const VTable *vtable;
@@ -315,10 +314,13 @@ struct InternalClass : public QQmlJS::Managed {
Q_REQUIRED_RESULT InternalClass *asProtoClass();
- void destroy();
+ void destroyAll();
void updateProtoUsage(Heap::Object *o);
+ static void markObjects(InternalClass *ic, MarkStack *stack);
+
+
private:
Q_QML_EXPORT InternalClass *changeVTableImpl(const VTable *vt);
Q_QML_EXPORT InternalClass *changePrototypeImpl(Heap::Object *proto);
@@ -329,11 +331,6 @@ private:
InternalClass(InternalClass *other);
};
-struct InternalClassPool : public QQmlJS::MemoryPool
-{
- void markObjects(MarkStack *markStack);
-};
-
}
QT_END_NAMESPACE