From af7f85c4eb724f2888ecce9c8b52d6d3bb1cd807 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 27 Apr 2019 23:41:47 -0400 Subject: Moved JVM type machinery to stdlib. --- new-luxc/source/luxc/lang/host/jvm.lux | 47 ++++------------------------------ 1 file changed, 5 insertions(+), 42 deletions(-) (limited to 'new-luxc/source/luxc/lang/host/jvm.lux') diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux index 01ec36624..4966038c6 100644 --- a/new-luxc/source/luxc/lang/host/jvm.lux +++ b/new-luxc/source/luxc/lang/host/jvm.lux @@ -1,5 +1,6 @@ (.module: - [lux (#- Type Definition) + [lux (#- Definition) + [host (#+ import:)] [abstract monad] [control @@ -11,16 +12,17 @@ [macro ["." code] [syntax (#+ syntax:)]] - [host (#+ import:)] [world [binary (#+ Binary)]] + [target + [jvm + [type (#+ Class)]]] [tool [compiler [reference (#+ Register)] [phase ["." generation]]]]]) -## [Host] (import: org/objectweb/asm/MethodVisitor) (import: org/objectweb/asm/ClassWriter) @@ -28,42 +30,6 @@ (import: #long org/objectweb/asm/Label (new [])) -## [Type] -(type: #export Bound - #Upper - #Lower) - -(type: #export Primitive - #Boolean - #Byte - #Short - #Int - #Long - #Float - #Double - #Char) - -(type: #export #rec Generic - (#Var Text) - (#Wildcard (Maybe [Bound Generic])) - (#Class Text (List Generic))) - -(type: #export Class - [Text (List Generic)]) - -(type: #export Parameter - [Text Class (List Class)]) - -(type: #export #rec Type - (#Primitive Primitive) - (#Generic Generic) - (#Array Type)) - -(type: #export Method - {#args (List Type) - #return (Maybe Type) - #exceptions (List Generic)}) - (type: #export Def (-> ClassWriter ClassWriter)) @@ -109,7 +75,6 @@ [Bundle generation.Bundle] ) -## [Values] (syntax: (config: {type s.local-identifier} {none s.local-identifier} {++ s.local-identifier} @@ -145,12 +110,10 @@ g!options+)))) -## Configs (config: Class-Config noneC ++C [finalC]) (config: Method-Config noneM ++M [finalM staticM synchronizedM strictM]) (config: Field-Config noneF ++F [finalF staticF transientF volatileF]) -## Labels (def: #export new-label (-> Any Label) (function (_ _) -- cgit v1.2.3