-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasmparser: Implement missing WasmFeatures configs (#482)
* implement missing WasmFeatures configs The following Wasm proposals are now covered by the WasmFeatures type: - saturating_float_to_int - sign_extension - mutable_global All enabled by default. * wasm-shrink: add missing fields to WasmFeatures * fuzz_targets: add missing fields to WasmFeatures * add missing WasmFeatures fields to benchmark.rs * fix Validator::export_section mutable-global check Now makes use of the already existing entity type check. * add missing-features smoke test for disabled sign-extension * remove unneeded .wast function identifiers * add smoke tests for disabled saturating-float-to-int conversions * add smoke test for disabled mutable-global
- Loading branch information
Showing
10 changed files
with
209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
(assert_invalid | ||
(module | ||
(import "m0" "g0" (global (mut i32))) | ||
) | ||
"mutable global support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(global $g0 (mut i32) (i32.const 0)) | ||
(export "g0" (global $g0)) | ||
) | ||
"mutable global support is not enabled" | ||
) |
79 changes: 79 additions & 0 deletions
79
tests/local/missing-features/saturating-float-to-int-disabled.wast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
(assert_invalid | ||
(module | ||
(func (param f32) (result i32) | ||
local.get 0 | ||
i32.trunc_sat_f32_s | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f32) (result i32) | ||
local.get 0 | ||
i32.trunc_sat_f32_u | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f64) (result i32) | ||
local.get 0 | ||
i32.trunc_sat_f64_s | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f64) (result i32) | ||
local.get 0 | ||
i32.trunc_sat_f64_u | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f32) (result i64) | ||
local.get 0 | ||
i64.trunc_sat_f32_s | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f32) (result i64) | ||
local.get 0 | ||
i64.trunc_sat_f32_u | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f64) (result i64) | ||
local.get 0 | ||
i64.trunc_sat_f64_s | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param f64) (result i64) | ||
local.get 0 | ||
i64.trunc_sat_f64_u | ||
) | ||
) | ||
"saturating float to int conversions support is not enabled" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
(assert_invalid | ||
(module | ||
(func (param i32) (result i32) | ||
local.get 0 | ||
i32.extend8_s | ||
) | ||
) | ||
"sign extension operations support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param i32) (result i32) | ||
local.get 0 | ||
i32.extend16_s | ||
) | ||
) | ||
"sign extension operations support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param i64) (result i64) | ||
local.get 0 | ||
i64.extend8_s | ||
) | ||
) | ||
"sign extension operations support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param i64) (result i64) | ||
local.get 0 | ||
i64.extend16_s | ||
) | ||
) | ||
"sign extension operations support is not enabled" | ||
) | ||
|
||
(assert_invalid | ||
(module | ||
(func (param i64) (result i64) | ||
local.get 0 | ||
i64.extend32_s | ||
) | ||
) | ||
"sign extension operations support is not enabled" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters