Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qv4bytecodehandler.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include <private/qv4bytecodehandler_p.h>
5
7using namespace QV4;
8using namespace Moth;
9
13
14#define DISPATCH_INSTRUCTION(name, nargs, ...) \
15 generate_##name( \
16 __VA_ARGS__ \
17 );
18
19#define DECODE_AND_DISPATCH(instr) \
20 { \
21 INSTR_##instr(MOTH_DECODE_WITH_BASE) \
22 Q_UNUSED(base_ptr); \
23 _currentOffset = _nextOffset; \
24 _nextOffset = code - start; \
25 if (startInstruction(Instr::Type::instr) == ProcessInstruction) { \
26 INSTR_##instr(DISPATCH) \
27 endInstruction(Instr::Type::instr); \
28 } \
29 continue; \
30 }
31
32void ByteCodeHandler::decode(const char *code, uint len)
33{
35
36 const char *start = code;
37 const char *end = code + len;
38 while (code < end) {
40
42 }
43}
44
45#undef DECODE_AND_DISPATCH
46#undef DISPATCH_INSTRUCTION
void decode(const char *code, uint len)
GLuint GLuint end
GLuint start
GLenum GLsizei len
unsigned int uint
Definition qtypes.h:34
#define DECODE_AND_DISPATCH(instr)
#define FOR_EACH_MOTH_INSTR(F)
#define MOTH_JUMP_TABLE
#define MOTH_DISPATCH()