Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions src/passes/LegalizeJSInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ struct LegalizeAndPruneJSInterface : public LegalizeJSInterface {

// RefFunc types etc. need updating.
ReFinalize().run(getPassRunner(), module);
ReFinalize().runOnModuleCode(getPassRunner(), module);

// TODO: globals etc.
}
Expand Down
8 changes: 8 additions & 0 deletions test/lit/passes/legalize-and-prune-js-interface.wast
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@

;; CHECK: (import "env" "imported-64" (func $legalimport$imported-64 (type $9) (param i32 f64) (result i32)))

;; CHECK: (global $global funcref (ref.func $imported-v128))
(global $global funcref
;; The ref target will turn from an import into an internal function. We'd
;; error if we do not update this ref.func while doing so, to make its type
;; exact.
(ref.func $imported-v128)
)

;; CHECK: (func $imported-v128 (type $0) (result v128)
;; CHECK-NEXT: (v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000)
;; CHECK-NEXT: )
Expand Down
Loading