aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compileddata_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-07-05 10:04:08 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2019-07-08 14:43:00 +0200
commitb4d4e077340e7a1c031be15415410c20adc74887 (patch)
tree54d234d205ecf46d2fb50d3516c91b3df1bec22d /src/qml/compiler/qv4compileddata_p.h
parent7811d69006d298dcbe2abff874b02dfa80d8bf80 (diff)
Centralize property & signal parameter type handling at compilation time
Collect all that code in the Parameter class, which allows for future re-use for function parameters and return types. Change-Id: Ib9dfec9313dc3938634f9ce3a2e5a3a59a7135d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r--src/qml/compiler/qv4compileddata_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h
index f3d5de3db1..1ee5c6a195 100644
--- a/src/qml/compiler/qv4compileddata_p.h
+++ b/src/qml/compiler/qv4compileddata_p.h
@@ -608,15 +608,21 @@ enum class BuiltinType : unsigned int {
Vector2D, Vector3D, Vector4D, Matrix4x4, Quaternion, InvalidBuiltin
};
-struct Parameter
+struct ParameterType
{
- quint32_le nameIndex;
union {
quint32 _dummy;
quint32_le_bitfield<0, 1> indexIsBuiltinType;
quint32_le_bitfield<1, 31> typeNameIndexOrBuiltinType;
};
};
+static_assert(sizeof(ParameterType) == 4, "ParameterType structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target");
+
+struct Parameter
+{
+ quint32_le nameIndex;
+ ParameterType type;
+};
static_assert(sizeof(Parameter) == 8, "Parameter structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target");
struct Signal