diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/function.jvm.lux (renamed from new-luxc/source/luxc/generator/function.jvm.lux) | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/generator/function.jvm.lux b/new-luxc/source/luxc/lang/translation/function.jvm.lux index 310f4d7a0..35c88e4ed 100644 --- a/new-luxc/source/luxc/generator/function.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/function.jvm.lux @@ -12,9 +12,9 @@ ["$i" inst])) (lang ["la" analysis] ["ls" synthesis] - [";L" variable #+ Variable]) - (generator ["&;" common] - ["&;" runtime]))) + (translation [";T" common] + [";T" runtime]) + [";L" variable #+ Variable]))) (def: arity-field Text "arity") @@ -57,7 +57,7 @@ (def: get-amount-of-partialsI $;Inst (|>. ($i;ALOAD +0) - ($i;GETFIELD hostL;function-class &runtime;partials-field $t;int))) + ($i;GETFIELD hostL;function-class runtimeT;partials-field $t;int))) (def: (load-fieldI class field) (-> Text Text $;Inst) @@ -72,13 +72,13 @@ (def: (applysI start amount) (-> $;Register Nat $;Inst) - (let [max-args (n.min amount &runtime;num-apply-variants) - later-applysI (if (n.> &runtime;num-apply-variants amount) - (applysI (n.+ &runtime;num-apply-variants start) (n.- &runtime;num-apply-variants amount)) + (let [max-args (n.min amount runtimeT;num-apply-variants) + later-applysI (if (n.> runtimeT;num-apply-variants amount) + (applysI (n.+ runtimeT;num-apply-variants start) (n.- runtimeT;num-apply-variants amount)) id)] (|>. ($i;CHECKCAST hostL;function-class) (inputsI start max-args) - ($i;INVOKEVIRTUAL hostL;function-class &runtime;apply-method (&runtime;apply-signature max-args) false) + ($i;INVOKEVIRTUAL hostL;function-class runtimeT;apply-method (runtimeT;apply-signature max-args) false) later-applysI))) (def: (inc-intI by) @@ -256,7 +256,7 @@ $i;ARETURN)) )))) $i;fuse)] - ($d;method #$;Public $;noneM &runtime;apply-method (&runtime;apply-signature apply-arity) + ($d;method #$;Public $;noneM runtimeT;apply-method (runtimeT;apply-signature apply-arity) (|>. get-amount-of-partialsI ($i;TABLESWITCH 0 (|> num-partials n.dec nat-to-int) @default @labels) @@ -272,16 +272,16 @@ (Meta [$;Def $;Inst])) (do meta;Monad<Meta> [@begin $i;make-label - bodyI (&common;with-function class (generate body)) + bodyI (commonT;with-function class (generate body)) #let [env-size (list;size env) applyD (: $;Def (if (poly-arg? arity) - (|> (n.min arity &runtime;num-apply-variants) + (|> (n.min arity runtimeT;num-apply-variants) (list;n.range +1) (list/map (with-apply class env arity @begin bodyI)) (list& (with-implementation arity @begin bodyI)) $d;fuse) - ($d;method #$;Public $;strictM &runtime;apply-method (&runtime;apply-signature +1) + ($d;method #$;Public $;strictM runtimeT;apply-method (runtimeT;apply-signature +1) (|>. ($i;label @begin) bodyI $i;ARETURN)))) @@ -302,7 +302,7 @@ (do meta;Monad<Meta> [function-class (:: @ map %code (meta;gensym "function")) [functionD instanceI] (with-function generate function-class env arity body) - _ (&common;store-class function-class + _ (commonT;store-class function-class ($d;class #$;V1.6 #$;Public $;finalC function-class (list) ($;simple-class hostL;function-class) (list) @@ -323,11 +323,11 @@ (do meta;Monad<Meta> [functionI (generate functionS) argsI (monad;map @ generate argsS) - #let [applyI (|> (segment &runtime;num-apply-variants argsI) + #let [applyI (|> (segment runtimeT;num-apply-variants argsI) (list/map (function [chunkI+] (|>. ($i;CHECKCAST hostL;function-class) ($i;fuse chunkI+) - ($i;INVOKEVIRTUAL hostL;function-class &runtime;apply-method (&runtime;apply-signature (list;size chunkI+)) false)))) + ($i;INVOKEVIRTUAL hostL;function-class runtimeT;apply-method (runtimeT;apply-signature (list;size chunkI+)) false)))) $i;fuse)]] (wrap (|>. functionI applyI)))) |