diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-08-24 14:10:41 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-08-28 13:18:36 +0000 |
commit | a4f8b9ae6dfacf9ad5c190cde6098ebf13102f41 (patch) | |
tree | a179acaa281c399ae8f122c70ba450ac82dd88e2 /src/qml/compiler/qv4instr_moth.cpp | |
parent | 011da0cfb69af8d3198f8150a2b7e2857a5ac22f (diff) |
Decode instructions into registers
Don't use the old instruction structures in the VME anymore,
instead directly decode into scoped registers.
Change-Id: Ie03ebad98050ebfd9eb9cc7e9273e5db92884a89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4instr_moth.cpp')
-rw-r--r-- | src/qml/compiler/qv4instr_moth.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4instr_moth.cpp b/src/qml/compiler/qv4instr_moth.cpp index ec4e99c4bf..ba52fc5f9a 100644 --- a/src/qml/compiler/qv4instr_moth.cpp +++ b/src/qml/compiler/qv4instr_moth.cpp @@ -86,7 +86,7 @@ static QString toString(QV4::ReturnedValue v) template<typename T> size_t absoluteInstructionOffset(const char *codeStart, const T &instr) { - return reinterpret_cast<const char *>(&instr) - codeStart + offsetof(T, offset) + instr.offset; + return reinterpret_cast<const char *>(&instr) - codeStart + sizeof(T) + instr.offset; } #define MOTH_BEGIN_INSTR(I) \ @@ -126,7 +126,7 @@ void dumpBytecode(const char *code, int len, int nLocals, int nFormals, int star lastLine = line; else line = -1; - switch (genericInstr->Common.instructionType) { + switch (Instr::Type(genericInstr->Common.instructionType)) { MOTH_BEGIN_INSTR(LoadReg) d << StackSlot::createRegister(instr.reg).dump(nFormals); |