diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-07-26 19:04:45 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-26 19:04:45 -0700 |
commit | edf001feb62d32c76f20d5564fabfab93035afdf (patch) | |
tree | bda476b9243bde99b59c2c770528ce476904f03b /test/unreachable-instr-type.wast.fromBinary | |
parent | ccd95f8f5725a8d52557772b3081875babda312f (diff) | |
download | binaryen-edf001feb62d32c76f20d5564fabfab93035afdf.tar.gz binaryen-edf001feb62d32c76f20d5564fabfab93035afdf.tar.bz2 binaryen-edf001feb62d32c76f20d5564fabfab93035afdf.zip |
Fix unreachable prefix in instruction printing (#2265)
When a memory instruction's type is unreachable, i.e., one of its
child expressions is unreachable, the instruction will be printed like
`unreachable.load`, which is invalid text format.
This prints unreachable prefix instruction types as `i32` to just make
them pass the parser. It is OK because they are not reachable anyway.
Also this removes printing of `?` in atomic.rmw instruction printing.
Diffstat (limited to 'test/unreachable-instr-type.wast.fromBinary')
-rw-r--r-- | test/unreachable-instr-type.wast.fromBinary | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unreachable-instr-type.wast.fromBinary b/test/unreachable-instr-type.wast.fromBinary new file mode 100644 index 000000000..32838581a --- /dev/null +++ b/test/unreachable-instr-type.wast.fromBinary @@ -0,0 +1,8 @@ +(module + (type $0 (func)) + (memory $0 (shared 1 1)) + (func $test (; 0 ;) (type $0) + (unreachable) + ) +) + |