Skip to content

Commit

Permalink
apply more suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
gkgoat1 committed Dec 23, 2024
1 parent f02138f commit 40f1ad1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/passes/Asyncify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,9 @@ struct Asyncify : public Pass {
break;
}
}
if (!asyncifyMemory) {
Fatal() << "Please specify which of the multiple memories to use, with --pass-arg=asyncify-memory@memory";
}
}
}
pointerType =
Expand Down
20 changes: 12 additions & 8 deletions test/lit/passes/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
;; CHECK: (global $__asyncify_state (mut i32) (i32.const 0))

;; CHECK: (global $__asyncify_data (mut i32) (i32.const 0))

;; CHECK: (memory $unused0 1 1)
(memory $unused0 (export "unused0") 1 1)
;; CHECK: (memory $mem 1 1)
(memory $mem (export "memory") 1 1)
;; CHECK: (memory $ignore 1 1)
(memory $ignore (export "unused") 1 1)
)
;; CHECK: (export "unused0" (memory $unused0))

;; CHECK: (export "memory" (memory $mem))

;; CHECK: (export "unused" (memory $ignore))
Expand All @@ -42,10 +46,10 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.gt_u
;; CHECK-NEXT: (i32.load $mem
;; CHECK-NEXT: (i32.load $unused0
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.load $mem offset=4
;; CHECK-NEXT: (i32.load $unused0 offset=4
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand All @@ -59,10 +63,10 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.gt_u
;; CHECK-NEXT: (i32.load $mem
;; CHECK-NEXT: (i32.load $unused0
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.load $mem offset=4
;; CHECK-NEXT: (i32.load $unused0 offset=4
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand All @@ -79,10 +83,10 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.gt_u
;; CHECK-NEXT: (i32.load $mem
;; CHECK-NEXT: (i32.load $unused0
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.load $mem offset=4
;; CHECK-NEXT: (i32.load $unused0 offset=4
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand All @@ -96,10 +100,10 @@
;; CHECK-NEXT: )
;; CHECK-NEXT: (if
;; CHECK-NEXT: (i32.gt_u
;; CHECK-NEXT: (i32.load $mem
;; CHECK-NEXT: (i32.load $unused0
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: (i32.load $mem offset=4
;; CHECK-NEXT: (i32.load $unused0 offset=4
;; CHECK-NEXT: (global.get $__asyncify_data)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
Expand Down

0 comments on commit 40f1ad1

Please sign in to comment.