From b63ac226cc2ea843f08f7c72b18d22602462c624 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 7 Sep 2019 01:50:37 -0400 Subject: Modified compiler's machinery to use the new abstractions for descriptors and signatures. --- new-luxc/source/program.lux | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'new-luxc/source/program.lux') diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index 1311392a9..8e372f77f 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -92,7 +92,8 @@ (def: #export (program programI) (-> _.Inst _.Definition) - (let [nilI runtime.noneI + (let [$Object ($t.class "java.lang.Object" (list)) + nilI runtime.noneI num-inputsI (|>> ($i.ALOAD 0) $i.ARRAYLENGTH) decI (|>> ($i.int +1) $i.ISUB) headI (|>> $i.DUP @@ -103,7 +104,7 @@ $i.DUP_X2 $i.POP) pairI (|>> ($i.int +2) - ($i.ANEWARRAY "java.lang.Object") + ($i.ANEWARRAY $Object) $i.DUP_X1 $i.SWAP ($i.int +0) @@ -135,18 +136,19 @@ ($i.label @end) $i.POP ($i.ASTORE 0))) - run-ioI (|>> ($i.CHECKCAST jvm.function-class) + $Function ($t.class jvm.function-class (list)) + run-ioI (|>> ($i.CHECKCAST $Function) $i.NULL - ($i.INVOKEVIRTUAL jvm.function-class runtime.apply-method (runtime.apply-signature 1) #0)) - main-type ($t.method (list ($t.array 1 ($t.class "java.lang.String" (list)))) - #.None - (list)) + ($i.INVOKEVIRTUAL $Function runtime.apply-method (runtime.apply-signature 1) #0)) + main-type ($t.method [(list ($t.array ($t.class "java.lang.String" (list)))) + $t.void + (list)]) bytecode-name "_"] [bytecode-name ($d.class #_.V1_6 #_.Public _.finalC bytecode-name - (list) ["java.lang.Object" (list)] + (list) $Object (list) (|>> ($d.method #_.Public _.staticM "main" main-type (|>> prepare-input-listI -- cgit v1.2.3