From 56bb7e715bc335ed344b94a70f2a8057d6ee7ddf Mon Sep 17 00:00:00 2001 From: Georgii Rylov Date: Wed, 5 Mar 2025 09:11:21 +0000 Subject: [PATCH] last fixes --- core/iwasm/aot/aot_runtime.c | 4 ++-- core/iwasm/interpreter/wasm_runtime.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/core/iwasm/aot/aot_runtime.c b/core/iwasm/aot/aot_runtime.c index 585a30728..2e267e950 100644 --- a/core/iwasm/aot/aot_runtime.c +++ b/core/iwasm/aot/aot_runtime.c @@ -4172,6 +4172,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer, * top_boundary For more details check wasm_iterate_callstack in * wasm_export.h */ + uint32 count = 0; #if WASM_ENABLE_GC == 0 WASMModuleInstance *module_inst = (WASMModuleInstance *)wasm_exec_env_get_module_inst(exec_env); @@ -4179,7 +4180,6 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer, uint8 *top_boundary = exec_env->wasm_stack.top_boundary; uint8 *bottom = exec_env->wasm_stack.bottom; uint32 frame_size = (uint32)offsetof(AOTFrame, lp); - uint32 count = 0; WASMCApiFrame record_frame; while (cur_frame && (uint8_t *)cur_frame >= bottom @@ -4198,13 +4198,13 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, wasm_frame_t *buffer, cur_frame = cur_frame->prev_frame; ++count; } - return count; #else /* * TODO: add support for standard frames when GC is enabled * now it poses a risk due to variable size of the frame */ #endif + return count; } uint32 diff --git a/core/iwasm/interpreter/wasm_runtime.c b/core/iwasm/interpreter/wasm_runtime.c index b4b55e65a..400a6ae6c 100644 --- a/core/iwasm/interpreter/wasm_runtime.c +++ b/core/iwasm/interpreter/wasm_runtime.c @@ -5,8 +5,6 @@ #include "wasm_runtime.h" #include "wasm.h" -#include "wasm_c_api.h" -#include "wasm_exec_env.h" #include "wasm_loader.h" #include "wasm_interp.h" #include "bh_common.h"