[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CompilerBug - TYPEP
- To: slug%r20.utexas.edu@CSNET-RELAY
- Subject: CompilerBug - TYPEP
- From: David Throop <AI.THROOP%r20.utexas.edu@CSNET-RELAY>
- Date: Sat 26 Jul 86 18:17:46-CDT
- Mail-from: AI.THROOP created at 26-Jul-86 18:17:46
- Resent-date: Sat 26 Jul 86 20:43:59-CDT
- Resent-from: <CMP.SLUG%r20.utexas.edu@CSNET-RELAY>
- Resent-message-id: <12225890803.13.CMP.SLUG@R20.UTEXAS.EDU>
- Resent-to: SLUG:;
In Rel 6.1, defining the function
(defun is-array (sexp)
(equal (typep sexp) :array))
then when is array is compliled
(is-array "foo") => T
but when is-array is interpreted
(is-array "foo") => NIL
The compiler is apparently optimizing
(equal (typep X) Y) => (typep X Y)
but there are cases in which they are not equivalent, particularly when
we are trying to distinguish between an instance of Y and an instance of X,
where Y is a subtype of X. Like arrays and strings.
The optimization is not consistant. In other code where X and Y were
flavors, the compiled code has not been incorrectly optimized.
David Throop
-------