|
45 | 45 | ) |
46 | 46 | ) |
47 | 47 |
|
| 48 | +;; A chain of continuations. During merging here we map types that are being |
| 49 | +;; rebuilt, and should not error while doing so. We can merge the function |
| 50 | +;; types, and all but two of the continuations. |
| 51 | +(module |
| 52 | + (rec |
| 53 | + ;; CHECK: (rec |
| 54 | + ;; CHECK-NEXT: (type $func (sub (func))) |
| 55 | + (type $func (sub (func))) |
| 56 | + ;; CHECK: (type $cont (sub (cont $func))) |
| 57 | + (type $cont (sub (cont $func))) |
| 58 | + (type $contB (sub $cont (cont $func))) |
| 59 | + (type $contC (sub $contB (cont $func))) |
| 60 | + (type $funcB (sub $func (func))) |
| 61 | + ;; CHECK: (type $contD (sub final $cont (cont $func))) |
| 62 | + (type $contD (sub final $contC (cont $funcB))) |
| 63 | + ) |
| 64 | + |
| 65 | + ;; CHECK: (type $3 (func)) |
| 66 | + |
| 67 | + ;; CHECK: (func $uses (type $3) |
| 68 | + ;; CHECK-NEXT: (local $func (ref $func)) |
| 69 | + ;; CHECK-NEXT: (local $funcB (ref $func)) |
| 70 | + ;; CHECK-NEXT: (local $cont (ref $cont)) |
| 71 | + ;; CHECK-NEXT: (local $contB (ref $cont)) |
| 72 | + ;; CHECK-NEXT: (local $contC (ref $cont)) |
| 73 | + ;; CHECK-NEXT: (local $contD (ref $contD)) |
| 74 | + ;; CHECK-NEXT: ) |
| 75 | + (func $uses |
| 76 | + (local $func (ref $func)) |
| 77 | + (local $funcB (ref $funcB)) |
| 78 | + (local $cont (ref $cont)) |
| 79 | + (local $contB (ref $contB)) |
| 80 | + (local $contC (ref $contC)) |
| 81 | + (local $contD (ref $contD)) |
| 82 | + ) |
| 83 | +) |
| 84 | + |
0 commit comments