diff options
author | Eduardo Julian | 2020-03-18 21:38:34 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-03-18 21:38:34 -0400 |
commit | 30801bcf8fbb1be7ae8f193edfa71e6c4909a4c3 (patch) | |
tree | d6f4f9335664f4d25c6c037e848d0743d211ff74 /new-luxc/source/luxc/lang/translation/jvm/function.lux | |
parent | 71c99d63a313d497c3881ab06752f05e3af33350 (diff) |
No passing the archive as a parameter to all phases.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/function.lux | 16 |
1 files changed, 8 insertions, 8 deletions
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+) |