From af3e6e2cb011dc2ad9204440990731a2f272716d Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 12 Jun 2021 01:32:40 -0400 Subject: Constraining the year of the snapshot time in Aedifex. --- .../luxc/lang/translation/jvm/extension/common.lux | 4 ++-- .../luxc/lang/translation/jvm/extension/host.lux | 4 ++-- .../source/luxc/lang/translation/jvm/function.lux | 2 +- .../source/luxc/lang/translation/jvm/primitive.lux | 2 +- .../source/luxc/lang/translation/jvm/runtime.lux | 22 ++++++++++++++-------- .../source/luxc/lang/translation/jvm/structure.lux | 2 +- 6 files changed, 21 insertions(+), 15 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm') 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 -- cgit v1.2.3