projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.7.4.11:
[sbcl.git]
/
src
/
compiler
/
main.lisp
diff --git
a/src/compiler/main.lisp
b/src/compiler/main.lisp
index
780ee91
..
89f7813
100644
(file)
--- a/
src/compiler/main.lisp
+++ b/
src/compiler/main.lisp
@@
-1115,15
+1115,8
@@
;;; Compile FORM and arrange for it to be called at load-time. Return
;;; the dumper handle and our best guess at the type of the object.
;;; Compile FORM and arrange for it to be called at load-time. Return
;;; the dumper handle and our best guess at the type of the object.
-(defun compile-load-time-value
- (form &optional
- (name (let ((*print-level* 2) (*print-length* 3))
- (format nil "load time value of ~S"
- (if (and (listp form)
- (eq (car form) 'make-value-cell))
- (second form)
- form)))))
- (let ((lambda (compile-load-time-stuff form name t)))
+(defun compile-load-time-value (form)
+ (let ((lambda (compile-load-time-stuff form t)))
(values
(fasl-dump-load-time-value-lambda lambda *compile-object*)
(let ((type (leaf-type lambda)))
(values
(fasl-dump-load-time-value-lambda lambda *compile-object*)
(let ((type (leaf-type lambda)))
@@
-1133,13
+1126,13
@@
;;; Compile the FORMS and arrange for them to be called (for effect,
;;; not value) at load time.
;;; Compile the FORMS and arrange for them to be called (for effect,
;;; not value) at load time.
-(defun compile-make-load-form-init-forms (forms name)
- (let ((lambda (compile-load-time-stuff `(progn ,@forms) name nil)))
+(defun compile-make-load-form-init-forms (forms)
+ (let ((lambda (compile-load-time-stuff `(progn ,@forms) nil)))
(fasl-dump-toplevel-lambda-call lambda *compile-object*)))
;;; Do the actual work of COMPILE-LOAD-TIME-VALUE or
;;; COMPILE-MAKE-LOAD-FORM-INIT-FORMS.
(fasl-dump-toplevel-lambda-call lambda *compile-object*)))
;;; Do the actual work of COMPILE-LOAD-TIME-VALUE or
;;; COMPILE-MAKE-LOAD-FORM-INIT-FORMS.
-(defun compile-load-time-stuff (form name for-value)
+(defun compile-load-time-stuff (form for-value)
(with-ir1-namespace
(let* ((*lexenv* (make-null-lexenv))
(lambda (ir1-toplevel form *current-path* for-value)))
(with-ir1-namespace
(let* ((*lexenv* (make-null-lexenv))
(lambda (ir1-toplevel form *current-path* for-value)))
@@
-1232,7
+1225,11
@@
(node-component (lambda-bind x)))
:toplevel)))
lambdas
(node-component (lambda-bind x)))
:toplevel)))
lambdas
- :start start)
+ ;; this used to read ":start start", but
+ ;; start can be greater than len, which
+ ;; is an error according to ANSI - CSR,
+ ;; 2002-04-25
+ :start (min start len))
len)))
(do* ((start 0 (1+ loser))
(loser (loser start) (loser start)))
len)))
(do* ((start 0 (1+ loser))
(loser (loser start) (loser start)))
@@
-1565,7
+1562,7
@@
;;; If the constant doesn't show up in *CONSTANTS-BEING-CREATED*, then
;;; we have to create it. We call MAKE-LOAD-FORM and check to see
;;; whether the creation form is the magic value
;;; If the constant doesn't show up in *CONSTANTS-BEING-CREATED*, then
;;; we have to create it. We call MAKE-LOAD-FORM and check to see
;;; whether the creation form is the magic value
-;;; :JUST-DUMP-IT-NORMALLY. If it is, then we don't do anything. The
+;;; :SB-JUST-DUMP-IT-NORMALLY. If it is, then we don't do anything. The
;;; dumper will eventually get its hands on the object and use the
;;; normal structure dumping noise on it.
;;;
;;; dumper will eventually get its hands on the object and use the
;;; normal structure dumping noise on it.
;;;
@@
-1582,7
+1579,7
@@
;;; deal with it.
(defvar *constants-being-created* nil)
(defvar *constants-created-since-last-init* nil)
;;; deal with it.
(defvar *constants-being-created* nil)
(defvar *constants-created-since-last-init* nil)
-;;; FIXME: Shouldn't these^ variables be bound in LET forms?
+;;; FIXME: Shouldn't these^ variables be unbound outside LET forms?
(defun emit-make-load-form (constant)
(aver (fasl-output-p *compile-object*))
(unless (or (fasl-constant-already-dumped-p constant *compile-object*)
(defun emit-make-load-form (constant)
(aver (fasl-output-p *compile-object*))
(unless (or (fasl-constant-already-dumped-p constant *compile-object*)
@@
-1606,7
+1603,7
@@
constant
condition)))
(case creation-form
constant
condition)))
(case creation-form
- (:just-dump-it-normally
+ (:sb-just-dump-it-normally
(fasl-validate-structure constant *compile-object*)
t)
(:ignore-it
(fasl-validate-structure constant *compile-object*)
t)
(:ignore-it
@@
-1630,8
+1627,7
@@
(fasl-note-handle-for-constant
constant
(compile-load-time-value
(fasl-note-handle-for-constant
constant
(compile-load-time-value
- creation-form
- (format nil "creation form for ~A" name))
+ creation-form)
*compile-object*)
nil)
(compiler-error "circular references in creation form for ~S"
*compile-object*)
nil)
(compiler-error "circular references in creation form for ~S"
@@
-1643,11
+1639,7
@@
(loop for (name form) on (cdr info) by #'cddr
collect name into names
collect form into forms
(loop for (name form) on (cdr info) by #'cddr
collect name into names
collect form into forms
- finally
- (compile-make-load-form-init-forms
- forms
- (format nil "init form~:[~;s~] for ~{~A~^, ~}"
- (cdr forms) names)))
+ finally (compile-make-load-form-init-forms forms))
nil)))
(when circular-ref
(setf (cdr circular-ref)
nil)))
(when circular-ref
(setf (cdr circular-ref)