aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm
diff options
context:
space:
mode:
authorEduardo Julian2021-06-12 01:32:40 -0400
committerEduardo Julian2021-06-12 01:32:40 -0400
commitaf3e6e2cb011dc2ad9204440990731a2f272716d (patch)
tree3521c74b05fc5b3ddddbe901d32ace87dbb6c018 /lux-jvm/source/luxc/lang/translation/jvm
parent8f575da5095e3b259d4eb6b6f13d3e37ef1d38e4 (diff)
Constraining the year of the snapshot time in Aedifex.
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation/jvm')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux4
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux4
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/function.lux2
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/primitive.lux2
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/runtime.lux22
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/structure.lux2
6 files changed, 21 insertions, 15 deletions
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
index c9eed9489..c15d1ffcf 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
@@ -1,5 +1,6 @@
(.module:
[lux (#- Type)
+ [ffi (#+ import:)]
[abstract
["." monad (#+ do)]]
[control
@@ -30,8 +31,7 @@
[extension (#+ Nullary Unary Binary Trinary Variadic
nullary unary binary trinary variadic)]]
["." extension
- ["." bundle]]]]]]]
- [host (#+ import:)]]
+ ["." bundle]]]]]]]]
[luxc
[lang
[host
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
index c3c522bfa..dc579c970 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
@@ -1,6 +1,6 @@
(.module:
[lux (#- Type primitive int char type)
- [host (#+ import:)]
+ [ffi (#+ import:)]
[abstract
["." monad (#+ do)]]
[control
@@ -1048,7 +1048,7 @@
(..with_anonymous_init class total_environment super_class inputsTI)
method_definitions))]]
_ (generation.execute! directive)
- _ (generation.save! (%.nat artifact_id) directive)]
+ _ (generation.save! artifact_id directive)]
(..anonymous_instance generate archive class total_environment)))]))
(def: bundle::class
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/function.lux b/lux-jvm/source/luxc/lang/translation/jvm/function.lux
index 6c03bd482..0b441c92f 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/function.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/function.lux
@@ -316,7 +316,7 @@
//.$Function (list)
functionD)]]
_ (generation.execute! directive)
- _ (generation.save! (%.nat (product.right function_context)) directive)]
+ _ (generation.save! (product.right function_context) directive)]
(wrap instanceI)))
(def: #export (call generate archive [functionS argsS])
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux
index b42f63c4d..3383e3856 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/primitive.lux
@@ -1,6 +1,6 @@
(.module:
[lux (#- i64)
- ["." host (#+ import:)]
+ ["." ffi (#+ import:)]
[math
[number
["i" int]]]
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/runtime.lux b/lux-jvm/source/luxc/lang/translation/jvm/runtime.lux
index 782187339..95cfd9e5a 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/runtime.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/runtime.lux
@@ -20,7 +20,7 @@
["." category (#+ Void Value' Value Return' Return Primitive Object Class Array Var Parameter Method)]
["." reflection]]]]
[tool
- [compiler (#+ Output)
+ [compiler
[arity (#+ Arity)]
["." phase]
[language
@@ -28,7 +28,7 @@
["." synthesis]
["." generation]]]
[meta
- [archive
+ [archive (#+ Output)
["." artifact (#+ Registry)]]]]]]
[luxc
[lang
@@ -334,8 +334,11 @@
(-> (Type (<| Return' Value' category)) Text))
(|>> type.reflection reflection.reflection))
+(def: runtime_id
+ 0)
+
(def: translate_runtime
- (Operation [Text Binary])
+ (Operation [artifact.ID Binary])
(let [runtime_class (..reflection //.$Runtime)
bytecode ($d.class #$.V1_6 #$.Public $.finalC runtime_class (list) (type.class "java.lang.Object" (list)) (list)
(|>> adt_methods
@@ -345,11 +348,14 @@
directive [runtime_class bytecode]]
(do phase.monad
[_ (generation.execute! directive)
- _ (generation.save! "0" directive)]
- (wrap ["0" bytecode]))))
+ _ (generation.save! ..runtime_id directive)]
+ (wrap [..runtime_id bytecode]))))
+
+(def: function_id
+ 1)
(def: translate_function
- (Operation [Text Binary])
+ (Operation [artifact.ID Binary])
(let [applyI (|> (enum.range n.enum 2 num_apply_variants)
(list@map (function (_ arity)
($d.method #$.Public $.noneM apply_method (apply_signature arity)
@@ -379,8 +385,8 @@
directive [function_class bytecode]]
(do phase.monad
[_ (generation.execute! directive)
- _ (generation.save! "1" directive)]
- (wrap ["1" bytecode]))))
+ _ (generation.save! ..function_id directive)]
+ (wrap [..function_id bytecode]))))
(def: #export translate
(Operation [Registry Output])
diff --git a/lux-jvm/source/luxc/lang/translation/jvm/structure.lux b/lux-jvm/source/luxc/lang/translation/jvm/structure.lux
index b3daed102..100bce9d9 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/structure.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/structure.lux
@@ -1,6 +1,6 @@
(.module:
[lux (#- Type)
- ["." host (#+ import:)]
+ ["." ffi (#+ import:)]
[abstract
["." monad (#+ do)]]
[control