Skip to content

Commit

Permalink
0.pre7.127:
Browse files Browse the repository at this point in the history
	(There were >300 matches to
		"egrep -sn '^\(def[^(;&]*function' ..." before.)
	s/to-function/to-fun/
	s/hook-function/hook-fun/
	s/describe-function/describe-fun/
	s/bogo-function/bogo-fun/
	s/fop-fun/fop-fun/
	s/not-function/not-fun/
	s/named-function/named-fun/
	s/nil-function/nil-fun/
	s/\<t-function/t-fun/
	s/simple-function/simple-fun/
	s/function-call/fun-call/
	s/move-function/move-fun/
	s/traced-function/traced-fun/
	s/function-or-lose/fun-or-lose/
	s/disassemble-function/disassemble-fun/
	s/get-function/get-fun/
	s/output-function/output-fun/
	s/1[-a-z0-9]*function/1$1fun/
	s/note-function/note-fun/
	s/check-function/check-fun/
	s/function-cache/fun-cache/
	s/disassem-function/disassem-fun/
	s/function-cost/fun-guessed-cost/
	s/function-value/fun-value/
	not just s/function/fun/, but also clearing up mess of (1)
		LOSSAGE/SLIME (esp. SLIME), what do they mean? and
		(2) "ERROR" and "WARNING" used in names even though
		the condition system isn't involved...
	...s/error-function/lossage-fun/
	...s/warning-function/unwinnage-fun/
	...s/slime/unwinnage/
	other confusion/inconstency...
	...s/compiler-style-warning/compiler-style-warn/ when used
		as verb (as opposed to used as condition name)
	...and similarly for s/compiler-warning/compiler-warn/
	s/test-function/test-fun/
	s/\*test-fun\*/*ctype-test-fun*/
	(There are now some 230 hits to the egrep at the start, mostly in
		src/pcl/*, where I'm trying to tread lightly to avoid
		gratuitously breaking quasistandard MOPish things.)
  • Loading branch information
William Harold Newman committed Jan 13, 2002
1 parent ed7ba4d commit d40a766
Show file tree
Hide file tree
Showing 64 changed files with 525 additions and 528 deletions.
8 changes: 2 additions & 6 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,14 @@ for 0.7.0:
protruding rusty nails and snipped off the trailing razor wire,
leaving some filing for later:-) from the monster
EVAL/EVAL-WHEN/%COMPILE/DEFUN/DEFSTRUCT cleanup:
** made inlining DEFUN inside MACROLET work again
** bug 138
* more renaming in global external names:
** reserved DO-FOO-style names for iteration macros
** finished s/FUNCTION/FUN/
** s/VARIABLE/VAR/
** perhaps s/DEF-FROB/DEF/ or s/DEF-FROB/DEFINE/
* Perhaps rename "cold" stuff (e.g. SB-COLD and src/cold/) to "boot".
* global style systematization:
** s/#'(lambda/(lambda/
* pending patches and bug reports that go in (or else get handled
somehow, rejected/logged/whatever) before 0.7.0:
** DIRECTORY problems (bug 139, CR patch sbcl-devel 2001-12-31)
=======================================================================
for early 0.7.x:

Expand All @@ -30,7 +25,8 @@ for early 0.7.x:
of them. Since I have other motivations for this rearrangement
besides CLISPiosyncrasies, I'm reasonably motivated to do it.
* urgent EVAL/EVAL-WHEN/%COMPILE/DEFUN/DEFSTRUCT cleanup:
** fixed bug 137
** made inlining DEFUN inside MACROLET work again
** fixed bug 137 (more)
* faster bootstrapping (both make.sh and slam.sh)
** added mechanisms for automatically finding dead code, and
used them to remove dead code
Expand Down
32 changes: 16 additions & 16 deletions package-data-list.lisp-expr
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"CALL" "CALL-LOCAL" "CALL-NAMED" "CALL-OUT" "CALL-VARIABLE"
"CALLEE-NFP-TN" "CALLEE-RETURN-PC-TN"
"CASE-BODY" "CATCH-BLOCK" "CHECK-CONS"
"CHECK-FIXNUM" "CHECK-FUNCTION"
"CHECK-FIXNUM" "CHECK-FUN"
"CHECK-SIGNED-BYTE-32" "CHECK-SYMBOL" "CHECK-UNSIGNED-BYTE-32"
"CLOSURE-INIT" "CLOSURE-REF"
"CODE-CONSTANT-REF" "CODE-CONSTANT-SET"
Expand All @@ -208,7 +208,7 @@
"DEF-IR1-TRANSLATOR"
"!DEF-PRIMITIVE-TYPE" "!DEF-PRIMITIVE-TYPE-ALIAS"
"DEFINE-SOURCE-TRANSFORM" "!DEF-VM-SUPPORT-ROUTINE"
"DEFINE-ASSEMBLY-ROUTINE" "DEFINE-MOVE-FUNCTION"
"DEFINE-ASSEMBLY-ROUTINE" "DEFINE-MOVE-FUN"
"DEFINE-MOVE-VOP" "DEFINE-STORAGE-BASE"
"DEFINE-STORAGE-CLASS" "DEFINE-VOP"
"DEFKNOWN" "DEFOPTIMIZER"
Expand Down Expand Up @@ -325,18 +325,18 @@
#s(sb-cold:package-data
:name "SB!DEBUG"
:doc
"public: (eventually) the debugger interface (but currently) the
debugger interface mixed with various low-level implementation stuff
like *STACK-TOP-HINT*"
"sorta public: Eventually this should become the debugger interface, with
basic stuff like BACKTRACE and ARG. For now, the actual supported interface
is still mixed indiscriminately with low-level internal implementation stuff
like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*."
:use ("CL" "SB!EXT" "SB!INT" "SB!SYS")
:export ("*DEBUG-BEGINNER-HELP-P*"
"*DEBUG-CONDITION*"
"*DEBUG-PRINT-LENGTH*" "*DEBUG-PRINT-LEVEL*"
"*DEBUG-READTABLE*" "*DEBUG-HELP-STRING*"
"*FLUSH-DEBUG-ERRORS*" "*IN-THE-DEBUGGER*"
"*TRACE-INDENTATION-STEP*" "*MAX-TRACE-INDENTATION*"
"*TRACE-FRAME*" "*TRACE-PRINT-LENGTH*"
"*TRACE-PRINT-LEVEL*" "*TRACED-FUNCTION-LIST*"
"*TRACE-FRAME*" "*TRACED-FUN-LIST*"
"ARG" "BACKTRACE" "INTERNAL-DEBUG" "VAR"
"*PRINT-LOCATION-KIND*"
"*ONLY-BLOCK-START-LOCATIONS*" "*STACK-TOP-HINT*"
Expand All @@ -358,7 +358,7 @@ like *STACK-TOP-HINT*"
"DEBUG-SOURCE-P")
:export ("ACTIVATE-BREAKPOINT"
"AMBIGUOUS-DEBUG-VARS" "AMBIGUOUS-VAR-NAME" "BREAKPOINT"
"BREAKPOINT-ACTIVE-P" "BREAKPOINT-HOOK-FUNCTION" "BREAKPOINT-INFO"
"BREAKPOINT-ACTIVE-P" "BREAKPOINT-HOOK-FUN" "BREAKPOINT-INFO"
"BREAKPOINT-KIND" "BREAKPOINT-P" "BREAKPOINT-WHAT" "CODE-LOCATION"
"CODE-LOCATION-DEBUG-BLOCK" "CODE-LOCATION-DEBUG-FUN"
"CODE-LOCATION-DEBUG-SOURCE" "CODE-LOCATION-FORM-NUMBER"
Expand Down Expand Up @@ -401,14 +401,14 @@ like *STACK-TOP-HINT*"
"ADD-COMMENT-HOOK" "ADD-HOOK" "ADD-NOTE-HOOK"
"ARG-VALUE" "CREATE-DSTATE" "DISASSEM-STATE"
"DISASSEMBLE-CODE-COMPONENT"
"DISASSEMBLE-FUNCTION" "DISASSEMBLE-MEMORY"
"DISASSEMBLE-FUN" "DISASSEMBLE-MEMORY"
"DISASSEMBLE-SEGMENT" "DISASSEMBLE-SEGMENTS"
"DSTATE-CODE" "DSTATE-CURPOS" "DSTATE-GET-PROP"
"DSTATE-NEXTPOS" "DSTATE-SEGMENT-LENGTH"
"DSTATE-SEGMENT-SAP" "DSTATE-SEGMENT-START"
"FIELD-TYPE" "FIND-INST" "GEN-FIELD-TYPE-DECL-FORM"
"GEN-INST-DECL-FORM" "GEN-INST-FORMAT-DECL-FORM"
"GET-CODE-SEGMENTS" "GET-FUNCTION-SEGMENTS"
"GET-CODE-SEGMENTS" "GET-FUN-SEGMENTS"
"GET-INST-SPACE" "HANDLE-BREAK-ARGS"
"INST" "INST-FORMAT" "LABEL-SEGMENTS"
"MAYBE-NOTE-ASSEMBLER-ROUTINE"
Expand Down Expand Up @@ -976,7 +976,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"CODE-COMPONENT" "CODE-COMPONENT-P"
"CODE-DEBUG-INFO" "CODE-HEADER-REF" "CODE-HEADER-SET"
"CODE-INSTRUCTIONS"
"COERCE-TO-BIT-VECTOR" "COERCE-TO-FUNCTION" "COERCE-TO-LEXENV"
"COERCE-TO-BIT-VECTOR" "COERCE-TO-FUN" "COERCE-TO-LEXENV"
"COERCE-TO-LIST" "COERCE-TO-SIMPLE-STRING"
"COERCE-TO-SIMPLE-VECTOR" "COERCE-TO-VECTOR"
"*COLD-INIT-COMPLETE-P*"
Expand Down Expand Up @@ -1074,7 +1074,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"MUTATOR-SELF"
"NAMED-TYPE" "NAMED-TYPE-NAME" "NAMED-TYPE-P"
"NATIVE-BYTE-ORDER" "NEGATE"
"NEVER-SUBTYPEP" "NIL-FUNCTION-RETURNED-ERROR"
"NEVER-SUBTYPEP" "NIL-FUN-RETURNED-ERROR"
"NOT-<=-ERROR" "NOT-=-ERROR"
"NOT-DUMPED-AT-ALL"
"NUMERIC-CONTAGION" "NUMERIC-TYPE"
Expand All @@ -1083,7 +1083,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"NUMERIC-TYPE-HIGH" "NUMERIC-TYPE-LOW" "NUMERIC-TYPE-P"
"OBJECT-NOT-ARRAY-ERROR" "OBJECT-NOT-BASE-CHAR-ERROR"
"OBJECT-NOT-BIGNUM-ERROR" "OBJECT-NOT-BIT-VECTOR-ERROR"
"OBJECT-NOT-COERCEABLE-TO-FUNCTION-ERROR"
"OBJECT-NOT-COERCEABLE-TO-FUN-ERROR"
"OBJECT-NOT-COMPLEX-ERROR"
"OBJECT-NOT-COMPLEX-FLOAT-ERROR"
"OBJECT-NOT-COMPLEX-SINGLE-FLOAT-ERROR"
Expand All @@ -1097,7 +1097,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"OBJECT-NOT-COMPLEX-VECTOR-ERROR"
"OBJECT-NOT-CONS-ERROR"
"OBJECT-NOT-DOUBLE-FLOAT-ERROR" "OBJECT-NOT-FIXNUM-ERROR"
"OBJECT-NOT-FLOAT-ERROR" "OBJECT-NOT-FUNCTION-ERROR"
"OBJECT-NOT-FLOAT-ERROR" "OBJECT-NOT-FUN-ERROR"
"OBJECT-NOT-INSTANCE-ERROR"
"OBJECT-NOT-INTEGER-ERROR"
"OBJECT-NOT-LIST-ERROR" "OBJECT-NOT-LONG-FLOAT-ERROR"
Expand Down Expand Up @@ -1244,7 +1244,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"%SIMPLE-FUN-TYPE" "PROCLAIM-AS-FUN-NAME"
"BECOME-DEFINED-FUN-NAME"
"%NUMERATOR" "CLASS-TYPEP"
"STRUCTURE-CLASS-PRINT-FUNCTION" "DSD-READ-ONLY"
"DSD-READ-ONLY"
"LAYOUT-INHERITS" "DD-LENGTH" "%CODE-ENTRY-POINTS"
"%DENOMINATOR"
"MAKE-STANDARD-CLASS"
Expand All @@ -1253,7 +1253,7 @@ is a good idea, but see SB-SYS re. blurring of boundaries."
"FUNCALLABLE-STRUCTURE-CLASS"
"%RANDOM-DOUBLE-FLOAT" "%RANDOM-LONG-FLOAT"
"%RANDOM-SINGLE-FLOAT"
"RANDOM-PCL-CLASS" "BASIC-STRUCTURE-CLASS-PRINT-FUNCTION"
"RANDOM-PCL-CLASS"
"%FUNCALLABLE-INSTANCE-INFO" "RANDOM-CHUNK"
"MAKE-FUNCALLABLE-STRUCTURE-CLASS" "LAYOUT-CLOS-HASH-MAX"
"CLASS-CELL-NAME" "BUILT-IN-CLASS-DIRECT-SUPERCLASSES"
Expand Down
10 changes: 5 additions & 5 deletions src/code/bignum.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@
(logand x (1- (ash 1 digit-size))))

#!-32x16-divide
;;; This takes three digits and returns the FLOOR'ed result of dividing the
;;; first two as a 64-bit integer by the third.
;;; This takes three digits and returns the FLOOR'ed result of
;;; dividing the first two as a 64-bit integer by the third.
;;;
;;; DO WEIRD let AND setq STUFF TO SLIME THE COMPILER INTO ALLOWING THE %FLOOR
;;; TRANSFORM TO EXPAND INTO PSEUDO-ASSEMBLER FOR WHICH THE COMPILER CAN LATER
;;; CORRECTLY ALLOCATE REGISTERS.
;;; Do weird LET and SETQ stuff to bamboozle the compiler into allowing
;;; the %FLOOR transform to expand into pseudo-assembler for which the
;;; compiler can later correctly allocate registers.
(defun %floor (a b c)
(let ((a a) (b b) (c c))
(declare (type bignum-element-type a b c))
Expand Down
4 changes: 2 additions & 2 deletions src/code/coerce.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
;;; DEFTRANSFORMs, though.
(declaim (inline coerce-to-list))
(declaim (inline coerce-to-simple-string coerce-to-bit-vector coerce-to-vector))
(defun coerce-to-function (object)
(defun coerce-to-fun (object)
;; (Unlike the other COERCE-TO-FOOs, this one isn't inline, because
;; it's so big and because optimizing away the outer ETYPECASE
;; doesn't seem to buy us that much anyway.)
Expand Down Expand Up @@ -270,7 +270,7 @@
((csubtypep type (specifier-type 'character))
(character object))
((csubtypep type (specifier-type 'function))
(coerce-to-function object))
(coerce-to-fun object))
((numberp object)
(let ((res
(cond
Expand Down
57 changes: 28 additions & 29 deletions src/code/debug-int.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,15 @@
(breakpoint-data-offset obj))))

(defstruct (breakpoint (:constructor %make-breakpoint
(hook-function what kind %info))
(hook-fun what kind %info))
(:copier nil))
;; This is the function invoked when execution encounters the
;; breakpoint. It takes a frame, the breakpoint, and optionally a
;; list of values. Values are supplied for :FUN-END breakpoints
;; as values to return for the function containing the breakpoint.
;; :FUN-END breakpoint hook-functions also take a cookie
;; argument. See COOKIE-FUN slot.
(hook-function nil :type function)
;; list of values. Values are supplied for :FUN-END breakpoints as
;; values to return for the function containing the breakpoint.
;; :FUN-END breakpoint hook functions also take a cookie argument.
;; See the COOKIE-FUN slot.
(hook-fun (required-arg) :type function)
;; CODE-LOCATION or DEBUG-FUN
(what nil :type (or code-location debug-fun))
;; :CODE-LOCATION, :FUN-START, or :FUN-END for that kind
Expand Down Expand Up @@ -431,7 +431,7 @@
;; for identifying :FUN-END breakpoint executions. That is, if
;; there is one :FUN-END breakpoint, but there may be multiple
;; pending calls of its function on the stack. This function takes
;; the cookie, and the hook-function takes the cookie too.
;; the cookie, and the hook function takes the cookie too.
(cookie-fun nil :type (or null function))
;; This slot users can set with whatever information they find useful.
%info)
Expand Down Expand Up @@ -2712,20 +2712,19 @@
;;;; user-visible interface

;;; Create and return a breakpoint. When program execution encounters
;;; the breakpoint, the system calls HOOK-FUNCTION. HOOK-FUNCTION takes the
;;; current frame for the function in which the program is running and the
;;; breakpoint object.
;;; the breakpoint, the system calls HOOK-FUN. HOOK-FUN takes the
;;; current frame for the function in which the program is running and
;;; the breakpoint object.
;;;
;;; WHAT and KIND determine where in a function the system invokes
;;; HOOK-FUNCTION. WHAT is either a code-location or a DEBUG-FUN.
;;; KIND is one of :CODE-LOCATION, :FUN-START, or :FUN-END.
;;; Since the starts and ends of functions may not have code-locations
;;; representing them, designate these places by supplying WHAT as a
;;; DEBUG-FUN and KIND indicating the :FUN-START or
;;; :FUN-END. When WHAT is a DEBUG-FUN and kind is
;;; :FUN-END, then hook-function must take two additional
;;; arguments, a list of values returned by the function and a
;;; FUN-END-COOKIE.
;;; HOOK-FUN. WHAT is either a code-location or a DEBUG-FUN. KIND is
;;; one of :CODE-LOCATION, :FUN-START, or :FUN-END. Since the starts
;;; and ends of functions may not have code-locations representing
;;; them, designate these places by supplying WHAT as a DEBUG-FUN and
;;; KIND indicating the :FUN-START or :FUN-END. When WHAT is a
;;; DEBUG-FUN and kind is :FUN-END, then HOOK-FUN must take two
;;; additional arguments, a list of values returned by the function
;;; and a FUN-END-COOKIE.
;;;
;;; INFO is information supplied by and used by the user.
;;;
Expand All @@ -2740,20 +2739,20 @@
;;; function.
;;;
;;; Signal an error if WHAT is an unknown code-location.
(defun make-breakpoint (hook-function what
(defun make-breakpoint (hook-fun what
&key (kind :code-location) info fun-end-cookie)
(etypecase what
(code-location
(when (code-location-unknown-p what)
(error "cannot make a breakpoint at an unknown code location: ~S"
what))
(aver (eq kind :code-location))
(let ((bpt (%make-breakpoint hook-function what kind info)))
(let ((bpt (%make-breakpoint hook-fun what kind info)))
(etypecase what
(compiled-code-location
;; This slot is filled in due to calling CODE-LOCATION-UNKNOWN-P.
(when (eq (compiled-code-location-kind what) :unknown-return)
(let ((other-bpt (%make-breakpoint hook-function what
(let ((other-bpt (%make-breakpoint hook-fun what
:unknown-return-partner
info)))
(setf (breakpoint-unknown-return-partner bpt) other-bpt)
Expand All @@ -2766,19 +2765,19 @@
(compiled-debug-fun
(ecase kind
(:fun-start
(%make-breakpoint hook-function what kind info))
(%make-breakpoint hook-fun what kind info))
(:fun-end
(unless (eq (sb!c::compiled-debug-fun-returns
(compiled-debug-fun-compiler-debug-fun what))
:standard)
(error ":FUN-END breakpoints are currently unsupported ~
for the known return convention."))

(let* ((bpt (%make-breakpoint hook-function what kind info))
(let* ((bpt (%make-breakpoint hook-fun what kind info))
(starter (compiled-debug-fun-end-starter what)))
(unless starter
(setf starter (%make-breakpoint #'list what :fun-start nil))
(setf (breakpoint-hook-function starter)
(setf (breakpoint-hook-fun starter)
(fun-end-starter-hook starter what))
(setf (compiled-debug-fun-end-starter what) starter))
(setf (breakpoint-start-helper bpt) starter)
Expand Down Expand Up @@ -2867,7 +2866,7 @@

;;;; ACTIVATE-BREAKPOINT

;;; Cause the system to invoke the breakpoint's hook-function until
;;; Cause the system to invoke the breakpoint's hook function until
;;; the next call to DEACTIVATE-BREAKPOINT or DELETE-BREAKPOINT. The
;;; system invokes breakpoint hook functions in the opposite order
;;; that you activate them.
Expand Down Expand Up @@ -2950,7 +2949,7 @@

;;;; DEACTIVATE-BREAKPOINT

;;; Stop the system from invoking the breakpoint's hook-function.
;;; Stop the system from invoking the breakpoint's hook function.
(defun deactivate-breakpoint (breakpoint)
(when (eq (breakpoint-status breakpoint) :active)
(without-interrupts
Expand Down Expand Up @@ -3148,7 +3147,7 @@
(frame (do ((f (top-frame) (frame-down f)))
((eq debug-fun (frame-debug-fun f)) f))))
(dolist (bpt breakpoints)
(funcall (breakpoint-hook-function bpt)
(funcall (breakpoint-hook-fun bpt)
frame
;; If this is an :UNKNOWN-RETURN-PARTNER, then pass the
;; hook function the original breakpoint, so that users
Expand Down Expand Up @@ -3186,7 +3185,7 @@
(cookie (gethash component *fun-end-cookies*)))
(remhash component *fun-end-cookies*)
(dolist (bpt breakpoints)
(funcall (breakpoint-hook-function bpt)
(funcall (breakpoint-hook-fun bpt)
frame bpt
(get-fun-end-breakpoint-values scp)
cookie))))
Expand Down
Loading

0 comments on commit d40a766

Please sign in to comment.