aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/translation/jvm/extension
diff options
context:
space:
mode:
authorEduardo Julian2021-09-12 00:07:08 -0400
committerEduardo Julian2021-09-12 00:07:08 -0400
commitdda05bca0956af5e5b3875c4cc36e61aa04772e4 (patch)
tree0f8b27697d58ab5c8e41aba7c7c9f769d3800767 /lux-jvm/source/luxc/lang/translation/jvm/extension
parentd48270f43c404ba19ca04da2553455ecaaf2caba (diff)
Made the "#" character great again!
Diffstat (limited to 'lux-jvm/source/luxc/lang/translation/jvm/extension')
-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.lux104
2 files changed, 54 insertions, 54 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 8d92a68eb..78048379c 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/common.lux
@@ -48,10 +48,10 @@
Handler))
(function (_ extension_name phase archive input)
(case (<s>.result parser input)
- {#try.Success input'}
+ {try.#Success input'}
(handler extension_name phase archive input')
- {#try.Failure error}
+ {try.#Failure error}
(phase.except extension.invalid_syntax [extension_name %synthesis input]))))
(import: java/lang/Double
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 5eda6443d..930e219a5 100644
--- a/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
+++ b/lux-jvm/source/luxc/lang/translation/jvm/extension/host.lux
@@ -96,15 +96,15 @@
(do <>.monad
[arrayJT (<text>.then parser.array <synthesis>.text)]
(case (parser.array? arrayJT)
- {#.Some elementJT}
+ {.#Some elementJT}
(case (parser.object? elementJT)
- {#.Some elementJT}
+ {.#Some elementJT}
(in elementJT)
- #.None
+ {.#None}
(<>.failure (exception.error ..not_an_object_array [arrayJT])))
- #.None
+ {.#None}
(undefined))))
(template [<name> <inst>]
@@ -629,10 +629,10 @@
(do phase.monad
[]
(case (dictionary.value unboxed ..primitives)
- {#.Some primitive}
+ {.#Some primitive}
(in (_.GETSTATIC (type.class class (list)) field primitive))
- #.None
+ {.#None}
(in (_.GETSTATIC (type.class class (list)) field (type.class unboxed (list)))))))]))
(def: put::static
@@ -644,12 +644,12 @@
[valueI (generate archive valueS)
.let [$class (type.class class (list))]]
(case (dictionary.value unboxed ..primitives)
- {#.Some primitive}
+ {.#Some primitive}
(in (|>> valueI
(_.PUTSTATIC $class field primitive)
(_.string synthesis.unit)))
- #.None
+ {.#None}
(in (|>> valueI
(_.CHECKCAST $class)
(_.PUTSTATIC $class field $class)
@@ -664,10 +664,10 @@
[objectI (generate archive objectS)
.let [$class (type.class class (list))
getI (case (dictionary.value unboxed ..primitives)
- {#.Some primitive}
+ {.#Some primitive}
(_.GETFIELD $class field primitive)
- #.None
+ {.#None}
(_.GETFIELD $class field (type.class unboxed (list))))]]
(in (|>> objectI
(_.CHECKCAST $class)
@@ -683,10 +683,10 @@
objectI (generate archive objectS)
.let [$class (type.class class (list))
putI (case (dictionary.value unboxed ..primitives)
- {#.Some primitive}
+ {.#Some primitive}
(_.PUTFIELD $class field primitive)
- #.None
+ {.#None}
(let [$unboxed (type.class unboxed (list))]
(|>> (_.CHECKCAST $unboxed)
(_.PUTFIELD $class field $unboxed))))]]
@@ -709,10 +709,10 @@
(do phase.monad
[valueI (generate archive valueS)]
(case (type.primitive? valueT)
- {#.Right valueT}
+ {.#Right valueT}
(in [valueT valueI])
- {#.Left valueT}
+ {.#Left valueT}
(in [valueT (|>> valueI
(_.CHECKCAST valueT))]))))
@@ -722,10 +722,10 @@
(def: (prepare_output outputT)
(-> (Type Return) Inst)
(case (type.void? outputT)
- {#.Right outputT}
+ {.#Right outputT}
..voidI
- {#.Left outputT}
+ {.#Left outputT}
function.identity))
(def: invoke::static
@@ -814,26 +814,26 @@
[0 _] body
[1 _] body
- [2 {#synthesis.Control {#synthesis.Branch {#synthesis.Let _ 2 hidden}}}]
+ [2 {synthesis.#Control {synthesis.#Branch {synthesis.#Let _ 2 hidden}}}]
hidden
- [_ {#synthesis.Control {#synthesis.Branch {#synthesis.Case _ path}}}]
+ [_ {synthesis.#Control {synthesis.#Branch {synthesis.#Case _ path}}}]
(loop [path path]
(case path
- (^or #synthesis.Pop
- {#synthesis.Access _}
- {#synthesis.Bind _}
- {#synthesis.Bit_Fork _}
- {#synthesis.I64_Fork _}
- {#synthesis.F64_Fork _}
- {#synthesis.Text_Fork _}
- {#synthesis.Alt _})
+ (^or {synthesis.#Pop}
+ {synthesis.#Access _}
+ {synthesis.#Bind _}
+ {synthesis.#Bit_Fork _}
+ {synthesis.#I64_Fork _}
+ {synthesis.#F64_Fork _}
+ {synthesis.#Text_Fork _}
+ {synthesis.#Alt _})
body
- {#synthesis.Seq _ next}
+ {synthesis.#Seq _ next}
(recur next)
- {#synthesis.Then hidden}
+ {synthesis.#Then hidden}
hidden))
_
@@ -875,18 +875,18 @@
(^template [<tag>]
[(^ {<tag> leftP rightP})
{<tag> (recur leftP) (recur rightP)}])
- ([#synthesis.Alt]
- [#synthesis.Seq])
+ ([synthesis.#Alt]
+ [synthesis.#Seq])
(^template [<tag>]
- [(^ {<tag> value})
+ [(^ {<tag> _})
path])
- ([#synthesis.Pop]
- [#synthesis.Bind]
- [#synthesis.Access])
+ ([synthesis.#Pop]
+ [synthesis.#Bind]
+ [synthesis.#Access])
- {#synthesis.Bit_Fork when then else}
- {#synthesis.Bit_Fork when (recur then) (maybe\each recur else)}
+ {synthesis.#Bit_Fork when then else}
+ {synthesis.#Bit_Fork when (recur then) (maybe\each recur else)}
(^template [<tag>]
[{<tag> [[test then] elses]}
@@ -894,16 +894,16 @@
(list\each (function (_ [else_test else_then])
[else_test (recur else_then)])
elses)]}])
- ([#synthesis.I64_Fork]
- [#synthesis.F64_Fork]
- [#synthesis.Text_Fork])
+ ([synthesis.#I64_Fork]
+ [synthesis.#F64_Fork]
+ [synthesis.#Text_Fork])
)))
(def: (normalize_method_body mapping)
(-> (Dictionary Synthesis Variable) Synthesis Synthesis)
(function (recur body)
(case body
- (^ {#synthesis.Primitive value})
+ (^ {synthesis.#Primitive value})
body
(^ (synthesis.constant value))
@@ -957,8 +957,8 @@
(^ (synthesis.function/apply [functionS inputsS+]))
(synthesis.function/apply [(recur functionS) (list\each recur inputsS+)])
- {#synthesis.Extension [name inputsS+]}
- {#synthesis.Extension [name (list\each recur inputsS+)]})))
+ {synthesis.#Extension [name inputsS+]}
+ {synthesis.#Extension [name (list\each recur inputsS+)]})))
(def: $Object
(type.class "java.lang.Object" (list)))
@@ -999,14 +999,14 @@
(def: (prepare_argument lux_register argumentT jvm_register)
(-> Register (Type Value) Register [Register Inst])
(case (type.primitive? argumentT)
- {#.Left argumentT}
+ {.#Left argumentT}
[(n.+ 1 jvm_register)
(if (n.= lux_register jvm_register)
(|>>)
(|>> (_.ALOAD jvm_register)
(_.ASTORE lux_register)))]
- {#.Right argumentT}
+ {.#Right argumentT}
(template.let [(wrap_primitive <shift> <load> <type>)
[[(n.+ <shift> jvm_register)
(|>> (<load> jvm_register)
@@ -1040,21 +1040,21 @@
(def: .public (returnI returnT)
(-> (Type Return) Inst)
(case (type.void? returnT)
- {#.Right returnT}
+ {.#Right returnT}
_.RETURN
- {#.Left returnT}
+ {.#Left returnT}
(case (type.primitive? returnT)
- {#.Left returnT}
+ {.#Left returnT}
(case (type.class? returnT)
- {#.Some class_name}
+ {.#Some class_name}
(|>> (_.CHECKCAST returnT)
_.ARETURN)
- #.None
+ {.#None}
_.ARETURN)
- {#.Right returnT}
+ {.#Right returnT}
(template.let [(unwrap_primitive <return> <type>)
[(|>> (_.unwrap <type>)
<return>)]]
@@ -1102,7 +1102,7 @@
... Give them names as "foreign" variables.
list.enumeration
(list\each (function (_ [id capture])
- [capture {#variable.Foreign id}]))
+ [capture {variable.#Foreign id}]))
(dictionary.of_list synthesis.hash))
normalized_methods (list\each (function (_ [environment
[ownerT name
@@ -1150,7 +1150,7 @@
(..with_anonymous_init class total_environment super_class inputsTI)
method_definitions))]]
_ (generation.execute! directive)
- _ (generation.save! artifact_id #.None directive)]
+ _ (generation.save! artifact_id {.#None} directive)]
(..anonymous_instance generate archive class total_environment)))]))
(def: class_bundle