-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix direct comparisons with unshared basic heap types (#6845)
Audit the remaining ocurrences of `== HeapType::` and fix those that did not handle shared types correctly. Add tests for some of the fixes; others are NFC but clarify the code.
- Loading branch information
Showing
8 changed files
with
152 additions
and
30 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
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,36 @@ | ||
;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. | ||
;; RUN: wasm-opt %s -all --precompute -S -o - | filecheck %s | ||
|
||
(module | ||
;; CHECK: (type $0 (func (result funcref))) | ||
|
||
;; CHECK: (type $shared-func (shared (func (result (ref null (shared func)))))) | ||
(type $shared-func (shared (func (result (ref null (shared func)))))) | ||
;; CHECK: (elem declare func $test $test-shared) | ||
|
||
;; CHECK: (func $test (type $0) (result funcref) | ||
;; CHECK-NEXT: (return | ||
;; CHECK-NEXT: (ref.func $test) | ||
;; CHECK-NEXT: ) | ||
;; CHECK-NEXT: ) | ||
(func $test (result funcref) | ||
(block | ||
(return | ||
(ref.func $test) | ||
) | ||
) | ||
) | ||
|
||
;; CHECK: (func $test-shared (type $shared-func) (result (ref null (shared func))) | ||
;; CHECK-NEXT: (return | ||
;; CHECK-NEXT: (ref.func $test-shared) | ||
;; CHECK-NEXT: ) | ||
;; CHECK-NEXT: ) | ||
(func $test-shared (type $shared-func) | ||
(block | ||
(return | ||
(ref.func $test-shared) | ||
) | ||
) | ||
) | ||
) |