History

make multiple calls to fillalias() possible

The asserts (a->type == ABot) made it impossible to run fillalias() multiple times. We now reset the Alias.type field of all temps before starting. Getting rid of the asserts would have been another option.

Quentin Carbonneaux committed 3 years ago

Commit a70aa041 parent 45ab1e51 file · +3 −0Browse files

Unified · Split

alias.c+3−0
@@ -108,6 +108,7 @@ void · 107 unmodified lines
108fillalias(Fn *fn)108fillalias(Fn *fn)
109{109{
110 uint n, m;110 uint n, m;
111 int t;
111 int64_t x;112 int64_t x;
112 bits w;113 bits w;
113 Blk *b;114 Blk *b;
@@ -116,6 +117,8 @@ fillalias(Fn *fn) · 2 unmodified lines
116 Con *c;117 Con *c;
117 Alias *a, a0, a1;118 Alias *a, a0, a1;
118 119
120 for (t=0; t<fn->ntmp; t++)
121 fn->tmp[t].alias.type = ABot;
119 for (n=0; n<fn->nblk; ++n) {122 for (n=0; n<fn->nblk; ++n) {
120 b = fn->rpo[n];123 b = fn->rpo[n];
121 for (p=b->phi; p; p=p->link) {124 for (p=b->phi; p; p=p->link) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t