[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compiler error in TYPEP

The function Is-Array, defined as			[in Rel6.1]

(defun Is-Array (obj)
  (equal (typep obj) :array)) is compiled incorrectly.  When interpreted, 
(Is-Array "foo") => NIL       but when compiled
(Is-Array "foo") =>  T

Apparently the compiler "optimizes" (equal (typep X) Y) to (typep X Y).
This becomes especially annoying when Y is a flavor that sometimes and
loaded and sometimes isn't.  (Equal (typep X) Y) then will break with a
message that Y is not a known flavor.  Further, this optimization is
inconsistant - sometimes it happens and sometimes it doesn't.    So minor
changes in nearby code have caused variations on this, which ran well
before, to start breaking.