Fix issues found by GC and Fast JIT, refine some codes (#1055)

Fix handle OP_TABLE_COPY issue
Fix loader handle OP_BLOCK/IF/LOOP issue if type_index is larger than 256
Fix loader handle OP_GET_GLOBAL, allow to change to GET_GLOBAL_64 for
aot compiler similiar to handling OP_SET_GLOBAL
Refine loader handle OP_GET/SET/TEE_LOCAL, disable changing opcode when
source debugging is enabled, so as no need to record the change of opcode
Refine wasm_interp_interp_frame_size to reduce the wasm operand stack usage

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Wenyong Huang
2022-03-24 14:14:42 +08:00
committed by GitHub
parent b6e5206e61
commit 7262aebf77
7 changed files with 29 additions and 59 deletions

View File

@ -68,8 +68,14 @@ typedef struct WASMInterpFrame {
static inline unsigned
wasm_interp_interp_frame_size(unsigned all_cell_num)
{
return align_uint((uint32)offsetof(WASMInterpFrame, lp) + all_cell_num * 5,
4);
unsigned frame_size;
#if WASM_ENABLE_FAST_INTERP == 0
frame_size = (uint32)offsetof(WASMInterpFrame, lp) + all_cell_num * 4;
#else
frame_size = (uint32)offsetof(WASMInterpFrame, operand) + all_cell_num * 4;
#endif
return align_uint(frame_size, 4);
}
void