From 254e6639cbde133d670e54597ebbdf331a8af692 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Mon, 26 Mar 1990 21:57:20 +0000 Subject: [PATCH] Only take continuation-value of constant-continuations in the %typep transform. Deal with NIL for the class when converting numeric typep tests. --- compiler/typetran.lisp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/typetran.lisp b/compiler/typetran.lisp index a8663e05c..e6733ca75 100644 --- a/compiler/typetran.lisp +++ b/compiler/typetran.lisp @@ -7,13 +7,15 @@ ;;; Scott Fahlman (FAHLMAN@CMUC). ;;; ********************************************************************** ;;; +;;; $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/typetran.lisp,v 1.1.1.2 1990/03/26 21:57:20 wlott Exp $ +;;; ;;; This file contains stuff that implements the portable IR1 semantics of ;;; type tests. The main thing we do is convert complex type tests into ;;; simpler code that can be compiled inline. ;;; ;;; Written by Rob MacLachlan ;;; -(in-package 'c) +(in-package "C") ;;;; Type predicate translation: @@ -96,6 +98,7 @@ ;;; Flush %Typep tests whose result is known at compile time. ;;; (deftransform %typep ((object type)) + (unless (constant-continuation-p type) (give-up)) (ir1-transform-type-predicate object (specifier-type (continuation-value type)))) @@ -229,7 +232,8 @@ 'fixnum 'integer)) (rational 'rational) - (float (or (numeric-type-format type) 'float))))) + (float (or (numeric-type-format type) 'float)) + ((nil) 'number)))) (once-only ((n-object object)) (ecase (numeric-type-complexp type) (:real -- GitLab