Introduced in
0892423b (faster SVREF and (SETF SVREF) compilation)
Thanks to James M. Lawrence for the quick report, with a reduced
test case.
;;;; -*- coding: utf-8; fill-column: 78 -*-
+changes relative to sbcl-1.1.6
+ * bug fix: svref/(setf svref) on symbol macros don't crash the compiler
+ anymore. (Minimal test case provided by James M. Lawrence on sbcl-devel)
+
changes in sbcl-1.1.6 relative to sbcl-1.1.5:
* enhancement: the continuable error when defknown-ing over extant
fndb entries can be ignored by passing :overwrite-fndb-silently t
(define-source-transform svref (vector index)
(let ((elt-type (or (when (symbolp vector)
(let ((var (lexenv-find vector vars)))
- (when var
+ (when (lambda-var-p var)
(type-specifier
(array-type-declared-element-type (lambda-var-type var))))))
t)))
(define-source-transform %svset (vector index value)
(let ((elt-type (or (when (symbolp vector)
(let ((var (lexenv-find vector vars)))
- (when var
+ (when (lambda-var-p var)
(type-specifier
(array-type-declared-element-type (lambda-var-type var))))))
t)))
(with-test (:name :second-open-coded)
(let ((fun (compile nil `(lambda (x) (second x)))))
(assert (not (ctu:find-named-callees fun)))))
+
+(with-test (:name :svref-of-symbol-macro)
+ (compile nil `(lambda (x)
+ (symbol-macrolet ((sv x))
+ (values (svref sv 0) (setf (svref sv 0) 99))))))