aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4compilercontext_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-06-22 09:20:43 +0200
committerLars Knoll <lars.knoll@qt.io>2018-06-26 10:04:11 +0000
commite9b3bdb96e008060a0e78815a3995015e5e4598d (patch)
treeb3213bc461329723e9fd119a65a5556c12209a21 /src/qml/compiler/qv4compilercontext_p.h
parent046d1c5db44f409c67244bd70b13077cc03219b2 (diff)
Various fixes for class support
Add support for a default constructor if none is given. Fix support for computed method names, by unifying the handling between static and non static methods. Fix our table generation, so that we write UINT_MAX as the string index for undefined strings and not a reference to the empty string, as that can actually be a valid method name. Add support for getter and setter methods in classes. Change-Id: If52c57d6a67424b0218b86339b95aed9d0351e47 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontext_p.h')
-rw-r--r--src/qml/compiler/qv4compilercontext_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h
index 9444173840..52c3fc5b05 100644
--- a/src/qml/compiler/qv4compilercontext_p.h
+++ b/src/qml/compiler/qv4compilercontext_p.h
@@ -86,13 +86,13 @@ struct Class {
Getter,
Setter
};
- QString name;
+ uint nameIndex;
Type type;
- int functionIndex;
+ uint functionIndex;
};
- QString name;
- int constructorIndex = -1;
+ uint nameIndex;
+ uint constructorIndex = UINT_MAX;
QVector<Method> staticMethods;
QVector<Method> methods;
};