diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/primitive.lux | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/primitive.lux b/new-luxc/source/luxc/lang/translation/jvm/primitive.lux index 85fed0a8e..6903b065d 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/primitive.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/primitive.lux @@ -2,6 +2,7 @@ [lux (#- i64) [target [jvm + ["." descriptor] ["$t" type]]] [tool [compiler @@ -12,11 +13,11 @@ ["." jvm (#+ Inst Operation) ["_" inst]]]]]) -(def: #export (bit value) +(def: #export bit (-> Bit (Operation Inst)) - (operation@wrap (_.GETSTATIC "java.lang.Boolean" - (if value "TRUE" "FALSE") - ($t.class "java.lang.Boolean" (list))))) + (let [Boolean (descriptor.class "java.lang.Boolean")] + (function (_ value) + (operation@wrap (_.GETSTATIC Boolean (if value "TRUE" "FALSE") Boolean))))) (template [<name> <type> <load> <wrap>] [(def: #export (<name> value) @@ -24,7 +25,7 @@ (let [loadI (|> value <load>)] (operation@wrap (|>> loadI <wrap>))))] - [i64 (I64 Any) (<| _.long .int) (_.wrap #$t.Long)] - [f64 Frac _.double (_.wrap #$t.Double)] + [i64 (I64 Any) (<| _.long .int) (_.wrap descriptor.long)] + [f64 Frac _.double (_.wrap descriptor.double)] [text Text _.string (<|)] ) |