Skip to content

Commit

Permalink
wasmparser: Enable the extended constant expressions proposal by defa…
Browse files Browse the repository at this point in the history
…ult (#1524)

It is phase 4, so let's enable it by default.
  • Loading branch information
fitzgen authored May 2, 2024
1 parent 755abb6 commit 5636e57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/wasmparser/src/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ define_wasm_features! {
/// The WebAssembly memory64 proposal.
pub memory64: MEMORY64(1 << 14) = false;
/// The WebAssembly extended_const proposal.
pub extended_const: EXTENDED_CONST(1 << 15) = false;
pub extended_const: EXTENDED_CONST(1 << 15) = true;
/// The WebAssembly component model proposal.
pub component_model: COMPONENT_MODEL(1 << 16) = true;
/// The WebAssembly typed function references proposal.
Expand Down
1 change: 1 addition & 0 deletions tests/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ fn error_matches(error: &str, message: &str) -> bool {
|| message == "malformed annotation id"
|| message == "alignment must be a power of two"
|| message == "i32 constant out of range"
|| message == "constant expression required"
{
return error.contains("expected ")
|| error.contains("constant out of range")
Expand Down

0 comments on commit 5636e57

Please sign in to comment.