From f68a6aebd795a8957f13109e89881e9a6c449e88 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Thu, 4 Sep 2003 15:05:06 +0000 Subject: [PATCH] * src/compiler/byte-comp.lisp (annotate-full-call): Don't delete argument type checks in safe code; see also the comment there. --- compiler/byte-comp.lisp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/byte-comp.lisp b/compiler/byte-comp.lisp index 4cc5cb647..41151ca36 100644 --- a/compiler/byte-comp.lisp +++ b/compiler/byte-comp.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/byte-comp.lisp,v 1.37 2003/09/02 15:00:58 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/byte-comp.lisp,v 1.38 2003/09/04 15:05:06 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -506,8 +506,14 @@ (info (gethash name *inline-function-table*))) (flet ((annotate-args () (annotate-basic-combination-args call) + ;; + ;; We cannot assume that we can delete type checks here. + ;; For instance, (GCD X) will be source-transformed to + ;; (ABS X), and GCD expects an integer argument while ABS + ;; expects a number only. (dolist (arg args) - (when (continuation-type-check arg) + (when (and (continuation-type-check arg) + (policy call (< safety 3))) (setf (continuation-%type-check arg) :deleted))) (annotate-continuation fun -- GitLab