aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-07-29 02:30:13 -0400
committerEduardo Julian2018-07-29 02:30:13 -0400
commita59fc865aee240afe21b82ffef2681bb9a6ea693 (patch)
treeb5a2d95ffdec3edd2ecf7615c477ba522779d985 /new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux
parent3b156dca7b4750e99bdd68b3858521e3fd6b3de5 (diff)
Adapted new-luxc to some of the latest changes to Lux.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux9
1 files changed, 5 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux
index ba606a437..2268b3ba2 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux
@@ -3,7 +3,7 @@
[control
[monad (#+ do)]]
[data
- [text ("text/." Hash<Text>)
+ [text
format]]
[compiler
[default
@@ -32,7 +32,7 @@
(-> Register (Operation Inst))
(do phase.Monad<Operation>
[function-class translation.context]
- (wrap (|>> (_.ALOAD +0)
+ (wrap (|>> (_.ALOAD 0)
(_.GETFIELD function-class
(|> variable .nat foreign-name)
//.$Object)))))
@@ -50,7 +50,8 @@
(#reference.Foreign variable)
(foreign variable)))
-(def: #export (constant [module short])
+(def: #export (constant name)
(-> Name (Operation Inst))
- (let [bytecode-name (format module "/" (name.normalize short) (%n (text/hash short)))]
+ (do phase.Monad<Operation>
+ [bytecode-name (translation.remember name)]
(operation/wrap (_.GETSTATIC bytecode-name //.value-field //.$Object))))