From 59ededb795732e04ac8e1eaceb2b1509a1c1cc23 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 20 Aug 2019 22:00:59 -0400 Subject: WIP: Make new-luxc instructions rely on the Descriptor type. --- new-luxc/source/luxc/lang/translation/jvm/structure.lux | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/structure.lux') 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))))) -- cgit v1.2.3