summaryrefslogtreecommitdiff
path: root/test/lit/ctor-eval/gc-cycle-multi.wast
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-09-10 15:24:16 -0700
committerGitHub <noreply@github.com>2024-09-10 22:24:16 +0000
commit1a2d26f4092897f88f8fc60fc7a4dee2083ae531 (patch)
tree8cbf4ab801fef574ce1666b42aa296493dedba45 /test/lit/ctor-eval/gc-cycle-multi.wast
parentb0c955d4e5d1454dd9d6036d25ec9118146eee4c (diff)
downloadbinaryen-1a2d26f4092897f88f8fc60fc7a4dee2083ae531.tar.gz
binaryen-1a2d26f4092897f88f8fc60fc7a4dee2083ae531.tar.bz2
binaryen-1a2d26f4092897f88f8fc60fc7a4dee2083ae531.zip
Replace the old topological sort everywhere (#6902)
To avoid having two separate topological sort utilities in the code base, replace remaining uses of the old DFS-based, CRTP topological sort with the newer Kahn's algorithm implementation. This would be NFC, except that the new topological sort produces a different order than the old topological sort, so the output of some passes is reordered.
Diffstat (limited to 'test/lit/ctor-eval/gc-cycle-multi.wast')
-rw-r--r--test/lit/ctor-eval/gc-cycle-multi.wast27
1 files changed, 13 insertions, 14 deletions
diff --git a/test/lit/ctor-eval/gc-cycle-multi.wast b/test/lit/ctor-eval/gc-cycle-multi.wast
index 705b76f2f..070291432 100644
--- a/test/lit/ctor-eval/gc-cycle-multi.wast
+++ b/test/lit/ctor-eval/gc-cycle-multi.wast
@@ -13,27 +13,26 @@
;; CHECK: (type $2 (func (result i32)))
- ;; CHECK: (global $ctor-eval$global_8 (ref $A) (struct.new $A
+ ;; CHECK: (global $ctor-eval$global_6 (ref $A) (struct.new $A
;; CHECK-NEXT: (ref.null none)
- ;; CHECK-NEXT: (i32.const 30)
+ ;; CHECK-NEXT: (i32.const 10)
;; CHECK-NEXT: ))
- ;; CHECK: (global $c (mut (ref null $A)) (global.get $ctor-eval$global_8))
-
;; CHECK: (global $ctor-eval$global_7 (ref $A) (struct.new $A
;; CHECK-NEXT: (ref.null none)
- ;; CHECK-NEXT: (i32.const 10)
+ ;; CHECK-NEXT: (i32.const 20)
;; CHECK-NEXT: ))
- ;; CHECK: (global $a (mut (ref null $A)) (global.get $ctor-eval$global_7))
- (global $a (mut (ref null $A)) (ref.null $A))
- ;; CHECK: (global $ctor-eval$global_6 (ref $A) (struct.new $A
+ ;; CHECK: (global $ctor-eval$global_8 (ref $A) (struct.new $A
;; CHECK-NEXT: (ref.null none)
- ;; CHECK-NEXT: (i32.const 20)
+ ;; CHECK-NEXT: (i32.const 30)
;; CHECK-NEXT: ))
- ;; CHECK: (global $b (mut (ref null $A)) (global.get $ctor-eval$global_6))
+ ;; CHECK: (global $a (mut (ref null $A)) (global.get $ctor-eval$global_6))
+ (global $a (mut (ref null $A)) (ref.null $A))
+ ;; CHECK: (global $b (mut (ref null $A)) (global.get $ctor-eval$global_7))
(global $b (mut (ref null $A)) (ref.null $A))
+ ;; CHECK: (global $c (mut (ref null $A)) (global.get $ctor-eval$global_8))
(global $c (mut (ref null $A)) (ref.null $A))
(func $makeCycle (param $i i32) (result (ref $A))
@@ -118,16 +117,16 @@
)
;; CHECK: (func $start (type $1)
;; CHECK-NEXT: (struct.set $A 0
-;; CHECK-NEXT: (global.get $ctor-eval$global_8)
-;; CHECK-NEXT: (global.get $ctor-eval$global_8)
+;; CHECK-NEXT: (global.get $ctor-eval$global_6)
+;; CHECK-NEXT: (global.get $ctor-eval$global_6)
;; CHECK-NEXT: )
;; CHECK-NEXT: (struct.set $A 0
;; CHECK-NEXT: (global.get $ctor-eval$global_7)
;; CHECK-NEXT: (global.get $ctor-eval$global_7)
;; CHECK-NEXT: )
;; CHECK-NEXT: (struct.set $A 0
-;; CHECK-NEXT: (global.get $ctor-eval$global_6)
-;; CHECK-NEXT: (global.get $ctor-eval$global_6)
+;; CHECK-NEXT: (global.get $ctor-eval$global_8)
+;; CHECK-NEXT: (global.get $ctor-eval$global_8)
;; CHECK-NEXT: )
;; CHECK-NEXT: )