diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/function.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/function.lux | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/function.lux b/new-luxc/source/luxc/lang/translation/jvm/function.lux index 72c77f2a2..449855aca 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/function.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/function.lux @@ -32,7 +32,7 @@ ["." def] ["_" inst]]]]] ["." // - ["." runtime] + ["#." runtime] ["." reference]]) (def: arity-field Text "arity") @@ -61,7 +61,7 @@ (def: get-amount-of-partialsI Inst (|>> (_.ALOAD 0) - (_.GETFIELD //.$Function runtime.partials-field type.int))) + (_.GETFIELD //.$Function //runtime.partials-field type.int))) (def: (load-fieldI class field) (-> (Type Class) Text Inst) @@ -76,13 +76,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 //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)) function.identity)] (|>> (_.CHECKCAST //.$Function) (inputsI start max-args) - (_.INVOKEVIRTUAL //.$Function runtime.apply-method (runtime.apply-signature max-args)) + (_.INVOKEVIRTUAL //.$Function //runtime.apply-method (//runtime.apply-signature max-args)) later-applysI))) (def: (inc-intI by) @@ -243,7 +243,7 @@ _.ARETURN)) )))) _.fuse)] - (def.method #$.Public $.noneM runtime.apply-method (runtime.apply-signature apply-arity) + (def.method #$.Public $.noneM //runtime.apply-method (//runtime.apply-signature apply-arity) (|>> get-amount-of-partialsI (_.TABLESWITCH +0 (|> num-partials dec .int) @default @labels) @@ -272,12 +272,12 @@ (let [classD (type.class class (list)) applyD (: Def (if (poly-arg? arity) - (|> (n.min arity runtime.num-apply-variants) + (|> (n.min arity //runtime.num-apply-variants) (list.n/range 1) (list@map (with-apply classD env arity @begin bodyI)) (list& (with-implementation arity @begin bodyI)) def.fuse) - (def.method #$.Public $.strictM runtime.apply-method (runtime.apply-signature 1) + (def.method #$.Public $.strictM //runtime.apply-method (//runtime.apply-signature 1) (|>> (_.label @begin) bodyI _.ARETURN)))) @@ -297,10 +297,10 @@ (Generator Abstraction) (do phase.monad [@begin _.make-label - [function-class bodyI] (generation.with-context - (generation.with-anchor [@begin 1] - (generate archive bodyS))) - #let [function-class (//.class-name' function-class)] + [function-context bodyI] (generation.with-new-context + (generation.with-anchor [@begin 1] + (generate archive bodyS))) + #let [function-class (//runtime.class-name function-context)] [functionD instanceI] (with-function @begin function-class env arity bodyI) _ (generation.save! true ["" function-class] [function-class @@ -316,11 +316,11 @@ [functionI (generate archive functionS) argsI (monad.map @ (generate archive) argsS) #let [applyI (|> argsI - (list.split-all runtime.num-apply-variants) + (list.split-all //runtime.num-apply-variants) (list@map (.function (_ chunkI+) (|>> (_.CHECKCAST //.$Function) (_.fuse chunkI+) - (_.INVOKEVIRTUAL //.$Function runtime.apply-method (runtime.apply-signature (list.size chunkI+)))))) + (_.INVOKEVIRTUAL //.$Function //runtime.apply-method (//runtime.apply-signature (list.size chunkI+)))))) _.fuse)]] (wrap (|>> functionI applyI)))) |