aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm/runtime.lux
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/runtime.lux
parent8f575da5095e3b259d4eb6b6f13d3e37ef1d38e4 (diff)
Constraining the year of the snapshot time in Aedifex.
Diffstat (limited to '')
-rw-r--r--lux-jvm/source/luxc/lang/translation/jvm/runtime.lux22
1 files changed, 14 insertions, 8 deletions
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])