mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-06-07 13:49:18 +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; \
|
goto got_exception; \
|
||||||
} \
|
} \
|
||||||
else if (instructions_left > 0) \
|
else if (instructions_left > 0) \
|
||||||
instructions_left--; \
|
instructions_left--;
|
||||||
#else
|
#else
|
||||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -107,9 +107,9 @@ typedef float64 CellType_F64;
|
||||||
wasm_set_exception(module_inst, "instruction limit exceeded"); \
|
wasm_set_exception(module_inst, "instruction limit exceeded"); \
|
||||||
goto got_exception; \
|
goto got_exception; \
|
||||||
} \
|
} \
|
||||||
else if (instructions_left > 0) { \
|
else if (instructions_left > 0) \
|
||||||
instructions_left--; \
|
instructions_left--;
|
||||||
} \
|
|
||||||
#else
|
#else
|
||||||
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
#define CHECK_INSTRUCTION_LIMIT() (void)0
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user