WebAssembly / binaryen

Optimizer and compiler/toolchain library for WebAssembly
Apache License 2.0
7.46k stars 740 forks source link

auto-update problem on test/fib-dbg.wasm.fromBinary #1040

Open kripken opened 7 years ago

kripken commented 7 years ago

Running ./auto_update_tests.py should be a no-op, but it breaks test/fib-dbg.wasm.fromBinary, changing it so that check.py fails. It creates this diff:

diff --git a/test/fib-dbg.wasm.fromBinary b/test/fib-dbg.wasm.fromBinary
index 3f940fa..307d880 100644
--- a/test/fib-dbg.wasm.fromBinary
+++ b/test/fib-dbg.wasm.fromBinary
@@ -124,21 +124,17 @@
   (local $var$9 i32)
   (local $var$10 i32)
   (local $var$11 i32)
-  ;;@ fib.c:8:0
   (block $label$0
    (set_local $var$11
     (get_global $global$3)
    )
-   ;;@ fib.c:3:0
    (set_local $var$6
     (i32.gt_s
      (get_local $var$0)
      (i32.const 0)
     )
    )
-   ;;@ fib.c:8:0
    (if
-    ;;@ fib.c:3:0
     (get_local $var$6)
     (block $label$1
      (set_local $var$1
@@ -155,23 +151,19 @@
      (set_local $var$4
       (i32.const 1)
      )
-     ;;@ fib.c:8:0
      (return
       (get_local $var$4)
      )
     )
    )
-   ;;@ fib.c:3:0
    (loop $label$3
     (block $label$4
-     ;;@ fib.c:4:0
      (set_local $var$3

Maybe missing a param or something in the auto-update script that is in check.py?

cc @yurydelendik , this is your code I believe.

kripken commented 7 years ago

@yurydelendik, do you have time to take a look at this?