-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,23 @@ | |
(module quote "(table shared i64 (ref null (shared func)) (elem (ref.null (shared func))))") | ||
"expected a u64") | ||
|
||
;; A shared table must be initialized from shared objects. | ||
(module | ||
(type $f (shared (func))) | ||
(global $g (shared (ref null $f)) (ref.null $f)) | ||
(table $t shared 1 (ref null $f)) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
(elem (ref null $f) (global.get $g)) | ||
) | ||
(assert_invalid | ||
(module | ||
(type $f (shared (func))) | ||
(global $g (ref null $f) (ref.null $f)) | ||
(table $t shared 1 (ref null $f)) | ||
;; When we initialize a shared element, everything must be shared, including | ||
;; the used global. | ||
This comment has been minimized.
Sorry, something went wrong.
rossberg
Member
|
||
(elem (ref null $f) (global.get $g))) | ||
"invalid type") | ||
|
||
;; Check `table.atomic.*` instructions. | ||
(module (;eq;) | ||
(table $a (import "spectest" "table_eq") shared 1 (ref null (shared eq))) | ||
|
The element segment is passive, so this table is unused (same below).