Explicit exit continuation's name

This commit is contained in:
Théophile Bastian 2018-02-15 22:02:04 +01:00
parent 2643118045
commit 6c5580d550

View file

@ -69,6 +69,6 @@ let rec cps_term_inner (t: S.term) (cont: T.variable) (nameHint: string option)
let cps_term (t: S.term): T.term = let cps_term (t: S.term): T.term =
(** Entry point. Transforms a [Lambda] term into a [Tail] term, applying a (** Entry point. Transforms a [Lambda] term into a [Tail] term, applying a
* continuation-passing-style transformation. *) * continuation-passing-style transformation. *)
let exitBlock = freshBlockVar () in let exitBlock = freshBlockVarHinted (Some "exit") in
letCont exitBlock (freshVar ()) T.Exit @@ letCont exitBlock (freshVar ()) T.Exit @@
cps_term_inner t exitBlock (Some "main_entry") cps_term_inner t exitBlock (Some "main_entry")