From fdd7fa13a67aa0bedfafd271d0f1063aeca9bd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kochma=C5=84ski?= Date: Tue, 5 Dec 2023 09:12:35 +0100 Subject: [PATCH] cmp: codegen: incorporate into the exit manager --- src/cmp/cmpbackend-cxx/cmppass2-exit.lsp | 113 ++++------------------- src/cmp/cmppass3-codegen.lsp | 88 ++++++++++++++++++ 2 files changed, 104 insertions(+), 97 deletions(-) diff --git a/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp b/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp index a3de9b049..99513fcba 100644 --- a/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp +++ b/src/cmp/cmpbackend-cxx/cmppass2-exit.lsp @@ -35,21 +35,21 @@ (t (baboon-exit-invalid *exit*))))) (defun unwind-jump (exit) - (%unwind (label-denv exit) *unwind-exit*) - (%goto exit) + (push-instruction :unwind (label-denv exit) *unwind-exit*) + (push-instruction :goto exit) (bir-return *bir* (exit-iblock exit))) (defun unwind-cont (exit) - (%unwind (label-denv exit) *unwind-exit*) - (%goto exit) + (push-instruction :unwind (label-denv exit) *unwind-exit*) + (push-instruction :goto exit) (bir-insert *bir* (exit-iblock exit))) (defun unwind-flee (exit kind) - (%escape exit kind) + (push-instruction :escape exit kind) (bir-escape *bir* (exit-iblock exit))) (defun unwind-cond (exit kind &rest args) - (%branch exit *unwind-exit* kind args) + (push-instruction :branch exit *unwind-exit* kind args) (bir-branch *bir* (exit-iblock exit)) (bir-insert *bir* (make-iblock :cont))) @@ -89,7 +89,7 @@ ;;; #