From 88006e957373bbd72ec68897474303964885fc68 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Nov 2017 13:36:15 -0400 Subject: - Minor refactorings. - Fixed some bugs. - Enabled macro-expansion for statements. --- new-luxc/source/luxc/lang/translation/runtime.jvm.lux | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/runtime.jvm.lux') diff --git a/new-luxc/source/luxc/lang/translation/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/runtime.jvm.lux index e5d237fc7..0a330ab73 100644 --- a/new-luxc/source/luxc/lang/translation/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/runtime.jvm.lux @@ -449,7 +449,7 @@ $i;ARETURN) update-tagI (|>. $i;ISUB ($i;ISTORE +1)) update-variantI (|>. ($i;ALOAD +0) datumI ($i;CHECKCAST ($t;descriptor $Variant)) ($i;ASTORE +0)) - wrongI (|>. $i;NULL $i;ARETURN) + failureI (|>. $i;NULL $i;ARETURN) return-datumI (|>. ($i;ALOAD +0) datumI $i;ARETURN)]) (|>. ($i;label @begin) ($i;ILOAD +1) ## tag @@ -458,7 +458,7 @@ $i;DUP2 ($i;IF_ICMPGT @further) $i;DUP2 ($i;IF_ICMPLT @shorten) ## $i;POP2 - wrongI + failureI ($i;label @then) ## tag, sumT ($i;ALOAD +2) ## tag, sumT, wants-last? ($i;ALOAD +0) flagI ## tag, sumT, wants-last?, is-last? @@ -478,7 +478,7 @@ shortenI ($i;label @wrong) ## tag, sumT ## $i;POP2 - wrongI))) + failureI))) ($d;method #$;Public $;staticM "pm_left" ($t;method (list $Tuple $t;int) (#;Some $Object) (list)) (<| $i;with-label (function [@begin]) $i;with-label (function [@not-recursive]) @@ -555,7 +555,7 @@ $i;ARETURN))) ))) -(def: generate-runtime +(def: translate-runtime (Meta commonT;Bytecode) (do meta;Monad [_ (wrap []) @@ -569,7 +569,7 @@ _ (commonT;store-class hostL;runtime-class bytecode)] (wrap bytecode))) -(def: generate-function +(def: translate-function (Meta commonT;Bytecode) (do meta;Monad [_ (wrap []) @@ -600,9 +600,9 @@ _ (commonT;store-class hostL;function-class bytecode)] (wrap bytecode))) -(def: #export generate +(def: #export translate (Meta [commonT;Bytecode commonT;Bytecode]) (do meta;Monad - [runtime-bc generate-runtime - function-bc generate-function] + [runtime-bc translate-runtime + function-bc translate-function] (wrap [runtime-bc function-bc]))) -- cgit v1.2.3