Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix a bug that append '_precheck' to aot_func #2936

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions test-tools/trans-jitted-func-name/trans_wasm_func_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ def replace_function_name(
with folded_in.open("rt", encoding="utf-8") as f_in, folded_out.open(
"wt", encoding="utf-8"
) 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:
new_line = []
line = line.strip()
Expand All @@ -162,8 +169,15 @@ def replace_function_name(
wasm_func_name = (
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)

line = ";".join(new_line)
Expand Down