diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-04-24 15:51:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-24 15:51:11 -0700 |
commit | 12445969dc5b32cbe82b829fe8c061f5d98fcbe7 (patch) | |
tree | f9b6bd44d3b7cd7864c148a698712b32f802348e /test | |
parent | 204cc7b7172d665ee731171d20995edb5897ef7d (diff) | |
download | binaryen-12445969dc5b32cbe82b829fe8c061f5d98fcbe7.tar.gz binaryen-12445969dc5b32cbe82b829fe8c061f5d98fcbe7.tar.bz2 binaryen-12445969dc5b32cbe82b829fe8c061f5d98fcbe7.zip |
Remove --fuzz-binary and simplify round trip (#2799)
Since the --roundtrip pass is more general than --fuzz-binary anyways. Also reimplements `ModuleUtils::clearModule` to use the module destructor and placement new to ensure that no members are missed.
Diffstat (limited to 'test')
3 files changed, 38 insertions, 2 deletions
diff --git a/test/passes/roundtrip.txt b/test/passes/roundtrip.txt index 508676657..c2a19480d 100644 --- a/test/passes/roundtrip.txt +++ b/test/passes/roundtrip.txt @@ -6,6 +6,6 @@ ) ) (module - (memory $ 1 1) - (table $ 0 funcref) + (memory $0 1 1) + (table $0 0 funcref) ) diff --git a/test/passes/strip-target-features_roundtrip_print-features_all-features.txt b/test/passes/strip-target-features_roundtrip_print-features_all-features.txt new file mode 100644 index 000000000..c8d989c93 --- /dev/null +++ b/test/passes/strip-target-features_roundtrip_print-features_all-features.txt @@ -0,0 +1,22 @@ +--enable-threads +--enable-mutable-globals +--enable-nontrapping-float-to-int +--enable-simd +--enable-bulk-memory +--enable-sign-ext +--enable-exception-handling +--enable-tail-call +--enable-reference-types +--enable-multivalue +(module + (type $none_=>_v128_anyref (func (result v128 anyref))) + (func $foo (result v128 anyref) + (tuple.make + (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000) + (ref.null) + ) + ) + (func $bar (result v128 anyref) + (return_call $foo) + ) +) diff --git a/test/passes/strip-target-features_roundtrip_print-features_all-features.wast b/test/passes/strip-target-features_roundtrip_print-features_all-features.wast new file mode 100644 index 000000000..214289904 --- /dev/null +++ b/test/passes/strip-target-features_roundtrip_print-features_all-features.wast @@ -0,0 +1,14 @@ +;; Test that features enabled on the IR Module survive a round trip +;; even if the target features section is stripped first + +(module + (func $foo (result v128 anyref ) + (tuple.make + (v128.const i32x4 0 0 0 0) + (ref.null) + ) + ) + (func $bar (result v128 anyref) + (return_call $foo) + ) +) |