From 788b8d78481a836ec2b52ce94d44fc91df3f5612 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Thu, 21 May 1992 22:46:56 +0000 Subject: [PATCH] Extended label-elsewhere-p to accept raw positions in addition to labels. --- compiler/codegen.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/compiler/codegen.lisp b/compiler/codegen.lisp index be17e9d3f..6e91a9473 100644 --- a/compiler/codegen.lisp +++ b/compiler/codegen.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/codegen.lisp,v 1.16 1992/05/18 17:55:27 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/codegen.lisp,v 1.17 1992/05/21 22:46:56 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -272,11 +272,15 @@ (assem:assemble (*elsewhere* nil) (assem:emit-label label)))) -(defun label-elsewhere-p (label) +(defun label-elsewhere-p (label-or-posn) (<= (label-position (if (backend-featurep :new-assembler) *elsewhere-label* *elsewhere*)) - (label-position label))) + (etypecase label-or-posn + (label + (label-position label-or-posn)) + (index + label-or-posn)))) (defun trace-table-entry (state) (let ((label (gen-label))) -- GitLab