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
108108 fillalias(Fn *fn)
109109 {
110110 uint n, m;
111+ int t;
111112 int64_t x;
112113 bits w;
113114 Blk *b;
@@ -116,6 +117,8 @@ fillalias(Fn *fn) · 2 unmodified lines
116117 Con *c;
117118 Alias *a, a0, a1;
118119
120+ for (t=0; t<fn->ntmp; t++)
121+ fn->tmp[t].alias.type = ABot;
119122 for (n=0; n<fn->nblk; ++n) {
120123 b = fn->rpo[n];
121124 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