From 8b5cba427098511aaec8ba061d056d960bccfad9 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 11 Dec 2021 01:33:54 -0800 Subject: compiler: small end/jend issue in late-peephole. * stdlib/optimize.tl (basic-blocks late-peephole): In one pattern, an instruction that is recognized as (jend ...) is inadvertently rewritten to (end ...). Since this is the last optimization stage, currently, and end and jend are synonyms for the same opcode, it doesn't matter. But it could turn into a bug; let's fix it. --- stdlib/optimize.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index 9c94d445..11b85aca 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -634,7 +634,7 @@ ,lab1 (gcall (t ,ty) ,*args) ,lab2 - (end (t ,ty)) + (jend (t ,ty)) ,*rest)) (@else else))) -- cgit v1.2.3