diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase')
13 files changed, 52 insertions, 37 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux index 769646ad0..2d1dec4b2 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -801,8 +801,7 @@ (def: (reflection-return mapping typeJ) (-> Mapping (Type Return) (Operation .Type)) - (case (|> typeJ jvm.signature signature.signature - (<t>.run (luxT.return mapping))) + (case (|> typeJ ..signature (<t>.run (luxT.return mapping))) (#try.Success check) (typeA.with-env check) @@ -1307,10 +1306,10 @@ [#let [argsT (list@map product.left argsTC)] [methodT exceptionsT] (method-candidate class-tvars class method-tvars method #Static argsT) [outputT argsA] (inferenceA.general analyse methodT (list@map product.right argsTC)) - outputJC (check-return outputT)] + outputJT (check-return outputT)] (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text (..signature (jvm.class class (list)))) (/////analysis.text method) - (/////analysis.text (..signature outputJC)) + (/////analysis.text (..signature outputJT)) (decorate-inputs argsT argsA))))))])) (def: invoke::virtual @@ -1328,10 +1327,10 @@ _ (undefined))] - outputJC (check-return outputT)] + outputJT (check-return outputT)] (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text (..signature (jvm.class class (list)))) (/////analysis.text method) - (/////analysis.text (..signature outputJC)) + (/////analysis.text (..signature outputJT)) objectA (decorate-inputs argsT argsA))))))])) @@ -1344,10 +1343,10 @@ [#let [argsT (list@map product.left argsTC)] [methodT exceptionsT] (method-candidate class-tvars class method-tvars method #Special argsT) [outputT argsA] (inferenceA.general analyse methodT (list& objectC (list@map product.right argsTC))) - outputJC (check-return outputT)] + outputJT (check-return outputT)] (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text (..signature (jvm.class class (list)))) (/////analysis.text method) - (/////analysis.text (..signature outputJC)) + (/////analysis.text (..signature outputJT)) (decorate-inputs argsT argsA))))))])) (def: invoke::interface @@ -1368,11 +1367,11 @@ _ (undefined))] - outputJC (check-return outputT)] + outputJT (check-return outputT)] (wrap (#/////analysis.Extension extension-name (list& (/////analysis.text (..signature (jvm.class class-name (list)))) (/////analysis.text method) - (/////analysis.text (..signature outputJC)) + (/////analysis.text (..signature outputJT)) objectA (decorate-inputs argsT argsA))))))])) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function.lux index 12e1bc460..36f8d72c6 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function.lux @@ -13,7 +13,6 @@ ["." row]]] [target [jvm - ["." descriptor (#+ Descriptor Value Return)] ["." modifier (#+ Modifier) ("#@." monoid)] ["." field (#+ Field)] ["." method (#+ Method)] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/arity.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/arity.lux index 08954a7c0..ac35be9ba 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/arity.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/arity.lux @@ -2,7 +2,8 @@ [lux (#- type) [target [jvm - ["." descriptor]]]]) + [type + ["." descriptor]]]]]) (def: #export field "arity") (def: #export type descriptor.int) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/foreign.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/foreign.lux index 91e06c383..1534a9683 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/foreign.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/foreign.lux @@ -1,5 +1,5 @@ (.module: - [lux #* + [lux (#- Type) [control [state (#+ State)]] [data @@ -8,10 +8,12 @@ ["." row]]] [target [jvm - [descriptor (#+ Descriptor Value)] ["." field (#+ Field)] [constant - [pool (#+ Pool)]]]]] + [pool (#+ Pool)]] + [type + [category (#+ Value)] + [descriptor (#+ Descriptor)]]]]] ["." // ["//#" /// #_ ["#." value] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/partial/count.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/partial/count.lux index 625cad78d..9b611fb94 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/partial/count.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/field/partial/count.lux @@ -2,11 +2,12 @@ [lux (#- type) [target [jvm - ["." descriptor] ["_" instruction (#+ Instruction) ("#@." monad)] [encoding [name (#+ External)] - ["." unsigned]]]]] + ["." unsigned]] + [type + ["." descriptor]]]]] ["." //// #_ ["#." abstract] ["/#" // #_ diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/apply.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/apply.lux index d2f2b9380..e298ab187 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/apply.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/apply.lux @@ -10,11 +10,13 @@ ["." list]]] [target [jvm - ["." descriptor (#+ Descriptor Value Return)] ["_" instruction (#+ Instruction) ("#@." monad)] ["." constant] [encoding - ["." unsigned]]]]] + ["." unsigned]] + [type + ["." category (#+ Value Return)] + ["." descriptor (#+ Descriptor)]]]]] ["." /// #_ ["#." abstract] ["#." arity] @@ -27,7 +29,7 @@ (def: #export name "apply") (def: #export (type arity) - (-> Arity [(List (Descriptor Value)) (Descriptor (Return Any))]) + (-> Arity [(List (Descriptor Value)) (Descriptor Return)]) [(list.repeat arity ////value.type) ////value.type]) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/implementation.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/implementation.lux index 9b8a19b59..18df43d9d 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/implementation.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/implementation.lux @@ -7,11 +7,13 @@ ["." list]]] [target [jvm - ["." descriptor (#+ Descriptor)] ["." method (#+ Method)] ["_" instruction (#+ Label Instruction)] [constant - [pool (#+ Pool)]]]]] + [pool (#+ Pool)]] + [type + ["." category] + ["." descriptor (#+ Descriptor)]]]]] ["." // ["//#" /// #_ ["#." value] @@ -21,7 +23,7 @@ (def: #export name "impl") (def: #export (type arity) - (-> Arity (Descriptor descriptor.Method)) + (-> Arity (Descriptor category.Method)) (descriptor.method [(list.repeat arity ////value.type) ////value.type])) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/init.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/init.lux index 5a53ff9e0..5f771abcd 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/init.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/init.lux @@ -2,10 +2,12 @@ [lux (#- type) [target [jvm - ["." descriptor (#+ Descriptor Value Return)] ["_" instruction (#+ Instruction)] [encoding - ["." unsigned]]]]] + ["." unsigned]] + [type + ["." category (#+ Value Return)] + ["." descriptor (#+ Descriptor)]]]]] ["." /// #_ ["#." abstract] ["#." arity] @@ -15,7 +17,7 @@ (def: #export type [(List (Descriptor Value)) - (Descriptor (Return Any))] + (Descriptor Return)] [(list ///arity.type) descriptor.void]) (def: #export (instruction environment-size arity) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/new.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/new.lux index 7196d60fd..f03d333b2 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/new.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/new.lux @@ -11,7 +11,6 @@ ["." list ("#@." monoid)]]] [target [jvm - ["." descriptor (#+ Descriptor Value Return)] ["." modifier (#+ Modifier) ("#@." monoid)] ["." field (#+ Field)] ["." method (#+ Method)] @@ -20,7 +19,10 @@ [pool (#+ Pool)]] [encoding [name (#+ External)] - ["." unsigned]]]]] + ["." unsigned]] + [type + ["." category (#+ Value Return)] + ["." descriptor (#+ Descriptor)]]]]] ["." // ["#." init] ["/#" // #_ @@ -43,7 +45,7 @@ (def: #export (type environment arity) (-> Environment Arity [(List (Descriptor Value)) - (Descriptor (Return Any))]) + (Descriptor Return)]) [(list@compose (///field/foreign.closure environment) (if (arity.multiary? arity) (list& ///arity.type (arguments arity)) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/reset.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/reset.lux index df9ea0ae8..e43fd1b9b 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/reset.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/function/method/reset.lux @@ -10,13 +10,15 @@ [target [jvm [modifier (#+ Modifier)] - ["." descriptor (#+ Descriptor)] ["." method (#+ Method)] ["_" instruction] [constant [pool (#+ Pool)]] [encoding - [name (#+ External)]]]]] + [name (#+ External)]] + [type + ["." category] + ["." descriptor (#+ Descriptor)]]]]] ["." // ["#." new] ["/#" // #_ @@ -34,7 +36,7 @@ (def: #export name "reset") (def: #export type - (-> External (Descriptor descriptor.Method)) + (-> External (Descriptor category.Method)) (|>> descriptor.class [(list)] descriptor.method)) (def: #export (method class environment arity) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/primitive.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/primitive.lux index d2d51d992..0f4cdfec7 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/primitive.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/primitive.lux @@ -4,9 +4,10 @@ [monad (#+ do)]] [target [jvm - ["|" descriptor] ["." constant] - ["_" instruction (#+ Instruction)]]] + ["_" instruction (#+ Instruction)] + [type + ["|" descriptor]]]] [macro ["." template]]] ["." // #_ diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/structure.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/structure.lux index 380040fa5..1ea837947 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/structure.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/structure.lux @@ -9,9 +9,10 @@ ["." list]]] [target [jvm - ["|" descriptor] ["_." constant] - ["_" instruction (#+ Instruction)]]]] + ["_" instruction (#+ Instruction)] + [type + ["|" descriptor]]]]] ["." // #_ ["#." runtime (#+ Operation Phase Generator)] ["#." primitive] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/value.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/value.lux index c0634ac25..0dfbe4861 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/value.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/value.lux @@ -2,7 +2,8 @@ [lux (#- type) [target [jvm - ["." descriptor (#+ Descriptor Value)]]]]) + [type + ["." descriptor]]]]]) (def: #export field "_value") |