diff options
| author | Eduardo Julian | 2018-07-29 02:30:13 -0400 |
|---|---|---|
| committer | Eduardo Julian | 2018-07-29 02:30:13 -0400 |
| commit | a59fc865aee240afe21b82ffef2681bb9a6ea693 (patch) | |
| tree | b5a2d95ffdec3edd2ecf7615c477ba522779d985 /new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux | |
| parent | 3b156dca7b4750e99bdd68b3858521e3fd6b3de5 (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.lux | 9 |
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)))) |
