| Test Execution Status | Statistics |
|---|---|
| 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) |
| Category | Removed Lines | Inserted Lines | Total |
|---|---|---|---|
| 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) |
| Execution Name | State |
|---|---|
| tst_bindingdependencyapi | Unknown |
| tst_drawingmodes | Unknown |
| tst_ecmascripttests | Unknown |
| tst_examples | Unknown |
| tst_flickableinterop | Unknown |
| tst_multipointtoucharea_interop | Unknown |
| tst_parserstress | Unknown |
| tst_qjsengine | Unknown |
| tst_qjsonbinding | Unknown |
| tst_qjsvalue | Unknown |
| tst_qjsvalueiterator | Unknown |
| tst_qmlcachegen | Unknown |
| tst_qmldiskcache | Unknown |
| tst_qqmlapplicationengine | Unknown |
| tst_qqmlbinding | Unknown |
| tst_qqmlcomponent | Unknown |
| tst_qqmlconnections | Unknown |
| tst_qqmlconsole | Unknown |
| tst_qqmlcontext | Unknown |
| tst_qqmldebugjs | Unknown |
| tst_qqmlecmascript | Unknown |
| tst_qqmlenginecleanup | Unknown |
| tst_qqmlenginedebugservice | Unknown |
| tst_qqmlexpression | Unknown |
| tst_qqmlincubator | Unknown |
| tst_qqmlinfo | Unknown |
| tst_qqmlinstantiator | Unknown |
| tst_qqmlitemmodels | Unknown |
| tst_qqmllistmodel | Unknown |
| tst_qqmllistmodelworkerscript | Unknown |
| tst_qqmllistreference | Unknown |
| tst_qqmllocale | Unknown |
| tst_qqmlmetaobject | Unknown |
| tst_qqmlmetatype | Unknown |
| tst_qqmlmoduleplugin | Unknown |
| tst_qqmlnativeconnector | Unknown |
| tst_qqmlnotifier | Unknown |
| tst_qqmlprofilerservice | Unknown |
| tst_qqmlproperty | Unknown |
| tst_qqmlpropertymap | Unknown |
| tst_qqmlqt | Unknown |
| tst_qqmlsettings | Unknown |
| tst_qqmlsqldatabase | Unknown |
| tst_qqmlstatemachine | Unknown |
| tst_qqmltimer | Unknown |
| tst_qqmltranslation | Unknown |
| tst_qqmltypeloader | Unknown |
| tst_qqmlvaluetypeproviders | Unknown |
| tst_qqmlvaluetypes | Unknown |
| tst_qqmlxmlhttprequest | Unknown |
| tst_qquickaccessible | Unknown |
| tst_qquickage | Unknown |
| tst_qquickanchors | Unknown |
| tst_qquickangleddirection | Unknown |
| tst_qquickanimatedimage | Unknown |
| tst_qquickanimatedsprite | Unknown |
| tst_qquickanimationcontroller | Unknown |
| tst_qquickanimations | Unknown |
| tst_qquickapplication | Unknown |
| tst_qquickbehaviors | Unknown |
| tst_qquickborderimage | Unknown |
| tst_qquickcumulativedirection | Unknown |
| tst_qquickcustomaffector | Unknown |
| tst_qquickcustomparticle | Unknown |
| tst_qquickdesignersupport | Unknown |
| tst_qquickdrag | Unknown |
| tst_qquickdraghandler | Unknown |
| tst_qquickdroparea | Unknown |
| tst_qquickdynamicpropertyanimation | Unknown |
| tst_qquickellipseextruder | Unknown |
| tst_qquickflickable | Unknown |
| tst_qquickflipable | Unknown |
| tst_qquickfocusscope | Unknown |
| tst_qquickfolderlistmodel | Unknown |
| tst_qquickfontloader | Unknown |
| tst_qquickfontloader_static | Unknown |
| tst_qquickfriction | Unknown |
| tst_qquickgraphicsinfo | Unknown |
| tst_qquickgravity | Unknown |
| tst_qquickgridview | Unknown |
| tst_qquickgroupgoal | Unknown |
| tst_qquickimage | Unknown |
| tst_qquickimageparticle | Unknown |
| tst_qquickitem | Unknown |
| tst_qquickitem2 | Unknown |
| tst_qquickitemlayer | Unknown |
| tst_qquickitemparticle | Unknown |
| tst_qquicklayouts | Unknown |
| tst_qquicklineextruder | Unknown |
| tst_qquicklistview | Unknown |
| tst_qquickloader | Unknown |
| tst_qquickmaskextruder | Unknown |
| tst_qquickmousearea | Unknown |
| tst_qquickmultipointtoucharea | Unknown |
| tst_qquickopenglinfo | Unknown |
| tst_qquickparticlegroup | Unknown |
| tst_qquickparticlesystem | Unknown |
| tst_qquickpath | Unknown |
| tst_qquickpathview | Unknown |
| tst_qquickpincharea | Unknown |
| tst_qquickpointattractor | Unknown |
| tst_qquickpointdirection | Unknown |
| tst_qquickpointerhandler | Unknown |
| tst_qquickpositioners | Unknown |
| tst_qquickrectangle | Unknown |
| tst_qquickrectangleextruder | Unknown |
| tst_qquickrepeater | Unknown |
| tst_qquickscreen | Unknown |
| tst_qquickshadereffect | Unknown |
| tst_qquickshape | Unknown |
| tst_qquickshortcut | Unknown |
| tst_qquicksmoothedanimation | Unknown |
| tst_qquickspringanimation | Unknown |
| tst_qquickspritegoal | Unknown |
| tst_qquickspritesequence | Unknown |
| tst_qquickstates | Unknown |
| tst_qquicksystempalette | Unknown |
| tst_qquicktableview | Unknown |
| tst_qquicktaphandler | Unknown |
| tst_qquicktargetdirection | Unknown |
| tst_qquicktext | Unknown |
| tst_qquicktextedit | Unknown |
| tst_qquicktextinput | Unknown |
| tst_qquicktrailemitter | Unknown |
| tst_qquickturbulence | Unknown |
| tst_qquickvisualdatamodel | Unknown |
| tst_qquickwander | Unknown |
| tst_qquickwidget | Unknown |
| tst_qquickwindow | Unknown |
| tst_qquickworkerscript | Unknown |
| tst_qtqmlmodules | Unknown |
| tst_quicktestmainwithsetup | Unknown |
| tst_qv4assembler | Unknown |
| tst_qv4debugger | Unknown |
| tst_rendernode | Unknown |
| tst_scenegraph | Unknown |
| tst_sharedimage | Unknown |
| tst_signalspy | Unknown |
| tst_testfiltering | Unknown |
| tst_touchmouse | Unknown |
| Line | Tests | Difference 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:
| + uchar *code = i.packed + Instr::encodedLength(type); |
| 78 ➡ 79 | for (int j = 0; j < nMembers; ++j) { | |
| 79 | 139 Executed by:
| - instructionsAsInts[j] = qFromLittleEndian<qint32>(i.packed + 1 + j * sizeof(int)); |
| 80 | 139 Executed by:
| + 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:
| - uchar *code = i.packed; |
| 92 | 139 Executed by:
| + code = i.packed; |
| 92 ➡ 93 | switch (width) { | |
| 93 ➡ 94 | case Normal: | |
| 94 | 139 Executed by:
| - Instr::pack(code, type); |
| 95 | 139 Executed by:
| - ++code; |
| 95 | 139 Executed by:
| + 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:
| - offsetOfOffset += 1; |
| 229 | 72 Executed by:
| - I instr{type, static_cast<short>(s + 1), 0, currentLine, offsetOfOffset, -1, "\0\0" }; |
| 228 | 72 Executed by:
| + 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:
| - Instr::pack(code, Instr::wideInstructionType(type)); |
| 232 | 139 Executed by:
| - ++code; |
| 233 | 139 Executed by:
| - Q_ASSERT(static_cast<uint>(Instr::wideInstructionType(type)) < 256); |
| 231 | 139 Executed by:
| + 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); |
| Line | Tests | Difference 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 |
| Line | Tests | Difference 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:
| + static int encodedLength(Type t) { return int(t) >= 256 ? 2 : 1; } |
| 535 | - | + |
| 536 | 140 Executed by:
| + 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:
| + if (uint(t) >= 256) { |
| 539 | 2 Executed by:
| + c[0] = 0x1; |
| 540 | 2 Executed by:
| + c[1] = uint(t) &0xff; |
| 541 | 2 Executed by:
| + return c + 2; |
| 542 | - | + } |
| 543 | 140 Executed by:
| + c[0] = uchar(uint(t)); |
| 544 | 140 Executed by:
| + 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:
| -FOR_EACH_MOTH_INSTR(MOTH_INSTR_META_TEMPLATE); |
| 577 | 140 Executed by:
| +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(); |
| Line | Tests | Difference 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) \ |