Raymond Toy comments that this is tricky on the X86 since its FPU
uses 80-bit precision internally.
+119:
+ a bug in the byte compiler and/or interpreter: Compile
+ (IN-PACKAGE :CL-USER)
+ (DECLAIM (OPTIMIZE (SPEED 0) (SAFETY 1) (DEBUG 1)))
+ (DEFUN BAR (&REST DIMS)
+ (IF (EVERY #'INTEGERP DIMS)
+ 1
+ 2))
+ then execute (BAR '(1 2 3 4)). In sbcl-0.pre7.14.flaky4.8
+ this gives a TYPE-ERROR,
+ The value #:UNINITIALIZED-EVAL-STACK-ELEMENT is not
+ of type (MOD 536870911).
+ The same error will probably occur in earlier versions as well,
+ although the name of the uninitialized-element placeholder will
+ be shorter.
+
KNOWN BUGS RELATED TO THE IR1 INTERPRETER
,(let ((*new-auxiliary-types* nil))
,@body)))
-;;; FIXME: Now that *NEW-AUXILIARY-TYPES* is born initialized to NIL,
-;;; we no longer need to make a distinction between this and
-;;; %PARSE-ALIEN-TYPE.
+;;; Parse TYPE as an alien type specifier and return the resultant
+;;; ALIEN-TYPE structure.
(defun parse-alien-type (type env)
(declare (type (or sb!kernel:lexenv null) env))
- #!+sb-doc
- "Parse the list structure TYPE as an alien type specifier and return
- the resultant ALIEN-TYPE structure."
- (%parse-alien-type type env))
-
-(defun %parse-alien-type (type env)
- (declare (type (or sb!kernel:lexenv null) env))
(if (consp type)
(let ((translator (info :alien-type :translator (car type))))
(unless translator
(error "unknown alien type: ~S" type))
(funcall translator type env))
- (case (info :alien-type :kind type)
+ (ecase (info :alien-type :kind type)
(:primitive
(let ((translator (info :alien-type :translator type)))
(unless translator
(when loser
(error "A dimension is not a non-negative fixnum: ~S" loser))))
- (let ((type (parse-alien-type ele-type env)))
+ (let ((parsed-ele-type (parse-alien-type ele-type env)))
(make-alien-array-type
- :element-type type
+ :element-type parsed-ele-type
:dimensions dims
- :alignment (alien-type-alignment type)
- :bits (if (and (alien-type-bits type)
+ :alignment (alien-type-alignment parsed-ele-type)
+ :bits (if (and (alien-type-bits parsed-ele-type)
(every #'integerp dims))
- (* (align-offset (alien-type-bits type)
- (alien-type-alignment type))
+ (* (align-offset (alien-type-bits parsed-ele-type)
+ (alien-type-alignment parsed-ele-type))
(reduce #'* dims))))))
(def-alien-type-method (array :unparse) (type)