From 51951d19cefd722633a9c3fb065ab4db7b10a989 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 8 Apr 2023 17:06:59 -0700 Subject: compiler: small fix in optimizer. * stdlib/optimizer.tl (basic-blocks do-peephole-block): Use pushnew instead of push in one peephole case, so the block isn't pushed onto the tryjoin and rescan lists twice. --- stdlib/optimize.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index 8bf8b8c9..8651db00 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -436,8 +436,8 @@ (@nil insns)))) (@(require ((if @(as reg (d @nil)) @nil) . @nil) (not (memqual reg bb.lt-dregs))) - (push bl bb.tryjoin) - (push bl bb.rescan) + (pushnew bl bb.tryjoin) + (pushnew bl bb.rescan) (pushnew bl.next bb.rescan) (set bb.recalc t) nil) -- cgit v1.2.3