Skip to content

Commit 2af544d

Browse files
authored
Update to cranelift 0.58.0 and enable (but ignore) reference types and bulk memory tests (bytecodealliance#926)
* Update cranelift to 0.58.0 * Update `wasmprinter` dep to require 0.2.1 We already had it in the lock file, but this ensures we won't ever go back down. * Ensure that our error messages match `assert_invalid`'s The bulk of this work was done in bytecodealliance/wasmparser#186 but now we can test it at the `wasmtime` level as well. Fixes bytecodealliance#492 * Stop feeling guilty about not matching `assert_malformed` messages Remove the "TODO" and stop printing warning messages. These would just be busy work to implement, and getting all the messages the exact same relies on using the same structure as the spec interpreter's parser, which means that where you have a helper function and they don't, then things go wrong, and vice versa. Not worth it. Fixes bytecodealliance#492 * Enable (but ignore) the reference-types proposal tests * Match test suite directly, instead of roundabout starts/endswith * Enable (but ignore) bulk memory operations proposal test suite
1 parent d42560c commit 2af544d

File tree

16 files changed

+221
-111
lines changed

16 files changed

+221
-111
lines changed

Diff for: Cargo.lock

+71-52
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: build.rs

+22-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ fn main() -> anyhow::Result<()> {
4040
strategy,
4141
)
4242
.expect("generating tests");
43+
44+
test_directory(
45+
&mut out,
46+
"tests/spec_testsuite/proposals/reference-types",
47+
strategy,
48+
)
49+
.expect("generating tests");
50+
51+
test_directory(
52+
&mut out,
53+
"tests/spec_testsuite/proposals/bulk-memory-operations",
54+
strategy,
55+
)
56+
.expect("generating tests");
4357
} else {
4458
println!(
4559
"cargo:warning=The spec testsuite is disabled. To enable, run `git submodule \
@@ -145,8 +159,10 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
145159
match strategy {
146160
#[cfg(feature = "lightbeam")]
147161
"Lightbeam" => match (testsuite, testname) {
148-
(_, _) if testname.starts_with("simd") => return true,
149-
(_, _) if testsuite.ends_with("multi_value") => return true,
162+
("simd", _) => return true,
163+
("multi_value", _) => return true,
164+
("reference_types", _) => return true,
165+
("bulk_memory_operations", _) => return true,
150166
// Lightbeam doesn't support float arguments on the stack.
151167
("spec_testsuite", "call") => return true,
152168
_ => (),
@@ -163,6 +179,10 @@ fn ignore(testsuite: &str, testname: &str, strategy: &str) -> bool {
163179
("simd", "simd_load_extend") => return true, // FIXME Unsupported feature: proposed SIMD operator I16x8Load8x8S { memarg: MemoryImmediate { flags: 0, offset: 0 } }
164180
("simd", "simd_load_splat") => return true, // FIXME Unsupported feature: proposed SIMD operator V8x16LoadSplat { memarg: MemoryImmediate { flags: 0, offset: 0 } }
165181
("simd", "simd_splat") => return true, // FIXME Unsupported feature: proposed SIMD operator I8x16ShrS
182+
183+
("reference_types", _) => return true,
184+
("bulk_memory_operations", _) => return true,
185+
166186
_ => {}
167187
},
168188
_ => panic!("unrecognized strategy"),

0 commit comments

Comments
 (0)