summaryrefslogtreecommitdiff
path: root/scripts/fuzz_opt.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/fuzz_opt.py')
-rwxr-xr-xscripts/fuzz_opt.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py
index c5498822e..d0705693f 100755
--- a/scripts/fuzz_opt.py
+++ b/scripts/fuzz_opt.py
@@ -561,6 +561,10 @@ def fix_output(out):
# change that index, so ignore it
out = re.sub(r'funcref\([\d\w$+-_:]+\)', 'funcref()', out)
+ # JS prints i31 as just a number, so change "i31ref(N)" (which C++ emits)
+ # to "N".
+ out = re.sub(r'i31ref\((\d+)\)', r'\1', out)
+
lines = out.splitlines()
for i in range(len(lines)):
line = lines[i]