diff options
| author | azidar | 2015-07-14 11:14:47 -0700 |
|---|---|---|
| committer | azidar | 2015-07-14 11:29:55 -0700 |
| commit | dad79768db7a899b071a49a63466003c7d7e80da (patch) | |
| tree | 4c8450d14eac55e8ca9cd7a420c91750816cd608 /src/main/stanza/errors.stanza | |
| parent | 271e1bf5ed56847c1ce7d50bdb7f1db9ccc5ea55 (diff) | |
Fixed performance bug in backend. Added renaming
Diffstat (limited to 'src/main/stanza/errors.stanza')
| -rw-r--r-- | src/main/stanza/errors.stanza | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/stanza/errors.stanza b/src/main/stanza/errors.stanza index 608b47d2..e36ec06d 100644 --- a/src/main/stanza/errors.stanza +++ b/src/main/stanza/errors.stanza @@ -774,7 +774,7 @@ public defn check-low-form (c:Circuit) -> Circuit : for p in ports(m) do : check-low-form-t(info(p),type(p),name(p)) - val assigned? = Vector<Symbol>() + val assigned? = HashTable<Symbol,True>(symbol-hash) val insts = Vector<Symbol>() val mems = Vector<Symbol>() defn check-correct-exp (info:FileInfo,e:Expression) -> False : @@ -811,8 +811,8 @@ public defn check-low-form (c:Circuit) -> Circuit : match(loc(s)) : (e:Ref|Subfield) : val n* = to-symbol $ to-string $ e - if contains?(assigned?,n*) : add(errors,SingleAssignment(info(s),n*)) - else : add(assigned?,to-symbol $ to-string $ e) + if key?(assigned?,n*) : add(errors,SingleAssignment(info(s),n*)) + else : assigned?[to-symbol $ to-string $ e] = true (e) : check-correct-exp(info(s),e) (s:EmptyStmt) : false (s:Begin) : do(check-low-form-s,s) |
