diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux index c22199864..0d37031e0 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux @@ -32,7 +32,7 @@ (def: #export logI $.Inst (let [outI ($i.GETSTATIC "java.lang.System" "out" ($t.class "java.io.PrintStream" (list))) - printI (function (_ method) ($i.INVOKEVIRTUAL "java.io.PrintStream" method ($t.method (list $Object) #.None (list)) false))] + printI (function (_ method) ($i.INVOKEVIRTUAL "java.io.PrintStream" method ($t.method (list $Object) #.None (list)) #0))] (|>> outI ($i.string "LOG: ") (printI "print") outI $i.SWAP (printI "println")))) @@ -42,7 +42,7 @@ (def: #export variantI $.Inst - ($i.INVOKESTATIC hostL.runtime-class "variant_make" variant-method false)) + ($i.INVOKESTATIC hostL.runtime-class "variant_make" variant-method #0)) (def: #export leftI $.Inst @@ -86,7 +86,7 @@ (def: #export string-concatI $.Inst - ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) false)) + ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) #0)) (def: #export partials-field Text "partials") (def: #export apply-method Text "apply") @@ -111,11 +111,11 @@ $i.with-label (function (_ @elem-end)) $i.with-label (function (_ @fold-end)) (let [on-normal-objectI (|>> ($i.ALOAD +0) - ($i.INVOKEVIRTUAL "java.lang.Object" "toString" ($t.method (list) (#.Some $String) (list)) false)) + ($i.INVOKEVIRTUAL "java.lang.Object" "toString" ($t.method (list) (#.Some $String) (list)) #0)) on-null-objectI ($i.string "NULL") arrayI (|>> ($i.ALOAD +0) ($i.CHECKCAST ($t.descriptor $Object-Array))) - recurseI ($i.INVOKESTATIC hostL.runtime-class "force_text" force-textMT false) + recurseI ($i.INVOKESTATIC hostL.runtime-class "force_text" force-textMT #0) force-elemI (|>> $i.DUP arrayI $i.SWAP $i.AALOAD recurseI) swap2 (|>> $i.DUP2_X2 ## X,Y => Y,X,Y $i.POP2 ## Y,X,Y => Y,X @@ -165,7 +165,7 @@ (def: #export force-textI $.Inst - ($i.INVOKESTATIC hostL.runtime-class "force_text" ($t.method (list $Object) (#.Some $String) (list)) false)) + ($i.INVOKESTATIC hostL.runtime-class "force_text" ($t.method (list $Object) (#.Some $String) (list)) #0)) (def: frac-shiftI $.Inst ($i.double (math.pow 32.0 2.0))) @@ -174,7 +174,7 @@ (|>> ($d.method #$.Public $.staticM "decode_frac" ($t.method (list $String) (#.Some $Object-Array) (list)) (try-methodI (|>> ($i.ALOAD +0) - ($i.INVOKESTATIC "java.lang.Double" "parseDouble" ($t.method (list $String) (#.Some $t.double) (list)) false) + ($i.INVOKESTATIC "java.lang.Double" "parseDouble" ($t.method (list $String) (#.Some $t.double) (list)) #0) ($i.wrap #$.Double)))) )) @@ -187,12 +187,12 @@ (|>> ($i.ALOAD +0) ($i.ILOAD +1) ($i.ILOAD +2) - ($i.INVOKEVIRTUAL "java.lang.String" "substring" ($t.method (list $t.int $t.int) (#.Some $String) (list)) false)))) + ($i.INVOKEVIRTUAL "java.lang.String" "substring" ($t.method (list $t.int $t.int) (#.Some $String) (list)) #0)))) ($d.method #$.Public $.staticM "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list)) (try-methodI (|>> ($i.ALOAD +0) ($i.ILOAD +1) - ($i.INVOKEVIRTUAL "java.lang.String" "codePointAt" ($t.method (list $t.int) (#.Some $t.int) (list)) false) + ($i.INVOKEVIRTUAL "java.lang.String" "codePointAt" ($t.method (list $t.int) (#.Some $t.int) (list)) #0) $i.I2L ($i.wrap #$.Long)))) )) @@ -207,13 +207,13 @@ (|>> ($i.NEW "java.lang.IllegalStateException") $i.DUP ($i.string "Invalid expression for pattern-matching.") - ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) false) + ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) #0) $i.ATHROW)) ($d.method #$.Public $.staticM "apply_fail" ($t.method (list) #.None (list)) (|>> ($i.NEW "java.lang.IllegalStateException") $i.DUP ($i.string "Error while applying function.") - ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) false) + ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) #0) $i.ATHROW)) ($d.method #$.Public $.staticM "pm_push" ($t.method (list $Stack $Object) (#.Some $Stack) (list)) (|>> ($i.int 2) @@ -312,7 +312,7 @@ $i.with-label (function (_ @slice)) (let [updated-idxI (|>> ($i.ILOAD +1) ($i.int 1) $i.IADD tuple-sizeI $i.ISUB) sliceI (|>> ($i.ALOAD +0) ($i.ILOAD +1) tuple-sizeI - ($i.INVOKESTATIC "java.util.Arrays" "copyOfRange" ($t.method (list $Object-Array $t.int $t.int) (#.Some $Object-Array) (list)) false))]) + ($i.INVOKESTATIC "java.util.Arrays" "copyOfRange" ($t.method (list $Object-Array $t.int $t.int) (#.Some $Object-Array) (list)) #0))]) (|>> ($i.label @begin) tuple-sizeI expected-last-sizeI @@ -335,14 +335,14 @@ $.Def (let [string-writerI (|>> ($i.NEW "java.io.StringWriter") $i.DUP - ($i.INVOKESPECIAL "java.io.StringWriter" "<init>" ($t.method (list) #.None (list)) false)) + ($i.INVOKESPECIAL "java.io.StringWriter" "<init>" ($t.method (list) #.None (list)) #0)) print-writerI (|>> ($i.NEW "java.io.PrintWriter") $i.SWAP $i.DUP2 $i.POP $i.SWAP - ($i.boolean true) - ($i.INVOKESPECIAL "java.io.PrintWriter" "<init>" ($t.method (list ($t.class "java.io.Writer" (list)) $t.boolean) #.None (list)) false) + ($i.boolean #1) + ($i.INVOKESPECIAL "java.io.PrintWriter" "<init>" ($t.method (list ($t.class "java.io.Writer" (list)) $t.boolean) #.None (list)) #0) )] (|>> ($d.method #$.Public $.staticM "try" ($t.method (list $Function) (#.Some $Variant) (list)) (<| $i.with-label (function (_ @from)) @@ -352,7 +352,7 @@ ($i.label @from) ($i.ALOAD +0) $i.NULL - ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false) + ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0) rightI $i.ARETURN ($i.label @to) @@ -360,8 +360,8 @@ string-writerI ## TW $i.DUP2 ## TWTW print-writerI ## TWTP - ($i.INVOKEVIRTUAL "java.lang.Throwable" "printStackTrace" ($t.method (list ($t.class "java.io.PrintWriter" (list))) #.None (list)) false) ## TW - ($i.INVOKEVIRTUAL "java.io.StringWriter" "toString" ($t.method (list) (#.Some $String) (list)) false) ## TS + ($i.INVOKEVIRTUAL "java.lang.Throwable" "printStackTrace" ($t.method (list ($t.class "java.io.PrintWriter" (list))) #.None (list)) #0) ## TW + ($i.INVOKEVIRTUAL "java.io.StringWriter" "toString" ($t.method (list) (#.Some $String) (list)) #0) ## TS $i.SWAP $i.POP leftI $i.ARETURN))) ))) @@ -378,21 +378,21 @@ (|>> ($i.NEW hostL.runnable-class) $i.DUP functionI - ($i.INVOKESPECIAL hostL.runnable-class "<init>" ($t.method (list $Function) #.None (list)) false)))) + ($i.INVOKESPECIAL hostL.runnable-class "<init>" ($t.method (list $Function) #.None (list)) #0)))) threadI (: (-> $.Inst $.Inst) (function (_ runnableI) (|>> ($i.NEW "java.lang.Thread") $i.DUP runnableI - ($i.INVOKESPECIAL "java.lang.Thread" "<init>" ($t.method (list $Runnable) #.None (list)) false))))] + ($i.INVOKESPECIAL "java.lang.Thread" "<init>" ($t.method (list $Runnable) #.None (list)) #0))))] (|>> ($d.field #$.Public ($.++F $.finalF $.staticF) executor-field executorT) ($d.method #$.Public $.staticM "<clinit>" ($t.method (list) #.None (list)) - (let [parallelism-levelI (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some $Runtime) (list)) false) - ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) false)) + (let [parallelism-levelI (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some $Runtime) (list)) #0) + ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) #0)) executorI (|>> ($i.NEW executor-class) $i.DUP parallelism-levelI - ($i.INVOKESPECIAL executor-class "<init>" ($t.method (list $t.int) #.None (list)) false))] + ($i.INVOKESPECIAL executor-class "<init>" ($t.method (list $t.int) #.None (list)) #0))] (|>> executorI ($i.PUTSTATIC hostL.runtime-class executor-field executorT) $i.RETURN))) @@ -410,10 +410,10 @@ (runnableI ($i.ALOAD +2)) delayI ($i.GETSTATIC time-unit-class "MILLISECONDS" time-unitT) - ($i.INVOKEVIRTUAL executor-class "schedule" ($t.method (list $Runnable $t.long time-unitT) (#.Some futureT) (list)) false)) + ($i.INVOKEVIRTUAL executor-class "schedule" ($t.method (list $Runnable $t.long time-unitT) (#.Some futureT) (list)) #0)) schedule-immediatelyI (|>> executorI (runnableI ($i.ALOAD +2)) - ($i.INVOKEVIRTUAL executor-class "execute" ($t.method (list $Runnable) #.None (list)) false))] + ($i.INVOKEVIRTUAL executor-class "execute" ($t.method (list $Runnable) #.None (list)) #0))] (<| $i.with-label (function (_ @immediately)) (|>> immediacy-checkI ($i.IFEQ @immediately) @@ -449,10 +449,10 @@ (list/map $i.ALOAD) $i.fuse)] (|>> preI - ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature (dec arity)) false) + ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature (dec arity)) #0) ($i.CHECKCAST hostL.function-class) ($i.ALOAD arity) - ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false) + ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0) $i.ARETURN))))) (list& ($d.abstract-method #$.Public $.noneM apply-method (apply-signature +1))) $d.fuse) @@ -460,7 +460,7 @@ (|>> ($d.field #$.Public $.finalF partials-field $t.int) ($d.method #$.Public $.noneM "<init>" ($t.method (list $t.int) #.None (list)) (|>> ($i.ALOAD +0) - ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) false) + ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) #0) ($i.ALOAD +0) ($i.ILOAD +1) ($i.PUTFIELD hostL.function-class partials-field $t.int) @@ -478,7 +478,7 @@ (|>> ($d.field #$.Public $.finalF procedure-field $Function) ($d.method #$.Public $.noneM "<init>" ($t.method (list $Function) #.None (list)) (|>> ($i.ALOAD +0) - ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) false) + ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) #0) ($i.ALOAD +0) ($i.ALOAD +1) ($i.PUTFIELD hostL.runnable-class procedure-field $Function) @@ -487,7 +487,7 @@ (|>> ($i.ALOAD +0) ($i.GETFIELD hostL.runnable-class procedure-field $Function) $i.NULL - ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false) + ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0) $i.RETURN)) ))] _ (commonT.store-class hostL.runnable-class bytecode)] |