From 30801bcf8fbb1be7ae8f193edfa71e6c4909a4c3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 18 Mar 2020 21:38:34 -0400 Subject: No passing the archive as a parameter to all phases. --- new-luxc/source/luxc/lang/translation/jvm/loop.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/loop.lux') 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 -- cgit v1.2.3