Skip to content
Snippets Groups Projects
Commit 7fbf5590 authored by toy's avatar toy
Browse files

Port over SBCL's fix for the Entomotomy bug

array-element-type-treated-as-declaration

wherein the compiler believes type declarations on array elements
without checking them, e.g.

	(DECLAIM (OPTIMIZE (SAFETY 3) (SPEED 1) (SPACE 1)))
	(DEFSTRUCT FOO A B)
	(DEFUN BAR (X)
	  (DECLARE (TYPE (SIMPLE-ARRAY CONS 1) X))
	  (WHEN (CONSP (AREF X 0))
	    (PRINT (AREF X 0))))
	(BAR (VECTOR (MAKE-FOO :A 11 :B 12)))

prints a structure out.

This patch makes the compiler use the specialized (upgraded) element
type instead of the declared element type for aref.
parent 7ca74850
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment