Skip to content

Commit

Permalink
0.6.8.17:
Browse files Browse the repository at this point in the history
	deleted more unused stuff
  • Loading branch information
William Harold Newman committed Nov 13, 2000
1 parent eca808d commit 77360ee
Show file tree
Hide file tree
Showing 41 changed files with 704 additions and 786 deletions.
26 changes: 15 additions & 11 deletions BUGS
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,6 @@ returning an array as first value always.
Process inferior-lisp exited abnormally with code 1
I haven't noticed a repeatable case of this yet.

28:
The system accepts DECLAIM in most places where DECLARE would be
accepted, without even issuing a warning. ANSI allows this, but since
it's fairly easy to mistype DECLAIM instead of DECLARE, and the
meaning is rather different, and it's unlikely that the user
has a good reason for doing DECLAIM not at top level, it would be
good to issue a STYLE-WARNING when this happens. A possible
fix would be to issue STYLE-WARNINGs for DECLAIMs not at top level,
or perhaps to issue STYLE-WARNINGs for any EVAL-WHEN not at top level.

29:
some sort of bug in inlining and RETURN-FROM in sbcl-0.6.5: Compiling
(DEFUN BAR? (X)
Expand Down Expand Up @@ -780,7 +770,7 @@ Error in function C::GET-LAMBDA-TO-COMPILE:
and GO forms are removed (leaving the SETF in ordinary, non-looping
code), or if the TAGBODY and GO forms are retained, but the
assigned value becomes 0.0 instead of (- (ROW-MAJOR-AREF A I)).


KNOWN BUGS RELATED TO THE IR1 INTERPRETER

Expand Down Expand Up @@ -840,3 +830,17 @@ IR1-3a:
"no!")))
and while EVAL doesn't print the "right now!" messages, the first
FUNCALL on the value returned by EVAL causes both of them to be printed.

IR1-4:
The system accepts DECLAIM in most places where DECLARE would be
accepted, without even issuing a warning. ANSI allows this, but since
it's fairly easy to mistype DECLAIM instead of DECLARE, and the
meaning is rather different, and it's unlikely that the user
has a good reason for doing DECLAIM not at top level, it would be
good to issue a STYLE-WARNING when this happens. A possible
fix would be to issue STYLE-WARNINGs for DECLAIMs not at top level,
or perhaps to issue STYLE-WARNINGs for any EVAL-WHEN not at top level.
[This is considered an IR1-interpreter-related bug because until
EVAL-WHEN is rewritten, which won't happen until after the IR1
interpreter is gone, the system's notion of what's a top-level form
and what's not will remain too confused to fix this problem.]
8 changes: 6 additions & 2 deletions package-data-list.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -1727,8 +1727,12 @@ structure representations"
:doc "internal: a code walker used by PCL"
:use ("CL")
:export ("DEFINE-WALKER-TEMPLATE" "WALK-FORM"
"*WALK-FORM-EXPAND-MACROS-P*" "NESTED-WALK-FORM"
"*WALK-FORM-EXPAND-MACROS-P*"
"VARIABLE-LEXICAL-P" "VARIABLE-SPECIAL-P"
"VARIABLE-GLOBALLY-SPECIAL-P"
"*VARIABLE-DECLARATIONS*" "VARIABLE-DECLARATION"
"MACROEXPAND-ALL")))

;; These were expored from the original PCL version of this
;; package, but aren't used in SBCL.
;;"NESTED-WALK-FORM" "MACROEXPAND-ALL"
)))
14 changes: 7 additions & 7 deletions src/code/alien-type.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
(:constructor %make-alien-type-type (alien-type)))
(alien-type nil :type alien-type))

(define-type-class alien)
(!define-type-class alien)

(define-type-method (alien :unparse) (type)
(!define-type-method (alien :unparse) (type)
`(alien ,(unparse-alien-type (alien-type-type-alien-type type))))

(define-type-method (alien :simple-subtypep) (type1 type2)
(!define-type-method (alien :simple-subtypep) (type1 type2)
(values (alien-subtype-p (alien-type-type-alien-type type1)
(alien-type-type-alien-type type2))
t))

;;; KLUDGE: This DEFINE-SUPERCLASSES gets executed much later than the
;;; KLUDGE: This !DEFINE-SUPERCLASSES gets executed much later than the
;;; others (toplevel form time instead of cold load init time) because
;;; ALIEN-VALUE itself is a structure which isn't defined until fairly
;;; late.
Expand All @@ -40,16 +40,16 @@
;;; It's sufficiently unlike the others that it's a bit of a pain, and
;;; it doesn't seem to be put to any good use either in type inference or
;;; in type declarations.
(define-superclasses alien ((alien-value)) progn)
(!define-superclasses alien ((alien-value)) progn)

(define-type-method (alien :simple-=) (type1 type2)
(!define-type-method (alien :simple-=) (type1 type2)
(let ((alien-type-1 (alien-type-type-alien-type type1))
(alien-type-2 (alien-type-type-alien-type type2)))
(values (or (eq alien-type-1 alien-type-2)
(alien-type-= alien-type-1 alien-type-2))
t)))

(def-type-translator alien (&optional (alien-type nil))
(!def-type-translator alien (&optional (alien-type nil))
(typecase alien-type
(null
(make-alien-type-type))
Expand Down
10 changes: 5 additions & 5 deletions src/code/class.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -660,16 +660,16 @@

;;;; CLASS type operations

(define-type-class sb!xc:class)
(!define-type-class sb!xc:class)

;;; Simple methods for TYPE= and SUBTYPEP should never be called when
;;; the two classes are equal, since there are EQ checks in those
;;; operations.
(define-type-method (sb!xc:class :simple-=) (type1 type2)
(!define-type-method (sb!xc:class :simple-=) (type1 type2)
(assert (not (eq type1 type2)))
(values nil t))

(define-type-method (sb!xc:class :simple-subtypep) (class1 class2)
(!define-type-method (sb!xc:class :simple-subtypep) (class1 class2)
(assert (not (eq class1 class2)))
(let ((subclasses (class-subclasses class2)))
(if (and subclasses (gethash class1 subclasses))
Expand Down Expand Up @@ -697,7 +697,7 @@
;;; they are structure classes, since a subclass of both might be
;;; defined. If either class is sealed, we can eliminate this
;;; possibility.
(define-type-method (sb!xc:class :simple-intersection) (class1 class2)
(!define-type-method (sb!xc:class :simple-intersection) (class1 class2)
(declare (type sb!xc:class class1 class2))
(cond ((eq class1 class2) class1)
((let ((subclasses (class-subclasses class2)))
Expand All @@ -716,7 +716,7 @@
(t
(values class1 nil))))

(define-type-method (sb!xc:class :unparse) (type)
(!define-type-method (sb!xc:class :unparse) (type)
(class-proper-name type))

;;;; PCL stuff
Expand Down
51 changes: 24 additions & 27 deletions src/code/cold-init.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,30 @@
;;; a SIMPLE-VECTOR set by genesis
(defvar *!load-time-values*)

(defun !cold-lose (msg)
(%primitive print msg)
(%primitive print "too early in cold init to recover from errors")
(%halt))

#!+gengc
(defun do-load-time-value-fixup (object offset index)
(declare (type index offset))
(macrolet ((lose (msg)
`(progn
(%primitive print ,msg)
(%halt))))
(let ((value (svref *!load-time-values* index)))
(typecase object
(list
(case offset
(0 (setf (car object) value))
(1 (setf (cdr object) value))
(t (lose "bogus offset in cons cell"))))
(instance
(setf (%instance-ref object (- offset sb!vm:instance-slots-offset))
value))
(code-component
(setf (code-header-ref object offset) value))
(simple-vector
(setf (svref object (- offset sb!vm:vector-data-offset)) value))
(t
(lose "unknown kind of object for load-time-value fixup"))))))
(let ((value (svref *!load-time-values* index)))
(typecase object
(list
(case offset
(0 (setf (car object) value))
(1 (setf (cdr object) value))
(t (!cold-lose "bogus offset in cons cell"))))
(instance
(setf (%instance-ref object (- offset sb!vm:instance-slots-offset))
value))
(code-component
(setf (code-header-ref object offset) value))
(simple-vector
(setf (svref object (- offset sb!vm:vector-data-offset)) value))
(t
(!cold-lose "unknown kind of object for load-time-value fixup")))))

(eval-when (:compile-toplevel :execute)
;; FIXME: Perhaps we should make SHOW-AND-CALL-AND-FMAKUNBOUND, too,
Expand Down Expand Up @@ -185,12 +186,8 @@
(fourth toplevel-thing)
(fifth toplevel-thing)))
(t
(%primitive print
"bogus fixup code in *!REVERSED-COLD-TOPLEVELS*")
(%halt))))
(t
(%primitive print "bogus function in *!REVERSED-COLD-TOPLEVELS*")
(%halt)))))
(!cold-lose "bogus fixup code in *!REVERSED-COLD-TOPLEVELS*"))))
(t (!cold-lose "bogus function in *!REVERSED-COLD-TOPLEVELS*")))))
(/show0 "done with loop over cold toplevel forms and fixups")

;; Set sane values again, so that the user sees sane values instead of
Expand Down Expand Up @@ -268,7 +265,7 @@
and so forth) unless RECKLESSLY-P is non-NIL. On UNIX-like systems,
UNIX-STATUS is used as the status code."
(declare (type (signed-byte 32) unix-code))
;; TO DO: UNIX-CODE was deprecated in sbcl-0.6.8, after having been
;; FIXME: UNIX-CODE was deprecated in sbcl-0.6.8, after having been
;; around for less than a year. It should be safe to remove it after
;; a year.
(when unix-code-p
Expand Down
20 changes: 11 additions & 9 deletions src/code/cross-type.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
(t
(error "can't handle TYPE-OF ~S in cross-compilation"))))))

;;; Like TYPEP, but asks whether HOST-OBJECT would be of TARGET-TYPE when
;;; instantiated on the target SBCL. Since this is hard to decide in some
;;; cases, and since in other cases we just haven't bothered to try, it
;;; needs to return two values, just like SUBTYPEP: the first value for
;;; its conservative opinion (never T unless it's certain) and the second
;;; value to tell whether it's certain.
;;; Like TYPEP, but asks whether HOST-OBJECT would be of TARGET-TYPE
;;; when instantiated on the target SBCL. Since this is hard to decide
;;; in some cases, and since in other cases we just haven't bothered
;;; to try, it needs to return two values, just like SUBTYPEP: the
;;; first value for its conservative opinion (never T unless it's
;;; certain) and the second value to tell whether it's certain.
(defun cross-typep (host-object target-type)
(flet ((warn-and-give-up ()
;; We don't have to keep track of this as long as system performance
Expand Down Expand Up @@ -328,7 +328,9 @@
(structure!object
(sb!xc:find-class (uncross (class-name (class-of x)))))
(t
;; There might be more cases which we could handle with sufficient effort;
;; since all we *need* to handle are enough cases for bootstrapping, we
;; don't try to be complete here. -- WHN 19990512
;; There might be more cases which we could handle with
;; sufficient effort; since all we *need* to handle are enough
;; cases for bootstrapping, we don't try to be complete here,. If
;; future maintainers make the bootstrap code more complicated,
;; they can also add new cases here to handle it. -- WHN 2000-11-11
(error "can't handle ~S in cross CTYPE-OF" x))))
52 changes: 28 additions & 24 deletions src/code/debug-info.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -262,24 +262,24 @@ function (which would be useful info anyway).

(def!struct (debug-source #-sb-xc-host (:pure t))
;; This slot indicates where the definition came from:
;; :File - from a file (Compile-File)
;; :Lisp - from Lisp (Compile)
;; :FILE - from a file (COMPILE-FILE)
;; :LISP - from Lisp (COMPILE)
(from (required-argument) :type (member :file :lisp))
;; If :File, the file name, if :Lisp or :Stream, then a vector of the
;; top-level forms. When from COMPILE, form 0 is #'(LAMBDA ...).
;; If :FILE, the file name, if :LISP or :STREAM, then a vector of
;; the top-level forms. When from COMPILE, form 0 is #'(LAMBDA ...).
(name nil)
;; File comment for this file, if any.
(comment nil :type (or simple-string null))
;; The universal time that the source was written, or NIL if unavailable.
;; the universal time that the source was written, or NIL if
;; unavailable
(created nil :type (or unsigned-byte null))
;; The universal time that the source was compiled.
;; the universal time that the source was compiled
(compiled (required-argument) :type unsigned-byte)
;; The source path root number of the first form read from this source (i.e.
;; the total number of forms converted previously in this compilation.)
;; the source path root number of the first form read from this
;; source (i.e. the total number of forms converted previously in
;; this compilation)
(source-root 0 :type index)
;; The file-positions of each truly top-level form read from this file (if
;; applicable). The vector element type will be chosen to hold the largest
;; element. May be null to save space.
;; The FILE-POSITIONs of the truly top-level forms read from this
;; file (if applicable). The vector element type will be chosen to
;; hold the largest element. May be null to save space.
(start-positions nil :type (or (simple-array * (*)) null))
;; If from :LISP, this is the function whose source is form 0.
(info nil))
Expand All @@ -292,21 +292,25 @@ function (which would be useful info anyway).
;; A list of DEBUG-SOURCE structures describing where the code for this
;; component came from, in the order that they were read.
;;
;; *** NOTE: the offset of this slot is wired into the fasl dumper so that it
;; *** can backpatch the source info when compilation is complete.
;; KLUDGE: comment from CMU CL:
;; *** NOTE: the offset of this slot is wired into the fasl dumper
;; *** so that it can backpatch the source info when compilation
;; *** is complete.
(source nil :type list))

(def!struct (compiled-debug-info
(:include debug-info)
#-sb-xc-host (:pure t))
;; a simple-vector of alternating DEBUG-FUNCTION objects and fixnum PCs,
;; used to map PCs to functions, so that we can figure out what function we
;; were running in. Each function is valid between the PC before it
;; (inclusive) and the PC after it (exclusive). The PCs are in sorted order,
;; to allow binary search. We omit the first and last PC, since their values
;; are 0 and the length of the code vector.
;; a simple-vector of alternating DEBUG-FUNCTION objects and fixnum
;; PCs, used to map PCs to functions, so that we can figure out what
;; function we were running in. Each function is valid between the
;; PC before it (inclusive) and the PC after it (exclusive). The PCs
;; are in sorted order, to allow binary search. We omit the first
;; and last PC, since their values are 0 and the length of the code
;; vector.
;;
;; KLUDGE: PC's can't always be represented by FIXNUMs, unless we're always
;; careful to put our code in low memory. Is that how it works? Would this
;; break if we used a more general memory map? -- WHN 20000120
;; KLUDGE: PC's can't always be represented by FIXNUMs, unless we're
;; always careful to put our code in low memory. Is that how it
;; works? Would this break if we used a more general memory map? --
;; WHN 20000120
(function-map (required-argument) :type simple-vector :read-only t))
26 changes: 13 additions & 13 deletions src/code/debug.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,7 @@ reset to ~S."
(unless (boundp '*)
(setq * nil)
(fresh-line)
;; FIXME: Perhaps this shouldn't be WARN (for fear of complicating
;; the debugging situation?) but at least it should go to *ERROR-OUTPUT*.
;; (And probably it should just be WARN.)
;; FIXME: The way INTERACTIVE-EVAL does this seems better.
(princ "Setting * to NIL (was unbound marker)."))))

;;;; debug loop functions
Expand Down Expand Up @@ -1212,8 +1210,9 @@ reset to ~S."

;;;; source location printing

;;; We cache a stream to the last valid file debug source so that we won't have
;;; to repeatedly open the file.
;;; We cache a stream to the last valid file debug source so that we
;;; won't have to repeatedly open the file.
;;;
;;; KLUDGE: This sounds like a bug, not a feature. Opening files is fast
;;; in the 1990s, so the benefit is negligible, less important than the
;;; potential of extra confusion if someone changes the source during
Expand All @@ -1236,16 +1235,17 @@ reset to ~S."
*cached-readtable* nil))
sb!int:*before-save-initializations*)

;;; We also cache the last top-level form that we printed a source for so that
;;; we don't have to do repeated reads and calls to FORM-NUMBER-TRANSLATIONS.
;;; We also cache the last top-level form that we printed a source for
;;; so that we don't have to do repeated reads and calls to
;;; FORM-NUMBER-TRANSLATIONS.
(defvar *cached-top-level-form-offset* nil)
(declaim (type (or index null) *cached-top-level-form-offset*))
(defvar *cached-top-level-form*)
(defvar *cached-form-number-translations*)

;;; Given a code location, return the associated form-number translations and
;;; the actual top-level form. We check our cache --- if there is a miss, we
;;; dispatch on the kind of the debug source.
;;; Given a code location, return the associated form-number
;;; translations and the actual top-level form. We check our cache ---
;;; if there is a miss, we dispatch on the kind of the debug source.
(defun get-top-level-form (location)
(let ((d-source (sb!di:code-location-debug-source location)))
(if (and (eq d-source *cached-debug-source*)
Expand All @@ -1262,9 +1262,9 @@ reset to ~S."
(sb!di:form-number-translations res offset))
(setq *cached-top-level-form* res))))))

;;; Locates the source file (if it still exists) and grabs the top-level form.
;;; If the file is modified, we use the top-level-form offset instead of the
;;; recorded character offset.
;;; Locate the source file (if it still exists) and grab the top-level
;;; form. If the file is modified, we use the top-level-form offset
;;; instead of the recorded character offset.
(defun get-file-top-level-form (location)
(let* ((d-source (sb!di:code-location-debug-source location))
(tlf-offset (sb!di:code-location-top-level-form-offset location))
Expand Down
Loading

0 comments on commit 77360ee

Please sign in to comment.