aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/reference.jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/reference.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/reference.jvm.lux8
1 files changed, 5 insertions, 3 deletions
diff --git a/new-luxc/source/luxc/lang/translation/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/reference.jvm.lux
index da86dd5b9..57336f27c 100644
--- a/new-luxc/source/luxc/lang/translation/reference.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/reference.jvm.lux
@@ -1,9 +1,11 @@
(;module:
lux
(lux (control [monad #+ do])
- (data text/format)
+ (data [text]
+ text/format)
[meta "meta/" Monad<Meta>])
(luxc ["&" base]
+ [";L" host]
(host ["$" jvm]
(jvm ["$t" type]
["$i" inst]))
@@ -15,9 +17,9 @@
(def: #export (translate-captured variable)
(-> Variable (Meta $;Inst))
(do meta;Monad<Meta>
- [function-class commonT;function]
+ [function-class hostL;context]
(wrap (|>. ($i;ALOAD +0)
- ($i;GETFIELD function-class
+ ($i;GETFIELD (text;replace-all "/+" "$" function-class)
(|> variable i.inc (i.* -1) int-to-nat functionT;captured)
commonT;$Object)))))