Remove a few hardcoded spec test knowledge from the core library (#3648)

Tweak the stack sizes in the spec test runner instead.
This commit is contained in:
YAMAMOTO Takashi
2024-07-22 14:30:00 +09:00
committed by GitHub
parent b05fdfd3ba
commit 50f28495a1
3 changed files with 14 additions and 26 deletions

View File

@ -1748,16 +1748,7 @@ aot_instantiate(AOTModule *module, AOTModuleInstance *parent,
/* Initialize the thread related data */
if (stack_size == 0)
stack_size = DEFAULT_WASM_STACK_SIZE;
#if WASM_ENABLE_SPEC_TEST != 0
#if WASM_ENABLE_TAIL_CALL == 0
if (stack_size < 128 * 1024)
stack_size = 128 * 1024;
#else
/* Some tail-call cases require large operand stack */
if (stack_size < 10 * 1024 * 1024)
stack_size = 10 * 1024 * 1024;
#endif
#endif
module_inst->default_wasm_stack_size = stack_size;
extra->stack_sizes =

View File

@ -2990,16 +2990,7 @@ wasm_instantiate(WASMModule *module, WASMModuleInstance *parent,
/* Initialize the thread related data */
if (stack_size == 0)
stack_size = DEFAULT_WASM_STACK_SIZE;
#if WASM_ENABLE_SPEC_TEST != 0
#if WASM_ENABLE_TAIL_CALL == 0
if (stack_size < 128 * 1024)
stack_size = 128 * 1024;
#else
/* Some tail-call cases require large operand stack */
if (stack_size < 10 * 1024 * 1024)
stack_size = 10 * 1024 * 1024;
#endif
#endif
module_inst->default_wasm_stack_size = stack_size;
if (module->malloc_function != (uint32)-1) {