Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
work
  • Loading branch information
kripken committed Feb 15, 2024
commit 29b34dbd81d1d90ecdf62c932f048fe5bcf00b53
20 changes: 15 additions & 5 deletions test/lit/passes/legalize-and-prune-js-interface.wast
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,21 @@

;; CHECK: (type $2 (func (result v128)))

;; CHECK: (type $3 (func (param i32)))
;; CHECK: (type $3 (func (result i32 i32)))

;; CHECK: (type $4 (func (param i32 i32) (result i32)))
;; CHECK: (type $4 (func (param i32)))

;; CHECK: (import "env" "setTempRet0" (func $setTempRet0 (type $3) (param i32)))
;; CHECK: (type $5 (func (param i32 i32) (result i32)))

;; CHECK: (import "env" "setTempRet0" (func $setTempRet0 (type $4) (param i32)))

;; CHECK: (export "export-64" (func $legalstub$export-64))

;; CHECK: (func $export-64 (type $0) (param $x i64) (result i64)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
(func $export-64 (export "export-64") (param $x i64) (result i64)
;; This can be legalized.
;; This can be legalized. Note we have two params, but that's no problem.
(unreachable)
)

Expand All @@ -157,12 +159,20 @@
;; This will be pruned.
(unreachable)
)

;; CHECK: (func $export-mv (type $3) (result i32 i32)
;; CHECK-NEXT: (unreachable)
;; CHECK-NEXT: )
(func $export-mv (export "export-mv") (result i32 i32)
;; This will be pruned.
(unreachable)
)
)

;; TODO exports
;; TODO: both import and export

;; CHECK: (func $legalstub$export-64 (type $4) (param $0 i32) (param $1 i32) (result i32)
;; CHECK: (func $legalstub$export-64 (type $5) (param $0 i32) (param $1 i32) (result i32)
;; CHECK-NEXT: (local $2 i64)
;; CHECK-NEXT: (local.set $2
;; CHECK-NEXT: (call $export-64
Expand Down