Refine aot call_indirect opcode translation (#492)
Re-implement aot call_indirect opcode translation: when calling non-import function, translate it by LLVM call IR to call the function in AOTed code, so as to avoid calling runtime aot_call_indirect API which is much slower. For import function, keep calling aot_call_indirect API due to the possible pointer/string argument conversion. And add prompt info while app heap is corrupted, change emit_leb to emit_uint32 inter fast-interp to refine footprint. Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -517,6 +517,19 @@ wasm_type_equal(const WASMType *type1, const WASMType *type2)
|
||||
? true : false;
|
||||
}
|
||||
|
||||
inline static uint32
|
||||
wasm_get_smallest_type_idx(WASMType **types, uint32 type_count,
|
||||
uint32 cur_type_idx)
|
||||
{
|
||||
uint32 i;
|
||||
|
||||
for (i = 0; i < cur_type_idx; i++) {
|
||||
if (wasm_type_equal(types[cur_type_idx], types[i]))
|
||||
return i;
|
||||
}
|
||||
return cur_type_idx;
|
||||
}
|
||||
|
||||
static inline uint32
|
||||
block_type_get_param_types(BlockType *block_type,
|
||||
uint8 **p_param_types)
|
||||
|
||||
Reference in New Issue
Block a user