From 012f6bd41e527479dddbccbdab10daa78fd9a0fd Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 1 Nov 2017 00:51:45 -0400 Subject: - Re-organized code-generation, and re-named it "translation". --- new-luxc/source/luxc/generator/reference.jvm.lux | 31 ------------------------ 1 file changed, 31 deletions(-) delete mode 100644 new-luxc/source/luxc/generator/reference.jvm.lux (limited to 'new-luxc/source/luxc/generator/reference.jvm.lux') diff --git a/new-luxc/source/luxc/generator/reference.jvm.lux b/new-luxc/source/luxc/generator/reference.jvm.lux deleted file mode 100644 index 9af511167..000000000 --- a/new-luxc/source/luxc/generator/reference.jvm.lux +++ /dev/null @@ -1,31 +0,0 @@ -(;module: - lux - (lux (control [monad #+ do]) - (data text/format) - [meta "meta/" Monad]) - (luxc ["&" base] - (host ["$" jvm] - (jvm ["$t" type] - ["$i" inst])) - (lang ["ls" synthesis] - [";L" variable #+ Variable]) - (generator [";G" common] - [";G" function]))) - -(def: #export (generate-captured variable) - (-> Variable (Meta $;Inst)) - (do meta;Monad - [function-class commonG;function] - (wrap (|>. ($i;ALOAD +0) - ($i;GETFIELD function-class - (|> variable i.inc (i.* -1) int-to-nat functionG;captured) - commonG;$Object))))) - -(def: #export (generate-variable variable) - (-> Variable (Meta $;Inst)) - (meta/wrap ($i;ALOAD (int-to-nat variable)))) - -(def: #export (generate-definition [def-module def-name]) - (-> Ident (Meta $;Inst)) - (let [bytecode-name (format def-module "/" (&;normalize-name def-name))] - (meta/wrap ($i;GETSTATIC bytecode-name commonG;value-field commonG;$Object)))) -- cgit v1.2.3