diff options
author | Alon Zakai <azakai@google.com> | 2023-04-04 13:38:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 13:38:14 -0700 |
commit | d7c24bc6796616b821b6b0dfcd649dbf1c821cb3 (patch) | |
tree | 105a556e0853b45669e18a16c45cbfe07df0b150 /test | |
parent | ce2fc9c7cd5158a64631baeda53dac2571038d5f (diff) | |
download | binaryen-d7c24bc6796616b821b6b0dfcd649dbf1c821cb3.tar.gz binaryen-d7c24bc6796616b821b6b0dfcd649dbf1c821cb3.tar.bz2 binaryen-d7c24bc6796616b821b6b0dfcd649dbf1c821cb3.zip |
[Wasm GC] Fuzz struct.new and array.new (#5622)
Repurpose makeBasicRef, makeCompoundRef to generate not just "constant"
refs but any reference, and use those to create StructNew/ArrayNew.
The key changes are to add makeCompoundRef to make(), and to make
the function call make() for children, where possible, instead of just
makeTrivial(). We also replace the i31-specific path with a call to
makeBasicRef which handles i31 among other things.
Diffstat (limited to 'test')
-rw-r--r-- | test/passes/translate-to-fuzz_all-features_metrics_noprint.txt | 76 |
1 files changed, 35 insertions, 41 deletions
diff --git a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt index 0e4351b47..e5923831d 100644 --- a/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt +++ b/test/passes/translate-to-fuzz_all-features_metrics_noprint.txt @@ -1,49 +1,43 @@ total - [exports] : 6 - [funcs] : 10 + [exports] : 5 + [funcs] : 18 [globals] : 16 [imports] : 5 [memories] : 1 [memory-data] : 20 - [table-data] : 2 + [table-data] : 4 [tables] : 1 - [tags] : 0 - [total] : 563 - [vars] : 7 - ArrayNew : 6 - ArrayNewFixed : 6 + [tags] : 2 + [total] : 746 + [vars] : 33 + ArrayNew : 7 + AtomicFence : 1 AtomicRMW : 1 - Binary : 78 - Block : 63 - Break : 5 - Call : 18 + Binary : 84 + Block : 91 + Break : 3 + Call : 32 CallIndirect : 1 - CallRef : 1 - Const : 119 - DataDrop : 1 - Drop : 6 - GlobalGet : 28 - GlobalSet : 26 - I31Get : 1 - I31New : 2 - If : 21 - Load : 22 - LocalGet : 43 - LocalSet : 26 - Loop : 4 - MemoryInit : 1 - Nop : 10 - RefAs : 2 - RefCast : 1 - RefEq : 2 - RefFunc : 7 - RefNull : 6 - RefTest : 1 - Return : 8 - SIMDExtract : 1 - Select : 1 - Store : 3 - StructNew : 2 - TupleMake : 6 - Unary : 20 - Unreachable : 14 + CallRef : 2 + Const : 153 + Drop : 11 + GlobalGet : 48 + GlobalSet : 46 + I31New : 1 + If : 29 + Load : 25 + LocalGet : 48 + LocalSet : 30 + Loop : 7 + Nop : 5 + RefFunc : 18 + RefIsNull : 3 + RefNull : 14 + Return : 6 + SIMDExtract : 2 + Select : 4 + StructNew : 3 + TupleExtract : 1 + TupleMake : 12 + Unary : 32 + Unreachable : 26 |