diff options
Diffstat (limited to 'stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux')
-rw-r--r-- | stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux index 5a8c50a16..7c0882b27 100644 --- a/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux +++ b/stdlib/source/library/lux/meta/compiler/language/lux/phase/translation/jvm/host.lux @@ -19,7 +19,7 @@ [binary (.only Binary) ["[0]" \\format]] ["[0]" text (.use "[1]#[0]" hash) - ["%" \\format (.only format)]] + ["%" \\format]] [collection ["[0]" array] ["[0]" dictionary (.only Dictionary)] @@ -181,13 +181,15 @@ (def .public host (IO [java/lang/ClassLoader //runtime.Host]) (io (let [library (loader.new_library []) - loader (loader.memory library)] + loader (loader.memory library) + id (atom.atom 0)] [loader (is //runtime.Host (implementation - (def (evaluate context @it,valueG) - (of try.monad each product.left - (..evaluate! library loader (format "E" (//runtime.class_name context)) @it,valueG))) + (def (evaluate @it,valueG) + (let [[id _] (io.run! (atom.update! ++ id))] + (of try.monad each product.left + (..evaluate! library loader (%.format "E" (%.nat id)) @it,valueG)))) (def execute (..execute! library loader)) |