From 6add45d9bb45a179cb7b81f0b4fc3e201019f9cc Mon Sep 17 00:00:00 2001 From: azidar Date: Thu, 23 Apr 2015 22:42:32 -0700 Subject: Fixed bug in lowering where the arguments to DoPrim and Pad weren't lowered --- src/main/stanza/passes.stanza | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/stanza/passes.stanza') diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index 50d2831a..6c347dff 100644 --- a/src/main/stanza/passes.stanza +++ b/src/main/stanza/passes.stanza @@ -789,6 +789,12 @@ defn lower (body:Stmt, table:HashTable>>) val exps = expand-expr(exp(e)) val len = num-elems(type(e)) headn(tailn(exps,len * value(e)),len) + (e:Pad) : + val v = key(expand-expr(value(e))[0]) + list(KeyValue(Pad(v,width(e),type(e)),DEFAULT)) + (e:DoPrim) : + val args = for x in args(e) map : key(expand-expr(x)[0]) + list(KeyValue(DoPrim(op(e),args,consts(e),type(e)),DEFAULT)) (e) : list(KeyValue(e, DEFAULT)) ;println-debug(table) -- cgit v1.2.3