diff options
author | Eduardo Julian | 2019-09-07 01:50:37 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-09-07 01:50:37 -0400 |
commit | b63ac226cc2ea843f08f7c72b18d22602462c624 (patch) | |
tree | 7fb72562c39549108b7a48c1a6819c9bd3a64dab /new-luxc/source/program.lux | |
parent | 181f93f3e963c9738ed60f6f5e2d2a37253a0b1b (diff) |
Modified compiler's machinery to use the new abstractions for descriptors and signatures.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/program.lux | 18 |
1 files changed, 10 insertions, 8 deletions
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 |