diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm.lux | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm.lux b/new-luxc/source/luxc/lang/translation/jvm.lux index cf04d2a1a..8e2cd2af6 100644 --- a/new-luxc/source/luxc/lang/translation/jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm.lux @@ -1,5 +1,5 @@ (.module: - [lux (#- Definition) + [lux (#- Module Definition) ["." host (#+ import: do-to object)] [abstract [monad (#+ do)]] @@ -25,7 +25,10 @@ ["." descriptor]]]] [tool [compiler - ["." name]]]] + [meta + [archive + [descriptor (#+ Module)] + ["." artifact]]]]]] [/// [host ["." jvm (#+ Inst Definition Host State) @@ -97,11 +100,9 @@ (-> Text Text) (text.replace-all .module-separator ..class-path-separator)) -(def: #export (class-name [module name]) - (-> Name Text) - (format (text.replace-all .module-separator ..class-path-separator module) - ..class-path-separator (name.normalize name) - "___" (%.nat (text@hash name)))) +(def: #export (class-name module id) + (-> Module artifact.ID Text) + (format (..class-name' module) ..class-path-separator (%.nat id))) (def: (evaluate! library loader eval-class valueI) (-> Library ClassLoader Text Inst (Try [Any Definition])) @@ -138,9 +139,9 @@ (loader.store class-name class-bytecode library))] (loader.load class-name loader)))) -(def: (define! library loader definition-name valueI) - (-> Library ClassLoader Name Inst (Try [Text Any Definition])) - (let [class-name (..class-name definition-name)] +(def: (define! library loader module id valueI) + (-> Library ClassLoader Module artifact.ID Inst (Try [Text Any Definition])) + (let [class-name (..class-name module id)] (do try.monad [[value definition] (evaluate! library loader class-name valueI)] (wrap [class-name value definition])))) @@ -152,9 +153,8 @@ (: Host (structure (def: (evaluate! temp-label valueI) - (let [eval-class (|> temp-label name.normalize (text.replace-all " " "$"))] - (:: try.monad map product.left - (..evaluate! library loader eval-class valueI)))) + (:: try.monad map product.left + (..evaluate! library loader (text.replace-all " " "$" temp-label) valueI))) (def: execute! (..execute! library loader)) |