From d6f60ea956e117a941318630c5423d5c6769a8fe Mon Sep 17 00:00:00 2001 From: victoryang00 Date: Fri, 28 Jul 2023 06:49:22 +0000 Subject: [PATCH] fix exec_env --- include/wamr_exec_env.h | 13 +------------ lib/wasm-micro-runtime | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/include/wamr_exec_env.h b/include/wamr_exec_env.h index 985930c..af2d9c5 100644 --- a/include/wamr_exec_env.h +++ b/include/wamr_exec_env.h @@ -176,7 +176,6 @@ struct WAMRExecEnv { // multiple env->cur_frame = (WASMInterpFrame *)((uint8 *)env->wasm_stack.s.bottom + this->frames[0]->lp - (uint32)offsetof(WASMInterpFrame, lp)); auto cur_frame = env->cur_frame; -#if defined(__DARWIN__) || defined(__APPLE__) || defined(_WIN32) for (int i=0; iframes.size(); i++) { restore(this->frames[i].get(), cur_frame); if (i != this->frames.size()-1) { @@ -186,17 +185,7 @@ struct WAMRExecEnv { // multiple cur_frame = cur_frame->prev_frame; } } -#else - for (auto &&[frame, next] : this->frames | std::views::adjacent<2>) { - restore(frame.get(), cur_frame); - if (frame != this->frames.back()) { - cur_frame->prev_frame = (WASMInterpFrame *)((uint8 *)env->wasm_stack.s.bottom + next->lp - - (uint32)offsetof(WASMInterpFrame, lp)); - LOGV(DEBUG) << "cur_frame" << (void *)cur_frame << " " << next->lp; - cur_frame = cur_frame->prev_frame; - } - } -#endif + for (int i = 0; i < BLOCK_ADDR_CACHE_SIZE; i++) { for (int j = 0; j < BLOCK_ADDR_CONFLICT_SIZE; j++) { restore(&(block_addr_cache[i][j]), &(env->block_addr_cache[i][j])); diff --git a/lib/wasm-micro-runtime b/lib/wasm-micro-runtime index e536cb7..cb7675f 160000 --- a/lib/wasm-micro-runtime +++ b/lib/wasm-micro-runtime @@ -1 +1 @@ -Subproject commit e536cb77e507ac8aaf2eb719bb68bf1f04d23dd6 +Subproject commit cb7675fadb41d7ea8b0d16bad7b81cefcbb5eca2