mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-05-08 12:46:14 +00:00
Fix a bug that appends '_precheck' to aot_func (#2936)
This commit is contained in:
parent
6c839042d6
commit
22c5c90340
|
@ -143,6 +143,13 @@ def replace_function_name(
|
||||||
with folded_in.open("rt", encoding="utf-8") as f_in, folded_out.open(
|
with folded_in.open("rt", encoding="utf-8") as f_in, folded_out.open(
|
||||||
"wt", encoding="utf-8"
|
"wt", encoding="utf-8"
|
||||||
) as f_out:
|
) as f_out:
|
||||||
|
precheck_mode = False
|
||||||
|
for line in f_in:
|
||||||
|
line = line.strip()
|
||||||
|
if "aot_func_internal" in line:
|
||||||
|
precheck_mode = True
|
||||||
|
|
||||||
|
f_in.seek(0)
|
||||||
for line in f_in:
|
for line in f_in:
|
||||||
new_line = []
|
new_line = []
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
@ -162,8 +169,15 @@ def replace_function_name(
|
||||||
wasm_func_name = (
|
wasm_func_name = (
|
||||||
f"[Wasm] function[{func_idx + import_function_count}]"
|
f"[Wasm] function[{func_idx + import_function_count}]"
|
||||||
)
|
)
|
||||||
# aot_func_internal
|
|
||||||
wasm_func_name += "_precheck" if not m.groups()[0] else ""
|
if precheck_mode:
|
||||||
|
# aot_func_internal -> xxx
|
||||||
|
# aot_func --> xxx_precheck
|
||||||
|
wasm_func_name += "_precheck" if not m.groups()[0] else ""
|
||||||
|
else:
|
||||||
|
# aot_func --> xxx
|
||||||
|
pass
|
||||||
|
|
||||||
new_line.append(wasm_func_name)
|
new_line.append(wasm_func_name)
|
||||||
|
|
||||||
line = ";".join(new_line)
|
line = ";".join(new_line)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user