From eff4c59794868b89d60fdc411f9b544a270b817e Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 2 Aug 2021 20:26:21 -0400 Subject: Fixed a bug in the new compiler which allowed the same module to be imported more than once. --- lux-jvm/source/program.lux | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'lux-jvm/source/program.lux') diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux index 60fb953aa..6442a87e7 100644 --- a/lux-jvm/source/program.lux +++ b/lux-jvm/source/program.lux @@ -212,19 +212,19 @@ (do phase.monad [instanceG (function.function' (#.Some [0 (.nat -1)]) expression.translate archive [(list) 4 ..how_to_wrap_a_phase]) phase_wrapper (generation.evaluate! [0 (.nat -2)] instanceG)] - (wrap (function (_ phase) - (<| try.assumed - (: (Try java/lang/Object)) - (do try.monad - [apply_method (|> phase_wrapper - (:as java/lang/Object) - (java/lang/Object::getClass) - (java/lang/Class::getMethod runtime.apply_method _apply1_args))] - (java/lang/reflect/Method::invoke - (:as java/lang/Object phase_wrapper) - (|> (ffi.array java/lang/Object 1) - (ffi.array_write 0 (:as java/lang/Object phase))) - apply_method))))))) + (in (function (_ phase) + (<| try.assumed + (: (Try java/lang/Object)) + (do try.monad + [apply_method (|> phase_wrapper + (:as java/lang/Object) + (java/lang/Object::getClass) + (java/lang/Class::getMethod runtime.apply_method _apply1_args))] + (java/lang/reflect/Method::invoke + (:as java/lang/Object phase_wrapper) + (|> (ffi.array java/lang/Object 1) + (ffi.array_write 0 (:as java/lang/Object phase))) + apply_method))))))) (def: #export platform ## (IO (Platform Anchor (Bytecode Any) Definition)) @@ -233,15 +233,15 @@ (do io.monad [## host jvm/host.host [loader host] jvm.host] - (wrap [loader - {#platform.&file_system (file.async file.default) - #platform.host host - ## #platform.phase jvm.generate - #platform.phase expression.translate - ## #platform.runtime runtime.generate - #platform.runtime runtime.translate - #platform.phase_wrapper ..phase_wrapper - #platform.write product.right}]))) + (in [loader + {#platform.&file_system (file.async file.default) + #platform.host host + ## #platform.phase jvm.generate + #platform.phase expression.translate + ## #platform.runtime runtime.generate + #platform.runtime runtime.translate + #platform.phase_wrapper ..phase_wrapper + #platform.write product.right}]))) (def: (extender phase_wrapper) (-> platform.Phase_Wrapper Extender) -- cgit v1.2.3