From 36b28f5b8b472331319a4449434628932cf799ab Mon Sep 17 00:00:00 2001 From: John Lorentzson Date: Wed, 9 Jul 2025 14:39:35 +0200 Subject: [PATCH] Remove QUICK-AND-DIRTY-TEST-COMPILE --- .../backend/code-generator.lisp | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp index 0fbe2cd..4c2488c 100644 --- a/wip-duuqnd/user-side-compiler/backend/code-generator.lisp +++ b/wip-duuqnd/user-side-compiler/backend/code-generator.lisp @@ -362,36 +362,3 @@ is the responsibility of the pre-assembly compilation step." (the (unsigned-byte 16) (operand asm-obj))) (ldb (byte 8 8) (the (unsigned-byte 16) (operand asm-obj)))))))) - -(defun quick-and-dirty-test-compile (text &key print-ir-p print-alloc-p make-asm-p) - (with-input-from-string (source-stream text) - (let ((*token-stream* (make-token-stream (tokenize source-stream text)))) - (let ((rb (with-compilation-setup (root-block builder) - (compile-node (match-syntax program) builder) - root-block)) - (return-values '())) - (do-iblocks (ib rb) - (optim-prepare-direct-instructions ib) - ;;(optim-commutative-constant-folding ib) - (optim-reorder-arguments ib) - (optim-call-duplicate-args ib) - (optim-remove-unused ib)) - (push rb return-values) - (let ((allocations (allocate-values rb))) - (optim-reuse-temporary-slots rb allocations) - (when print-ir-p - (print-iblocks rb) - (terpri)) - (when print-alloc-p - (loop :for allocation :in allocations - :do (format t "~%~A - ~A~{ - ~A~}" - (data allocation) - (strategy allocation) - (unless (null (varvec-index allocation)) - (list (varvec-index allocation))))) - (terpri)) - (push allocations return-values) - (when make-asm-p - (with-variable-allocations allocations - (push (compile-iblocks rb) return-values)))) - (values-list (nreverse return-values))))))