From cae7975a036352ca4bbcf1381a445362f8e01367 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 12 May 2017 15:12:45 +0200 Subject: Move the internalClass field from Heap::Object to Heap::Base And do not store the vtable in Heap::Base anymore. This change makes the internal class the main distinguishing feature of all garbage collected objects. It also saves one pointer on all Objects. No measurable impact on runtime performance. Change-Id: I040a28b7581b993f1886b5219e279173dfa567e8 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4managed_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/jsruntime/qv4managed_p.h') diff --git a/src/qml/jsruntime/qv4managed_p.h b/src/qml/jsruntime/qv4managed_p.h index 00bfad78dd..814755efe9 100644 --- a/src/qml/jsruntime/qv4managed_p.h +++ b/src/qml/jsruntime/qv4managed_p.h @@ -198,6 +198,8 @@ public: }; Q_MANAGED_TYPE(Invalid) + InternalClass *internalClass() const { return d()->internalClass; } + bool isListType() const { return d()->vtable()->type == Type_QmlSequence; } bool isArrayObject() const { return d()->vtable()->type == Type_ArrayObject; } -- cgit v1.2.3