diff options
author | Eduardo Julian | 2019-10-17 20:07:19 -0400 |
---|---|---|
committer | Eduardo Julian | 2019-10-17 20:07:19 -0400 |
commit | 299908a885d00ec735070a937f9720410fe224a9 (patch) | |
tree | 1504b8fc46eade6654673e91bf5aa94636de9217 /new-luxc/source/luxc/lang/translation/jvm/loop.lux | |
parent | de9d57c45da46cdae9e21ff1d9747952e0815b32 (diff) |
Ported JVM pattern-matching & loop generation to the new JVM bytecode machinery.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/loop.lux | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/loop.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.lux index 5b4f981f6..bc5ca5b98 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/loop.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/loop.lux @@ -22,14 +22,14 @@ ["_" inst]]]]] ["." //]) -(def: (constant? register changeS) +(def: (invariant? register changeS) (-> Register Synthesis Bit) (case changeS (^ (synthesis.variable/local var)) (n.= register var) _ - #0)) + false)) (def: #export (recur translate argsS) (-> Phase (List Synthesis) (Operation Inst)) @@ -48,13 +48,13 @@ ## should be the case. valuesI+ (monad.map @ (function (_ [register argS]) (: (Operation Inst) - (if (constant? register argS) + (if (invariant? register argS) (wrap function.identity) (translate argS)))) pairs) #let [storesI+ (list/map (function (_ [register argS]) (: Inst - (if (constant? register argS) + (if (invariant? register argS) function.identity (_.ASTORE register)))) (list.reverse pairs))]] |