diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/rust/wast | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/wast')
19 files changed, 387 insertions, 219 deletions
diff --git a/third_party/rust/wast/.cargo-checksum.json b/third_party/rust/wast/.cargo-checksum.json index 3852650553..98ffcfa204 100644 --- a/third_party/rust/wast/.cargo-checksum.json +++ b/third_party/rust/wast/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"53d3c5b19092b2144bdfe0d4cd843c2b42ce0fddfca703fd09fec319232468dc","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"5a0d2b894a3ac74ee2be74715a2f22c40a08520cb4ac59183f4e7356f34ac566","src/component.rs":"23a62f4f2774ccfaf60f68e9d9416e68ba203eea782ce0c39cf553ad293f1df4","src/component/alias.rs":"5ec26333e179dc3778dead489f1273815fe9c1c808ba6a7e60eff54072fad795","src/component/binary.rs":"02b07602dc755fd5cec95b6348dd919c75f368c16a81402072201cf911be5f0d","src/component/component.rs":"0c49ff1c1c4b8fe6d330eb41bce8ad176c7208c4178090b7325e9994e83c1f20","src/component/custom.rs":"f5b23c34b73a716a986fd999fc8d8c9e24c341e83292088fe83325cd82dab4f5","src/component/expand.rs":"71b2e23f50957b4a15d758df7f8651fdbaf5cf8f44fbfeb134b412318dbd8921","src/component/export.rs":"f51e824c839d8bb0884eca509622f376c8cce3335be324b2b25033af6216fd2a","src/component/func.rs":"4f69de6c38cc6fe77b638ed7d8000c8a170d7053a11a6585dcd5b4877a06804c","src/component/import.rs":"ffe6e4ab8f2cec68b1022c753135d675ab27ecd1315bd38517472ceaffd0610c","src/component/instance.rs":"e550a7ee9af092ae084dd41e2c0ae756b7dca8da4b91d672d90265a6a15dff83","src/component/item_ref.rs":"e9c426ccc0210dc0c37bb0448468f5f4d9e52656b72d4ff0f2dc65c89957fe60","src/component/module.rs":"d27a28199d1dea1c64294a514329a524432319288515b0a0e3091fa7d3a33f74","src/component/resolve.rs":"4bc58161f3e38499cf0d7fddcbaec875579e8c48e0f347f1c820db21b8aa2d86","src/component/types.rs":"c854a2df9613145c38720d41cda571d0d01408fc09789bd22740874628cbff99","src/component/wast.rs":"36f9440618be7755db0a2994e5ff14187392c25543cdde2069e4c69111a7f490","src/core.rs":"24b71d1ab2ad874c4e37b4dd709b6532989b60e6bc503194434f95029cc1cda7","src/core/binary.rs":"59462baaf8ccb7eb44a39721b71c3627c5ff2cf5e4f24c89a158c5372732f026","src/core/custom.rs":"edd6044b75d79ec873c28d803fb8dc9a53724f1bba474bcdef2bc77196e0a4d2","src/core/export.rs":"1322a120d9e1dd6f3aa1485ee0bbc4294961028ae8a7584a24170af5823b73b1","src/core/expr.rs":"c3b66daa6d2ad3f47d1d3c6a69bd1652d289e248ab3244e448f2fba7ea291b55","src/core/func.rs":"f87239645e45b7e40ecf7f8f2b707a7cfc0620cd2632cfdaca3cb155a06da732","src/core/global.rs":"dec0abecadd2fde9298acb729259deba1ef3c4733ae5afcb4fe8cd4a633f5349","src/core/import.rs":"602a13aed2fd5fa63e2562246586546199861df57f304c2906561ab77810cadd","src/core/memory.rs":"de66cc6d6a9238428ed39ea5dccfa5ff065b4f3ec96d6cfc8405cbb16742791d","src/core/module.rs":"2b608a3cfee4df1ceeefaa046863dc964172bd6f52f6678d96078091fae7657a","src/core/resolve/deinline_import_export.rs":"41226cb8c654e7ed5a22bdb774b3901c73bed52c23a4ed6f5d0302950e02c30b","src/core/resolve/mod.rs":"9b2680b00a1cafad2dbbfdac86aa1c135ea67203bbc4dee939302b27f4aff6d0","src/core/resolve/names.rs":"afa1df4d75555dd7235a117a3c7217d1ec774b062e3a7c98d7470447561c97af","src/core/resolve/types.rs":"ff34eed438539cd88ea6c2c51e49ed42eee0d8be566d40c799254bf08125cfa8","src/core/table.rs":"6b611622d7d4f83cbe8e1a82139937c0294996d5f8208ade0886d680d8ef0b5d","src/core/tag.rs":"8a3d4fcdb86dedd68cdaf25abd930ef52a461cf2a0e9393bb9cb6f425afaaf2e","src/core/types.rs":"608f59af8c41f83c0d6db41c03f187fd30d3f85a021540a5de522464b011d52a","src/core/wast.rs":"a7307f93fb20274f0c99952deeefb51c28d4afe017702ee75d96324285346442","src/encode.rs":"0b165176db54fb9136202c54180adabda843a88e5436b96c19be9d41623912a3","src/error.rs":"4526260299c7983696a49ffe30a80139beb0d081fa8f42decc5e3283b361b1cb","src/gensym.rs":"b5e02e34443085f01deb5b657e541be7dc5d6dc952304e434a0b08320ea6c185","src/lexer.rs":"bc65c4d71c6f16a55670585a31ee615c9fcfc40a4bfa165e020ed03a9a27930d","src/lib.rs":"3b1e7af5e618b9d3ac680e7f8e9b0114fedf502496fb0e62dc95d3dbc1633772","src/names.rs":"81d49fecbff3b2abbbc323595271f32d912f03cd55a5685b7216d7cead32c420","src/parser.rs":"fe6a3727c68c8075c38422de545eb189fd8f5747ca681f6704982ed5c8ea4476","src/token.rs":"d18c2f304ffbc017a3b0a7764daeb879a8c653c330cdb6b1eae431ae6c6dd14e","src/wast.rs":"af6e208c2a37028461a6ad9101967fbfa5c7fc343fe5eb6ecad54f948c74e15d","src/wat.rs":"6fd57cf40795fabe977bdae50913f0e75c3dad3a0c0ace95df2de4f92be8aaf5","tests/annotations.rs":"06294077550600f93a5a8c0d7e3ac38b47f00bb8933f9dc390ff31868e873afb","tests/comments.rs":"694e8a3467e9c837f723a43c729be0c6f6dfe3441ad9692759b1d55fd63055a2","tests/parse-fail.rs":"0f1d5dffd1e6145105571222096703c89c4f4a46e25c848faa730f731155ea1c","tests/parse-fail/bad-core-func-alias.wat":"b71372064c3fce9d4a616418605040fe5e1356030a709b798b4769d3619cbbfb","tests/parse-fail/bad-core-func-alias.wat.err":"bb63274c26d3a21209bad794767f48372834bdc10cfbebf568a0c65d52803c90","tests/parse-fail/bad-func-alias.wat":"237c07149e1e74afe3b991a1fee6acb63167c1ca8931341614c435000339b887","tests/parse-fail/bad-func-alias.wat.err":"4a4bfc691b06d20fdf71e1dbac04649a52c76787048415599978987d761308fa","tests/parse-fail/bad-index.wat":"d21489daeec3a35327dcc9e2ba2d0acdd05f4aeaff2272cca608fda4d2338497","tests/parse-fail/bad-index.wat.err":"dc11070de0c9160573006ea4e5fa3c4d28e71bc39b24b1938cf6ff3b03ea7154","tests/parse-fail/bad-name.wat":"e5ff5d410007779a0de6609ea4cc693f0e603d36a106b8f5098c1980dd9f8124","tests/parse-fail/bad-name.wat.err":"fb5638476c1b85d9d1919e3dbcb0f16f82d088a4a22d4a0c186d7b8ba6e1902b","tests/parse-fail/bad-name2.wat":"5a6a4d0c19e5f2e48d7cebf361aca9b9000b7ef0c652997b5bd0ffaadbd2ca8a","tests/parse-fail/bad-name2.wat.err":"129707cce45f1e3cfb3e2ca5c702182e16ca5eeb2dbb2edd0710b004a8e194a5","tests/parse-fail/bad-name3.wat":"c19133d738cc84e9174301f27d4050c216bda81c7e9918d03ac792b088f24a05","tests/parse-fail/bad-name3.wat.err":"84ea63d40a619a0782ec6e94fce63921188ab87b1c3875eacae0a371144ed83a","tests/parse-fail/block1.wat":"91e74b5c3b43be692e7a6ae74fbfa674c4b6197299eb61338c4eccf282b18f17","tests/parse-fail/block1.wat.err":"40a083ae496b41dee7002cc6a664c5db0c5e4d904ae03b815773a769c4493fca","tests/parse-fail/block2.wat":"a8c07b4c09d51f10a8ffdf19806586022552398701cd90eb6d09816d45df06e5","tests/parse-fail/block2.wat.err":"33c842ec5dd0f2fdd3a9ce8187dd98b45ceee48c12810802af809d05b9cd25e9","tests/parse-fail/block3.wat":"29739abfbabd7c55f00ddfbbb9ebd818b4a114ef2336d50514f0842f7e075905","tests/parse-fail/block3.wat.err":"fc667ae2e71a260f62a3c7393bc97272e7c0ff38b17594f4370847b8a5019060","tests/parse-fail/confusing-block-comment0.wat":"8f27c9d0d212bbb1862ea89ffd7cbeafde5dfd755d695c1ba696cd520aba1a1d","tests/parse-fail/confusing-block-comment0.wat.err":"b53cbaef7bcec3862c64e09c084b92cd61bd29b954125482b2d083db250cd9e2","tests/parse-fail/confusing-block-comment1.wat":"b1a0447c9a8eaab8938d15cd33bd4adbb8bb69c2d710209b604023991a4347cb","tests/parse-fail/confusing-block-comment1.wat.err":"2fc3b3e4f98416326e1e5ec034026301069b6a98fa24451bc7573e16b8cb3811","tests/parse-fail/confusing-block-comment2.wat":"e3f49c7a388fba81081beb25d87bbd7db0acce5dd8e3eaa04574905ed7ec420c","tests/parse-fail/confusing-block-comment2.wat.err":"2183231d6acd0b5a117f9aea747c3d5c12e758450a6cd74027bb954a3134cf19","tests/parse-fail/confusing-block-comment3.wat":"d83f89c582501eb8833e772b8462c8974984a2f7fbb80b1452dc399fac74e5ed","tests/parse-fail/confusing-block-comment3.wat.err":"8b2096a4833627905c63f49cdabe44be24336646578dcfbdc67e9bfb35cbc601","tests/parse-fail/confusing-block-comment4.wat":"b7c6c68844d918e9ef6dd5ab9c40c7de7b38f04f94fadad630eda4e596f3e0f8","tests/parse-fail/confusing-block-comment4.wat.err":"2f790cc511edfcd89a12c9207901be16039fc1a06a584d73095e77a52f861cd9","tests/parse-fail/confusing-block-comment5.wat":"a159808032638cc914fa80ac4354a68b0af4f435a09cbe3e2d577582e183eb0a","tests/parse-fail/confusing-block-comment5.wat.err":"6fe0d99894307442f83fe93beaa5da706e06c9bdaf8e39d7cbae4c4fffafcb94","tests/parse-fail/confusing-block-comment6.wat":"abe48bcba2587dca98bc80ddde4e813f94fbc8a3538704a0775ea85bca0f8466","tests/parse-fail/confusing-block-comment6.wat.err":"3c97b9bf1112bbb7335d7fe4be5befb6f91eea7bec7dd3e6b543792231003c56","tests/parse-fail/confusing-block-comment7.wat":"e125c416ea5fa0ac35a58295a83a6f345438e2d7ddc6a39bd76c8e89885b3f0e","tests/parse-fail/confusing-block-comment7.wat.err":"5c34528ff2019cd3f0b3df34fd42523c0b66120706321da2c88ec05793478d2e","tests/parse-fail/confusing-block-comment8.wat":"200cc4c0e5af21a25529d7a81633a03642cff807255d6cd72eb45cdccc605cec","tests/parse-fail/confusing-block-comment8.wat.err":"9b81237d150a784b71791eee88fb6264a8bd6412862660f7392945203809e517","tests/parse-fail/confusing-line-comment0.wat":"bcec4c5a1e52b3e392e07c6711c979aa8d7db8baaf2bcdf270ba16d1aa528d26","tests/parse-fail/confusing-line-comment0.wat.err":"41ec5a075dc6b73afe1aec6b3198c5c4ae3a1a900e1610115879058ce034d6f6","tests/parse-fail/confusing-line-comment1.wat":"a2afbcab00ec957dfd9e9bf21fa4238852247b27f0b054f4a00f6b172dddf853","tests/parse-fail/confusing-line-comment1.wat.err":"f19a645e6fb5cbd7a0dd2308732741edcf83dbae0ef62549972029856a9e7fc6","tests/parse-fail/confusing-line-comment2.wat":"7f2a68229d02aac56ec4dfccf139bf2d617a0e89430357b30444dc4239d8aa89","tests/parse-fail/confusing-line-comment2.wat.err":"08add3d33e10e1ab6b4f3ae431f5db61d6f6c0a2b7d6828482a1e51b3a2d3851","tests/parse-fail/confusing-line-comment3.wat":"61173ae54782f6de86685f9555ffb94bbe2cf20b234daf660abb69ba3326f1ff","tests/parse-fail/confusing-line-comment3.wat.err":"4a5333dc02efa3c1eeab9cafa7c707f78abe92defdb01a71d6fe20944e4785f0","tests/parse-fail/confusing-line-comment4.wat":"9ecbbbe82c750e6475af1bfb46fe7a06115e4446a437d19fc08ca3d002f2a1c9","tests/parse-fail/confusing-line-comment4.wat.err":"ddb8aee8006265253b09c313cf5eb5c2dc4da66f502b4f6d3e2e1de77b35aec9","tests/parse-fail/confusing-line-comment5.wat":"8a4c8d342111bc9d37c16dbdf67c52027e1a42632abc9f359b3e4f07a85748b5","tests/parse-fail/confusing-line-comment5.wat.err":"34e368719fc0eab2f1a43c9f8e6f1b31aa9be9f971085d72374e49bde39cbfe5","tests/parse-fail/confusing-line-comment6.wat":"15f0dcdec23736ce92db84b3a7cdfe8689c97f2a7d0b9b0bfb0dcd2675163ed1","tests/parse-fail/confusing-line-comment6.wat.err":"0570be2ede803f071925d249f3858d3a417b5a6d678c9da40fc851d788d12983","tests/parse-fail/confusing-line-comment7.wat":"c7ee59301a701dd52d56cad02df78b0ad3584460bc18efa42ee137fe0c35aef6","tests/parse-fail/confusing-line-comment7.wat.err":"feebbeee8c85d8b3b85cec89435ae18f3ade9f754ca180d747a41406b64ca07a","tests/parse-fail/confusing-line-comment8.wat":"17632a8142154624de88b3cf93516147ed3419d785200bcd7049499eca8e8f04","tests/parse-fail/confusing-line-comment8.wat.err":"9c209285f2295cd2bc999aa7a9534a654932493308ab1f102839ed15a4d04d17","tests/parse-fail/confusing-string0.wat":"497b679b32baddcd6a158f4cadd3d9a9dea3457bac2a8c2c3d4e09b7c2d80842","tests/parse-fail/confusing-string0.wat.err":"cb3d737f2319346675a038716694354cd3b272453daa8a96e32e9861a9277f7b","tests/parse-fail/confusing-string1.wat":"46654cbed1ea6aab5019aef3d20098a391e40dacafa1ad5e83bf4ec384109fce","tests/parse-fail/confusing-string1.wat.err":"de7e7da516dc6c244bd0e4f012577b69f0cacbcc10f727fadb4b50bb04e0e2b4","tests/parse-fail/confusing-string2.wat":"11938f217c14387c05312735130f00c91d9df2d3ff9df7f13395e0f2b81dad54","tests/parse-fail/confusing-string2.wat.err":"e7bd08b146a855d681fefaf9e0576a9c333a2d10044f8e268b916b22a54227c9","tests/parse-fail/confusing-string3.wat":"e0ca4903fcafb9a54a91cf99e5eac95d25c6d2eb67b076f88191ad396f839cb6","tests/parse-fail/confusing-string3.wat.err":"b88d5db9e445c798eb24f95b7661b9c0368934d27ee8208477cd1c99351b939a","tests/parse-fail/confusing-string4.wat":"3ee2aee7f77604d051519c6f1795634469c12e98ae347a98f0c8445eecf1ff3d","tests/parse-fail/confusing-string4.wat.err":"1edc65bb09d8d3eed6ff69e7d9a7a4b5941dc823fa3436fa375657510255f6f4","tests/parse-fail/confusing-string5.wat":"024e50943128840d53f17e31a9b9332ce4f0ee70a847a043015f435b1c3c6e76","tests/parse-fail/confusing-string5.wat.err":"a0f13ec40d596ea2d8b0c4292b0d28775a5116ab7e11d7de88b295d25428c661","tests/parse-fail/confusing-string6.wat":"79cf157e29319800d2652c5a7f3dc90e07ebe2145c9904a70fc12027cdee84b7","tests/parse-fail/confusing-string6.wat.err":"860555e7aa13e3de3639cc2a530d6a42b974b629c4659593e972cbb0f306abae","tests/parse-fail/confusing-string7.wat":"7d8e403766dfb4e569754160d31ed0f9a27f908ed6cff96be43ab3d37f5975d5","tests/parse-fail/confusing-string7.wat.err":"658b6a02ba6d769254485f35c20984e7135d914b4266929963d723f26a40be4a","tests/parse-fail/confusing-string8.wat":"5a9b222e578655d57ee6e9f19bc1ea8e29aa52d652975fac685213444ed6458f","tests/parse-fail/confusing-string8.wat.err":"9a4e1a510330c800a1df7966998ebc3cde931eda20b249e5360f5e9a905dce11","tests/parse-fail/inline1.wat":"4e9767d67207aace2ac5e6f63a30e7510e4aa245ba35420539509e2254470272","tests/parse-fail/inline1.wat.err":"0143017a9825e518baa6009bae2c8d63520051dedd3437705bbe36b038a57f41","tests/parse-fail/newline-in-string.wat":"5c01cf709544ade0a6cdfcc39a3836a3bc018b633dc42a6cd872b6defc763ea7","tests/parse-fail/newline-in-string.wat.err":"1504209cc37a78b2aee778f23eacf78606daf964cf7bff251f5700efcd27ffd7","tests/parse-fail/string1.wat":"620d46d585ce94b382b5fde628c1399f3e562014b7a44af46e92f7bd045ca86e","tests/parse-fail/string1.wat.err":"fc53f3a1c4a65d8f25e5af51dec7699f45cecba114ca9c7871781bc70f664320","tests/parse-fail/string10.wat":"f7409dd45e153a1b11cb23e38f4ed87da12bedde38f8f0ccfe91037b0a4d97bd","tests/parse-fail/string10.wat.err":"ce677db5e37e0ed81ca357ed6b5edb21d85c27303ee194855bea7a88457efb6a","tests/parse-fail/string11.wat":"f6e0400b8c6a2014efa1ac676c567e140d8f86b5f4d5129773e6d67af537b615","tests/parse-fail/string11.wat.err":"4c6a550d29eda38a4e1bf7a589596f11655dc779479d7b8d466cfc53f815a742","tests/parse-fail/string12.wat":"23e30070eef22271651cce096a801fc4f79f3c37343c88bb8d2fc99b32d3b8b9","tests/parse-fail/string12.wat.err":"b5ec59f2996b88b2ee157e22d1774dc3e36fc08ed5bfc621aea830d30f66f586","tests/parse-fail/string13.wat":"81a305b981159ee10e140749ea3220c9edaaff53605e63c21995de47382b5faf","tests/parse-fail/string13.wat.err":"959f26c6b54e0d367b51d11d1addd8a53b5b8ff3caf70ebdd46bbea8ccfa2418","tests/parse-fail/string14.wat":"c45c2cc9f7afbfbd4be8e513106d22f7e5e817091448576c6bdf0701b81d95dd","tests/parse-fail/string14.wat.err":"50b5bccba905ddbe275938edb7ed0b09a5ca53dcdad36a7ff736ce9bc8e7a338","tests/parse-fail/string15.wat":"b5e0d5ade40de53b2d767a132e28376bb8c7a6f6238c4d8c248ae717c41d7f1f","tests/parse-fail/string15.wat.err":"0e9fc502cc90f96d1f592a3f63369fd2a3574bc4a2345a70365dbb76804e870f","tests/parse-fail/string16.wat":"38c3688cee80a9d089d239aa06eb1d27c5364ad2bd270aca57d05997c20aa682","tests/parse-fail/string16.wat.err":"4274b3bbe4df4cf0373619b1fcd082d0c802990817d2aca26ed885168c80e489","tests/parse-fail/string2.wat":"1172964aed31537b8c466d1f045f3e756926e7b221f80b2aff4a9a6721ea0beb","tests/parse-fail/string2.wat.err":"4618d3b20a78a077337eb5d6cae14ac39d9853762f011fbd23cff8921618dbde","tests/parse-fail/string3.wat":"07e0fbcd6270c1db100917c151ee4ac3f935e4ee1b27bce3c453b22b4b74f4d6","tests/parse-fail/string3.wat.err":"08ffc6158a9e030b2e211d53bdb8aeacfd879815c7b284d6a83b030566e35928","tests/parse-fail/string4.wat":"c970da2051b0613bdd1de4664f10424e14f2ebabe604175d4fb9b763b37af577","tests/parse-fail/string4.wat.err":"406706594d305c560fabd66417ad4fc276939990b5e701bd9d13fc223d207219","tests/parse-fail/string5.wat":"386cf314bb05acdaaabdf4da1caf140167271a26bd08bf34c3a7427d4bc4431f","tests/parse-fail/string5.wat.err":"1e56b44a23a37b2b2ad05aa9dd7e1e18191b5cc22151f93bbcf9d618779a57bd","tests/parse-fail/string6.wat":"8f1fe2825ff96f2acee9130a7721f86fcc93c221baa9411bf1fb6f0870d38ccb","tests/parse-fail/string6.wat.err":"d55dfd84d94e893f167ae73b7a080aefb2bfb05cc8a1ec201c4d3066fb8549b4","tests/parse-fail/string7.wat":"b12f8c75313d7f834489d3c353422f90bc945b37139586446eda82e334a97cde","tests/parse-fail/string7.wat.err":"4cee0ca61992c249dd0faaf2529a073cf8deeb36111a3f69b43695e5682560a2","tests/parse-fail/string8.wat":"4c2e0e1f883bb4e8cba9313497ed792130e5848e62bde7716102788d7467be10","tests/parse-fail/string8.wat.err":"840c6def7c60dd7c2b7261549cab435ba78c9b3a937adf6d5d9595ff8af01c91","tests/parse-fail/string9.wat":"2b7670caed2b0688d535de6e4e416f35fa717cfbe096a6cc764a669085c8f52f","tests/parse-fail/string9.wat.err":"37b5a9c3af9631500f31f9e5e3efa821b8d96063c57d60fd01df6be6a5c323e1","tests/parse-fail/unbalanced.wat":"f664fbef53a0308f864ba496d38044eb90482636e32586512939d4930729f3fe","tests/parse-fail/unbalanced.wat.err":"aba579f7b836856e69afe05da8328aabe0643d94e369898e686aa7bb0b07e9c9","tests/recursive.rs":"ad8a2b07bf955121a7c9e326ed35f9b2bc56b440c8cc0bbde24d423a79945c1a"},"package":"1ef6e1ef34d7da3e2b374fd2b1a9c0227aff6cad596e1b24df9b58d0f6222faa"}
\ No newline at end of file +{"files":{"Cargo.toml":"3e223e7ed5faa9b3eaf4893e03596e1e40688df9dc2e0863fc3c44e443d88ef9","LICENSE":"268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5","README.md":"5a0d2b894a3ac74ee2be74715a2f22c40a08520cb4ac59183f4e7356f34ac566","src/component.rs":"23a62f4f2774ccfaf60f68e9d9416e68ba203eea782ce0c39cf553ad293f1df4","src/component/alias.rs":"5ec26333e179dc3778dead489f1273815fe9c1c808ba6a7e60eff54072fad795","src/component/binary.rs":"310940e2c455129c5e2a4219e64fca51121755818269306f943792216810c8b2","src/component/component.rs":"0c49ff1c1c4b8fe6d330eb41bce8ad176c7208c4178090b7325e9994e83c1f20","src/component/custom.rs":"f5b23c34b73a716a986fd999fc8d8c9e24c341e83292088fe83325cd82dab4f5","src/component/expand.rs":"71b2e23f50957b4a15d758df7f8651fdbaf5cf8f44fbfeb134b412318dbd8921","src/component/export.rs":"f51e824c839d8bb0884eca509622f376c8cce3335be324b2b25033af6216fd2a","src/component/func.rs":"4f69de6c38cc6fe77b638ed7d8000c8a170d7053a11a6585dcd5b4877a06804c","src/component/import.rs":"ffe6e4ab8f2cec68b1022c753135d675ab27ecd1315bd38517472ceaffd0610c","src/component/instance.rs":"e550a7ee9af092ae084dd41e2c0ae756b7dca8da4b91d672d90265a6a15dff83","src/component/item_ref.rs":"e9c426ccc0210dc0c37bb0448468f5f4d9e52656b72d4ff0f2dc65c89957fe60","src/component/module.rs":"d27a28199d1dea1c64294a514329a524432319288515b0a0e3091fa7d3a33f74","src/component/resolve.rs":"6454c289407e9e0c904c4e27af0cc5a40fbcd9a0d874ac5a64475b08264d2f39","src/component/types.rs":"65b2250f147f8b132e7d13ee809cf72d4fa5ed26a55f1a35f1ef665421b7e750","src/component/wast.rs":"aa39db0ea0acd38744dc3cbd35903c9b00b5de90a5bfc8b76e6b6a7581d7c4c0","src/core.rs":"24b71d1ab2ad874c4e37b4dd709b6532989b60e6bc503194434f95029cc1cda7","src/core/binary.rs":"2e7e1145273582d149398991a26c8252a9b6e325be8c277ab597b3be581fc795","src/core/custom.rs":"edd6044b75d79ec873c28d803fb8dc9a53724f1bba474bcdef2bc77196e0a4d2","src/core/export.rs":"1322a120d9e1dd6f3aa1485ee0bbc4294961028ae8a7584a24170af5823b73b1","src/core/expr.rs":"e521d86433d30b0669a160a913e0638e3bb78d8233fa570173b75e04b56abe26","src/core/func.rs":"f87239645e45b7e40ecf7f8f2b707a7cfc0620cd2632cfdaca3cb155a06da732","src/core/global.rs":"dec0abecadd2fde9298acb729259deba1ef3c4733ae5afcb4fe8cd4a633f5349","src/core/import.rs":"602a13aed2fd5fa63e2562246586546199861df57f304c2906561ab77810cadd","src/core/memory.rs":"be4b5067c4febb0e5718186e59ffee69305b01801f3133730a9933e2e7193bc1","src/core/module.rs":"2b608a3cfee4df1ceeefaa046863dc964172bd6f52f6678d96078091fae7657a","src/core/resolve/deinline_import_export.rs":"696b58d4b4267210e6453b7617c521b57f8c768970b740665c5b475575fc2160","src/core/resolve/mod.rs":"9b2680b00a1cafad2dbbfdac86aa1c135ea67203bbc4dee939302b27f4aff6d0","src/core/resolve/names.rs":"d869983d60e36b432a38edf60f53900f230cc5ab6248d3368ced229e69a259f0","src/core/resolve/types.rs":"6099b59c44aec7879996d6cdcb0d0ac2e25991a52291c5b15ab23b8d7e07cde9","src/core/table.rs":"6b611622d7d4f83cbe8e1a82139937c0294996d5f8208ade0886d680d8ef0b5d","src/core/tag.rs":"8a3d4fcdb86dedd68cdaf25abd930ef52a461cf2a0e9393bb9cb6f425afaaf2e","src/core/types.rs":"1d4afbeb9ed8a465d9c727e5bdc5be798216505fc4034d3fef64859808ff6e0a","src/core/wast.rs":"dda114d05e1b1fcf65a1ca6124786261cf0b885eb61ad10ab258f80ff6dd2c2e","src/encode.rs":"0b165176db54fb9136202c54180adabda843a88e5436b96c19be9d41623912a3","src/error.rs":"4526260299c7983696a49ffe30a80139beb0d081fa8f42decc5e3283b361b1cb","src/gensym.rs":"b5e02e34443085f01deb5b657e541be7dc5d6dc952304e434a0b08320ea6c185","src/lexer.rs":"bc65c4d71c6f16a55670585a31ee615c9fcfc40a4bfa165e020ed03a9a27930d","src/lib.rs":"bcf1814d97dca75bbd6f49123f5811472a3ca1e93788dfe23cb079804e9294d0","src/names.rs":"81d49fecbff3b2abbbc323595271f32d912f03cd55a5685b7216d7cead32c420","src/parser.rs":"fe6a3727c68c8075c38422de545eb189fd8f5747ca681f6704982ed5c8ea4476","src/token.rs":"292d0cc8871990ba7a757d49edcbe5a9c94c346131f10df2ce517789f25e7fd8","src/wast.rs":"692dc20c1912acd2ed1db7427d305a5c9eab31dfc8675f037ffc475b6db15d58","src/wat.rs":"2ff97b6af77da19b0a8e0dfd136f58dbfa8247896c476726d1c9f88a3630cac2","tests/annotations.rs":"06294077550600f93a5a8c0d7e3ac38b47f00bb8933f9dc390ff31868e873afb","tests/comments.rs":"694e8a3467e9c837f723a43c729be0c6f6dfe3441ad9692759b1d55fd63055a2","tests/parse-fail.rs":"162023ac21f74ea856ec5916f4925a762d769b425eaf721c223c54b3efec6a53","tests/parse-fail/bad-core-func-alias.wat":"b71372064c3fce9d4a616418605040fe5e1356030a709b798b4769d3619cbbfb","tests/parse-fail/bad-core-func-alias.wat.err":"bb63274c26d3a21209bad794767f48372834bdc10cfbebf568a0c65d52803c90","tests/parse-fail/bad-func-alias.wat":"237c07149e1e74afe3b991a1fee6acb63167c1ca8931341614c435000339b887","tests/parse-fail/bad-func-alias.wat.err":"4a4bfc691b06d20fdf71e1dbac04649a52c76787048415599978987d761308fa","tests/parse-fail/bad-index.wat":"d21489daeec3a35327dcc9e2ba2d0acdd05f4aeaff2272cca608fda4d2338497","tests/parse-fail/bad-index.wat.err":"dc11070de0c9160573006ea4e5fa3c4d28e71bc39b24b1938cf6ff3b03ea7154","tests/parse-fail/bad-name.wat":"e5ff5d410007779a0de6609ea4cc693f0e603d36a106b8f5098c1980dd9f8124","tests/parse-fail/bad-name.wat.err":"fb5638476c1b85d9d1919e3dbcb0f16f82d088a4a22d4a0c186d7b8ba6e1902b","tests/parse-fail/bad-name2.wat":"5a6a4d0c19e5f2e48d7cebf361aca9b9000b7ef0c652997b5bd0ffaadbd2ca8a","tests/parse-fail/bad-name2.wat.err":"129707cce45f1e3cfb3e2ca5c702182e16ca5eeb2dbb2edd0710b004a8e194a5","tests/parse-fail/bad-name3.wat":"c19133d738cc84e9174301f27d4050c216bda81c7e9918d03ac792b088f24a05","tests/parse-fail/bad-name3.wat.err":"84ea63d40a619a0782ec6e94fce63921188ab87b1c3875eacae0a371144ed83a","tests/parse-fail/block1.wat":"91e74b5c3b43be692e7a6ae74fbfa674c4b6197299eb61338c4eccf282b18f17","tests/parse-fail/block1.wat.err":"40a083ae496b41dee7002cc6a664c5db0c5e4d904ae03b815773a769c4493fca","tests/parse-fail/block2.wat":"a8c07b4c09d51f10a8ffdf19806586022552398701cd90eb6d09816d45df06e5","tests/parse-fail/block2.wat.err":"33c842ec5dd0f2fdd3a9ce8187dd98b45ceee48c12810802af809d05b9cd25e9","tests/parse-fail/block3.wat":"29739abfbabd7c55f00ddfbbb9ebd818b4a114ef2336d50514f0842f7e075905","tests/parse-fail/block3.wat.err":"fc667ae2e71a260f62a3c7393bc97272e7c0ff38b17594f4370847b8a5019060","tests/parse-fail/confusing-block-comment0.wat":"8f27c9d0d212bbb1862ea89ffd7cbeafde5dfd755d695c1ba696cd520aba1a1d","tests/parse-fail/confusing-block-comment0.wat.err":"b53cbaef7bcec3862c64e09c084b92cd61bd29b954125482b2d083db250cd9e2","tests/parse-fail/confusing-block-comment1.wat":"b1a0447c9a8eaab8938d15cd33bd4adbb8bb69c2d710209b604023991a4347cb","tests/parse-fail/confusing-block-comment1.wat.err":"2fc3b3e4f98416326e1e5ec034026301069b6a98fa24451bc7573e16b8cb3811","tests/parse-fail/confusing-block-comment2.wat":"e3f49c7a388fba81081beb25d87bbd7db0acce5dd8e3eaa04574905ed7ec420c","tests/parse-fail/confusing-block-comment2.wat.err":"2183231d6acd0b5a117f9aea747c3d5c12e758450a6cd74027bb954a3134cf19","tests/parse-fail/confusing-block-comment3.wat":"d83f89c582501eb8833e772b8462c8974984a2f7fbb80b1452dc399fac74e5ed","tests/parse-fail/confusing-block-comment3.wat.err":"8b2096a4833627905c63f49cdabe44be24336646578dcfbdc67e9bfb35cbc601","tests/parse-fail/confusing-block-comment4.wat":"b7c6c68844d918e9ef6dd5ab9c40c7de7b38f04f94fadad630eda4e596f3e0f8","tests/parse-fail/confusing-block-comment4.wat.err":"2f790cc511edfcd89a12c9207901be16039fc1a06a584d73095e77a52f861cd9","tests/parse-fail/confusing-block-comment5.wat":"a159808032638cc914fa80ac4354a68b0af4f435a09cbe3e2d577582e183eb0a","tests/parse-fail/confusing-block-comment5.wat.err":"6fe0d99894307442f83fe93beaa5da706e06c9bdaf8e39d7cbae4c4fffafcb94","tests/parse-fail/confusing-block-comment6.wat":"abe48bcba2587dca98bc80ddde4e813f94fbc8a3538704a0775ea85bca0f8466","tests/parse-fail/confusing-block-comment6.wat.err":"3c97b9bf1112bbb7335d7fe4be5befb6f91eea7bec7dd3e6b543792231003c56","tests/parse-fail/confusing-block-comment7.wat":"e125c416ea5fa0ac35a58295a83a6f345438e2d7ddc6a39bd76c8e89885b3f0e","tests/parse-fail/confusing-block-comment7.wat.err":"5c34528ff2019cd3f0b3df34fd42523c0b66120706321da2c88ec05793478d2e","tests/parse-fail/confusing-block-comment8.wat":"200cc4c0e5af21a25529d7a81633a03642cff807255d6cd72eb45cdccc605cec","tests/parse-fail/confusing-block-comment8.wat.err":"9b81237d150a784b71791eee88fb6264a8bd6412862660f7392945203809e517","tests/parse-fail/confusing-line-comment0.wat":"bcec4c5a1e52b3e392e07c6711c979aa8d7db8baaf2bcdf270ba16d1aa528d26","tests/parse-fail/confusing-line-comment0.wat.err":"41ec5a075dc6b73afe1aec6b3198c5c4ae3a1a900e1610115879058ce034d6f6","tests/parse-fail/confusing-line-comment1.wat":"a2afbcab00ec957dfd9e9bf21fa4238852247b27f0b054f4a00f6b172dddf853","tests/parse-fail/confusing-line-comment1.wat.err":"f19a645e6fb5cbd7a0dd2308732741edcf83dbae0ef62549972029856a9e7fc6","tests/parse-fail/confusing-line-comment2.wat":"7f2a68229d02aac56ec4dfccf139bf2d617a0e89430357b30444dc4239d8aa89","tests/parse-fail/confusing-line-comment2.wat.err":"08add3d33e10e1ab6b4f3ae431f5db61d6f6c0a2b7d6828482a1e51b3a2d3851","tests/parse-fail/confusing-line-comment3.wat":"61173ae54782f6de86685f9555ffb94bbe2cf20b234daf660abb69ba3326f1ff","tests/parse-fail/confusing-line-comment3.wat.err":"4a5333dc02efa3c1eeab9cafa7c707f78abe92defdb01a71d6fe20944e4785f0","tests/parse-fail/confusing-line-comment4.wat":"9ecbbbe82c750e6475af1bfb46fe7a06115e4446a437d19fc08ca3d002f2a1c9","tests/parse-fail/confusing-line-comment4.wat.err":"ddb8aee8006265253b09c313cf5eb5c2dc4da66f502b4f6d3e2e1de77b35aec9","tests/parse-fail/confusing-line-comment5.wat":"8a4c8d342111bc9d37c16dbdf67c52027e1a42632abc9f359b3e4f07a85748b5","tests/parse-fail/confusing-line-comment5.wat.err":"34e368719fc0eab2f1a43c9f8e6f1b31aa9be9f971085d72374e49bde39cbfe5","tests/parse-fail/confusing-line-comment6.wat":"15f0dcdec23736ce92db84b3a7cdfe8689c97f2a7d0b9b0bfb0dcd2675163ed1","tests/parse-fail/confusing-line-comment6.wat.err":"0570be2ede803f071925d249f3858d3a417b5a6d678c9da40fc851d788d12983","tests/parse-fail/confusing-line-comment7.wat":"c7ee59301a701dd52d56cad02df78b0ad3584460bc18efa42ee137fe0c35aef6","tests/parse-fail/confusing-line-comment7.wat.err":"feebbeee8c85d8b3b85cec89435ae18f3ade9f754ca180d747a41406b64ca07a","tests/parse-fail/confusing-line-comment8.wat":"17632a8142154624de88b3cf93516147ed3419d785200bcd7049499eca8e8f04","tests/parse-fail/confusing-line-comment8.wat.err":"9c209285f2295cd2bc999aa7a9534a654932493308ab1f102839ed15a4d04d17","tests/parse-fail/confusing-string0.wat":"497b679b32baddcd6a158f4cadd3d9a9dea3457bac2a8c2c3d4e09b7c2d80842","tests/parse-fail/confusing-string0.wat.err":"cb3d737f2319346675a038716694354cd3b272453daa8a96e32e9861a9277f7b","tests/parse-fail/confusing-string1.wat":"46654cbed1ea6aab5019aef3d20098a391e40dacafa1ad5e83bf4ec384109fce","tests/parse-fail/confusing-string1.wat.err":"de7e7da516dc6c244bd0e4f012577b69f0cacbcc10f727fadb4b50bb04e0e2b4","tests/parse-fail/confusing-string2.wat":"11938f217c14387c05312735130f00c91d9df2d3ff9df7f13395e0f2b81dad54","tests/parse-fail/confusing-string2.wat.err":"e7bd08b146a855d681fefaf9e0576a9c333a2d10044f8e268b916b22a54227c9","tests/parse-fail/confusing-string3.wat":"e0ca4903fcafb9a54a91cf99e5eac95d25c6d2eb67b076f88191ad396f839cb6","tests/parse-fail/confusing-string3.wat.err":"b88d5db9e445c798eb24f95b7661b9c0368934d27ee8208477cd1c99351b939a","tests/parse-fail/confusing-string4.wat":"3ee2aee7f77604d051519c6f1795634469c12e98ae347a98f0c8445eecf1ff3d","tests/parse-fail/confusing-string4.wat.err":"1edc65bb09d8d3eed6ff69e7d9a7a4b5941dc823fa3436fa375657510255f6f4","tests/parse-fail/confusing-string5.wat":"024e50943128840d53f17e31a9b9332ce4f0ee70a847a043015f435b1c3c6e76","tests/parse-fail/confusing-string5.wat.err":"a0f13ec40d596ea2d8b0c4292b0d28775a5116ab7e11d7de88b295d25428c661","tests/parse-fail/confusing-string6.wat":"79cf157e29319800d2652c5a7f3dc90e07ebe2145c9904a70fc12027cdee84b7","tests/parse-fail/confusing-string6.wat.err":"860555e7aa13e3de3639cc2a530d6a42b974b629c4659593e972cbb0f306abae","tests/parse-fail/confusing-string7.wat":"7d8e403766dfb4e569754160d31ed0f9a27f908ed6cff96be43ab3d37f5975d5","tests/parse-fail/confusing-string7.wat.err":"658b6a02ba6d769254485f35c20984e7135d914b4266929963d723f26a40be4a","tests/parse-fail/confusing-string8.wat":"5a9b222e578655d57ee6e9f19bc1ea8e29aa52d652975fac685213444ed6458f","tests/parse-fail/confusing-string8.wat.err":"9a4e1a510330c800a1df7966998ebc3cde931eda20b249e5360f5e9a905dce11","tests/parse-fail/inline1.wat":"4e9767d67207aace2ac5e6f63a30e7510e4aa245ba35420539509e2254470272","tests/parse-fail/inline1.wat.err":"0143017a9825e518baa6009bae2c8d63520051dedd3437705bbe36b038a57f41","tests/parse-fail/newline-in-string.wat":"5c01cf709544ade0a6cdfcc39a3836a3bc018b633dc42a6cd872b6defc763ea7","tests/parse-fail/newline-in-string.wat.err":"1504209cc37a78b2aee778f23eacf78606daf964cf7bff251f5700efcd27ffd7","tests/parse-fail/string1.wat":"620d46d585ce94b382b5fde628c1399f3e562014b7a44af46e92f7bd045ca86e","tests/parse-fail/string1.wat.err":"fc53f3a1c4a65d8f25e5af51dec7699f45cecba114ca9c7871781bc70f664320","tests/parse-fail/string10.wat":"f7409dd45e153a1b11cb23e38f4ed87da12bedde38f8f0ccfe91037b0a4d97bd","tests/parse-fail/string10.wat.err":"ce677db5e37e0ed81ca357ed6b5edb21d85c27303ee194855bea7a88457efb6a","tests/parse-fail/string11.wat":"f6e0400b8c6a2014efa1ac676c567e140d8f86b5f4d5129773e6d67af537b615","tests/parse-fail/string11.wat.err":"4c6a550d29eda38a4e1bf7a589596f11655dc779479d7b8d466cfc53f815a742","tests/parse-fail/string12.wat":"23e30070eef22271651cce096a801fc4f79f3c37343c88bb8d2fc99b32d3b8b9","tests/parse-fail/string12.wat.err":"b5ec59f2996b88b2ee157e22d1774dc3e36fc08ed5bfc621aea830d30f66f586","tests/parse-fail/string13.wat":"81a305b981159ee10e140749ea3220c9edaaff53605e63c21995de47382b5faf","tests/parse-fail/string13.wat.err":"959f26c6b54e0d367b51d11d1addd8a53b5b8ff3caf70ebdd46bbea8ccfa2418","tests/parse-fail/string14.wat":"c45c2cc9f7afbfbd4be8e513106d22f7e5e817091448576c6bdf0701b81d95dd","tests/parse-fail/string14.wat.err":"50b5bccba905ddbe275938edb7ed0b09a5ca53dcdad36a7ff736ce9bc8e7a338","tests/parse-fail/string15.wat":"b5e0d5ade40de53b2d767a132e28376bb8c7a6f6238c4d8c248ae717c41d7f1f","tests/parse-fail/string15.wat.err":"0e9fc502cc90f96d1f592a3f63369fd2a3574bc4a2345a70365dbb76804e870f","tests/parse-fail/string16.wat":"38c3688cee80a9d089d239aa06eb1d27c5364ad2bd270aca57d05997c20aa682","tests/parse-fail/string16.wat.err":"4274b3bbe4df4cf0373619b1fcd082d0c802990817d2aca26ed885168c80e489","tests/parse-fail/string2.wat":"1172964aed31537b8c466d1f045f3e756926e7b221f80b2aff4a9a6721ea0beb","tests/parse-fail/string2.wat.err":"4618d3b20a78a077337eb5d6cae14ac39d9853762f011fbd23cff8921618dbde","tests/parse-fail/string3.wat":"07e0fbcd6270c1db100917c151ee4ac3f935e4ee1b27bce3c453b22b4b74f4d6","tests/parse-fail/string3.wat.err":"08ffc6158a9e030b2e211d53bdb8aeacfd879815c7b284d6a83b030566e35928","tests/parse-fail/string4.wat":"c970da2051b0613bdd1de4664f10424e14f2ebabe604175d4fb9b763b37af577","tests/parse-fail/string4.wat.err":"406706594d305c560fabd66417ad4fc276939990b5e701bd9d13fc223d207219","tests/parse-fail/string5.wat":"386cf314bb05acdaaabdf4da1caf140167271a26bd08bf34c3a7427d4bc4431f","tests/parse-fail/string5.wat.err":"1e56b44a23a37b2b2ad05aa9dd7e1e18191b5cc22151f93bbcf9d618779a57bd","tests/parse-fail/string6.wat":"8f1fe2825ff96f2acee9130a7721f86fcc93c221baa9411bf1fb6f0870d38ccb","tests/parse-fail/string6.wat.err":"d55dfd84d94e893f167ae73b7a080aefb2bfb05cc8a1ec201c4d3066fb8549b4","tests/parse-fail/string7.wat":"b12f8c75313d7f834489d3c353422f90bc945b37139586446eda82e334a97cde","tests/parse-fail/string7.wat.err":"4cee0ca61992c249dd0faaf2529a073cf8deeb36111a3f69b43695e5682560a2","tests/parse-fail/string8.wat":"4c2e0e1f883bb4e8cba9313497ed792130e5848e62bde7716102788d7467be10","tests/parse-fail/string8.wat.err":"840c6def7c60dd7c2b7261549cab435ba78c9b3a937adf6d5d9595ff8af01c91","tests/parse-fail/string9.wat":"2b7670caed2b0688d535de6e4e416f35fa717cfbe096a6cc764a669085c8f52f","tests/parse-fail/string9.wat.err":"37b5a9c3af9631500f31f9e5e3efa821b8d96063c57d60fd01df6be6a5c323e1","tests/parse-fail/unbalanced.wat":"f664fbef53a0308f864ba496d38044eb90482636e32586512939d4930729f3fe","tests/parse-fail/unbalanced.wat.err":"aba579f7b836856e69afe05da8328aabe0643d94e369898e686aa7bb0b07e9c9","tests/recursive.rs":"ad8a2b07bf955121a7c9e326ed35f9b2bc56b440c8cc0bbde24d423a79945c1a"},"package":"441a6a195b3b5245e26d450bbcc91366c6b652382a22f63cbe3c73240e13b2bb"}
\ No newline at end of file diff --git a/third_party/rust/wast/Cargo.toml b/third_party/rust/wast/Cargo.toml index 7f2d159a8b..8c07c94112 100644 --- a/third_party/rust/wast/Cargo.toml +++ b/third_party/rust/wast/Cargo.toml @@ -12,7 +12,7 @@ [package] edition = "2021" name = "wast" -version = "201.0.0" +version = "205.0.0" authors = ["Alex Crichton <alex@alexcrichton.com>"] description = """ Customizable Rust parsers for the WebAssembly Text formats WAT and WAST @@ -40,13 +40,13 @@ version = "2.4.1" version = "0.1.9" [dependencies.wasm-encoder] -version = "0.201.0" +version = "0.205.0" [dev-dependencies.anyhow] version = "1.0.58" -[dev-dependencies.rayon] -version = "1.3" +[dev-dependencies.libtest-mimic] +version = "0.7.0" [features] default = ["wasm-module"] diff --git a/third_party/rust/wast/src/component/binary.rs b/third_party/rust/wast/src/component/binary.rs index a57cc0f912..a04343269f 100644 --- a/third_party/rust/wast/src/component/binary.rs +++ b/third_party/rust/wast/src/component/binary.rs @@ -597,7 +597,7 @@ impl From<core::HeapType<'_>> for wasm_encoder::HeapType { match r { core::HeapType::Func => Self::Func, core::HeapType::Extern => Self::Extern, - core::HeapType::Exn => { + core::HeapType::Exn | core::HeapType::NoExn => { todo!("encoding of exceptions proposal types not yet implemented") } core::HeapType::Concrete(Index::Num(i, _)) => Self::Concrete(i), @@ -640,11 +640,23 @@ impl From<core::TableType<'_>> for wasm_encoder::TableType { impl From<core::MemoryType> for wasm_encoder::MemoryType { fn from(ty: core::MemoryType) -> Self { - let (minimum, maximum, memory64, shared) = match ty { - core::MemoryType::B32 { limits, shared } => { - (limits.min.into(), limits.max.map(Into::into), false, shared) - } - core::MemoryType::B64 { limits, shared } => (limits.min, limits.max, true, shared), + let (minimum, maximum, memory64, shared, page_size_log2) = match ty { + core::MemoryType::B32 { + limits, + shared, + page_size_log2, + } => ( + limits.min.into(), + limits.max.map(Into::into), + false, + shared, + page_size_log2, + ), + core::MemoryType::B64 { + limits, + shared, + page_size_log2, + } => (limits.min, limits.max, true, shared, page_size_log2), }; Self { @@ -652,6 +664,7 @@ impl From<core::MemoryType> for wasm_encoder::MemoryType { maximum, memory64, shared, + page_size_log2, } } } @@ -661,6 +674,7 @@ impl From<core::GlobalType<'_>> for wasm_encoder::GlobalType { Self { val_type: ty.ty.into(), mutable: ty.mutable, + shared: ty.shared, } } } @@ -780,8 +794,8 @@ impl From<PrimitiveValType> for wasm_encoder::PrimitiveValType { PrimitiveValType::U32 => Self::U32, PrimitiveValType::S64 => Self::S64, PrimitiveValType::U64 => Self::U64, - PrimitiveValType::Float32 => Self::Float32, - PrimitiveValType::Float64 => Self::Float64, + PrimitiveValType::F32 => Self::F32, + PrimitiveValType::F64 => Self::F64, PrimitiveValType::Char => Self::Char, PrimitiveValType::String => Self::String, } diff --git a/third_party/rust/wast/src/component/resolve.rs b/third_party/rust/wast/src/component/resolve.rs index c0122ef73f..0f33df564a 100644 --- a/third_party/rust/wast/src/component/resolve.rs +++ b/third_party/rust/wast/src/component/resolve.rs @@ -531,7 +531,8 @@ impl<'a> Resolver<'a> { | core::HeapType::Struct | core::HeapType::None | core::HeapType::NoFunc - | core::HeapType::NoExtern => {} + | core::HeapType::NoExtern + | core::HeapType::NoExn => {} core::HeapType::Concrete(id) => { self.resolve_ns(id, Ns::Type)?; } diff --git a/third_party/rust/wast/src/component/types.rs b/third_party/rust/wast/src/component/types.rs index 72eced02a8..dc8a91fd6b 100644 --- a/third_party/rust/wast/src/component/types.rs +++ b/third_party/rust/wast/src/component/types.rs @@ -230,8 +230,8 @@ pub enum PrimitiveValType { U32, S64, U64, - Float32, - Float64, + F32, + F64, Char, String, } @@ -266,12 +266,18 @@ impl<'a> Parse<'a> for PrimitiveValType { } else if l.peek::<kw::u64>()? { parser.parse::<kw::u64>()?; Ok(Self::U64) + } else if l.peek::<kw::f32>()? { + parser.parse::<kw::f32>()?; + Ok(Self::F32) + } else if l.peek::<kw::f64>()? { + parser.parse::<kw::f64>()?; + Ok(Self::F64) } else if l.peek::<kw::float32>()? { parser.parse::<kw::float32>()?; - Ok(Self::Float32) + Ok(Self::F32) } else if l.peek::<kw::float64>()? { parser.parse::<kw::float64>()?; - Ok(Self::Float64) + Ok(Self::F64) } else if l.peek::<kw::char>()? { parser.parse::<kw::char>()?; Ok(Self::Char) @@ -297,6 +303,8 @@ impl Peek for PrimitiveValType { | Some(("u32", _)) | Some(("s64", _)) | Some(("u64", _)) + | Some(("f32", _)) + | Some(("f64", _)) | Some(("float32", _)) | Some(("float64", _)) | Some(("char", _)) diff --git a/third_party/rust/wast/src/component/wast.rs b/third_party/rust/wast/src/component/wast.rs index 72d8bf15bc..28f1ce267c 100644 --- a/third_party/rust/wast/src/component/wast.rs +++ b/third_party/rust/wast/src/component/wast.rs @@ -1,6 +1,6 @@ use crate::kw; use crate::parser::{Cursor, Parse, Parser, Peek, Result}; -use crate::token::{Float32, Float64}; +use crate::token::{F32, F64}; /// Expression that can be used inside of `invoke` expressions for core wasm /// functions. @@ -16,8 +16,8 @@ pub enum WastVal<'a> { S32(i32), U64(u64), S64(i64), - Float32(Float32), - Float64(Float64), + F32(F32), + F64(F64), Char(char), String(&'a str), List(Vec<WastVal<'a>>), @@ -53,8 +53,8 @@ static CASES: &[(&str, fn(Parser<'_>) -> Result<WastVal<'_>>)] = { ("s32.const", |p| Ok(S32(p.parse()?))), ("u64.const", |p| Ok(U64(p.parse()?))), ("s64.const", |p| Ok(S64(p.parse()?))), - ("f32.const", |p| Ok(Float32(p.parse()?))), - ("f64.const", |p| Ok(Float64(p.parse()?))), + ("f32.const", |p| Ok(F32(p.parse()?))), + ("f64.const", |p| Ok(F64(p.parse()?))), ("char.const", |p| { let s = p.parse::<&str>()?; let mut ch = s.chars(); diff --git a/third_party/rust/wast/src/core/binary.rs b/third_party/rust/wast/src/core/binary.rs index da94da0241..769e120112 100644 --- a/third_party/rust/wast/src/core/binary.rs +++ b/third_party/rust/wast/src/core/binary.rs @@ -295,6 +295,7 @@ impl<'a> Encode for HeapType<'a> { HeapType::I31 => e.push(0x6c), HeapType::NoFunc => e.push(0x73), HeapType::NoExtern => e.push(0x72), + HeapType::NoExn => e.push(0x74), HeapType::None => e.push(0x71), // Note that this is encoded as a signed leb128 so be sure to cast // to an i64 first @@ -349,6 +350,11 @@ impl<'a> Encode for RefType<'a> { nullable: true, heap: HeapType::NoExtern, } => e.push(0x72), + // The 'nullexnref' binary abbreviation + RefType { + nullable: true, + heap: HeapType::NoExn, + } => e.push(0x74), // The 'nullref' binary abbreviation RefType { nullable: true, @@ -466,25 +472,45 @@ impl Encode for Limits { impl Encode for MemoryType { fn encode(&self, e: &mut Vec<u8>) { match self { - MemoryType::B32 { limits, shared } => { + MemoryType::B32 { + limits, + shared, + page_size_log2, + } => { let flag_max = limits.max.is_some() as u8; let flag_shared = *shared as u8; - let flags = flag_max | (flag_shared << 1); + let flag_page_size = page_size_log2.is_some() as u8; + let flags = flag_max | (flag_shared << 1) | (flag_page_size << 3); e.push(flags); limits.min.encode(e); if let Some(max) = limits.max { max.encode(e); } + if let Some(p) = page_size_log2 { + p.encode(e); + } } - MemoryType::B64 { limits, shared } => { - let flag_max = limits.max.is_some() as u8; - let flag_shared = *shared as u8; - let flags = flag_max | (flag_shared << 1) | 0x04; + MemoryType::B64 { + limits, + shared, + page_size_log2, + } => { + let flag_max = limits.max.is_some(); + let flag_shared = *shared; + let flag_mem64 = true; + let flag_page_size = page_size_log2.is_some(); + let flags = ((flag_max as u8) << 0) + | ((flag_shared as u8) << 1) + | ((flag_mem64 as u8) << 2) + | ((flag_page_size as u8) << 3); e.push(flags); limits.min.encode(e); if let Some(max) = limits.max { max.encode(e); } + if let Some(p) = page_size_log2 { + p.encode(e); + } } } } @@ -493,11 +519,14 @@ impl Encode for MemoryType { impl<'a> Encode for GlobalType<'a> { fn encode(&self, e: &mut Vec<u8>) { self.ty.encode(e); + let mut flags = 0; if self.mutable { - e.push(0x01); - } else { - e.push(0x00); + flags |= 0b01; + } + if self.shared { + flags |= 0b10; } + e.push(flags); } } @@ -749,19 +778,6 @@ impl Encode for BlockType<'_> { } } -impl Encode for FuncBindType<'_> { - fn encode(&self, e: &mut Vec<u8>) { - self.ty.encode(e); - } -} - -impl Encode for LetType<'_> { - fn encode(&self, e: &mut Vec<u8>) { - self.block.encode(e); - self.locals.encode(e); - } -} - impl Encode for LaneArg { fn encode(&self, e: &mut Vec<u8>) { self.lane.encode(e); @@ -784,6 +800,23 @@ impl Encode for MemArg<'_> { } } +impl Encode for Ordering { + fn encode(&self, buf: &mut Vec<u8>) { + let flag: u8 = match self { + Ordering::SeqCst => 0, + Ordering::AcqRel => 1, + }; + flag.encode(buf); + } +} + +impl Encode for OrderedAccess<'_> { + fn encode(&self, buf: &mut Vec<u8>) { + self.ordering.encode(buf); + self.index.encode(buf); + } +} + impl Encode for LoadOrStoreLane<'_> { fn encode(&self, e: &mut Vec<u8>) { self.memarg.encode(e); @@ -845,13 +878,13 @@ impl Encode for BrTableIndices<'_> { } } -impl Encode for Float32 { +impl Encode for F32 { fn encode(&self, e: &mut Vec<u8>) { e.extend_from_slice(&self.bits.to_le_bytes()); } } -impl Encode for Float64 { +impl Encode for F64 { fn encode(&self, e: &mut Vec<u8>) { e.extend_from_slice(&self.bits.to_le_bytes()); } @@ -994,8 +1027,7 @@ fn find_names<'a>( | Instruction::Block(block) | Instruction::Loop(block) | Instruction::Try(block) - | Instruction::TryTable(TryTable { block, .. }) - | Instruction::Let(LetType { block, .. }) => { + | Instruction::TryTable(TryTable { block, .. }) => { if let Some(name) = get_name(&block.label, &block.label_name) { label_names.push((label_idx, name)); } diff --git a/third_party/rust/wast/src/core/expr.rs b/third_party/rust/wast/src/core/expr.rs index b45950b896..df0abb7cd0 100644 --- a/third_party/rust/wast/src/core/expr.rs +++ b/third_party/rust/wast/src/core/expr.rs @@ -184,7 +184,6 @@ impl<'a> ExpressionParser<'a> { // seen i @ Instruction::Block(_) | i @ Instruction::Loop(_) - | i @ Instruction::Let(_) | i @ Instruction::TryTable(_) => { self.instrs.push(i); self.stack.push(Level::EndWith(Instruction::End(None))); @@ -350,7 +349,7 @@ macro_rules! instructions { }) => ( /// A listing of all WebAssembly instructions that can be in a module /// that this crate currently parses. - #[derive(Debug)] + #[derive(Debug, Clone)] #[allow(missing_docs)] pub enum Instruction<'a> { $( @@ -468,8 +467,6 @@ instructions! { // function-references proposal CallRef(Index<'a>) : [0x14] : "call_ref", ReturnCallRef(Index<'a>) : [0x15] : "return_call_ref", - FuncBind(FuncBindType<'a>) : [0x16] : "func.bind", - Let(LetType<'a>) : [0x17] : "let", Drop : [0x1a] : "drop", Select(SelectTypes<'a>) : [] : "select", @@ -574,8 +571,8 @@ instructions! { I32Const(i32) : [0x41] : "i32.const", I64Const(i64) : [0x42] : "i64.const", - F32Const(Float32) : [0x43] : "f32.const", - F64Const(Float64) : [0x44] : "f64.const", + F32Const(F32) : [0x43] : "f32.const", + F64Const(F64) : [0x44] : "f64.const", I32Clz : [0x67] : "i32.clz", I32Ctz : [0x68] : "i32.ctz", @@ -803,6 +800,10 @@ instructions! { I64AtomicRmw16CmpxchgU(MemArg<2>) : [0xfe, 0x4d] : "i64.atomic.rmw16.cmpxchg_u", I64AtomicRmw32CmpxchgU(MemArg<4>) : [0xfe, 0x4e] : "i64.atomic.rmw32.cmpxchg_u", + // proposal: shared-everything-threads + GlobalAtomicGet(OrderedAccess<'a>) : [0xfe, 0x4f] : "global.atomic.get", + GlobalAtomicSet(OrderedAccess<'a>) : [0xfe, 0x50] : "global.atomic.set", + // proposal: simd // // https://webassembly.github.io/simd/core/binary/instructions.html @@ -1123,7 +1124,7 @@ impl<'a> Instruction<'a> { /// /// This is used to label blocks and also annotate what types are expected for /// the block. -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(missing_docs)] pub struct BlockType<'a> { pub label: Option<Id<'a>>, @@ -1143,7 +1144,7 @@ impl<'a> Parse<'a> for BlockType<'a> { } } -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(missing_docs)] pub struct TryTable<'a> { pub block: Box<BlockType<'a>>, @@ -1187,7 +1188,7 @@ impl<'a> Parse<'a> for TryTable<'a> { } } -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(missing_docs)] pub enum TryTableCatchKind<'a> { // Catch a tagged exception, do not capture an exnref. @@ -1210,50 +1211,16 @@ impl<'a> TryTableCatchKind<'a> { } } -#[derive(Debug)] +#[derive(Debug, Clone)] #[allow(missing_docs)] pub struct TryTableCatch<'a> { pub kind: TryTableCatchKind<'a>, pub label: Index<'a>, } -/// Extra information associated with the func.bind instruction. -#[derive(Debug)] -#[allow(missing_docs)] -pub struct FuncBindType<'a> { - pub ty: TypeUse<'a, FunctionType<'a>>, -} - -impl<'a> Parse<'a> for FuncBindType<'a> { - fn parse(parser: Parser<'a>) -> Result<Self> { - Ok(FuncBindType { - ty: parser - .parse::<TypeUse<'a, FunctionTypeNoNames<'a>>>()? - .into(), - }) - } -} - -/// Extra information associated with the let instruction. -#[derive(Debug)] -#[allow(missing_docs)] -pub struct LetType<'a> { - pub block: Box<BlockType<'a>>, - pub locals: Box<[Local<'a>]>, -} - -impl<'a> Parse<'a> for LetType<'a> { - fn parse(parser: Parser<'a>) -> Result<Self> { - Ok(LetType { - block: parser.parse()?, - locals: Local::parse_remainder(parser)?.into(), - }) - } -} - /// Extra information associated with the `br_table` instruction. #[allow(missing_docs)] -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct BrTableIndices<'a> { pub labels: Vec<Index<'a>>, pub default: Index<'a>, @@ -1271,7 +1238,7 @@ impl<'a> Parse<'a> for BrTableIndices<'a> { } /// Payload for lane-related instructions. Unsigned with no + prefix. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct LaneArg { /// The lane argument. pub lane: u8, @@ -1299,7 +1266,7 @@ impl<'a> Parse<'a> for LaneArg { /// Payload for memory-related instructions indicating offset/alignment of /// memory accesses. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct MemArg<'a> { /// The alignment of this access. /// @@ -1374,7 +1341,7 @@ impl<'a> MemArg<'a> { } /// Extra data associated with the `loadN_lane` and `storeN_lane` instructions. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct LoadOrStoreLane<'a> { /// The memory argument for this instruction. pub memarg: MemArg<'a>, @@ -1428,7 +1395,7 @@ impl<'a> LoadOrStoreLane<'a> { } /// Extra data associated with the `call_indirect` instruction. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct CallIndirect<'a> { /// The table that this call is going to be indexing. pub table: Index<'a>, @@ -1449,7 +1416,7 @@ impl<'a> Parse<'a> for CallIndirect<'a> { } /// Extra data associated with the `table.init` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct TableInit<'a> { /// The index of the table we're copying into. pub table: Index<'a>, @@ -1471,7 +1438,7 @@ impl<'a> Parse<'a> for TableInit<'a> { } /// Extra data associated with the `table.copy` instruction. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct TableCopy<'a> { /// The index of the destination table to copy into. pub dst: Index<'a>, @@ -1493,7 +1460,7 @@ impl<'a> Parse<'a> for TableCopy<'a> { } /// Extra data associated with unary table instructions. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct TableArg<'a> { /// The index of the table argument. pub dst: Index<'a>, @@ -1511,7 +1478,7 @@ impl<'a> Parse<'a> for TableArg<'a> { } /// Extra data associated with unary memory instructions. -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct MemoryArg<'a> { /// The index of the memory space. pub mem: Index<'a>, @@ -1529,7 +1496,7 @@ impl<'a> Parse<'a> for MemoryArg<'a> { } /// Extra data associated with the `memory.init` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct MemoryInit<'a> { /// The index of the data segment we're copying into memory. pub data: Index<'a>, @@ -1551,7 +1518,7 @@ impl<'a> Parse<'a> for MemoryInit<'a> { } /// Extra data associated with the `memory.copy` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct MemoryCopy<'a> { /// The index of the memory we're copying from. pub src: Index<'a>, @@ -1573,7 +1540,7 @@ impl<'a> Parse<'a> for MemoryCopy<'a> { } /// Extra data associated with the `struct.get/set` instructions -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct StructAccess<'a> { /// The index of the struct type we're accessing. pub r#struct: Index<'a>, @@ -1591,7 +1558,7 @@ impl<'a> Parse<'a> for StructAccess<'a> { } /// Extra data associated with the `array.fill` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayFill<'a> { /// The index of the array type we're filling. pub array: Index<'a>, @@ -1606,7 +1573,7 @@ impl<'a> Parse<'a> for ArrayFill<'a> { } /// Extra data associated with the `array.copy` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayCopy<'a> { /// The index of the array type we're copying to. pub dest_array: Index<'a>, @@ -1624,7 +1591,7 @@ impl<'a> Parse<'a> for ArrayCopy<'a> { } /// Extra data associated with the `array.init_[data/elem]` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayInit<'a> { /// The index of the array type we're initializing. pub array: Index<'a>, @@ -1642,7 +1609,7 @@ impl<'a> Parse<'a> for ArrayInit<'a> { } /// Extra data associated with the `array.new_fixed` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayNewFixed<'a> { /// The index of the array type we're accessing. pub array: Index<'a>, @@ -1660,7 +1627,7 @@ impl<'a> Parse<'a> for ArrayNewFixed<'a> { } /// Extra data associated with the `array.new_data` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayNewData<'a> { /// The index of the array type we're accessing. pub array: Index<'a>, @@ -1678,7 +1645,7 @@ impl<'a> Parse<'a> for ArrayNewData<'a> { } /// Extra data associated with the `array.new_elem` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct ArrayNewElem<'a> { /// The index of the array type we're accessing. pub array: Index<'a>, @@ -1696,7 +1663,7 @@ impl<'a> Parse<'a> for ArrayNewElem<'a> { } /// Extra data associated with the `ref.cast` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct RefCast<'a> { /// The type to cast to. pub r#type: RefType<'a>, @@ -1711,7 +1678,7 @@ impl<'a> Parse<'a> for RefCast<'a> { } /// Extra data associated with the `ref.test` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct RefTest<'a> { /// The type to test for. pub r#type: RefType<'a>, @@ -1726,7 +1693,7 @@ impl<'a> Parse<'a> for RefTest<'a> { } /// Extra data associated with the `br_on_cast` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct BrOnCast<'a> { /// The label to branch to. pub label: Index<'a>, @@ -1747,7 +1714,7 @@ impl<'a> Parse<'a> for BrOnCast<'a> { } /// Extra data associated with the `br_on_cast_fail` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct BrOnCastFail<'a> { /// The label to branch to. pub label: Index<'a>, @@ -1767,16 +1734,65 @@ impl<'a> Parse<'a> for BrOnCastFail<'a> { } } +/// The memory ordering for atomic instructions. +/// +/// For an in-depth explanation of memory orderings, see the C++ documentation +/// for [`memory_order`] or the Rust documentation for [`atomic::Ordering`]. +/// +/// [`memory_order`]: https://en.cppreference.com/w/cpp/atomic/memory_order +/// [`atomic::Ordering`]: https://doc.rust-lang.org/std/sync/atomic/enum.Ordering.html +#[derive(Clone, Debug)] +pub enum Ordering { + /// Like `AcqRel` but all threads see all sequentially consistent operations + /// in the same order. + AcqRel, + /// For a load, it acquires; this orders all operations before the last + /// "releasing" store. For a store, it releases; this orders all operations + /// before it at the next "acquiring" load. + SeqCst, +} + +impl<'a> Parse<'a> for Ordering { + fn parse(parser: Parser<'a>) -> Result<Self> { + if parser.peek::<kw::seq_cst>()? { + parser.parse::<kw::seq_cst>()?; + Ok(Ordering::SeqCst) + } else if parser.peek::<kw::acq_rel>()? { + parser.parse::<kw::acq_rel>()?; + Ok(Ordering::AcqRel) + } else { + Err(parser.error("expected a memory ordering: `seq_cst` or `acq_rel`")) + } + } +} + +/// Extra data associated with the `global.atomic.*` instructions. +#[derive(Clone, Debug)] +pub struct OrderedAccess<'a> { + /// The memory ordering for this atomic instruction. + pub ordering: Ordering, + /// The index of the global to access. + pub index: Index<'a>, +} + +impl<'a> Parse<'a> for OrderedAccess<'a> { + fn parse(parser: Parser<'a>) -> Result<Self> { + let ordering = parser.parse()?; + let index = parser.parse()?; + Ok(OrderedAccess { ordering, index }) + } +} + /// Different ways to specify a `v128.const` instruction -#[derive(Debug)] +#[derive(Clone, Debug)] #[allow(missing_docs)] pub enum V128Const { I8x16([i8; 16]), I16x8([i16; 8]), I32x4([i32; 4]), I64x2([i64; 2]), - F32x4([Float32; 4]), - F64x2([Float64; 2]), + F32x4([F32; 4]), + F64x2([F64; 2]), } impl V128Const { @@ -1934,7 +1950,7 @@ impl<'a> Parse<'a> for V128Const { } /// Lanes being shuffled in the `i8x16.shuffle` instruction -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct I8x16Shuffle { #[allow(missing_docs)] pub lanes: [u8; 16], @@ -1966,7 +1982,7 @@ impl<'a> Parse<'a> for I8x16Shuffle { } /// Payload of the `select` instructions -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct SelectTypes<'a> { #[allow(missing_docs)] pub tys: Option<Vec<ValType<'a>>>, diff --git a/third_party/rust/wast/src/core/memory.rs b/third_party/rust/wast/src/core/memory.rs index eb1baa1a95..5f5f051109 100644 --- a/third_party/rust/wast/src/core/memory.rs +++ b/third_party/rust/wast/src/core/memory.rs @@ -59,7 +59,10 @@ impl<'a> Parse<'a> for Memory<'a> { import, ty: parser.parse()?, } - } else if l.peek::<LParen>()? || parser.peek2::<LParen>()? { + } else if l.peek::<LParen>()? + || ((parser.peek::<kw::i32>()? || parser.peek::<kw::i64>()?) + && parser.peek2::<LParen>()?) + { let is_32 = if parser.parse::<Option<kw::i32>>()?.is_some() { true } else { @@ -133,7 +136,7 @@ impl<'a> Parse<'a> for Data<'a> { let id = parser.parse()?; let name = parser.parse()?; - let kind = if parser.peek::<&[u8]>()? { + let kind = if parser.peek::<&[u8]>()? || parser.peek::<RParen>()? { DataKind::Passive // ... and otherwise we must be attached to a particular memory as well @@ -248,8 +251,8 @@ impl<'a> Parse<'a> for DataVal<'a> { || consume::<kw::i16, i16, _>(p, l, r, |u, v| v.extend(&u.to_le_bytes()))? || consume::<kw::i32, i32, _>(p, l, r, |u, v| v.extend(&u.to_le_bytes()))? || consume::<kw::i64, i64, _>(p, l, r, |u, v| v.extend(&u.to_le_bytes()))? - || consume::<kw::f32, Float32, _>(p, l, r, |u, v| v.extend(&u.bits.to_le_bytes()))? - || consume::<kw::f64, Float64, _>(p, l, r, |u, v| v.extend(&u.bits.to_le_bytes()))? + || consume::<kw::f32, F32, _>(p, l, r, |u, v| v.extend(&u.bits.to_le_bytes()))? + || consume::<kw::f64, F64, _>(p, l, r, |u, v| v.extend(&u.bits.to_le_bytes()))? || consume::<kw::v128, V128Const, _>(p, l, r, |u, v| v.extend(&u.to_le_bytes()))? { Ok(DataVal::Integral(result)) diff --git a/third_party/rust/wast/src/core/resolve/deinline_import_export.rs b/third_party/rust/wast/src/core/resolve/deinline_import_export.rs index 98e680b58a..f2d12e9a52 100644 --- a/third_party/rust/wast/src/core/resolve/deinline_import_export.rs +++ b/third_party/rust/wast/src/core/resolve/deinline_import_export.rs @@ -50,7 +50,7 @@ pub fn run(fields: &mut Vec<ModuleField>) { // field here instead, switching this to a `Normal` memory. MemoryKind::Inline { is_32, ref data } => { let len = data.iter().map(|l| l.len()).sum::<usize>() as u32; - let pages = (len + page_size() - 1) / page_size(); + let pages = (len + default_page_size() - 1) / default_page_size(); let kind = MemoryKind::Normal(if is_32 { MemoryType::B32 { limits: Limits { @@ -58,6 +58,7 @@ pub fn run(fields: &mut Vec<ModuleField>) { max: Some(pages), }, shared: false, + page_size_log2: None, } } else { MemoryType::B64 { @@ -66,6 +67,7 @@ pub fn run(fields: &mut Vec<ModuleField>) { max: Some(u64::from(pages)), }, shared: false, + page_size_log2: None, } }); let data = match mem::replace(&mut m.kind, kind) { @@ -212,7 +214,7 @@ pub fn run(fields: &mut Vec<ModuleField>) { fields.push(item); } - fn page_size() -> u32 { + fn default_page_size() -> u32 { 1 << 16 } } diff --git a/third_party/rust/wast/src/core/resolve/names.rs b/third_party/rust/wast/src/core/resolve/names.rs index 05894e9a1e..f17590bbd1 100644 --- a/third_party/rust/wast/src/core/resolve/names.rs +++ b/third_party/rust/wast/src/core/resolve/names.rs @@ -457,6 +457,10 @@ impl<'a, 'b> ExprResolver<'a, 'b> { self.resolver.resolve(i, Ns::Global)?; } + GlobalAtomicSet(i) | GlobalAtomicGet(i) => { + self.resolver.resolve(&mut i.index, Ns::Global)?; + } + LocalSet(i) | LocalGet(i) | LocalTee(i) => { assert!(self.scopes.len() > 0); // Resolve a local by iterating over scopes from most recent @@ -490,30 +494,6 @@ impl<'a, 'b> ExprResolver<'a, 'b> { self.resolver.resolve(i, Ns::Type)?; } - FuncBind(b) => { - self.resolver.resolve_type_use(&mut b.ty)?; - } - - Let(t) => { - // Resolve (ref T) in locals - for local in t.locals.iter_mut() { - self.resolver.resolve_valtype(&mut local.ty)?; - } - - // Register all locals defined in this let - let mut scope = Namespace::default(); - for local in t.locals.iter() { - scope.register(local.id, "local")?; - } - self.scopes.push(scope); - self.blocks.push(ExprBlock { - label: t.block.label, - pushed_scope: true, - }); - - self.resolve_block_type(&mut t.block)?; - } - Block(bt) | If(bt) | Loop(bt) | Try(bt) => { self.blocks.push(ExprBlock { label: bt.label, diff --git a/third_party/rust/wast/src/core/resolve/types.rs b/third_party/rust/wast/src/core/resolve/types.rs index bfb996b4b6..84b0e516e4 100644 --- a/third_party/rust/wast/src/core/resolve/types.rs +++ b/third_party/rust/wast/src/core/resolve/types.rs @@ -139,7 +139,6 @@ impl<'a> Expander<'a> { Instruction::Block(bt) | Instruction::If(bt) | Instruction::Loop(bt) - | Instruction::Let(LetType { block: bt, .. }) | Instruction::Try(bt) | Instruction::TryTable(TryTable { block: bt, .. }) => { // No expansion necessary, a type reference is already here. @@ -174,9 +173,6 @@ impl<'a> Expander<'a> { } self.expand_type_use(&mut bt.ty); } - Instruction::FuncBind(b) => { - self.expand_type_use(&mut b.ty); - } Instruction::CallIndirect(c) | Instruction::ReturnCallIndirect(c) => { self.expand_type_use(&mut c.ty); } diff --git a/third_party/rust/wast/src/core/types.rs b/third_party/rust/wast/src/core/types.rs index 179a62b9b8..160317c1c3 100644 --- a/third_party/rust/wast/src/core/types.rs +++ b/third_party/rust/wast/src/core/types.rs @@ -2,6 +2,7 @@ use crate::core::*; use crate::kw; use crate::parser::{Cursor, Parse, Parser, Peek, Result}; use crate::token::{Id, Index, LParen, NameAnnotation, Span}; +use crate::Error; use std::mem; /// The value types for a wasm module. @@ -86,6 +87,8 @@ pub enum HeapType<'a> { NoExtern, /// The bottom type of the anyref hierarchy. Part of the GC proposal. None, + /// The bottom type of the exnref hierarchy. Part of the exceptions proposal. + NoExn, /// A reference to a concrete function, struct, or array type defined by /// Wasm: `ref T`. This is part of the function references and GC proposals. Concrete(Index<'a>), @@ -124,6 +127,9 @@ impl<'a> Parse<'a> for HeapType<'a> { } else if l.peek::<kw::noextern>()? { parser.parse::<kw::noextern>()?; Ok(HeapType::NoExtern) + } else if l.peek::<kw::noexn>()? { + parser.parse::<kw::noexn>()?; + Ok(HeapType::NoExn) } else if l.peek::<kw::none>()? { parser.parse::<kw::none>()?; Ok(HeapType::None) @@ -147,6 +153,7 @@ impl<'a> Peek for HeapType<'a> { || kw::i31::peek(cursor)? || kw::nofunc::peek(cursor)? || kw::noextern::peek(cursor)? + || kw::noexn::peek(cursor)? || kw::none::peek(cursor)? || (LParen::peek(cursor)? && kw::r#type::peek2(cursor)?)) } @@ -251,6 +258,14 @@ impl<'a> RefType<'a> { heap: HeapType::None, } } + + /// A `nullexnref` as an abbreviation for `(ref null noexn)`. + pub fn nullexnref() -> Self { + RefType { + nullable: true, + heap: HeapType::NoExn, + } + } } impl<'a> Parse<'a> for RefType<'a> { @@ -286,6 +301,9 @@ impl<'a> Parse<'a> for RefType<'a> { } else if l.peek::<kw::nullexternref>()? { parser.parse::<kw::nullexternref>()?; Ok(RefType::nullexternref()) + } else if l.peek::<kw::nullexnref>()? { + parser.parse::<kw::nullexnref>()?; + Ok(RefType::nullexnref()) } else if l.peek::<kw::nullref>()? { parser.parse::<kw::nullref>()?; Ok(RefType::nullref()) @@ -327,6 +345,7 @@ impl<'a> Peek for RefType<'a> { || kw::i31ref::peek(cursor)? || kw::nullfuncref::peek(cursor)? || kw::nullexternref::peek(cursor)? + || kw::nullexnref::peek(cursor)? || kw::nullref::peek(cursor)? || (LParen::peek(cursor)? && kw::r#ref::peek2(cursor)?)) } @@ -368,22 +387,35 @@ pub struct GlobalType<'a> { pub ty: ValType<'a>, /// Whether or not the global is mutable or not. pub mutable: bool, + /// Whether or not the global is shared. + pub shared: bool, } impl<'a> Parse<'a> for GlobalType<'a> { fn parse(parser: Parser<'a>) -> Result<Self> { - if parser.peek2::<kw::r#mut>()? { + if parser.peek2::<kw::shared>()? || parser.peek2::<kw::r#mut>()? { parser.parens(|p| { - p.parse::<kw::r#mut>()?; + let mut shared = false; + let mut mutable = false; + if p.peek::<kw::shared>()? { + p.parse::<kw::shared>()?; + shared = true; + } + if p.peek::<kw::r#mut>()? { + p.parse::<kw::r#mut>()?; + mutable = true; + } Ok(GlobalType { - ty: parser.parse()?, - mutable: true, + ty: p.parse()?, + mutable, + shared, }) }) } else { Ok(GlobalType { ty: parser.parse()?, mutable: false, + shared: false, }) } } @@ -458,6 +490,8 @@ pub enum MemoryType { limits: Limits, /// Whether or not this is a shared (atomic) memory type shared: bool, + /// The custom page size for this memory, if any. + page_size_log2: Option<u32>, }, /// A 64-bit memory B64 { @@ -465,21 +499,53 @@ pub enum MemoryType { limits: Limits64, /// Whether or not this is a shared (atomic) memory type shared: bool, + /// The custom page size for this memory, if any. + page_size_log2: Option<u32>, }, } +fn page_size(parser: Parser<'_>) -> Result<Option<u32>> { + if parser.peek::<LParen>()? { + Ok(Some(parser.parens(|parser| { + parser.parse::<kw::pagesize>()?; + let span = parser.cur_span(); + let size = parser.parse::<u32>()?; + if size.is_power_of_two() { + Ok(size.ilog2()) + } else { + Err(Error::new( + span, + format!("invalid custom page size: {size}"), + )) + } + })?)) + } else { + Ok(None) + } +} + impl<'a> Parse<'a> for MemoryType { fn parse(parser: Parser<'a>) -> Result<Self> { if parser.peek::<kw::i64>()? { parser.parse::<kw::i64>()?; let limits = parser.parse()?; let shared = parser.parse::<Option<kw::shared>>()?.is_some(); - Ok(MemoryType::B64 { limits, shared }) + let page_size = page_size(parser)?; + Ok(MemoryType::B64 { + limits, + shared, + page_size_log2: page_size, + }) } else { parser.parse::<Option<kw::i32>>()?; let limits = parser.parse()?; let shared = parser.parse::<Option<kw::shared>>()?.is_some(); - Ok(MemoryType::B32 { limits, shared }) + let page_size = page_size(parser)?; + Ok(MemoryType::B32 { + limits, + shared, + page_size_log2: page_size, + }) } } } diff --git a/third_party/rust/wast/src/core/wast.rs b/third_party/rust/wast/src/core/wast.rs index 2d3b51b061..9dd9a92391 100644 --- a/third_party/rust/wast/src/core/wast.rs +++ b/third_party/rust/wast/src/core/wast.rs @@ -1,7 +1,7 @@ use crate::core::{HeapType, V128Const}; use crate::kw; use crate::parser::{Cursor, Parse, Parser, Peek, Result}; -use crate::token::{Float32, Float64, Index}; +use crate::token::{Index, F32, F64}; /// Expression that can be used inside of `invoke` expressions for core wasm /// functions. @@ -10,8 +10,8 @@ use crate::token::{Float32, Float64, Index}; pub enum WastArgCore<'a> { I32(i32), I64(i64), - F32(Float32), - F64(Float64), + F32(F32), + F64(F64), V128(V128Const), RefNull(HeapType<'a>), RefExtern(u32), @@ -67,8 +67,8 @@ impl Peek for WastArgCore<'_> { pub enum WastRetCore<'a> { I32(i32), I64(i64), - F32(NanPattern<Float32>), - F64(NanPattern<Float64>), + F32(NanPattern<F32>), + F64(NanPattern<F64>), V128(V128Pattern), /// A null reference is expected, optionally with a specified type. @@ -151,7 +151,7 @@ impl Peek for WastRetCore<'_> { } /// Either a NaN pattern (`nan:canonical`, `nan:arithmetic`) or a value of type `T`. -#[derive(Debug, PartialEq)] +#[derive(Copy, Clone, Debug, PartialEq)] #[allow(missing_docs)] pub enum NanPattern<T> { CanonicalNan, @@ -181,15 +181,15 @@ where /// /// This implementation is necessary because only float types can include NaN patterns; otherwise /// it is largely similar to the implementation of `V128Const`. -#[derive(Debug)] +#[derive(Clone, Debug)] #[allow(missing_docs)] pub enum V128Pattern { I8x16([i8; 16]), I16x8([i16; 8]), I32x4([i32; 4]), I64x2([i64; 2]), - F32x4([NanPattern<Float32>; 4]), - F64x2([NanPattern<Float64>; 2]), + F32x4([NanPattern<F32>; 4]), + F64x2([NanPattern<F64>; 2]), } impl<'a> Parse<'a> for V128Pattern { diff --git a/third_party/rust/wast/src/lib.rs b/third_party/rust/wast/src/lib.rs index bb16574177..4964e8df0f 100644 --- a/third_party/rust/wast/src/lib.rs +++ b/third_party/rust/wast/src/lib.rs @@ -447,14 +447,17 @@ pub mod kw { custom_keyword!(nan_canonical = "nan:canonical"); custom_keyword!(nofunc); custom_keyword!(noextern); + custom_keyword!(noexn); custom_keyword!(none); custom_keyword!(null); custom_keyword!(nullfuncref); custom_keyword!(nullexternref); + custom_keyword!(nullexnref); custom_keyword!(nullref); custom_keyword!(offset); custom_keyword!(outer); custom_keyword!(own); + custom_keyword!(pagesize); custom_keyword!(param); custom_keyword!(parent); custom_keyword!(passive); @@ -469,12 +472,14 @@ pub mod kw { custom_keyword!(ref_null = "ref.null"); custom_keyword!(register); custom_keyword!(rec); + custom_keyword!(acq_rel); custom_keyword!(rep); custom_keyword!(resource); custom_keyword!(resource_new = "resource.new"); custom_keyword!(resource_drop = "resource.drop"); custom_keyword!(resource_rep = "resource.rep"); custom_keyword!(result); + custom_keyword!(seq_cst); custom_keyword!(shared); custom_keyword!(start); custom_keyword!(sub); diff --git a/third_party/rust/wast/src/token.rs b/third_party/rust/wast/src/token.rs index 9dd15f97a8..b296341096 100644 --- a/third_party/rust/wast/src/token.rs +++ b/third_party/rust/wast/src/token.rs @@ -639,13 +639,13 @@ macro_rules! float { } float! { - Float32 => { + F32 => { bits: u32, float: f32, exponent_bits: 8, name: strtof, } - Float64 => { + F64 => { bits: u64, float: f64, exponent_bits: 11, @@ -677,6 +677,22 @@ impl Peek for LParen { } } +/// A convenience type to use with [`Parser::peek`](crate::parser::Parser::peek) +/// to see if the next token is the end of an s-expression. +pub struct RParen { + _priv: (), +} + +impl Peek for RParen { + fn peek(cursor: Cursor<'_>) -> Result<bool> { + cursor.peek_rparen() + } + + fn display() -> &'static str { + "right paren" + } +} + #[cfg(test)] mod tests { #[test] diff --git a/third_party/rust/wast/src/wast.rs b/third_party/rust/wast/src/wast.rs index 5e18f517d0..418bc83fc7 100644 --- a/third_party/rust/wast/src/wast.rs +++ b/third_party/rust/wast/src/wast.rs @@ -113,8 +113,7 @@ impl WastDirective<'_> { /// Returns the location in the source that this directive was defined at pub fn span(&self) -> Span { match self { - WastDirective::Wat(QuoteWat::Wat(Wat::Module(m))) => m.span, - WastDirective::Wat(QuoteWat::Wat(Wat::Component(c))) => c.span, + WastDirective::Wat(QuoteWat::Wat(w)) => w.span(), WastDirective::Wat(QuoteWat::QuoteModule(span, _)) => *span, WastDirective::Wat(QuoteWat::QuoteComponent(span, _)) => *span, WastDirective::AssertMalformed { span, .. } @@ -219,11 +218,23 @@ pub enum WastExecute<'a> { Invoke(WastInvoke<'a>), Wat(Wat<'a>), Get { + span: Span, module: Option<Id<'a>>, global: &'a str, }, } +impl<'a> WastExecute<'a> { + /// Returns the first span for this execute statement. + pub fn span(&self) -> Span { + match self { + WastExecute::Invoke(i) => i.span, + WastExecute::Wat(i) => i.span(), + WastExecute::Get { span, .. } => *span, + } + } +} + impl<'a> Parse<'a> for WastExecute<'a> { fn parse(parser: Parser<'a>) -> Result<Self> { let mut l = parser.lookahead1(); @@ -232,8 +243,9 @@ impl<'a> Parse<'a> for WastExecute<'a> { } else if l.peek::<kw::module>()? || l.peek::<kw::component>()? { Ok(WastExecute::Wat(parse_wat(parser)?)) } else if l.peek::<kw::get>()? { - parser.parse::<kw::get>()?; + let span = parser.parse::<kw::get>()?.0; Ok(WastExecute::Get { + span, module: parser.parse()?, global: parser.parse()?, }) @@ -296,28 +308,47 @@ impl QuoteWat<'_> { /// Encodes this module to bytes, either by encoding the module directly or /// parsing the contents and then encoding it. pub fn encode(&mut self) -> Result<Vec<u8>, Error> { + match self.to_test()? { + QuoteWatTest::Binary(bytes) => Ok(bytes), + QuoteWatTest::Text(text) => { + let text = std::str::from_utf8(&text).map_err(|_| { + let span = self.span(); + Error::new(span, "malformed UTF-8 encoding".to_string()) + })?; + let buf = ParseBuffer::new(&text)?; + let mut wat = parser::parse::<Wat<'_>>(&buf)?; + wat.encode() + } + } + } + + /// Converts this to either a `QuoteWatTest::Binary` or + /// `QuoteWatTest::Text` depending on what it is internally. + pub fn to_test(&mut self) -> Result<QuoteWatTest, Error> { let (source, prefix) = match self { - QuoteWat::Wat(m) => return m.encode(), + QuoteWat::Wat(m) => return m.encode().map(QuoteWatTest::Binary), QuoteWat::QuoteModule(_, source) => (source, None), QuoteWat::QuoteComponent(_, source) => (source, Some("(component")), }; - let mut ret = String::new(); - for (span, src) in source { - match std::str::from_utf8(src) { - Ok(s) => ret.push_str(s), - Err(_) => { - return Err(Error::new(*span, "malformed UTF-8 encoding".to_string())); - } - } - ret.push(' '); + let mut ret = Vec::new(); + for (_, src) in source { + ret.extend_from_slice(src); + ret.push(b' '); } if let Some(prefix) = prefix { - ret.insert_str(0, prefix); - ret.push(')'); + ret.splice(0..0, prefix.as_bytes().iter().copied()); + ret.push(b')'); + } + Ok(QuoteWatTest::Text(ret)) + } + + /// Returns the defining span of this module. + pub fn span(&self) -> Span { + match self { + QuoteWat::Wat(w) => w.span(), + QuoteWat::QuoteModule(span, _) => *span, + QuoteWat::QuoteComponent(span, _) => *span, } - let buf = ParseBuffer::new(&ret)?; - let mut wat = parser::parse::<Wat<'_>>(&buf)?; - wat.encode() } } @@ -345,6 +376,14 @@ impl<'a> Parse<'a> for QuoteWat<'a> { } } +/// Returned from [`QuoteWat::to_test`]. +#[allow(missing_docs)] +#[derive(Debug)] +pub enum QuoteWatTest { + Binary(Vec<u8>), + Text(Vec<u8>), +} + #[derive(Debug)] #[allow(missing_docs)] pub enum WastArg<'a> { diff --git a/third_party/rust/wast/src/wat.rs b/third_party/rust/wast/src/wat.rs index 6d9a233359..d4982264fa 100644 --- a/third_party/rust/wast/src/wat.rs +++ b/third_party/rust/wast/src/wat.rs @@ -32,6 +32,14 @@ impl Wat<'_> { Wat::Component(c) => c.encode(), } } + + /// Returns the defining span of this file. + pub fn span(&self) -> Span { + match self { + Wat::Module(m) => m.span, + Wat::Component(c) => c.span, + } + } } impl<'a> Parse<'a> for Wat<'a> { diff --git a/third_party/rust/wast/tests/parse-fail.rs b/third_party/rust/wast/tests/parse-fail.rs index 3ae1817a4a..a8d4f34456 100644 --- a/third_party/rust/wast/tests/parse-fail.rs +++ b/third_party/rust/wast/tests/parse-fail.rs @@ -4,46 +4,28 @@ //! Use `BLESS=1` in the environment to auto-update `*.err` files. Be sure to //! look at the diff! -use rayon::prelude::*; +use libtest_mimic::{Arguments, Trial}; use std::env; use std::path::{Path, PathBuf}; fn main() { let mut tests = Vec::new(); find_tests("tests/parse-fail".as_ref(), &mut tests); - let filter = std::env::args().nth(1); - let bless = env::var("BLESS").is_ok(); - let tests = tests - .iter() - .filter(|test| { - if let Some(filter) = &filter { - if let Some(s) = test.file_name().and_then(|s| s.to_str()) { - if !s.contains(filter) { - return false; - } - } - } - true - }) - .collect::<Vec<_>>(); - - println!("running {} tests\n", tests.len()); - - let errors = tests - .par_iter() - .filter_map(|test| run_test(test, bless).err()) - .collect::<Vec<_>>(); - if !errors.is_empty() { - for msg in errors.iter() { - eprintln!("{}", msg); - } - - panic!("{} tests failed", errors.len()) + let mut trials = Vec::new(); + for test in tests { + let trial = Trial::test(format!("{test:?}"), move || { + run_test(&test, bless).map_err(|e| format!("{e:?}").into()) + }); + trials.push(trial); } - println!("test result: ok. {} passed\n", tests.len()); + let mut args = Arguments::from_args(); + if cfg!(target_family = "wasm") && !cfg!(target_feature = "atomics") { + args.test_threads = Some(1); + } + libtest_mimic::run(&args, trials).exit(); } fn run_test(test: &Path, bless: bool) -> anyhow::Result<()> { |