diff options
author | Andrei Golubev <andrei.golubev@qt.io> | 2022-07-01 13:51:12 +0200 |
---|---|---|
committer | Andrei Golubev <andrei.golubev@qt.io> | 2022-07-22 16:38:42 +0200 |
commit | 8d0adee3b3317f1fab03742bdf0f7cdbe57df914 (patch) | |
tree | 6c51c5ffb0c0542fb4f4db4bd7fcd2eaa59db4c4 /tests/auto/qml/qmltc | |
parent | 76d992431e113c3df9b6f879e2889973d5093a44 (diff) |
qqmltypecompiler: align runtime function table order to qmlcachegen
When we write runtime functions to compilation unit at run time, the
order of the functions in the unit (often) differs from the order of
functions in the unit produced ahead of time by qmlcachegen and friends.
Additionally, the order also differs from what qmltc expects (and
qmlcompiler library in general)
Fix the order by simplifying the procedure of JS code generation when
we create the compilation unit at run time: new logic just goes over
the objects in the document linearly, instead of relying on bindings
(which are known to be out of order w.r.t. AST)
Change-Id: I4070b9d061f03c4c76d03120654ad3f30725493a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qmltc')
-rw-r--r-- | tests/auto/qml/qmltc/tst_qmltc.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/tests/auto/qml/qmltc/tst_qmltc.cpp b/tests/auto/qml/qmltc/tst_qmltc.cpp index bf261d2eec..84f31d3ca5 100644 --- a/tests/auto/qml/qmltc/tst_qmltc.cpp +++ b/tests/auto/qml/qmltc/tst_qmltc.cpp @@ -1940,19 +1940,9 @@ void tst_qmltc::listView() QCOMPARE(model->count(), 0); created.appendDigit("5"); - if (isCacheDisabled()) { - // TODO: doesn't work in no_disk_cache mode because - // QV4::Lookup::nextIndex values are different. These come from - // CompiledData::Lookup table of the compilation unit -- why would that - // change during QQmlTypeCompiler's CU generation? - QEXPECT_FAIL("", "Doesn't work without qmlcachegen - needs investigation", Continue); - } QCOMPARE(model->count(), 1); created.appendOperator("+"); - if (isCacheDisabled()) { // same as above - QEXPECT_FAIL("", "Doesn't work without qmlcachegen - needs investigation", Continue); - } QCOMPARE(model->count(), 2); // TODO: add more testing (e.g. check that values are actually recorded) |