diff options
author | Eduardo Julian | 2018-07-30 18:17:01 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-30 18:17:01 -0400 |
commit | 4edf1f78132715124910ac8b8fc20e4da7072f15 (patch) | |
tree | 5cc731d4db39e1a7bb567f03f4bc8ef1db8a6261 /new-luxc/source | |
parent | a59fc865aee240afe21b82ffef2681bb9a6ea693 (diff) |
Updating new-luxc to latest Lux changes [Part 0].
Diffstat (limited to 'new-luxc/source')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm.lux | 19 |
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") |