From 7e6485a046fde121f0e6fdf954162354939ff1d8 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 1 Dec 2017 09:07:34 +0100 Subject: Don't use bitfields for VTable flags Accessing those is significantly slower than using a byte for each flag. As they are performance critical, let's rather use some more bytes in the vtable. Change-Id: I7104d3b791f469fe5d6705f20db0c965878126e2 Reviewed-by: Simon Hausmann --- src/qml/memory/qv4heap_p.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/qml/memory') diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h index 316b89b829..84208b51e0 100644 --- a/src/qml/memory/qv4heap_p.h +++ b/src/qml/memory/qv4heap_p.h @@ -67,17 +67,17 @@ namespace QV4 { struct VTable { const VTable * const parent; - uint inlinePropertyOffset : 16; - uint nInlineProperties : 16; - uint isExecutionContext : 1; - uint isString : 1; - uint isObject : 1; - uint isFunctionObject : 1; - uint isErrorObject : 1; - uint isArrayData : 1; - uint isStringOrSymbol : 1; - uint unused : 17; - uint type : 8; + quint32 inlinePropertyOffset : 16; + quint32 nInlineProperties : 16; + quint8 isExecutionContext; + quint8 isString; + quint8 isObject; + quint8 isFunctionObject; + quint8 isErrorObject; + quint8 isArrayData; + quint8 isStringOrSymbol; + quint8 type; + quint8 unused[4]; const char *className; void (*destroy)(Heap::Base *); void (*markObjects)(Heap::Base *, MarkStack *markStack); -- cgit v1.2.3