diff options
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4instr_moth_p.h | 9 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4instr_moth_p.h b/src/qml/compiler/qv4instr_moth_p.h index 39309aad2b..3f6e7b9db4 100644 --- a/src/qml/compiler/qv4instr_moth_p.h +++ b/src/qml/compiler/qv4instr_moth_p.h @@ -353,7 +353,6 @@ QT_BEGIN_NAMESPACE #define MOTH_DECODE_INSTRUCTION(name, nargs, ...) \ MOTH_DEFINE_ARGS(nargs, __VA_ARGS__) \ - goto op_int_##name; \ op_int_##name: \ MOTH_ADJUST_CODE(int, nargs); \ MOTH_DECODE_ARGS(name, int, nargs, __VA_ARGS__) \ @@ -367,7 +366,6 @@ QT_BEGIN_NAMESPACE #define MOTH_DECODE_WITH_BASE_INSTRUCTION(name, nargs, ...) \ MOTH_DEFINE_ARGS(nargs, __VA_ARGS__) \ const char *base_ptr; \ - goto op_int_##name; \ op_int_##name: \ base_ptr = code; \ MOTH_ADJUST_CODE(int, nargs); \ @@ -421,15 +419,16 @@ QT_BEGIN_NAMESPACE #define MOTH_INSTR_CASE_AND_JUMP(instr) \ INSTR_##instr(GET_CASE_AND_JUMP) #define GET_CASE_AND_JUMP_INSTRUCTION(name, ...) \ - case Instr::Type::name: goto op_char_##name; + case static_cast<uchar>(Instr::Type::name): goto op_char_##name; #define MOTH_INSTR_CASE_AND_JUMP_WIDE(instr) \ INSTR_##instr(GET_CASE_AND_JUMP_WIDE) #define GET_CASE_AND_JUMP_WIDE_INSTRUCTION(name, ...) \ - case Instr::Type::name: goto op_int_##name; + case (static_cast<uchar>(Instr::Type::name) + MOTH_NUM_INSTRUCTIONS()): goto op_int_##name; #define MOTH_DISPATCH() \ - switch (static_cast<Instr::Type>(*code)) { \ + switch (static_cast<uchar>(*code)) { \ FOR_EACH_MOTH_INSTR(MOTH_INSTR_CASE_AND_JUMP) \ + FOR_EACH_MOTH_INSTR(MOTH_INSTR_CASE_AND_JUMP_WIDE) \ } #endif diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index aec88369b2..dec322e995 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -526,6 +526,7 @@ QV4::ReturnedValue VME::exec(CallData *callData, QV4::Function *function) for (;;) { MOTH_DISPATCH() + Q_UNREACHABLE(); // only reached when the dispatch doesn't jump somewhere MOTH_BEGIN_INSTR(LoadConst) acc = constant(function, index).asReturnedValue(); |