(module
(type $0 (struct (field i32)))
(type $1 (func (result i32)))
(func $0 (result i32)
(struct.atomic.get $0 0
(struct.new_default $0)
)
)
)
This validates with --enable-gc --enable-shared-everything --enable-reference-types: GC for structs, shared-all for the new atomic operation there, and references as a dependency of GC. However, adding --heap2local will cause an atomic.fence to be emitted, and that requires --enable-threads, so this errors:
$ wasm-opt w.wasm --enable-gc --enable-shared-everything --enable-reference-types --heap2local
[wasm-validator error in function 0] unexpected false: Atomic operations require threads [--enable-threads], on
(atomic.fence)
Fatal: error after opts
Should struct.atomic.* require --enable-threads? Or is this intentionally separate, and so we should avoid emitting atomic.fence here? @tlively
This validates with
--enable-gc --enable-shared-everything --enable-reference-types: GC for structs, shared-all for the new atomic operation there, and references as a dependency of GC. However, adding--heap2localwill cause anatomic.fenceto be emitted, and that requires--enable-threads, so this errors:Should
struct.atomic.*require--enable-threads? Or is this intentionally separate, and so we should avoid emittingatomic.fencehere? @tlively