aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/directive/jvm.lux
diff options
context:
space:
mode:
Diffstat (limited to 'lux-jvm/source/luxc/lang/directive/jvm.lux')
-rw-r--r--lux-jvm/source/luxc/lang/directive/jvm.lux40
1 files changed, 21 insertions, 19 deletions
diff --git a/lux-jvm/source/luxc/lang/directive/jvm.lux b/lux-jvm/source/luxc/lang/directive/jvm.lux
index 323c337d5..f125192f5 100644
--- a/lux-jvm/source/luxc/lang/directive/jvm.lux
+++ b/lux-jvm/source/luxc/lang/directive/jvm.lux
@@ -22,6 +22,8 @@
["[0]" dictionary {"+" Dictionary}]
["[0]" sequence {"+" Sequence} ("[1]#[0]" functor mix)]
["[0]" set {"+" Set}]]]
+ [macro
+ ["^" pattern]]
[math
[number
["[0]" nat]]]
@@ -254,7 +256,7 @@
(def: (object instruction)
(-> /.Object Inst)
(case instruction
- (^template [<tag> <inst>]
+ (^.template [<tag> <inst>]
[{<tag> class field_name field_type}
(<inst> class field_name field_type)])
([/.#GETSTATIC _.GETSTATIC]
@@ -267,7 +269,7 @@
{/.#INSTANCEOF type} (_.INSTANCEOF type)
{/.#CHECKCAST type} (_.CHECKCAST type)
- (^template [<tag> <inst>]
+ (^.template [<tag> <inst>]
[{<tag> class method_name method_type}
(<inst> class method_name method_type)])
([/.#INVOKEINTERFACE _.INVOKEINTERFACE]
@@ -434,7 +436,7 @@
(def: (relabel_branching [mapping instruction])
(Re_labeler /.Branching)
(case instruction
- (^template [<tag>]
+ (^.template [<tag>]
[{<tag> label}
(let [[mapping label] (..relabel [mapping label])]
[mapping {<tag> label}])])
@@ -476,7 +478,7 @@
(def: (relabel_control [mapping instruction])
(Re_labeler /.Control)
(case instruction
- (^template [<tag> <relabel>]
+ (^.template [<tag> <relabel>]
[{<tag> instruction}
(let [[mapping instruction] (<relabel> [mapping instruction])]
[mapping {<tag> instruction}])])
@@ -484,7 +486,7 @@
[/.#Branching ..relabel_branching]
[/.#Exception ..relabel_exception])
- (^template [<tag>]
+ (^.template [<tag>]
[{<tag> instruction}
[mapping {<tag> instruction}]])
([/.#Concurrency] [/.#Return])
@@ -499,7 +501,7 @@
{/.#NOP}
[mapping {/.#NOP}]
- (^template [<tag>]
+ (^.template [<tag>]
[{<tag> instruction}
[mapping {<tag> instruction}]])
([/.#Constant]
@@ -568,7 +570,7 @@
(-> jvm.Extender ..Handler)
(function (handler extension_name phase archive inputsC+)
(case inputsC+
- (^ (list nameC valueC))
+ (pattern (list nameC valueC))
(do phase.monad
[[_ _ name] (lux/.evaluate! archive Text nameC)
[_ handlerV] (lux/.generator archive (:as Text name) ..Handler' valueC)
@@ -740,15 +742,15 @@
(in (cache.all (list& body_dependencies all_super_ctor_dependencies))))
- (^or {#Override [[parent_name parent_variables] name strict_floating_point? annotations variables
+ (^.or {#Override [[parent_name parent_variables] name strict_floating_point? annotations variables
+ self arguments return exceptions
+ body]}
+ {#Virtual [name privacy final? strict_floating_point? annotations variables
self arguments return exceptions
body]}
- {#Virtual [name privacy final? strict_floating_point? annotations variables
- self arguments return exceptions
- body]}
- {#Static [name privacy strict_floating_point? annotations variables
- arguments return exceptions
- body]})
+ {#Static [name privacy strict_floating_point? annotations variables
+ arguments return exceptions
+ body]})
(cache.dependencies archive body)
{#Abstract _}
@@ -1204,7 +1206,7 @@
(in [privacy strict_floating_point? annotations method_tvars exceptions
self arguments constructor_argumentsS
(case bodyS
- (^ (method_body bodyS))
+ (pattern (method_body bodyS))
bodyS
_
@@ -1223,7 +1225,7 @@
(in [[super_name super_tvars] method_name strict_floating_point? annotations
method_tvars self arguments returnJ exceptionsJ
(case bodyS
- (^ (method_body bodyS))
+ (pattern (method_body bodyS))
bodyS
_
@@ -1242,7 +1244,7 @@
(in [name privacy final? strict_floating_point? annotations method_tvars
self arguments returnJ exceptionsJ
(case bodyS
- (^ (method_body bodyS))
+ (pattern (method_body bodyS))
bodyS
_
@@ -1261,7 +1263,7 @@
(in [name privacy strict_floating_point? annotations method_tvars
arguments returnJ exceptionsJ
(case bodyS
- (^ (method_body bodyS))
+ (pattern (method_body bodyS))
bodyS
_
@@ -1500,7 +1502,7 @@
(list#each ..constraint type_variables)
supers
(|> method_declarations
- (list#each (function (_ (^open "_[0]"))
+ (list#each (function (_ (open "_[0]"))
(def.abstract_method {jvm.#Public} jvm.noneM _#name
(/type.method [_#type_variables _#arguments _#return _#exceptions]))))
def.fuse))]]]