diff options
| author | Eduardo Julian | 2018-07-18 23:44:29 -0400 | 
|---|---|---|
| committer | Eduardo Julian | 2018-07-18 23:44:29 -0400 | 
| commit | 8b4f0ded7bddaa42cf432f74523bfd6aa1e76fed (patch) | |
| tree | 27840fac3765bf9f3411ca65dc1ef5d8de0b044b /new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux | |
| parent | c99909d6f03d9968cdd81c8a5c7e254372a3afcd (diff) | |
WIP: Fix new-luxc's JVM back-end.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux')
| -rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux | 46 | 
1 files changed, 24 insertions, 22 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux index 250b0db52..f1d639b72 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux @@ -1,29 +1,31 @@  (.module: -  lux -  (lux (control monad) -       (data text/format) -       [macro "macro/" Monad<Meta>]) -  (luxc ["&" lang] -        (lang [".L" host] -              (host ["$" jvm] -                    (jvm ["$i" inst] -                         ["$t" type])) -              ["la" analysis] -              ["ls" synthesis])) -  (// [".T" common])) +  [lux (#- i64) +   [control +    monad] +   [data +    [text +     format]] +   [language +    [compiler ("operation/" Monad<Operation>)]]] +  [luxc +   [lang +    [host +     [jvm (#+ Inst Operation) +      ["$i" inst] +      ["$t" type]]]]]) -(def: #export (translate-bit value) -  (-> Bit (Meta $.Inst)) -  (macro/wrap ($i.GETSTATIC "java.lang.Boolean" -                            (if value "TRUE" "FALSE") -                            ($t.class "java.lang.Boolean" (list))))) +(def: #export (bit value) +  (-> Bit (Operation Inst)) +  (operation/wrap ($i.GETSTATIC "java.lang.Boolean" +                                (if value "TRUE" "FALSE") +                                ($t.class "java.lang.Boolean" (list)))))  (do-template [<name> <type> <load> <wrap>]    [(def: #export (<name> value) -     (-> <type> (Meta $.Inst)) -     (macro/wrap (|>> (<load> value) <wrap>)))] +     (-> <type> (Operation Inst)) +     (operation/wrap (|>> (<load> value) <wrap>)))] -  [translate-i64  Int  $i.long   ($i.wrap #$.Long)] -  [translate-f64  Frac $i.double ($i.wrap #$.Double)] -  [translate-text Text $i.string id] +  [i64  Int  $i.long   ($i.wrap #jvm.Long)] +  [f64  Frac $i.double ($i.wrap #jvm.Double)] +  [text Text $i.string (<|)]    )  | 
