diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-01-27 09:57:00 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-03-09 08:58:15 +0000 |
commit | 10c1e4053366085080a39ea84ebbd189c8d827ec (patch) | |
tree | 65af97d1897f113647e5463c9bdf9b3dfce94f1b /src/qml/jsruntime/qv4engine.cpp | |
parent | 58b882ad42f99e03ac8dca13ff9c0d39fcafbaa0 (diff) |
Unify mark handling for MemberData and ArrayData
Introduce a ValueArray class, that defines an array of
Values at the end of a Heap Object.
Change-Id: I00efbf6f5839a6687dd5bc5fc037ec8f06e0936e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4engine.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 39b433e5f9..19298f3803 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -600,11 +600,11 @@ Heap::ArrayObject *ExecutionEngine::newArrayObject(const Value *values, int leng size_t size = sizeof(Heap::ArrayData) + (length-1)*sizeof(Value); Heap::SimpleArrayData *d = scope.engine->memoryManager->allocManaged<SimpleArrayData>(size); d->init(); - d->alloc = length; d->type = Heap::ArrayData::Simple; d->offset = 0; - d->len = length; - memcpy(&d->arrayData, values, length*sizeof(Value)); + d->values.alloc = length; + d->values.size = length; + memcpy(&d->values.v, values, length*sizeof(Value)); a->d()->arrayData = d; a->setArrayLengthUnchecked(length); } |