Implement wasm-c-api frame/trap APIs for AOT mode (#663)
And update CI workflow to build/cache llvm and run wasm-c-api samples.
This commit is contained in:
@ -1435,6 +1435,12 @@ wasm_trap_new_internal(WASMModuleInstanceCommon *inst_comm_rt,
|
||||
trap->frames = ((WASMModuleInstance *)inst_comm_rt)->frames;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_AOT != 0
|
||||
if (inst_comm_rt->module_type == Wasm_Module_AoT) {
|
||||
trap->frames = ((AOTModuleInstance *)inst_comm_rt)->frames.ptr;
|
||||
}
|
||||
#endif
|
||||
#endif /* WASM_ENABLE_DUMP_CALL_STACK != 0 */
|
||||
|
||||
/* allow a NULL frames list */
|
||||
|
||||
@ -86,13 +86,6 @@ struct wasm_ref_t {
|
||||
uint32 obj;
|
||||
};
|
||||
|
||||
struct wasm_frame_t {
|
||||
wasm_instance_t *instance;
|
||||
uint32 module_offset;
|
||||
uint32 func_index;
|
||||
uint32 func_offset;
|
||||
};
|
||||
|
||||
struct wasm_trap_t {
|
||||
wasm_byte_vec_t *message;
|
||||
Vector *frames;
|
||||
|
||||
@ -336,6 +336,14 @@ typedef struct WASMMemoryInstanceCommon {
|
||||
typedef package_type_t PackageType;
|
||||
typedef wasm_section_t WASMSection, AOTSection;
|
||||
|
||||
typedef struct wasm_frame_t {
|
||||
/* wasm_instance_t */
|
||||
void *instance;
|
||||
uint32 module_offset;
|
||||
uint32 func_index;
|
||||
uint32 func_offset;
|
||||
} WASMCApiFrame;
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN bool
|
||||
wasm_runtime_init(void);
|
||||
|
||||
Reference in New Issue
Block a user