From f621a133e6e0a516c0586270fea8eaffb4829d82 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 8 Aug 2021 17:56:15 -0400 Subject: No more #export magic syntax. --- .../luxc/lang/translation/jvm/extension/common.lux | 6 ++--- .../luxc/lang/translation/jvm/extension/host.lux | 28 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm/extension') 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 eb3d02be7..8c6d96283 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux @@ -41,7 +41,7 @@ ["." /// ["." runtime]]) -(def: #export (custom [parser handler]) +(def: .public (custom [parser handler]) (All [s] (-> [(Parser s) (-> Text Phase Archive s (Operation Inst))] @@ -111,7 +111,7 @@ branchG (_.GOTO @end))])))) conditionals)) - #let [table (|> conditionalsG+ + .let [table (|> conditionalsG+ (list@map product.left) list@join) conditionalsG (|> conditionalsG+ @@ -367,7 +367,7 @@ (bundle.install "log" (unary io::log)) (bundle.install "error" (unary io::error))))) -(def: #export bundle +(def: .public bundle Bundle (<| (bundle.prefix "lux") (|> bundle::lux 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 e87ea6510..069f23fae 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux @@ -68,7 +68,7 @@ ["#." function]]]) (template [ ] - [(def: #export + [(def: .public (Parser (Type )) (.then .text))] @@ -87,11 +87,11 @@ (All [a] (-> (Type a) Text)) (|>> type.descriptor descriptor.descriptor)) -(exception: #export (not_an_object_array {arrayJT (Type Array)}) +(exception: .public (not_an_object_array {arrayJT (Type Array)}) (exception.report ["JVM Type" (..signature arrayJT)])) -(def: #export object_array +(def: .public object_array (Parser (Type Object)) (do <>.monad [arrayJT (.then parser.array .text)] @@ -642,7 +642,7 @@ (function (_ extension_name generate archive [class field unboxed valueS]) (do phase.monad [valueI (generate archive valueS) - #let [$class (type.class class (list))]] + .let [$class (type.class class (list))]] (case (dictionary.get unboxed ..primitives) (#.Some primitive) (in (|>> valueI @@ -662,7 +662,7 @@ (function (_ extension_name generate archive [class field unboxed objectS]) (do phase.monad [objectI (generate archive objectS) - #let [$class (type.class class (list)) + .let [$class (type.class class (list)) getI (case (dictionary.get unboxed ..primitives) (#.Some primitive) (_.GETFIELD $class field primitive) @@ -681,7 +681,7 @@ (do phase.monad [valueI (generate archive valueS) objectI (generate archive objectS) - #let [$class (type.class class (list)) + .let [$class (type.class class (list)) putI (case (dictionary.get unboxed ..primitives) (#.Some primitive) (_.PUTFIELD $class field primitive) @@ -808,7 +808,7 @@ (Parser Argument) (.tuple (<>.and .text ..value))) -(def: #export (hidden_method_body arity body) +(def: .public (hidden_method_body arity body) (-> Nat Synthesis Synthesis) (case [arity body] [0 _] body @@ -1027,7 +1027,7 @@ ## (\ type.equivalence = type.double argumentT) (wrap_primitive 2 _.DLOAD type.double)))))) -(def: #export (prepare_arguments offset types) +(def: .public (prepare_arguments offset types) (-> Nat (List (Type Value)) Inst) (|> types list.enumeration @@ -1037,7 +1037,7 @@ (: [Register Inst] [offset (|>>)])) product.right)) -(def: #export (returnI returnT) +(def: .public (returnI returnT) (-> (Type Return) Inst) (case (type.void? returnT) (#.Right returnT) @@ -1087,7 +1087,7 @@ overriden_methods]) (do {! phase.monad} [[context _] (generation.with_new_context archive (in [])) - #let [[module_id artifact_id] context + .let [[module_id artifact_id] context anonymous_class_name (///.class_name context) class (type.class anonymous_class_name (list)) total_environment (|> overriden_methods @@ -1097,7 +1097,7 @@ list\join ## Remove duplicates. (set.of_list synthesis.hash) - set.to_list) + set.list) global_mapping (|> total_environment ## Give them names as "foreign" variables. list.enumeration @@ -1131,7 +1131,7 @@ (do ! [bodyG (generation.with_context artifact_id (generate archive bodyS)) - #let [argumentsT (list\map product.right arguments)]] + .let [argumentsT (list\map product.right arguments)]] (in (_def.method #$.Public (if strict_fp? ($_ $.++M $.finalM $.strictM) @@ -1142,7 +1142,7 @@ bodyG (returnI returnT))))))) (\ ! map _def.fuse)) - #let [directive [anonymous_class_name + .let [directive [anonymous_class_name (_def.class #$.V1_6 #$.Public $.finalC anonymous_class_name (list) super_class super_interfaces @@ -1160,7 +1160,7 @@ (bundle.install "anonymous" class::anonymous) ))) -(def: #export bundle +(def: .public bundle Bundle (<| (bundle.prefix "jvm") (|> ..conversion_bundle -- cgit v1.2.3