diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/generator/function.jvm.lux | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/new-luxc/source/luxc/generator/function.jvm.lux b/new-luxc/source/luxc/generator/function.jvm.lux index 1b0939856..ed90d3aa2 100644 --- a/new-luxc/source/luxc/generator/function.jvm.lux +++ b/new-luxc/source/luxc/generator/function.jvm.lux @@ -11,10 +11,10 @@ ["$d" def] ["$i" inst])) (lang ["la" analysis] - ["ls" synthesis]) + ["ls" synthesis] + [";L" variable #+ Variable]) ["&;" analyser] ["&;" synthesizer] - (synthesizer [function]) (generator ["&;" common] ["&;" runtime]))) @@ -40,11 +40,11 @@ ($t;method (list) (#;Some ($t;class class (list))) (list))) (def: (captured-args env) - (-> (List ls;Variable) (List $;Type)) + (-> (List Variable) (List $;Type)) (list;repeat (list;size env) $Object)) (def: (init-method env arity) - (-> (List ls;Variable) ls;Arity $;Method) + (-> (List Variable) ls;Arity $;Method) (if (poly-arg? arity) ($t;method (list;concat (list (captured-args env) (list $t;int) @@ -95,7 +95,7 @@ $i;fuse)) (def: (with-captured env) - (-> (List ls;Variable) $;Def) + (-> (List Variable) $;Def) (|> (list;enumerate env) (list/map (function [[env-idx env-source]] ($d;field #$;Private $;finalF (captured env-idx) $Object))) @@ -111,11 +111,11 @@ id)) (def: (instance class arity env) - (-> Text ls;Arity (List ls;Variable) $;Inst) + (-> Text ls;Arity (List Variable) $;Inst) (let [captureI (|> env (list/map (function [source] - (if (function;captured? source) - ($i;GETFIELD class (captured (function;captured-idx source)) $Object) + (if (variableL;captured? source) + ($i;GETFIELD class (captured (variableL;captured-register source)) $Object) ($i;ALOAD (int-to-nat source))))) $i;fuse) argsI (if (poly-arg? arity) @@ -130,7 +130,7 @@ ($i;INVOKESPECIAL class "<init>" (init-method env arity) false)))) (def: (with-reset class arity env) - (-> Text ls;Arity (List ls;Variable) $;Def) + (-> Text ls;Arity (List Variable) $;Def) ($d;method #$;Public $;noneM "reset" (reset-method class) (if (poly-arg? arity) (let [env-size (list;size env) @@ -173,7 +173,7 @@ ($i;INVOKESPECIAL hostL;function-class "<init>" function-init-method false)))) (def: (with-init class env arity) - (-> Text (List ls;Variable) ls;Arity $;Def) + (-> Text (List Variable) ls;Arity $;Def) (let [env-size (list;size env) offset-partial (: (-> Nat Nat) (|>. n.inc (n.+ env-size))) @@ -202,7 +202,7 @@ $i;RETURN)))) (def: (with-apply class env function-arity @begin bodyI apply-arity) - (-> Text (List ls;Variable) ls;Arity $;Label $;Inst ls;Arity + (-> Text (List Variable) ls;Arity $;Label $;Inst ls;Arity $;Def) (let [num-partials (n.dec function-arity) @default ($;new-label []) @@ -270,7 +270,7 @@ (def: #export (with-function generate class env arity body) (-> (-> ls;Synthesis (Meta $;Inst)) - Text (List ls;Variable) ls;Arity ls;Synthesis + Text (List Variable) ls;Arity ls;Synthesis (Meta [$;Def $;Inst])) (do meta;Monad<Meta> [@begin $i;make-label @@ -299,7 +299,7 @@ (def: #export (generate-function generate env arity body) (-> (-> ls;Synthesis (Meta $;Inst)) - (List ls;Variable) ls;Arity ls;Synthesis + (List Variable) ls;Arity ls;Synthesis (Meta $;Inst)) (do meta;Monad<Meta> [function-class (:: @ map %code (meta;gensym "function")) |