-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a flag to opt in to the old WAT parser (#6536)
This flag is intended to help users gracefully migrate to the new wat parser. It will be removed again not too long after the new wat parser is enabled by default in wasm-opt.
- Loading branch information
Showing
3 changed files
with
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
|
||
;; RUN: wasm-opt --deprecated-wat-parser -all %s -S -o - | filecheck %s | ||
|
||
(module | ||
;; CHECK: (type $0 (func (param i32))) | ||
|
||
;; CHECK: (type $1 (func (result i32))) | ||
|
||
;; CHECK: (import "env" "bad" (func $wrong (type $0) (param i32))) | ||
|
||
;; CHECK: (func $foo (type $1) (result i32) | ||
;; CHECK-NEXT: (i32.const 0) | ||
;; CHECK-NEXT: ) | ||
(func $foo (result i32) | ||
;; Non-standard block result format | ||
(block i32 | ||
(i32.const 0) | ||
) | ||
) | ||
|
||
;; Non-standard import after declared function | ||
(import $wrong "env" "bad" (param i32)) | ||
) |
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