aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux')
-rw-r--r--stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux17
1 files changed, 10 insertions, 7 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
index f2349ff41..3ed3ecb52 100644
--- a/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
+++ b/stdlib/source/lux/tool/compiler/phase/generation/jvm/runtime.lux
@@ -67,6 +67,9 @@
(type: #export (Generator i)
(-> Phase i (Operation (Bytecode Any))))
+(type: #export Host
+ (///.Host (Bytecode Any) Definition))
+
(def: #export class (type.class "LuxRuntime" (list)))
(def: procedure
@@ -180,7 +183,7 @@
(def: #export decode-frac (..procedure ..decode-frac::name ..decode-frac::type))
(def: decode-frac::method
- (method.method ..modifier ..variant::name
+ (method.method ..modifier ..decode-frac::name
..variant::type
(list)
(#.Some
@@ -492,7 +495,7 @@
(def: ^Object (type.class "java.lang.Object" (list)))
-(def: translate-runtime
+(def: generate-runtime
(Operation Any)
(let [class (..reflection ..class)
modifier (: (Modifier Class)
@@ -524,7 +527,7 @@
[_ (///.execute! class [class bytecode])]
(///.save! .false ["" class] [class bytecode]))))
-(def: translate-function
+(def: generate-function
(Operation Any)
(let [apply::method+ (|> (list.n/range (inc //function/arity.minimum)
//function/arity.maximum)
@@ -542,7 +545,7 @@
(_.aload arity)
(_.invokevirtual //function.class ..apply::name (..apply::type //function/arity.minimum))
_.areturn))))))
- (list& (method.method (modifier@compose method.public method.abstract)
+ (list& (method.method method.public
..apply::name (..apply::type //function/arity.minimum)
(list)
## TODO: It shouldn't be necessary to set the code for this method, since it's abstract.
@@ -586,11 +589,11 @@
[_ (///.execute! class [class bytecode])]
(///.save! .false ["" class] [class bytecode]))))
-(def: #export translate
+(def: #export generate
(Operation Any)
(do ////.monad
- [_ ..translate-runtime]
- ..translate-function))
+ [_ ..generate-runtime]
+ ..generate-function))
(def: #export forge-label
(Operation Label)