diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/test/test/luxc/lang/translation/reference.lux (renamed from new-luxc/test/test/luxc/generator/reference.lux) | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/new-luxc/test/test/luxc/generator/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux index dd522839b..0bc2bb325 100644 --- a/new-luxc/test/test/luxc/generator/reference.lux +++ b/new-luxc/test/test/luxc/lang/translation/reference.lux @@ -11,28 +11,28 @@ test) (luxc (host ["$" jvm] (jvm ["$i" inst])) - (lang ["ls" synthesis]) - ["_;" module] - (generator [";G" statement] - [";G" eval] - [";G" expression] - [";G" case] - [";G" runtime])) + (lang ["ls" synthesis] + (translation [";T" statement] + [";T" eval] + [";T" expression] + [";T" case] + [";T" runtime])) + ["_;" module]) (test/luxc common)) -(def: nilI $;Inst runtimeG;noneI) +(def: nilI $;Inst runtimeT;noneI) (def: cursorI $;Inst (|>. ($i;int 3) - ($i;array runtimeG;$Tuple) + ($i;array runtimeT;$Tuple) $i;DUP ($i;int 0) ($i;string "") $i;AASTORE $i;DUP ($i;int 1) ($i;long 0) ($i;wrap #$;Long) $i;AASTORE $i;DUP ($i;int 2) ($i;long 0) ($i;wrap #$;Long) $i;AASTORE)) (def: empty-metaI (|>. ($i;int 2) - ($i;array runtimeG;$Tuple) + ($i;array runtimeT;$Tuple) $i;DUP ($i;int 0) cursorI $i;AASTORE $i;DUP ($i;int 1) nilI $i;AASTORE)) @@ -47,12 +47,12 @@ (test "Can refer to definitions." (|> (do meta;Monad<Meta> [_ (_module;with-module +0 module-name - (statementG;generate-def def-name Int valueI empty-metaI (' {}))) - sampleI (expressionG;generate (code;symbol [module-name def-name]))] - (evalG;eval sampleI)) + (statementT;generate-def def-name Int valueI empty-metaI (' {}))) + sampleI (expressionT;generate (code;symbol [module-name def-name]))] + (evalT;eval sampleI)) (meta;run (init-compiler [])) - (case> (#e;Success valueG) - (i.= def-value (:! Int valueG)) + (case> (#e;Success valueT) + (i.= def-value (:! Int valueT)) (#e;Error error) false))) @@ -66,14 +66,14 @@ ($_ seq (test "Can refer to local variables/registers." (|> (do meta;Monad<Meta> - [sampleI (caseG;generate-let expressionG;generate + [sampleI (caseT;generate-let expressionT;generate register (code;int value) (` ((~ (code;int (nat-to-int register))))))] - (evalG;eval sampleI)) + (evalT;eval sampleI)) (meta;run (init-compiler [])) - (case> (#e;Success outputG) - (i.= value (:! Int outputG)) + (case> (#e;Success outputT) + (i.= value (:! Int outputT)) (#e;Error error) false))) |