From 94c8064798901b1b658552564e4a8d9a378bbfed Mon Sep 17 00:00:00 2001 From: John Coiner Date: Thu, 7 Jun 2018 12:43:19 -0400 Subject: [PATCH] Fix linear search; this is part of the fix for issue 1316. --- src/V3Delayed.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index 9ea69f258..91c17134e 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -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) {