diff options
author | Eduardo Julian | 2019-08-20 22:00:59 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-08-20 22:00:59 -0400 |
commit | 59ededb795732e04ac8e1eaceb2b1509a1c1cc23 (patch) | |
tree | c0498fbae7cd18fa9434c972a6f7e35d0e02b456 /new-luxc/source/luxc/lang/translation/jvm/structure.lux | |
parent | cdfda2f80b2abd8ec7d8021aab910ccc82271ade (diff) |
WIP: Make new-luxc instructions rely on the Descriptor type.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/structure.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/structure.lux | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/structure.lux b/new-luxc/source/luxc/lang/translation/jvm/structure.lux index 5e721f65a..92bf41256 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/structure.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/structure.lux @@ -13,6 +13,7 @@ ["." list]]] [target [jvm + ["." descriptor] ["$t" type (#+ Type)]]] [tool [compiler @@ -23,14 +24,13 @@ [host [jvm (#+ Inst Operation Phase) ["_" inst]]]]] - ["." //]) + ["." // + ["#." runtime]]) (exception: #export (not-a-tuple {size Nat}) (ex.report ["Expected size" ">= 2"] ["Actual size" (%.nat size)])) -(def: $Object ($t.class "java.lang.Object" (list))) - (def: #export (tuple generate members) (-> Phase (List Synthesis) (Operation Inst)) (do phase.monad @@ -48,7 +48,7 @@ _.AASTORE))))) (:: @ map _.fuse))] (wrap (|>> (_.int (.int size)) - (_.array $Object) + (_.array //runtime.$Value) membersI)))) (def: (flagI right?) @@ -66,9 +66,8 @@ lefts))) (flagI right?) memberI - (_.INVOKESTATIC //.runtime-class + (_.INVOKESTATIC (descriptor.class //.runtime-class) "variant_make" - ($t.method (list $t.int $Object $Object) - (#.Some ($t.array 1 $Object)) - (list)) + (descriptor.method [(list //runtime.$Tag //runtime.$Flag //runtime.$Value) + //.$Variant]) #0))))) |