Skip to content

Commit ff41b36

Browse files
Fix test
1 parent 96ea564 commit ff41b36

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/ir/child-typer.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@ template<typename Subtype> struct ChildTyper : OverriddenVisitor<Subtype> {
10181018
note(&curr->ref, Type(*ht, Nullable));
10191019
auto type = fields[curr->index].type;
10201020
auto expectedType = type;
1021+
// TODO: assertion for f32 / f64?
10211022
if (expectedType.isRef()) {
10221023
expectedType =
10231024
Type(HeapTypes::eq.getBasic(type.getHeapType().getShared()), Nullable);

‎src/wasm/wasm-ir-builder.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,6 +2352,7 @@ Result<> IRBuilder::makeStructWait(HeapType type, Index index) {
23522352
}
23532353

23542354
StructWait curr(wasm.allocator);
2355+
curr.index = index;
23552356
CHECK_ERR(ChildPopper{*this}.visitStructWait(&curr, type));
23562357
CHECK_ERR(validateTypeAnnotation(type, curr.ref));
23572358
push(builder.makeStructWait(

‎test/spec/waitqueue.wast‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
(assert_return (invoke "struct.wait_i64" (i64.const 1) (i64.const 100)) (i32.const 1))
129129
(assert_return (invoke "struct.wait_i64" (i64.const 0) (i64.const 0)) (i32.const 2))
130130

131-
(assert_return (invoke "struct.wait_ref" (ref.i31 (i32.const 0)) (i64.const 100)) (i32.const 1))
131+
(assert_return (invoke "struct.wait_ref" (ref.i31_shared (i32.const 0)) (i64.const 100)) (i32.const 1))
132132
(assert_return (invoke "struct.wait_ref" (ref.null (shared eq)) (i64.const 0)) (i32.const 2))
133133

134134
;; Try to wake up 1 thread, but no-one was waiting.

0 commit comments

Comments
 (0)