diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-20 17:39:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-21 21:22:46 +0200 |
commit | 43431619d644ebd783d292a12c1904cfd7680824 (patch) | |
tree | 7d79c2b79f6ed450613b29de700ee488d8cd99f4 /src/qml/jsruntime/qv4arraydata.cpp | |
parent | 7a1b5b1cfece18d5f4b2d8beb340d3cbe8f54451 (diff) | |
parent | cb6c208c77e2e3c8b6d5957fae73f0326eee4296 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/quick/items/qquickflickable_p_p.h
src/quick/items/qquickpathview_p_p.h
tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp
Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4arraydata.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp index 4c4639c94f..f4afe46fcb 100644 --- a/src/qml/jsruntime/qv4arraydata.cpp +++ b/src/qml/jsruntime/qv4arraydata.cpp @@ -99,8 +99,8 @@ Q_STATIC_ASSERT(sizeof(Heap::ArrayData) == sizeof(Heap::SparseArrayData)); static Q_ALWAYS_INLINE void storeValue(ReturnedValue *target, uint value) { - Value v = Value::fromReturnedValue(*target); - v.setValue(value); + Value v; + v.setTagValue(Value::fromReturnedValue(*target).tag(), value); *target = v.asReturnedValue(); } @@ -195,7 +195,7 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt n->value = i; } else { storeValue(lastFree, i); - sparse->arrayData[i].setTag(Value::Empty_Type); + sparse->arrayData[i].setEmpty(); lastFree = &sparse->arrayData[i].rawValueRef(); } } @@ -204,7 +204,7 @@ void ArrayData::realloc(Object *o, Type newType, uint requested, bool enforceAtt if (toCopy < sparse->alloc) { for (uint i = toCopy; i < sparse->alloc; ++i) { storeValue(lastFree, i); - sparse->arrayData[i].setTag(Value::Empty_Type); + sparse->arrayData[i].setEmpty(); lastFree = &sparse->arrayData[i].rawValueRef(); } storeValue(lastFree, UINT_MAX); @@ -402,7 +402,7 @@ uint SparseArrayData::allocate(Object *o, bool doubleSlot) // found two slots in a row uint idx = Value::fromReturnedValue(*last).uint_32(); Value lastV = Value::fromReturnedValue(*last); - lastV.setValue(dd->arrayData[lastV.value() + 1].value()); + lastV.setTagValue(lastV.tag(), dd->arrayData[lastV.value() + 1].value()); *last = lastV.rawValue(); dd->attrs[idx] = Attr_Accessor; return idx; |