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/function.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/function.lux') diff --git a/new-luxc/source/luxc/lang/translation/jvm/function.lux b/new-luxc/source/luxc/lang/translation/jvm/function.lux index ec5d9c61f..72c77f2a2 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/function.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/function.lux @@ -28,7 +28,7 @@ [luxc [lang [host - ["$" jvm (#+ Label Inst Def Operation Phase) + ["$" jvm (#+ Label Inst Def Operation Phase Generator) ["." def] ["_" inst]]]]] ["." // @@ -293,13 +293,13 @@ [instanceI (instance classD arity env)] (wrap [functionD instanceI])))) -(def: #export (function generate [env arity bodyS]) - (-> Phase Abstraction (Operation Inst)) +(def: #export (function generate archive [env arity bodyS]) + (Generator Abstraction) (do phase.monad [@begin _.make-label [function-class bodyI] (generation.with-context (generation.with-anchor [@begin 1] - (generate bodyS))) + (generate archive bodyS))) #let [function-class (//.class-name' function-class)] [functionD instanceI] (with-function @begin function-class env arity bodyI) _ (generation.save! true ["" function-class] @@ -310,11 +310,11 @@ functionD)])] (wrap instanceI))) -(def: #export (call generate [functionS argsS]) - (-> Phase Apply (Operation Inst)) +(def: #export (call generate archive [functionS argsS]) + (Generator Apply) (do phase.monad - [functionI (generate functionS) - argsI (monad.map @ generate argsS) + [functionI (generate archive functionS) + argsI (monad.map @ (generate archive) argsS) #let [applyI (|> argsI (list.split-all runtime.num-apply-variants) (list@map (.function (_ chunkI+) -- cgit v1.2.3