OpenCoverageQt Quick

Qt Quick patch #8 - Test report of the modifications

Overview

Test Execution StatusStatistics
Passed
  0.000% (0/185)
Failed
  0.000% (0/185)
Requires Manual Checking
  0.000% (0/185)
Unknown
 75.676% (140/185)
All
 75.676% (140/185)
CategoryRemoved LinesInserted LinesTotal
Modified lines executed:
 12.658% (10/79)
 13.889% (15/108)
 13.369% (25/187)
Modified lines not executed:
  0.000% (0/79)
  0.000% (0/108)
  0.000% (0/187)
Source code lines not instrumented:
 87.342% (69/79)
 86.111% (93/108)
 86.631% (162/187)

List of tests executing the changes

Execution NameState
tst_bindingdependencyapiUnknown
tst_drawingmodesUnknown
tst_ecmascripttestsUnknown
tst_examplesUnknown
tst_flickableinteropUnknown
tst_multipointtoucharea_interopUnknown
tst_parserstressUnknown
tst_qjsengineUnknown
tst_qjsonbindingUnknown
tst_qjsvalueUnknown
tst_qjsvalueiteratorUnknown
tst_qmlcachegenUnknown
tst_qmldiskcacheUnknown
tst_qqmlapplicationengineUnknown
tst_qqmlbindingUnknown
tst_qqmlcomponentUnknown
tst_qqmlconnectionsUnknown
tst_qqmlconsoleUnknown
tst_qqmlcontextUnknown
tst_qqmldebugjsUnknown
tst_qqmlecmascriptUnknown
tst_qqmlenginecleanupUnknown
tst_qqmlenginedebugserviceUnknown
tst_qqmlexpressionUnknown
tst_qqmlincubatorUnknown
tst_qqmlinfoUnknown
tst_qqmlinstantiatorUnknown
tst_qqmlitemmodelsUnknown
tst_qqmllistmodelUnknown
tst_qqmllistmodelworkerscriptUnknown
tst_qqmllistreferenceUnknown
tst_qqmllocaleUnknown
tst_qqmlmetaobjectUnknown
tst_qqmlmetatypeUnknown
tst_qqmlmodulepluginUnknown
tst_qqmlnativeconnectorUnknown
tst_qqmlnotifierUnknown
tst_qqmlprofilerserviceUnknown
tst_qqmlpropertyUnknown
tst_qqmlpropertymapUnknown
tst_qqmlqtUnknown
tst_qqmlsettingsUnknown
tst_qqmlsqldatabaseUnknown
tst_qqmlstatemachineUnknown
tst_qqmltimerUnknown
tst_qqmltranslationUnknown
tst_qqmltypeloaderUnknown
tst_qqmlvaluetypeprovidersUnknown
tst_qqmlvaluetypesUnknown
tst_qqmlxmlhttprequestUnknown
tst_qquickaccessibleUnknown
tst_qquickageUnknown
tst_qquickanchorsUnknown
tst_qquickangleddirectionUnknown
tst_qquickanimatedimageUnknown
tst_qquickanimatedspriteUnknown
tst_qquickanimationcontrollerUnknown
tst_qquickanimationsUnknown
tst_qquickapplicationUnknown
tst_qquickbehaviorsUnknown
tst_qquickborderimageUnknown
tst_qquickcumulativedirectionUnknown
tst_qquickcustomaffectorUnknown
tst_qquickcustomparticleUnknown
tst_qquickdesignersupportUnknown
tst_qquickdragUnknown
tst_qquickdraghandlerUnknown
tst_qquickdropareaUnknown
tst_qquickdynamicpropertyanimationUnknown
tst_qquickellipseextruderUnknown
tst_qquickflickableUnknown
tst_qquickflipableUnknown
tst_qquickfocusscopeUnknown
tst_qquickfolderlistmodelUnknown
tst_qquickfontloaderUnknown
tst_qquickfontloader_staticUnknown
tst_qquickfrictionUnknown
tst_qquickgraphicsinfoUnknown
tst_qquickgravityUnknown
tst_qquickgridviewUnknown
tst_qquickgroupgoalUnknown
tst_qquickimageUnknown
tst_qquickimageparticleUnknown
tst_qquickitemUnknown
tst_qquickitem2Unknown
tst_qquickitemlayerUnknown
tst_qquickitemparticleUnknown
tst_qquicklayoutsUnknown
tst_qquicklineextruderUnknown
tst_qquicklistviewUnknown
tst_qquickloaderUnknown
tst_qquickmaskextruderUnknown
tst_qquickmouseareaUnknown
tst_qquickmultipointtouchareaUnknown
tst_qquickopenglinfoUnknown
tst_qquickparticlegroupUnknown
tst_qquickparticlesystemUnknown
tst_qquickpathUnknown
tst_qquickpathviewUnknown
tst_qquickpinchareaUnknown
tst_qquickpointattractorUnknown
tst_qquickpointdirectionUnknown
tst_qquickpointerhandlerUnknown
tst_qquickpositionersUnknown
tst_qquickrectangleUnknown
tst_qquickrectangleextruderUnknown
tst_qquickrepeaterUnknown
tst_qquickscreenUnknown
tst_qquickshadereffectUnknown
tst_qquickshapeUnknown
tst_qquickshortcutUnknown
tst_qquicksmoothedanimationUnknown
tst_qquickspringanimationUnknown
tst_qquickspritegoalUnknown
tst_qquickspritesequenceUnknown
tst_qquickstatesUnknown
tst_qquicksystempaletteUnknown
tst_qquicktableviewUnknown
tst_qquicktaphandlerUnknown
tst_qquicktargetdirectionUnknown
tst_qquicktextUnknown
tst_qquicktexteditUnknown
tst_qquicktextinputUnknown
tst_qquicktrailemitterUnknown
tst_qquickturbulenceUnknown
tst_qquickvisualdatamodelUnknown
tst_qquickwanderUnknown
tst_qquickwidgetUnknown
tst_qquickwindowUnknown
tst_qquickworkerscriptUnknown
tst_qtqmlmodulesUnknown
tst_quicktestmainwithsetupUnknown
tst_qv4assemblerUnknown
tst_qv4debuggerUnknown
tst_rendernodeUnknown
tst_scenegraphUnknown
tst_sharedimageUnknown
tst_signalspyUnknown
tst_testfilteringUnknown
tst_touchmouseUnknown

Patch File

Showing: 

Modified File: src/qml/compiler/qv4bytecodegenerator.cpp

LineTestsDifference Output
diff --git a/src/qml/compiler/qv4bytecodegenerator.cpp b/src/qml/compiler/qv4bytecodegenerator.cpp
index 6efeac2a3..7e1f49ee8 100644
--- a/src/qml/compiler/qv4bytecodegenerator.cpp
+++ b/src/qml/compiler/qv4bytecodegenerator.cpp
@@ -75,8 +75,9 @@ void BytecodeGenerator::packInstruction(I &i)
75 type = Instr::narrowInstructionType(type);
76 int instructionsAsInts[sizeof(Instr)/sizeof(int)] = {};
77 int nMembers = Moth::InstrInfo::argumentCount[static_cast<int>(i.type)];
78
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ uchar *code = i.packed + Instr::encodedLength(type);
78 ➡ 79 for (int j = 0; j < nMembers; ++j) {
79
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- instructionsAsInts[j] = qFromLittleEndian<qint32>(i.packed + 1 + j * sizeof(int));
80
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ instructionsAsInts[j] = qFromLittleEndian<qint32>(code + j * sizeof(int));
80 ➡ 81 }
81 ➡ 82 enum {
82 ➡ 83 Normal,
@@ -88,11 +89,10 @@ void BytecodeGenerator::packInstruction(I &i)
88 ➡ 89 break;
89 ➡ 90 }
90 ➡ 91 }
91
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- uchar *code = i.packed;
92
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ code = i.packed;
92 ➡ 93 switch (width) {
93 ➡ 94 case Normal:
94
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- Instr::pack(code, type);
95
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- ++code;
95
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ code = Instr::pack(code, type);
96 for (int n = 0; n < nMembers; ++n) {
97 qint8 v = static_cast<qint8>(instructionsAsInts[n]);
98 memcpy(code, &v, 1);
@@ -225,12 +225,10 @@ QT_WARNING_POP
225 const int argCount = Moth::InstrInfo::argumentCount[static_cast<int>(type)];
226 int s = argCount*sizeof(int);
227 if (offsetOfOffset != -1)
228
72
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • ...
- offsetOfOffset += 1;
229
72
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • ...
- I instr{type, static_cast<short>(s + 1), 0, currentLine, offsetOfOffset, -1, "\0\0" };
228
72
Executed by:
  • tst_bindingdependencyapi
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qmlcachegen
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmlecmascript
  • tst_qqmlinstantiator
  • tst_qqmlitemmodels
  • tst_qqmllistmodel
  • tst_qqmllistmodelworkerscript
  • tst_qqmllocale
  • tst_qqmlnotifier
  • tst_qqmlprofilerservice
  • tst_qqmlpropertymap
  • tst_qqmlqt
  • tst_qqmlsqldatabase
  • ...
+ offsetOfOffset += Instr::encodedLength(type);
229
-
+ I instr{type, static_cast<short>(s + Instr::encodedLength(type)), 0, currentLine, offsetOfOffset, -1, "\0\0" };
230 uchar *code = instr.packed;
231
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- Instr::pack(code, Instr::wideInstructionType(type));
232
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- ++code;
233
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
- Q_ASSERT(static_cast<uint>(Instr::wideInstructionType(type)) < 256);
231
139
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ code = Instr::pack(code, Instr::wideInstructionType(type));
234 ➡ 232
235 ➡ 233 for (int j = 0; j < argCount; ++j) {
236 ➡ 234 qToLittleEndian<qint32>(i.argumentsAsInts[j], code);

Modified File: src/qml/compiler/qv4instr_moth.cpp

LineTestsDifference Output
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp
index 6773f97c8..8e474b378 100644
--- a/src/qml/compiler/qv4instr_moth.cpp
+++ b/src/qml/compiler/qv4instr_moth.cpp
@@ -48,7 +48,7 @@ int InstrInfo::size(Instr::Type type)
48 {
49 #define MOTH_RETURN_INSTR_SIZE(I) case Instr::Type::I: case Instr::Type::I##_Wide: return InstrMeta<int(Instr::Type::I)>::Size;
50 switch (type) {
51
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_RETURN_INSTR_SIZE)
51
-
+ FOR_EACH_MOTH_INSTR_ALL(MOTH_RETURN_INSTR_SIZE)
52 }
53 #undef MOTH_RETURN_INSTR_SIZE
54 Q_UNREACHABLE();
@@ -111,6 +111,8 @@ static QString toString(QV4::ReturnedValue v)
111 QDebug d = qDebug(); \
112 d.noquote(); \
113 d.nospace(); \
114
-
+ if (static_cast<int>(Instr::Type::instr) >= 0x100) \
115
-
+ --base_ptr; \
114 ➡ 116 d << alignedLineNumber(line) << alignedNumber(codeOffset).constData() << ": " \
115 ➡ 117 << rawBytes(base_ptr, int(code - base_ptr)) << #instr << " ";
116 ➡ 118
@@ -123,7 +125,7 @@ namespace QV4 {
123 ➡ 125 namespace Moth {
124 ➡ 126
125 ➡ 127 const int InstrInfo::argumentCount[] = {
126
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_COLLECT_NARGS)
128
-
+ FOR_EACH_MOTH_INSTR_ALL(MOTH_COLLECT_NARGS)
127 ➡ 129 };
128 ➡ 130
129 ➡ 131

Modified File: src/qml/compiler/qv4instr_moth_p.h

LineTestsDifference Output
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h
index 29fc28c12..4e2dd370c 100644
--- a/src/qml/compiler/qv4instr_moth_p.h
+++ b/src/qml/compiler/qv4instr_moth_p.h
@@ -62,6 +62,7 @@ QT_BEGIN_NAMESPACE
62 op##_INSTRUCTION(name, nargs, __VA_ARGS__)
63
64 /* for all jump instructions, the offset has to come last, to simplify the job of the bytecode generator */
65
-
+#define INSTR_Nop(op) INSTRUCTION(op, Nop, 0)
65 ➡ 66 #define INSTR_Ret(op) INSTRUCTION(op, Ret, 0)
66 ➡ 67 #define INSTR_Debug(op) INSTRUCTION(op, Debug, 0)
67 ➡ 68 #define INSTR_LoadConst(op) INSTRUCTION(op, LoadConst, 1, index)
@@ -191,10 +192,12 @@ QT_BEGIN_NAMESPACE
191 ➡ 192 #define INSTR_LoadQmlContext(op) INSTRUCTION(op, LoadQmlContext, 1, result)
192 ➡ 193 #define INSTR_LoadQmlImportedScripts(op) INSTRUCTION(op, LoadQmlImportedScripts, 1, result)
193 ➡ 194
195
-
+#define FOR_EACH_MOTH_INSTR_ALL(F) \
196
-
+ F(Nop) \
197
-
+ FOR_EACH_MOTH_INSTR(F)
194 ➡ 198
195 ➡ 199 #define FOR_EACH_MOTH_INSTR(F) \
196 ➡ 200 F(Ret) \
197
-
No equivalent source code line in the reference code can be identified.
- F(Debug) \
198 ➡ 201 F(LoadConst) \
199 ➡ 202 F(LoadZero) \
200 ➡ 203 F(LoadTrue) \
@@ -202,6 +205,7 @@ QT_BEGIN_NAMESPACE
202 ➡ 205 F(LoadNull) \
203 ➡ 206 F(LoadUndefined) \
204 ➡ 207 F(LoadInt) \
208
-
+ F(LoadRuntimeString) \
205 ➡ 209 F(MoveConst) \
206 ➡ 210 F(LoadReg) \
207 ➡ 211 F(StoreReg) \
@@ -210,7 +214,6 @@ QT_BEGIN_NAMESPACE
210 ➡ 214 F(StoreLocal) \
211 ➡ 215 F(LoadScopedLocal) \
212 ➡ 216 F(StoreScopedLocal) \
213
-
No equivalent source code line in the reference code can be identified.
- F(LoadRuntimeString) \
214 ➡ 217 F(MoveRegExp) \
215 ➡ 218 F(LoadClosure) \
216 ➡ 219 F(LoadName) \
@@ -230,51 +233,7 @@ QT_BEGIN_NAMESPACE
230 ➡ 233 F(LoadScopeObjectProperty) \
231 ➡ 234 F(LoadContextObjectProperty) \
232 ➡ 235 F(LoadIdObject) \
233
-
No equivalent source code line in the reference code can be identified.
- F(Yield) \
234
-
No equivalent source code line in the reference code can be identified.
- F(Resume) \
235
-
No equivalent source code line in the reference code can be identified.
- F(CallValue) \
236
-
No equivalent source code line in the reference code can be identified.
- F(CallProperty) \
237
-
No equivalent source code line in the reference code can be identified.
- F(CallPropertyLookup) \
238
-
No equivalent source code line in the reference code can be identified.
- F(CallElement) \
239
-
No equivalent source code line in the reference code can be identified.
- F(CallName) \
240
-
No equivalent source code line in the reference code can be identified.
- F(CallPossiblyDirectEval) \
241
-
No equivalent source code line in the reference code can be identified.
- F(CallGlobalLookup) \
242
-
No equivalent source code line in the reference code can be identified.
- F(CallScopeObjectProperty) \
243
-
No equivalent source code line in the reference code can be identified.
- F(CallContextObjectProperty) \
244
-
No equivalent source code line in the reference code can be identified.
- F(CallWithSpread) \
245
-
No equivalent source code line in the reference code can be identified.
- F(Construct) \
246
-
No equivalent source code line in the reference code can be identified.
- F(ConstructWithSpread) \
247
-
No equivalent source code line in the reference code can be identified.
- F(SetUnwindHandler) \
248
-
No equivalent source code line in the reference code can be identified.
- F(UnwindDispatch) \
249
-
No equivalent source code line in the reference code can be identified.
- F(UnwindToLabel) \
250
-
No equivalent source code line in the reference code can be identified.
- F(ThrowException) \
251
-
No equivalent source code line in the reference code can be identified.
- F(GetException) \
252
-
No equivalent source code line in the reference code can be identified.
- F(SetException) \
253
-
No equivalent source code line in the reference code can be identified.
- F(CreateCallContext) \
254
-
No equivalent source code line in the reference code can be identified.
- F(PushCatchContext) \
255
-
No equivalent source code line in the reference code can be identified.
- F(PushWithContext) \
256
-
No equivalent source code line in the reference code can be identified.
- F(PushBlockContext) \
257
-
No equivalent source code line in the reference code can be identified.
- F(CloneBlockContext) \
258
-
No equivalent source code line in the reference code can be identified.
- F(PushScriptContext) \
259
-
No equivalent source code line in the reference code can be identified.
- F(PopScriptContext) \
260
-
No equivalent source code line in the reference code can be identified.
- F(PopContext) \
261
-
No equivalent source code line in the reference code can be identified.
- F(GetIterator) \
262
-
No equivalent source code line in the reference code can be identified.
- F(IteratorNext) \
263
-
No equivalent source code line in the reference code can be identified.
- F(IteratorClose) \
264
-
No equivalent source code line in the reference code can be identified.
- F(DestructureRestElement) \
265
-
No equivalent source code line in the reference code can be identified.
- F(DeleteProperty) \
266
-
No equivalent source code line in the reference code can be identified.
- F(DeleteName) \
267
-
No equivalent source code line in the reference code can be identified.
- F(TypeofName) \
268
-
No equivalent source code line in the reference code can be identified.
- F(TypeofValue) \
269
-
No equivalent source code line in the reference code can be identified.
- F(DeclareVar) \
270
-
No equivalent source code line in the reference code can be identified.
- F(DefineArray) \
271
-
No equivalent source code line in the reference code can be identified.
- F(DefineObjectLiteral) \
272
-
No equivalent source code line in the reference code can be identified.
- F(CreateClass) \
273
-
No equivalent source code line in the reference code can be identified.
- F(CreateMappedArgumentsObject) \
274
-
No equivalent source code line in the reference code can be identified.
- F(CreateUnmappedArgumentsObject) \
275
-
No equivalent source code line in the reference code can be identified.
- F(CreateRestParameter) \
276 ➡ 236 F(ConvertThisToObject) \
277
-
No equivalent source code line in the reference code can be identified.
- F(LoadSuperConstructor) \
278 ➡ 237 F(ToObject) \
279 ➡ 238 F(Jump) \
280 ➡ 239 F(JumpTrue) \
@@ -319,9 +278,55 @@ QT_BEGIN_NAMESPACE
319 ➡ 278 F(Div) \
320 ➡ 279 F(Mod) \
321 ➡ 280 F(Sub) \
281
-
+ F(CallValue) \
282
-
+ F(CallProperty) \
283
-
+ F(CallPropertyLookup) \
284
-
+ F(CallElement) \
285
-
+ F(CallName) \
286
-
+ F(CallPossiblyDirectEval) \
287
-
+ F(CallGlobalLookup) \
288
-
+ F(CallScopeObjectProperty) \
289
-
+ F(CallContextObjectProperty) \
290
-
+ F(CallWithSpread) \
291
-
+ F(Construct) \
292
-
+ F(ConstructWithSpread) \
293
-
+ F(SetUnwindHandler) \
294
-
+ F(UnwindDispatch) \
295
-
+ F(UnwindToLabel) \
296
-
+ F(ThrowException) \
297
-
+ F(GetException) \
298
-
+ F(SetException) \
299
-
+ F(CreateCallContext) \
300
-
+ F(PushCatchContext) \
301
-
+ F(PushWithContext) \
302
-
+ F(PushBlockContext) \
303
-
+ F(CloneBlockContext) \
304
-
+ F(PopContext) \
305
-
+ F(GetIterator) \
306
-
+ F(IteratorNext) \
307
-
+ F(IteratorClose) \
308
-
+ F(DestructureRestElement) \
309
-
+ F(DeleteProperty) \
310
-
+ F(DeleteName) \
311
-
+ F(TypeofName) \
312
-
+ F(TypeofValue) \
313
-
+ F(DeclareVar) \
314
-
+ F(DefineArray) \
315
-
+ F(DefineObjectLiteral) \
316
-
+ F(CreateMappedArgumentsObject) \
317
-
+ F(CreateUnmappedArgumentsObject) \
318
-
+ F(CreateRestParameter) \
322 ➡ 319 F(LoadQmlContext) \
323
-
No equivalent source code line in the reference code can be identified.
- F(LoadQmlImportedScripts)
324
-
No equivalent source code line in the reference code can be identified.
-#define MOTH_NUM_INSTRUCTIONS() (static_cast<int>(Moth::Instr::Type::LoadQmlImportedScripts_Wide))
320
-
+ F(LoadQmlImportedScripts) \
321
-
+ F(Yield) \
322
-
+ F(Resume) \
323
-
+ F(CreateClass) \
324
-
+ F(LoadSuperConstructor) \
325
-
+ F(PushScriptContext) \
326
-
+ F(PopScriptContext) \
327
-
+ F(Debug) \
328
-
+
329
-
+#define MOTH_NUM_INSTRUCTIONS() (static_cast<int>(Moth::Instr::Type::Debug_Wide) + 1)
325 ➡ 330
326 ➡ 331 #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
327 ➡ 332 // icc before version 1200 doesn't support computed goto, and at least up to version 18.0.0 the
@@ -439,27 +444,44 @@ QT_BEGIN_NAMESPACE
439 ➡ 444
440 ➡ 445 #define MOTH_JUMP_TABLE \
441 ➡ 446 static const void *jumpTable[] = { \
442
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(COLLECT_LABELS) \
447
-
+ FOR_EACH_MOTH_INSTR_ALL(COLLECT_LABELS) \
443 ➡ 448 };
444 ➡ 449
445
-
No equivalent source code line in the reference code can be identified.
-#define MOTH_DISPATCH() \
450
-
+#define MOTH_DISPATCH_SINGLE() \
446 ➡ 451 goto *jumpTable[*reinterpret_cast<const uchar *>(code)];
452
-
+
453
-
+#define MOTH_DISPATCH() \
454
-
+ MOTH_DISPATCH_SINGLE() \
455
-
+ op_byte_Nop: \
456
-
+ ++code; \
457
-
+ MOTH_DISPATCH_SINGLE() \
458
-
+ op_int_Nop: /* wide prefix */ \
459
-
+ ++code; \
460
-
+ goto *jumpTable[0x100 | *reinterpret_cast<const uchar *>(code)];
447 ➡ 461 #else
448 ➡ 462 #define MOTH_JUMP_TABLE
449 ➡ 463
450 ➡ 464 #define MOTH_INSTR_CASE_AND_JUMP(instr) \
451
-
No equivalent source code line in the reference code can be identified.
- INSTR_##instr(GET_CASE_AND_JUMP)
452
-
No equivalent source code line in the reference code can be identified.
-#define GET_CASE_AND_JUMP_INSTRUCTION(name, ...) \
453
-
No equivalent source code line in the reference code can be identified.
- case static_cast<uchar>(Instr::Type::name): goto op_byte_##name;
454
-
No equivalent source code line in the reference code can be identified.
-#define MOTH_INSTR_CASE_AND_JUMP_WIDE(instr) \
465
-
+ INSTR_##instr(GET_CASE_AND_JUMP) \
455 ➡ 466 INSTR_##instr(GET_CASE_AND_JUMP_WIDE)
467
-
+#define GET_CASE_AND_JUMP_INSTRUCTION(name, ...) \
468
-
+ case Instr::Type::name: goto op_byte_##name;
456 ➡ 469 #define GET_CASE_AND_JUMP_WIDE_INSTRUCTION(name, ...) \
457
-
No equivalent source code line in the reference code can be identified.
- case (static_cast<uchar>(Instr::Type::name##_Wide)): goto op_int_##name;
470
-
+ case Instr::Type::name##_Wide: goto op_int_##name;
458 ➡ 471
459 ➡ 472 #define MOTH_DISPATCH() \
460
-
No equivalent source code line in the reference code can be identified.
- switch (static_cast<uchar>(*code)) { \
473
-
+ Instr::Type type = Instr::Type(static_cast<uchar>(*code)); \
474
-
+ dispatch: \
475
-
+ switch (type) { \
476
-
+ case Instr::Type::Nop: \
477
-
+ ++code; \
478
-
+ type = Instr::Type(static_cast<uchar>(*code)); \
479
-
+ goto dispatch; \
480
-
+ case Instr::Type::Nop_Wide: /* wide prefix */ \
481
-
+ ++code; \
482
-
+ type = Instr::Type(0x100 | static_cast<uchar>(*code)); \
483
-
+ goto dispatch; \
461 ➡ 484 FOR_EACH_MOTH_INSTR(MOTH_INSTR_CASE_AND_JUMP) \
462
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_INSTR_CASE_AND_JUMP_WIDE) \
463 ➡ 485 }
464 ➡ 486 #endif
465 ➡ 487
@@ -502,20 +524,29 @@ inline void dumpBytecode(const QByteArray &bytecode, int nLocals, int nFormals,
502 ➡ 524 union Instr
503 ➡ 525 {
504 ➡ 526 enum class Type {
505
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_INSTR_ENUM)
527
-
+ FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_ENUM)
506 ➡ 528 };
507 ➡ 529
508 ➡ 530 static Type wideInstructionType(Type t) { return Type(int(t) | 1); }
509 ➡ 531 static Type narrowInstructionType(Type t) { return Type(int(t) & ~1); }
510 ➡ 532 static bool isWide(Type t) { return int(t) & 1; }
511 ➡ 533 static bool isNarrow(Type t) { return !(int(t) & 1); }
534
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ static int encodedLength(Type t) { return int(t) >= 256 ? 2 : 1; }
535
-
+
536
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ static Type unpack(const uchar *c) { if (c[0] == 0x1) return Type(0x100 + c[1]); return Type(c[0]); }
537
-
+ static uchar *pack(uchar *c, Type t) {
538
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ if (uint(t) >= 256) {
539
2
Executed by:
  • tst_qqmldebugjs
  • tst_qv4debugger
+ c[0] = 0x1;
540
2
Executed by:
  • tst_qqmldebugjs
  • tst_qv4debugger
+ c[1] = uint(t) &0xff;
541
2
Executed by:
  • tst_qqmldebugjs
  • tst_qv4debugger
+ return c + 2;
542
-
+ }
543
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ c[0] = uchar(uint(t));
544
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+ return c + 1;
545
-
+ }
512 ➡ 546
513
-
No equivalent source code line in the reference code can be identified.
- static Type unpack(const uchar *c) { return Type(*c); }
514
-
No equivalent source code line in the reference code can be identified.
- static void pack(uchar *c, Type t) { *c = uchar(uint(t)); }
515
-
No equivalent source code line in the reference code can be identified.
-
516
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_EMIT_STRUCTS)
547
-
+ FOR_EACH_MOTH_INSTR_ALL(MOTH_EMIT_STRUCTS)
517 ➡ 548
518
-
No equivalent source code line in the reference code can be identified.
- FOR_EACH_MOTH_INSTR(MOTH_EMIT_INSTR_MEMBERS)
549
-
+ FOR_EACH_MOTH_INSTR_ALL(MOTH_EMIT_INSTR_MEMBERS)
519 ➡ 550
520 ➡ 551 int argumentsAsInts[4];
521 ➡ 552 };
@@ -526,8 +557,6 @@ struct InstrInfo
526 ➡ 557 static int size(Instr::Type type);
527 ➡ 558 };
528 ➡ 559
529
-
No equivalent source code line in the reference code can be identified.
-Q_STATIC_ASSERT(MOTH_NUM_INSTRUCTIONS() <= 256);
530
-
No equivalent source code line in the reference code can be identified.
-
531 ➡ 560 template<int N>
532 ➡ 561 struct InstrMeta {
533 ➡ 562 };
@@ -545,7 +574,7 @@ QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
545 ➡ 574 reinterpret_cast<const char *>(&v), \
546 ➡ 575 Size); } \
547 ➡ 576 };
548
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
-FOR_EACH_MOTH_INSTR(MOTH_INSTR_META_TEMPLATE);
577
140
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugjs
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • tst_qqmlenginedebugservice
  • tst_qqmlexpression
  • tst_qqmlincubator
  • ...
+FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_META_TEMPLATE);
549 ➡ 578 #undef MOTH_INSTR_META_TEMPLATE
550 ➡ 579 QT_WARNING_POP
551 ➡ 580
@@ -556,7 +585,7 @@ class InstrData : public InstrMeta<InstrType>::DataType
556 ➡ 585
557 ➡ 586 struct Instruction {
558 ➡ 587 #define MOTH_INSTR_DATA_TYPEDEF(I) typedef InstrData<int(Instr::Type::I)> I;
559
-
No equivalent source code line in the reference code can be identified.
-FOR_EACH_MOTH_INSTR(MOTH_INSTR_DATA_TYPEDEF)
588
-
+FOR_EACH_MOTH_INSTR_ALL(MOTH_INSTR_DATA_TYPEDEF)
560 ➡ 589 #undef MOTH_INSTR_DATA_TYPEDEF
561 ➡ 590 private:
562 ➡ 591 Instruction();

Modified File: src/qml/jsruntime/qv4vme_moth.cpp

LineTestsDifference Output
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp
index 6c667110a..53e5632ef 100644
--- a/src/qml/jsruntime/qv4vme_moth.cpp
+++ b/src/qml/jsruntime/qv4vme_moth.cpp
@@ -328,7 +328,7 @@ static struct InstrCount {
328
329 #ifdef MOTH_COMPUTED_GOTO
330 #define MOTH_END_INSTR(instr) \
331
-
No equivalent source code line in the reference code can be identified.
- MOTH_DISPATCH() \
331
-
+ MOTH_DISPATCH_SINGLE() \
332 }
333 #else // !MOTH_COMPUTED_GOTO
334 #define MOTH_END_INSTR(instr) \

Generated by Squish Coco 4.2.0