diff options
| author | azidar | 2015-08-18 16:38:14 -0700 |
|---|---|---|
| committer | azidar | 2015-08-18 16:38:14 -0700 |
| commit | f64e4868fdb72cc592226250f02a021fd38b40f5 (patch) | |
| tree | 8313285521d0ccd7a6419609dfa6fa1ca2ef0762 | |
| parent | 9964b8ff88e905f500c512ff2448f3f360d60d47 (diff) | |
Fixed width inference for static shift left, #18
| -rw-r--r-- | src/main/stanza/passes.stanza | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza index e9e9c8f0..b8bd572a 100644 --- a/src/main/stanza/passes.stanza +++ b/src/main/stanza/passes.stanza @@ -1867,6 +1867,9 @@ defn solve-constraints (l:List<WGeq>) -> HashTable<Symbol,Width> : ;println-all-debug(["Removing cycle for " n " inside " w]) val w* = match(map(remove-cycle{n,_},w)) : (w:MaxWidth) : MaxWidth(to-list(filter({_ != VarWidth(n)},args(w)))) + (w:MinusWidth) : + if arg1(w) == VarWidth(n) : arg1(w) + else : w (w) : w ;println-all-debug(["After removing cycle for " n ", returning " w*]) w* |
