From 83f855f96cfb067ee8bfed1fb89003070f9f7eea Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 23 Feb 2021 11:32:48 -0800 Subject: compiler: wrong close pattern in jump threading. * share/txr/stdlib/optimize.tl (thread-jumps-block): Add missing argument to close instruction pattern. This causes us to miss a threading opportunity due to the new ntregs parameter being mistaken for a label, which is not found. --- share/txr/stdlib/optimize.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/optimize.tl b/share/txr/stdlib/optimize.tl index ac978a06..f85439f6 100644 --- a/share/txr/stdlib/optimize.tl +++ b/share/txr/stdlib/optimize.tl @@ -120,12 +120,12 @@ (jmp @(and @jjlabel @(not @jlabel))) . @nil) ^(ifq ,reg ,creg ,jjlabel)) (@jelse insn)))) - ((close @reg @nargs @jlabel . @cargs) + ((close @reg @frsize @ntregs @jlabel . @cargs) (let ((jinsns [bb.hash jlabel])) (match-case jinsns ((@jlabel (jmp @(and @jjlabel @(not @jlabel))) . @nil) - ^(close ,reg ,nargs ,jjlabel ,*cargs)) + ^(close ,reg ,frsize ,ntregs ,jjlabel ,*cargs)) (@jelse insn)))) (@else else)))) (cond -- cgit v1.2.3