mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-06-06 13:19:32 +00:00
fix: simplify instruction limit checks for better readability
This commit is contained in:
parent
70af781bde
commit
0df05aff1a
|
@ -1575,7 +1575,7 @@ get_global_addr(uint8 *global_data, WASMGlobalInstance *global)
|
|||
goto got_exception; \
|
||||
} \
|
||||
else if (instructions_left > 0) \
|
||||
instructions_left--; \
|
||||
instructions_left--;
|
||||
#else
|
||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||
#endif
|
||||
|
|
|
@ -107,9 +107,9 @@ typedef float64 CellType_F64;
|
|||
wasm_set_exception(module_inst, "instruction limit exceeded"); \
|
||||
goto got_exception; \
|
||||
} \
|
||||
else if (instructions_left > 0) { \
|
||||
instructions_left--; \
|
||||
} \
|
||||
else if (instructions_left > 0) \
|
||||
instructions_left--;
|
||||
|
||||
#else
|
||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user