diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/jvm')
4 files changed, 14 insertions, 11 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux index a4eb5b93b..c78b0baeb 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux @@ -42,11 +42,11 @@ (type: #export Artifacts (Dict File Blob)) (type: #export Host - {#loader ClassLoader + {#context [Text Nat] + #anchor (Maybe [Label Register]) + #loader ClassLoader #store Class-Store - #artifacts Artifacts - #context [Text Nat] - #anchor (Maybe [Label Register])}) + #artifacts Artifacts}) (exception: #export Unknown-Class) (exception: #export Class-Already-Stored) diff --git a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux index 82c8c0ec0..67a6935ba 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux @@ -21,6 +21,7 @@ [".T" case] [".T" procedure])) +(exception: #export Invalid-Function-Syntax) (exception: #export Unrecognized-Synthesis) (def: #export (translate synthesis) @@ -62,9 +63,13 @@ (^code ("lux case" (~ inputS) (~ pathPS))) (caseT.translate-case translate inputS pathPS) - (^multi (^code ("lux function" (~ [_ (#.Nat arity)]) [(~+ environment)] (~ bodyS))) - [(s.run environment (p.some s.int)) (#e.Success environment)]) - (functionT.translate-function translate environment arity bodyS) + (^code ("lux function" (~ [_ (#.Nat arity)]) [(~+ environment)] (~ bodyS))) + (case (s.run environment (p.some s.int)) + (#e.Success environment) + (functionT.translate-function translate environment arity bodyS) + + _ + (&.throw Invalid-Function-Syntax (%code synthesis))) (^code ("lux call" (~ functionS) (~+ argsS))) (functionT.translate-call translate functionS argsS) diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux index c7513fd6e..57455e1e1 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux @@ -792,8 +792,7 @@ (def: #export procedures Bundle (<| (prefix "lux") - (|> (dict.new text.Hash<Text>) - (dict.merge lux-procs) + (|> lux-procs (dict.merge bit-procs) (dict.merge nat-procs) (dict.merge int-procs) diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux index 30d17cac3..f585fb10c 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux @@ -748,8 +748,7 @@ (def: #export procedures @.Bundle (<| (@.prefix "jvm") - (|> (dict.new text.Hash<Text>) - (dict.merge conversion-procs) + (|> conversion-procs (dict.merge int-procs) (dict.merge long-procs) (dict.merge float-procs) |