diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/loop.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/loop.lux | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/loop.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.lux index a2c25e883..14b305843 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/loop.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/loop.lux @@ -20,7 +20,7 @@ [luxc [lang [host - [jvm (#+ Inst Operation Phase) + [jvm (#+ Inst Operation Phase Generator) ["_" inst]]]]] ["." //]) @@ -33,8 +33,8 @@ _ false)) -(def: #export (recur translate argsS) - (-> Phase (List Synthesis) (Operation Inst)) +(def: #export (recur translate archive argsS) + (Generator (List Synthesis)) (do phase.monad [[@begin start] generation.anchor #let [end (|> argsS list.size dec (n.+ start)) @@ -52,7 +52,7 @@ (: (Operation Inst) (if (invariant? register argS) (wrap function.identity) - (translate argS)))) + (translate archive argS)))) pairs) #let [storesI+ (list/map (function (_ [register argS]) (: Inst @@ -64,13 +64,13 @@ (_.fuse storesI+) (_.GOTO @begin))))) -(def: #export (scope translate [start initsS+ iterationS]) - (-> Phase [Nat (List Synthesis) Synthesis] (Operation Inst)) +(def: #export (scope translate archive [start initsS+ iterationS]) + (Generator [Nat (List Synthesis) Synthesis]) (do phase.monad [@begin _.make-label - initsI+ (monad.map @ translate initsS+) + initsI+ (monad.map @ (translate archive) initsS+) iterationI (generation.with-anchor [@begin start] - (translate iterationS)) + (translate archive iterationS)) #let [initializationI (|> (list.enumerate initsI+) (list/map (function (_ [register initI]) (|>> initI |