aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4sparsearray.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-05-24 12:07:54 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-24 11:23:52 +0000
commit1e755ff21469d817481af8feed792569ab2c2bb8 (patch)
treeb05a7d1076bec46e99c9870d0e698be22499f853 /src/qml/jsruntime/qv4sparsearray.cpp
parentcbbb040da01319bc4706dedb7faf7d883d9b9fab (diff)
Don't use empty values anymore to store internal freelists
Simply encode them as integers. That works just as well, and allows removing the indexed empty values. This is helpful, to swap the internal representations of undefined and empty values, which in turn will simplify an implementation of correct handling of uninitialized variables (through let/const). Change-Id: I299f975d665309611d1b561f6a0c86b5ca15782a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4sparsearray.cpp')
-rw-r--r--src/qml/jsruntime/qv4sparsearray.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4sparsearray.cpp b/src/qml/jsruntime/qv4sparsearray.cpp
index 2a3e28bf63..8930c9a94d 100644
--- a/src/qml/jsruntime/qv4sparsearray.cpp
+++ b/src/qml/jsruntime/qv4sparsearray.cpp
@@ -395,7 +395,7 @@ void SparseArray::freeTree(SparseArrayNode *root, int alignment)
SparseArray::SparseArray()
: numEntries(0)
{
- freeList = Primitive::emptyValue(UINT_MAX).asReturnedValue();
+ freeList = Encode(-1);
header.p = 0;
header.left = nullptr;
header.right = nullptr;