aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/function.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2017-11-01 13:36:15 -0400
committerEduardo Julian2017-11-01 13:36:15 -0400
commit88006e957373bbd72ec68897474303964885fc68 (patch)
treea34f88ea0921f56737c8881345245e11e7c8b546 /new-luxc/source/luxc/lang/translation/function.jvm.lux
parent012f6bd41e527479dddbccbdab10daa78fd9a0fd (diff)
- Minor refactorings.
- Fixed some bugs. - Enabled macro-expansion for statements.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/function.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/function.jvm.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/new-luxc/source/luxc/lang/translation/function.jvm.lux b/new-luxc/source/luxc/lang/translation/function.jvm.lux
index 35c88e4ed..ebdb28853 100644
--- a/new-luxc/source/luxc/lang/translation/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/function.jvm.lux
@@ -266,13 +266,13 @@
$i;ARETURN
))))
-(def: #export (with-function generate class env arity body)
+(def: #export (with-function translate class env arity body)
(-> (-> ls;Synthesis (Meta $;Inst))
Text (List Variable) ls;Arity ls;Synthesis
(Meta [$;Def $;Inst]))
(do meta;Monad<Meta>
[@begin $i;make-label
- bodyI (commonT;with-function class (generate body))
+ bodyI (commonT;with-function class (translate body))
#let [env-size (list;size env)
applyD (: $;Def
(if (poly-arg? arity)
@@ -295,13 +295,13 @@
instanceI (instance class arity env)]]
(wrap [functionD instanceI])))
-(def: #export (generate-function generate env arity body)
+(def: #export (translate-function translate env arity body)
(-> (-> ls;Synthesis (Meta $;Inst))
(List Variable) ls;Arity ls;Synthesis
(Meta $;Inst))
(do meta;Monad<Meta>
[function-class (:: @ map %code (meta;gensym "function"))
- [functionD instanceI] (with-function generate function-class env arity body)
+ [functionD instanceI] (with-function translate function-class env arity body)
_ (commonT;store-class function-class
($d;class #$;V1.6 #$;Public $;finalC
function-class (list)
@@ -316,13 +316,13 @@
(list pre)
(list& pre (segment size post)))))
-(def: #export (generate-call generate functionS argsS)
+(def: #export (translate-call translate functionS argsS)
(-> (-> ls;Synthesis (Meta $;Inst))
ls;Synthesis (List ls;Synthesis)
(Meta $;Inst))
(do meta;Monad<Meta>
- [functionI (generate functionS)
- argsI (monad;map @ generate argsS)
+ [functionI (translate functionS)
+ argsI (monad;map @ translate argsS)
#let [applyI (|> (segment runtimeT;num-apply-variants argsI)
(list/map (function [chunkI+]
(|>. ($i;CHECKCAST hostL;function-class)