aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-12-01 09:07:34 +0100
committerLars Knoll <lars.knoll@qt.io>2018-05-03 20:05:09 +0000
commit7e6485a046fde121f0e6fdf954162354939ff1d8 (patch)
tree6eb3d377de1080211850486fcac6d8c2b6ddf4ff /src/qml/memory
parent02b20c37ed544e6226f4d4d377bc272852e06357 (diff)
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 <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4heap_p.h22
1 files changed, 11 insertions, 11 deletions
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);