diff options
author | Eduardo Julian | 2018-01-08 21:40:06 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-01-08 21:40:06 -0400 |
commit | 9eaaaf953ba7ce1eeb805603f4e113aa15f5178f (patch) | |
tree | ef134eecc8a5767a997fce0637cd64e0ebcee6b1 /new-luxc/source/luxc/lang/translation | |
parent | f523bc14d43286348aeb200bd0554812dc6ef28d (diff) |
- Moved all translation code under the JVM path (in preparation for porting the JS back-end).
Diffstat (limited to 'new-luxc/source/luxc/lang/translation')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/case.jvm.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/common.jvm.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/eval.jvm.lux) | 5 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/expression.jvm.lux) | 22 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/function.jvm.lux) | 8 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/imports.jvm.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/loop.jvm.lux) | 8 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/primitive.jvm.lux) | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/procedure.jvm.lux) | 0 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux) | 10 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/procedure/host.jvm.lux) | 2 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/reference.jvm.lux) | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/runtime.jvm.lux) | 4 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/statement.jvm.lux) | 8 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux (renamed from new-luxc/source/luxc/lang/translation/structure.jvm.lux) | 4 |
15 files changed, 41 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation/case.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux index b693f50b8..b693f50b8 100644 --- a/new-luxc/source/luxc/lang/translation/case.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux diff --git a/new-luxc/source/luxc/lang/translation/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux index a4eb5b93b..a4eb5b93b 100644 --- a/new-luxc/source/luxc/lang/translation/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/common.jvm.lux diff --git a/new-luxc/source/luxc/lang/translation/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux index 9cce16a49..c326895a2 100644 --- a/new-luxc/source/luxc/lang/translation/eval.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/eval.jvm.lux @@ -11,9 +11,8 @@ ["$d" def] ["$i" inst])) ["la" analysis] - ["ls" synthesis] - (translation [".T" common])) - )) + ["ls" synthesis])) + (// [".T" common])) (host.import java/lang/reflect/Field (get [Object] Object)) diff --git a/new-luxc/source/luxc/lang/translation/expression.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux index 4496de784..82c8c0ec0 100644 --- a/new-luxc/source/luxc/lang/translation/expression.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/expression.jvm.lux @@ -9,16 +9,17 @@ (macro ["s" syntax])) (luxc ["&" lang] (lang [".L" variable #+ Variable Register] + [".L" extension] (host ["$" jvm]) - ["ls" synthesis] - (translation [".T" common] - [".T" primitive] - [".T" structure] - [".T" eval] - [".T" procedure] - [".T" function] - [".T" reference] - [".T" case])))) + ["ls" synthesis])) + (// [".T" common] + [".T" primitive] + [".T" structure] + [".T" eval] + [".T" function] + [".T" reference] + [".T" case] + [".T" procedure])) (exception: #export Unrecognized-Synthesis) @@ -70,6 +71,9 @@ (^code ((~ [_ (#.Text procedure)]) (~+ argsS))) (procedureT.translate-procedure translate procedure argsS) + ## (do macro.Monad<Meta> + ## [translation (extensionL.find-translation procedure)] + ## (translation argsS)) _ (&.throw Unrecognized-Synthesis (%code synthesis)) diff --git a/new-luxc/source/luxc/lang/translation/function.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux index 3070800fe..6fb446bc4 100644 --- a/new-luxc/source/luxc/lang/translation/function.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux @@ -13,10 +13,10 @@ ["$i" inst])) ["la" analysis] ["ls" synthesis] - (translation [".T" common] - [".T" runtime] - [".T" reference]) - [".L" variable #+ Variable]))) + [".L" variable #+ Variable])) + (// [".T" common] + [".T" runtime] + [".T" reference])) (def: arity-field Text "arity") diff --git a/new-luxc/source/luxc/lang/translation/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux index 892dd869f..892dd869f 100644 --- a/new-luxc/source/luxc/lang/translation/imports.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux diff --git a/new-luxc/source/luxc/lang/translation/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux index 8920dc936..2e585fb11 100644 --- a/new-luxc/source/luxc/lang/translation/loop.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux @@ -13,10 +13,10 @@ ["$i" inst])) ["la" analysis] ["ls" synthesis] - (translation [".T" common] - [".T" runtime] - [".T" reference]) - [".L" variable #+ Variable Register]))) + [".L" variable #+ Variable Register])) + (// [".T" common] + [".T" runtime] + [".T" reference])) (def: (constant? register changeS) (-> Register ls.Synthesis Bool) diff --git a/new-luxc/source/luxc/lang/translation/primitive.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux index 8fed1de18..f92c7025a 100644 --- a/new-luxc/source/luxc/lang/translation/primitive.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/primitive.jvm.lux @@ -9,8 +9,8 @@ (jvm ["$i" inst] ["$t" type])) ["la" analysis] - ["ls" synthesis] - (translation [".T" common])))) + ["ls" synthesis])) + (// [".T" common])) (def: #export translate-unit (Meta $.Inst) diff --git a/new-luxc/source/luxc/lang/translation/procedure.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux index e4f8b9908..e4f8b9908 100644 --- a/new-luxc/source/luxc/lang/translation/procedure.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure.jvm.lux diff --git a/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux index 84c42244e..c7513fd6e 100644 --- a/new-luxc/source/luxc/lang/translation/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux @@ -19,11 +19,11 @@ ["$d" def] ["$i" inst])) ["la" analysis] - ["ls" synthesis] - (translation [".T" runtime] - [".T" case] - [".T" function] - [".T" loop])))) + ["ls" synthesis])) + (/// [".T" runtime] + [".T" case] + [".T" function] + [".T" loop])) (host.import java/lang/Long (#static MIN_VALUE Long) diff --git a/new-luxc/source/luxc/lang/translation/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux index f737e81fc..30d17cac3 100644 --- a/new-luxc/source/luxc/lang/translation/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux @@ -23,7 +23,7 @@ ["la" analysis] (extension (analysis ["&." host])) ["ls" synthesis])) - ["@" //common]) + (// ["@" common])) (exception: #export Invalid-Syntax-For-JVM-Type) (exception: #export Invalid-Syntax-For-Argument-Generation) diff --git a/new-luxc/source/luxc/lang/translation/reference.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux index bfb5856d4..6776092c9 100644 --- a/new-luxc/source/luxc/lang/translation/reference.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/reference.jvm.lux @@ -10,8 +10,8 @@ (jvm ["$t" type] ["$i" inst])) ["ls" synthesis] - [".L" variable #+ Variable] - (translation [".T" common])))) + [".L" variable #+ Variable])) + (// [".T" common])) (do-template [<name> <prefix>] [(def: #export (<name> idx) diff --git a/new-luxc/source/luxc/lang/translation/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux index df494a904..87a47f338 100644 --- a/new-luxc/source/luxc/lang/translation/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux @@ -12,8 +12,8 @@ ["$d" def] ["$i" inst])) ["la" analysis] - ["ls" synthesis] - (translation [".T" common])))) + ["ls" synthesis])) + (// [".T" common])) (def: $Object $.Type ($t.class "java.lang.Object" (list))) (def: $Object-Array $.Type ($t.array +1 $Object)) diff --git a/new-luxc/source/luxc/lang/translation/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux index b2e302e1b..1b828535f 100644 --- a/new-luxc/source/luxc/lang/translation/statement.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux @@ -17,10 +17,10 @@ ["$i" inst])) ["&." scope] ["&." module] - [".L" host] - (translation [".T" eval] - [".T" common] - [".T" runtime])))) + [".L" host])) + (// [".T" eval] + [".T" common] + [".T" runtime])) (exception: #export Invalid-Definition-Value) (exception: #export Cannot-Evaluate-Definition) diff --git a/new-luxc/source/luxc/lang/translation/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux index f7cdb524f..ddb6541cf 100644 --- a/new-luxc/source/luxc/lang/translation/structure.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux @@ -13,8 +13,8 @@ ["$d" def] ["$i" inst])) ["la" analysis] - ["ls" synthesis] - (translation [".T" common])))) + ["ls" synthesis])) + (// [".T" common])) (exception: #export Not-A-Tuple) |