Enhance GC const initializer expression to support nested struct/array new (#3447)

Only support interpreter now, and fix some issues found in wasm loader.

This PR fixes issue #3410 and #3411.
This commit is contained in:
Wenyong Huang
2024-05-21 16:09:12 +08:00
committed by GitHub
parent 403f472ff1
commit 15d191943a
3 changed files with 307 additions and 108 deletions

View File

@ -250,13 +250,13 @@ typedef union WASMValue {
#endif /* end of WASM_VALUE_DEFINED */
typedef struct WASMStructNewInitValues {
uint8 type_idx;
uint32 type_idx;
uint32 count;
WASMValue fields[1];
} WASMStructNewInitValues;
typedef struct WASMArrayNewInitValues {
uint8 type_idx;
uint32 type_idx;
uint32 length;
WASMValue elem_data[1];
} WASMArrayNewInitValues;