From ec1f31b5a1492d5e0ab260397291d4449483bbd9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 23 Aug 2021 02:30:53 -0400 Subject: The Python compiler can now be compiled by the new JVM compiler. --- lux-jvm/test/test/luxc/lang/analysis/host.jvm.lux | 78 +++++++++++------------ lux-jvm/test/test/luxc/lang/synthesis/loop.lux | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) (limited to 'lux-jvm/test') diff --git a/lux-jvm/test/test/luxc/lang/analysis/host.jvm.lux b/lux-jvm/test/test/luxc/lang/analysis/host.jvm.lux index 77f5b34bc..f3af659fa 100644 --- a/lux-jvm/test/test/luxc/lang/analysis/host.jvm.lux +++ b/lux-jvm/test/test/luxc/lang/analysis/host.jvm.lux @@ -11,7 +11,7 @@ format] [collection ["." array] - [list ("list/" Fold)] + [list ("list/" Mix)] ["dict" dictionary]]] [math ["r" random "r/" Monad]] @@ -38,8 +38,8 @@ [... runtime-bytecode @runtime.translate ] (default.with-scope - (typeA.with-type output-type - (_primitive.analyse (` ((~ (code.text procedure)) (~+ params))))))) + (typeA.with-type output-type + (_primitive.analyse (` ((~ (code.text procedure)) (~+ params))))))) (analysis.with-current-module "") (macro.result (initL.compiler [])) (case> (#e.Success _) @@ -59,8 +59,8 @@ [... runtime-bytecode @runtime.translate ] (default.with-scope - (typeA.with-type output-type - (_primitive.analyse syntax)))) + (typeA.with-type output-type + (_primitive.analyse syntax)))) (analysis.with-current-module "") (macro.result (initL.compiler [])) (case> (#e.Success _) @@ -87,9 +87,9 @@ ["jvm convert float-to-int" "java.lang.Float" hostAE.Integer] ["jvm convert float-to-long" "java.lang.Float" hostAE.Long] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: "Conversions [int]." (with-expansions [ (template [ ] @@ -105,9 +105,9 @@ ["jvm convert int-to-long" "java.lang.Integer" hostAE.Long] ["jvm convert int-to-short" "java.lang.Integer" hostAE.Short] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: "Conversions [long]." (with-expansions [ (template [ ] @@ -122,9 +122,9 @@ ["jvm convert long-to-short" "java.lang.Long" hostAE.Short] ["jvm convert long-to-byte" "java.lang.Long" hostAE.Byte] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: "Conversions [char + byte + short]." (with-expansions [ (template [ ] @@ -140,9 +140,9 @@ ["jvm convert byte-to-long" "java.lang.Byte" hostAE.Long] ["jvm convert short-to-long" "java.lang.Short" hostAE.Long] )] - ($_ seq - - ))) + ($_ seq + + ))) (template [ ] [(context: (format "Arithmetic " "[" "].") @@ -159,9 +159,9 @@ [(format "jvm " " /") ] [(format "jvm " " %") ] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: (format "Order " "[" "].") (with-expansions [ (template [ ] @@ -174,9 +174,9 @@ [(format "jvm " " =") hostAE.Boolean] [(format "jvm " " <") hostAE.Boolean] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: (format "Bitwise " "[" "].") (with-expansions [ (template [ ] @@ -193,9 +193,9 @@ [(format "jvm " " shr") "java.lang.Integer" ] [(format "jvm " " ushr") "java.lang.Integer" ] )] - ($_ seq - - )))] + ($_ seq + + )))] ["int" "java.lang.Integer" hostAE.Integer] @@ -217,9 +217,9 @@ [(format "jvm " " /") ] [(format "jvm " " %") ] )] - ($_ seq - - ))) + ($_ seq + + ))) (context: (format "Order " "[" "].") (with-expansions [ (template [ ] @@ -232,9 +232,9 @@ [(format "jvm " " =") hostAE.Boolean] [(format "jvm " " <") hostAE.Boolean] )] - ($_ seq - - )))] + ($_ seq + + )))] ["float" "java.lang.Float" hostAE.Float] @@ -253,9 +253,9 @@ [(format "jvm " " =") hostAE.Boolean] [(format "jvm " " <") hostAE.Boolean] )] - ($_ seq - - )))] + ($_ seq + + )))] ["char" "java.lang.Character" hostAE.Character] @@ -287,10 +287,10 @@ ("jvm array new" (~ (code.nat size))))) boxedT (#.Primitive boxed (list)) boxedTC (` (+0 (~ (code.text boxed)) (+0))) - multi-arrayT (list/fold (function (_ _ innerT) - (|> innerT (list) (#.Primitive "#Array"))) - boxedT - (list.n/range +1 level))]] + multi-arrayT (list/mix (function (_ _ innerT) + (|> innerT (list) (#.Primitive "#Array"))) + boxedT + (list.n/range +1 level))]] ($_ seq (test "jvm array new" (success "jvm array new" diff --git a/lux-jvm/test/test/luxc/lang/synthesis/loop.lux b/lux-jvm/test/test/luxc/lang/synthesis/loop.lux index 7aeafab5f..2b09fb3e7 100644 --- a/lux-jvm/test/test/luxc/lang/synthesis/loop.lux +++ b/lux-jvm/test/test/luxc/lang/synthesis/loop.lux @@ -4,7 +4,7 @@ (control [monad #+ do]) (data [bit "bit/" Eq] [number] - (coll [list "list/" Functor Fold] + (coll [list "list/" Functor] (set ["set" unordered])) text/format) (macro [code]) -- cgit v1.2.3