aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/program.lux24
-rw-r--r--lux-jvm/source/program.lux10
2 files changed, 22 insertions, 12 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/program.lux b/lux-jvm/source/luxc/lang/translation/jvm/program.lux
index 7ac897009..2c4f1d3f2 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/program.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/program.lux
@@ -1,8 +1,17 @@
(.module:
[lux #*
+ [data
+ [text
+ ["%" format (#+ format)]]]
[target
[jvm
- ["$t" type]]]]
+ ["$t" type]]]
+ [tool
+ [compiler
+ [language
+ [lux
+ [generation (#+ Context)]
+ [program (#+ Program)]]]]]]
[luxc
[lang
[host
@@ -13,12 +22,10 @@
["." jvm
["." runtime]]]]])
-(def: #export class "LuxProgram")
-
(def: ^Object ($t.class "java.lang.Object" (list)))
-(def: #export (program programI)
- (-> _.Inst _.Definition)
+(def: #export (program artifact-name context programI)
+ (-> (-> Context Text) (Program _.Inst _.Definition))
(let [nilI runtime.noneI
num-inputsI (|>> ($i.ALOAD 0) $i.ARRAYLENGTH)
decI (|>> ($i.int +1) $i.ISUB)
@@ -67,11 +74,12 @@
($i.INVOKEVIRTUAL jvm.$Function runtime.apply-method (runtime.apply-signature 1)))
main-type ($t.method [(list ($t.array ($t.class "java.lang.String" (list))))
$t.void
- (list)])]
- [..class
+ (list)])
+ class (artifact-name context)]
+ [class
($d.class #_.V1_6
#_.Public _.finalC
- ..class
+ class
(list) ..^Object
(list)
(|>> ($d.method #_.Public _.staticM "main" main-type
diff --git a/lux-jvm/source/program.lux b/lux-jvm/source/program.lux
index ccb8ba414..d5f9ecb0b 100644
--- a/lux-jvm/source/program.lux
+++ b/lux-jvm/source/program.lux
@@ -27,6 +27,9 @@
[compiler
[default
["." platform (#+ Platform)]]
+ [meta
+ ["." packager #_
+ ["#" jvm]]]
[language
[lux
[analysis
@@ -42,8 +45,7 @@
]
[generation
["." jvm #_
- ## ["." runtime (#+ Anchor Definition)]
- ["." packager]
+ ["#/." runtime]
## ["#/." host]
]]]]]]]]
[program
@@ -174,9 +176,9 @@
## generation.bundle
translation.bundle
(directive.bundle ..extender)
- jvm/program.program
+ (jvm/program.program jvm/runtime.class-name)
..extender
service
- [(packager.package jvm/program.class) jar-path])]
+ [packager.package jar-path])]
(..declare-success! []))
(io.io []))))