| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | | - |
| 38 | | - |
| 39 | | - |
| 40 | #ifndef QV4BYTECODEHANDLER_P_H | - |
| 41 | #define QV4BYTECODEHANDLER_P_H | - |
| 42 | | - |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | | - |
| 49 | | - |
| 50 | | - |
| 51 | | - |
| 52 | | - |
| 53 | #include <private/qv4instr_moth_p.h> | - |
| 54 | | - |
| 55 | QT_BEGIN_NAMESPACE | - |
| 56 | | - |
| 57 | namespace QV4 { | - |
| 58 | namespace Moth { | - |
| 59 | | - |
| 60 | #define BYTECODE_HANDLER_DEFINE_ARGS(nargs, ...) \ | - |
| 61 | MOTH_EXPAND_FOR_MSVC(BYTECODE_HANDLER_DEFINE_ARGS##nargs(__VA_ARGS__)) | - |
| 62 | | - |
| 63 | #define BYTECODE_HANDLER_DEFINE_ARGS0() | - |
| 64 | #define BYTECODE_HANDLER_DEFINE_ARGS1(arg) \ | - |
| 65 | int arg | - |
| 66 | #define BYTECODE_HANDLER_DEFINE_ARGS2(arg1, arg2) \ | - |
| 67 | int arg1, \ | - |
| 68 | int arg2 | - |
| 69 | #define BYTECODE_HANDLER_DEFINE_ARGS3(arg1, arg2, arg3) \ | - |
| 70 | int arg1, \ | - |
| 71 | int arg2, \ | - |
| 72 | int arg3 | - |
| 73 | #define BYTECODE_HANDLER_DEFINE_ARGS4(arg1, arg2, arg3, arg4) \ | - |
| 74 | int arg1, \ | - |
| 75 | int arg2, \ | - |
| 76 | int arg3, \ | - |
| 77 | int arg4 | - |
| 78 | | - |
| 79 | #define BYTECODE_HANDLER_DEFINE_VIRTUAL_BYTECODE_HANDLER_INSTRUCTION(name, nargs, ...) \ | - |
| 80 | virtual void generate_##name( \ | - |
| 81 | BYTECODE_HANDLER_DEFINE_ARGS(nargs, __VA_ARGS__) \ | - |
| 82 | ) = 0; | - |
| 83 | | - |
| 84 | #define BYTECODE_HANDLER_DEFINE_VIRTUAL_BYTECODE_HANDLER(instr) \ | - |
| 85 | INSTR_##instr(BYTECODE_HANDLER_DEFINE_VIRTUAL_BYTECODE_HANDLER) | - |
| 86 | | - |
| 87 | class ByteCodeHandler | - |
| 88 | { | - |
| 89 | public: | - |
| 90 | virtual ~ByteCodeHandler(); | - |
| 91 | | - |
| 92 | void decode(const char *code, uint len); | - |
| 93 | | - |
| 94 | int instructionOffset() const { return _offset; }executed 199450 times by 64 tests: return _offset;Executed by:- tst_examples
- tst_flickableinterop
- tst_multipointtoucharea_interop
- tst_qjsengine
- tst_qjsvalue
- tst_qqmlbinding
- tst_qqmlcomponent
- tst_qqmlcontext
- tst_qqmlecmascript
- tst_qqmlenginedebugservice
- tst_qqmlinstantiator
- tst_qqmlitemmodels
- tst_qqmllistmodel
- tst_qqmllistmodelworkerscript
- tst_qqmllocale
- tst_qqmlnotifier
- tst_qqmlprofilerservice
- tst_qqmlproperty
- tst_qqmlqt
- tst_qqmlvaluetypeproviders
- tst_qqmlvaluetypes
- tst_qqmlxmlhttprequest
- tst_qquickaccessible
- tst_qquickanimatedimage
- tst_qquickanimationcontroller
- ...
| 199450 |
| 95 | | - |
| 96 | static std::vector<int> collectLabelsInBytecode(const char *code, uint len); | - |
| 97 | | - |
| 98 | protected: | - |
| 99 | FOR_EACH_MOTH_INSTR(BYTECODE_HANDLER_DEFINE_VIRTUAL_BYTECODE_HANDLER) | - |
| 100 | | - |
| 101 | virtual void startInstruction(Moth::Instr::Type instr) = 0; | - |
| 102 | virtual void endInstruction(Moth::Instr::Type instr) = 0; | - |
| 103 | | - |
| 104 | private: | - |
| 105 | int _offset = 0; | - |
| 106 | }; | - |
| 107 | | - |
| 108 | } | - |
| 109 | } | - |
| 110 | | - |
| 111 | QT_END_NAMESPACE | - |
| 112 | | - |
| 113 | #endif // QV4BYTECODEHANDLER_P_H | - |
| | |