From bc01ff1a3c062860894ee30df2237e17b1eef65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Mon, 27 Nov 2023 11:32:59 +0100 Subject: [PATCH] cmp: unwind-cjump: avoid recursive call to unwind-exit Previously our call for conditional jumps worked like: unwind-exit -> unwind-cjump -> unwind-exit -> unwind-{label,exit} The roundtrip to unwind-exit makes tracking invocations harder. The new invocation chain is: unwind-exit -> unwind-cjump -> unwind-{label,exit} --- src/cmp/cmpbackend-cxx/cmppass2-exit.lsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp b/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp index dcacdf0c1..aff293aa9 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp @@ -212,7 +212,9 @@ (unwind-jump label))) (unless (and constantp (not (null value))) (let ((*destination* 'TRASH)) - (unwind-exit *vv-nil*)))) + (if (labelp *exit*) + (unwind-label *vv-nil*) + (unwind-leave *vv-nil*))))) (JUMP-FALSE (cond ((not constantp) (case (loc-representation-type loc) @@ -224,4 +226,6 @@ (unwind-jump label))) (unless (and constantp (null value)) (let ((*destination* 'TRASH)) - (unwind-exit *vv-t*)))))))) + (if (labelp *exit*) + (unwind-label *vv-t*) + (unwind-leave *vv-t*)))))))))