move var out of the recursive type definition

This commit is contained in:
zapashcanon 2023-07-30 19:45:23 +02:00
parent 5b8186490a
commit 57f090da8e
Signed by: zapashcanon
GPG Key ID: 8981C3C62D1D28F1
10 changed files with 24 additions and 14 deletions

View File

@ -384,6 +384,11 @@ let term t =
] )
] ) )
]
; [ ( Some "vars"
, ( Owi.Types.Final
, []
, Def_array_t (Var, Val_storage_t (Ref_type (No_null, Eq_ht))) ) )
]
; [ ( Some "set_of_closures"
, ( Owi.Types.Final
, []
@ -406,10 +411,6 @@ let term t =
( Var
, Val_storage_t (Ref_type (No_null, Def_ht (Symbolic "closure")))
) ) )
; ( Some "vars"
, ( Owi.Types.Final
, []
, Def_array_t (Var, Val_storage_t (Ref_type (No_null, Eq_ht))) ) )
; ( Some "closure"
, ( Owi.Types.Final
, []

View File

@ -75,12 +75,13 @@ a.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -57,12 +57,13 @@ b.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -59,12 +59,13 @@ c.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -22,12 +22,13 @@ d.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -15,12 +15,13 @@ e.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))
@ -36,6 +37,6 @@ e.flambda1:
(start $start)
)
***
/tmp/build_ad841e_dune/flambda_generated_b033ce.wast:24.8-24.28: syntax error: unknown label $exn_whosgonnastopme
/tmp/build_7aa54f_dune/flambda_generated_04aa5b.wast:25.8-25.28: syntax error: unknown label $exn_whosgonnastopme
Fatal error: exception Failure("error: wasmgc exited with code 1\n")
[2]

View File

@ -47,12 +47,13 @@ g.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -43,12 +43,13 @@ h.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -34,12 +34,13 @@ i.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))

View File

@ -54,12 +54,13 @@ w.flambda1:
(type $block (sub final (struct
(field i32)
(field (ref null $data)))))
(type $vars (sub final (array (mut eqref))))
(rec
(type $set_of_closures (sub final (struct
(field (mut (ref null $closures)))
(field (ref null $vars)))))
(type $closures (sub final (array (mut (ref $closure)))))
(type $vars (sub final (array (mut eqref))))
(type $closure (sub final (struct
(field (ref $mlfun))
(field (mut (ref null $set_of_closures)))))))