aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-02 20:56:11 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-06-02 20:56:12 +0200
commitf390e86c057265446f1467b158c1088212dc93b4 (patch)
treeca73598b798d309a5a82b858d8689889d03ee5bc /src/qml
parent99c96eb1042575a7ca5ba534f453c679c6dc9cd8 (diff)
parentaefbf418b6d99f87f7bcc7df1eb530c278a17ab4 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/jsruntime/qv4value_p.h17
-rw-r--r--src/qml/qml/qqmlmetatype.cpp4
2 files changed, 20 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index b4a045edfb..ce85e48b72 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -146,12 +146,29 @@ struct Q_QML_PRIVATE_EXPORT Value
QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const
{
Heap::Base *b;
+#ifdef __ia64
+// Restore bits 49-47 to bits 63-61, undoing the workaround explained in
+// setM below.
+ quint64 _tmp;
+
+ _tmp = _val & (7L << 47); // 0x3800000000000
+ _tmp = (_tmp << 14) | (_val ^ _tmp);
+ memcpy(&b, &_tmp, 8);
+#else
memcpy(&b, &_val, 8);
+#endif
return b;
}
QML_NEARLY_ALWAYS_INLINE void setM(Heap::Base *b)
{
memcpy(&_val, &b, 8);
+#ifdef __ia64
+// On ia64, bits 63-61 in a 64-bit pointer are used to store the virtual region
+// number. Since this implementation is not 64-bit clean, we move bits 63-61
+// to bits 49-47 and hope for the best. This is undone in *m(), above.
+ _val |= ((_val & (7L << 61)) >> 14);
+ _val &= ((1L << 50)-1);
+#endif
}
#elif QT_POINTER_SIZE == 4
QML_NEARLY_ALWAYS_INLINE Heap::Base *m() const
diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp
index 83196f4577..29b19b433f 100644
--- a/src/qml/qml/qqmlmetatype.cpp
+++ b/src/qml/qml/qqmlmetatype.cpp
@@ -2568,7 +2568,8 @@ void qmlUnregisterType(int typeIndex)
QMutexLocker lock(metaTypeDataLock());
QQmlMetaTypeData *data = metaTypeData();
{
- const QQmlTypePrivate *d = data->types.value(typeIndex).priv();
+ const QQmlType type = data->types.value(typeIndex);
+ const QQmlTypePrivate *d = type.priv();
if (d) {
removeQQmlTypePrivate(data->idToType, d);
removeQQmlTypePrivate(data->nameToType, d);
@@ -2580,6 +2581,7 @@ void qmlUnregisterType(int typeIndex)
modulePrivate->remove(d);
}
data->types[typeIndex] = QQmlType();
+ data->undeletableTypes.remove(type);
}
}
}