aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation/jvm.lux')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm.lux22
1 files changed, 11 insertions, 11 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm.lux b/lux-jvm/source/luxc/lang/translation/jvm.lux
index cebd5e652..0ffea0e42 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm.lux
@@ -104,9 +104,10 @@
..class-path-separator (%.nat module-id)
..class-path-separator (%.nat artifact-id)))
-(def: (evaluate! library loader eval-class valueI)
- (-> Library java/lang/ClassLoader Text Inst (Try [Any Definition]))
- (let [bytecode-name (..bytecode-name eval-class)
+(def: (evaluate! library loader context valueI)
+ (-> Library java/lang/ClassLoader generation.Context Inst (Try [Any Definition]))
+ (let [eval-class (..class-name context)
+ bytecode-name (..bytecode-name eval-class)
bytecode (def.class #jvm.V1_6
#jvm.Public jvm.noneC
bytecode-name
@@ -127,8 +128,8 @@
(wrap [value
[eval-class bytecode]])))))
-(def: (execute! library loader temp-label [class-name class-bytecode])
- (-> Library java/lang/ClassLoader Text Definition (Try Any))
+(def: (execute! library loader [class-name class-bytecode])
+ (-> Library java/lang/ClassLoader Definition (Try Any))
(io.run (do (try.with io.monad)
[existing-class? (|> (atom.read library)
(:: io.monad map (dictionary.contains? class-name))
@@ -141,10 +142,9 @@
(def: (define! library loader context valueI)
(-> Library java/lang/ClassLoader generation.Context Inst (Try [Text Any Definition]))
- (let [class-name (..class-name context)]
- (do try.monad
- [[value definition] (evaluate! library loader class-name valueI)]
- (wrap [class-name value definition]))))
+ (do try.monad
+ [[value definition] (evaluate! library loader context valueI)]
+ (wrap [(..class-name context) value definition])))
(def: #export host
(IO Host)
@@ -152,9 +152,9 @@
loader (loader.memory library)]
(: Host
(structure
- (def: (evaluate! temp-label valueI)
+ (def: (evaluate! context valueI)
(:: try.monad map product.left
- (..evaluate! library loader (text.replace-all " " "$" temp-label) valueI)))
+ (..evaluate! library loader context valueI)))
(def: execute!
(..execute! library loader))