aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm.lux19
1 files changed, 9 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm.lux b/new-luxc/source/luxc/lang/translation/jvm.lux
index 52b104149..8f4af43c6 100644
--- a/new-luxc/source/luxc/lang/translation/jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm.lux
@@ -160,7 +160,7 @@
(#error.Error error)
(ex.throw invalid-field [class-name ..value-field])))
-(def: (eval store loader temp-label valueI)
+(def: (evaluate! store loader temp-label valueI)
(-> Store ClassLoader Text Inst (Error Any))
(do error.Monad<Error>
[#let [eval-class (|> temp-label name.normalize (text.replace-all " " "$"))
@@ -181,21 +181,20 @@
class (..load! eval-class loader)]
(class-value eval-class class)))
-(def: (define store loader temp-label [class-name class-bytecode])
+(def: (execute! store loader temp-label [class-name class-bytecode])
(-> Store ClassLoader Text Definition (Error Any))
(do error.Monad<Error>
- [_ (..store! class-name class-bytecode store)
- class (..load! class-name loader)]
- (class-value class-name class)))
+ [_ (..store! class-name class-bytecode store)]
+ (..load! class-name loader)))
(def: #export init
- (IO State)
+ (IO Host)
(io (let [store (: Store (atom (dictionary.new text.Hash<Text>)))
loader (memory-class-loader store)]
- (translation.init (: Host
- (structure
- (def: evaluate! (..eval store loader))
- (def: execute! (..define store loader))))))))
+ (: Host
+ (structure
+ (def: evaluate! (..evaluate! store loader))
+ (def: execute! (..execute! store loader)))))))
(def: #export runtime-class "LuxRuntime")
(def: #export function-class "LuxFunction")