Skip to content

Commit

Permalink
make sure that the record has a cycles field
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreif committed Aug 13, 2024
1 parent 82f2049 commit a7d2874
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ir_passes/await.ml
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,10 @@ and c_exp' context exp k =
in
let cps_async =
cps_asyncE T.Fut typ1 (match par_opt with
| Some par -> optE par
| None -> primE ICCyclesPrim []) (typ exp1)
| Some par when T.(sub (typ par) (Obj (Object, [{ lab = "cycles"; typ = nat; src = empty_src}])))
-> optE par
| None -> primE ICCyclesPrim []
| Some _ -> nullE ()) (typ exp1)
(forall [tb] ([k_ret; k_fail; k_clean] -->*
(c_exp context' exp1 (ContVar k_ret)))) in
let k' = meta (typ cps_async)
Expand Down

0 comments on commit a7d2874

Please sign in to comment.