Changeset 15366
- Timestamp:
- 08/13/20 19:24:23 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compile-file.lisp
r14915 r15366 1 2 1 ;;; compile-file.lisp 3 2 ;;; … … 268 267 (note-toplevel-form form) 269 268 (eval form) 269 ;;; emit make-array when initial-value is a specialized vector 270 (let ((initial-value (third form))) 271 (when (and (atom initial-value) 272 (arrayp initial-value) 273 (= (length (array-dimensions initial-value)) 1) 274 (not (eq (array-element-type initial-value) t))) 275 (setf (third form) 276 `(common-lisp:make-array 277 ',(array-dimensions initial-value) 278 :element-type ',(array-element-type initial-value) 279 :initial-contents ',(coerce initial-value 'list))))) 270 280 `(progn 271 281 (put ',(second form) 'sys::source (cons '(,(second form) ,(namestring *source*) ,*source-position*) (get ',(second form) 'sys::source nil))) … … 375 385 (let ((name (second form))) 376 386 (%defvar name))) 377 (let ((name (second form))) 387 (let ((name (second form)) 388 (initial-value (third form))) 389 ;;; emit make-array when initial-value is a specialized vector 390 (when (and (atom initial-value) 391 (arrayp initial-value) 392 (= (length (array-dimensions initial-value)) 1) 393 (not (eq (array-element-type initial-value) t))) 394 (setf (third form) 395 `(common-lisp:make-array 396 ',(array-dimensions initial-value) 397 :element-type ',(array-element-type initial-value) 398 :initial-contents ',(coerce initial-value 'list)))) 378 399 `(progn 379 400 (put ',name 'sys::source (cons (list :variable ,(namestring *source*) ,*source-position*) (get ',name 'sys::source nil))) 380 ,form))) 401 ,form))) 402 381 403 382 404 (declaim (ftype (function (t t t) t) process-toplevel-defpackage/in-package))
Note: See TracChangeset
for help on using the changeset viewer.