diff options
author | Eduardo Julian | 2019-09-17 21:51:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-09-17 21:51:05 -0400 |
commit | f0a95ee657fef968df1f5f88dc741256e1153e63 (patch) | |
tree | 539e0d1b8b70f8eba4e2905e1ba8da00fc7e3bf5 /new-luxc/source | |
parent | 4049370ec0d0bec578b8fcb83700d020e81386c4 (diff) |
Some refactoring.
Diffstat (limited to 'new-luxc/source')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/extension.lux | 16 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/extension/common.lux (renamed from new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/extension/host.lux (renamed from new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/program.lux | 27 |
4 files changed, 26 insertions, 17 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/extension.lux b/new-luxc/source/luxc/lang/translation/jvm/extension.lux new file mode 100644 index 000000000..9066dd156 --- /dev/null +++ b/new-luxc/source/luxc/lang/translation/jvm/extension.lux @@ -0,0 +1,16 @@ +(.module: + [lux #* + [data + [collection + ["." dictionary]]]] + [//// + [host + [jvm (#+ Bundle)]]] + ["." / #_ + ["#." common] + ["#." host]]) + +(def: #export bundle + Bundle + (dictionary.merge /common.bundle + /host.bundle)) diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux b/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux index a46813232..a46813232 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/extension/common.lux diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux b/new-luxc/source/luxc/lang/translation/jvm/extension/host.lux index ca6e31bfd..ca6e31bfd 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/extension/host.lux diff --git a/new-luxc/source/program.lux b/new-luxc/source/program.lux index b579b0df0..f22d9ef58 100644 --- a/new-luxc/source/program.lux +++ b/new-luxc/source/program.lux @@ -22,8 +22,8 @@ [compiler [phase ["." macro (#+ Expander)] - ["." extension #_ - [analysis + [extension + ["." analysis #_ ["#" jvm]]]] [default ["." platform (#+ Platform)]]]]] @@ -36,15 +36,13 @@ ["_" jvm ["$d" def] ["$i" inst]]] - [directive - [".S" jvm]] + ["." directive #_ + ["#" jvm]] [translation ["." jvm ["." runtime] ["." expression] - [procedure - [".E" common] - [".E" host]]]]]]) + ["translation" extension]]]]]) (import: #long java/lang/reflect/Method (invoke [java/lang/Object [java/lang/Object]] #try java/lang/Object)) @@ -80,7 +78,7 @@ (host.array-write 1 (:coerce java/lang/Object lux))) apply-method)))) -(def: #export jvm +(def: #export platform (IO (Platform IO _.Anchor _.Inst _.Definition)) (do io.monad [host jvm.host] @@ -156,18 +154,13 @@ $i.POP $i.RETURN))))])) -(def: #export bundle - _.Bundle - (dictionary.merge commonE.bundle - hostE.bundle)) - (program: [{service /cli.service}] (/.compiler @.jvm ".jvm" ..expander - extension.bundle - ..jvm - ..bundle - jvmS.bundle + analysis.bundle + ..platform + translation.bundle + directive.bundle ..program service)) |