Fix linear search; this is part of the fix for issue 1316.

This commit is contained in:
John Coiner 2018-06-07 12:43:19 -04:00
parent cf0464c263
commit 94c8064798

View File

@ -150,7 +150,8 @@ private:
AstActive* createActivePost(AstVarRef* varrefp) {
AstActive* newactp = new AstActive (varrefp->fileline(), "sequentdly",
m_activep->sensesp());
m_activep->addNext(newactp);
// Was addNext(), but addNextHere() avoids a linear search.
m_activep->addNextHere(newactp);
return newactp;
}
void checkActivePost(AstVarRef* varrefp, AstActive* oldactivep) {