mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
0.pre7.139:
more s/argument/arg/... ...s/entry-argument/entry-arg/ ...s/argument-list/arg-list/ ...s/compile-argument/compile-arg/ ...s/associate-argument/associate-arg/ ...s/compute-argument/compute-arg/ ...s/reference-argument/reference-arg/ ...*not* s/one-argument/one-arg/, since CL defines :IDENTITY-WITH-ONE-ARGUMENT as a kw arg for DEFINE-METHOD-COMBINATION ...s/from-argument/from-arg/
This commit is contained in:
parent
9a241987c4
commit
104ee7ee30
5
NEWS
5
NEWS
|
|
@ -926,6 +926,11 @@ changes in sbcl-0.7.0 relative to sbcl-0.6.13:
|
|||
DEFINE-CONDITION, DEFINE-MODIFY-MACRO..). This mostly affects
|
||||
internal symbols, but a few supported extensions like
|
||||
SB-ALIEN:DEF-ALIEN-FUNCTION are also affected.
|
||||
?? minor incompatible change: SB-C-CALL and SB-ALIEN no longer exist
|
||||
as separate packages. The external symbols of both packages have
|
||||
moved into a new SB-FFI package. Almost all old code should still
|
||||
continue to work without immediate update, as SB-C-CALL and SB-ALIEN
|
||||
names will be retained as nicknames for that package for some time.
|
||||
* minor incompatible change (part of a bug fix by Christophe Rhodes
|
||||
to DIRECTORY behavior): DIRECTORY no longer implicitly promotes
|
||||
NIL slots of its pathname argument to :WILD, and in particular
|
||||
|
|
|
|||
33
TLA
Normal file
33
TLA
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
(TLA = "three letter acronym/abbreviation":-)
|
||||
|
||||
abbreviations we try to use pervasively in the system
|
||||
|
||||
As Dan Barlow pointed out long ago on the mailing list, unabbreviated
|
||||
names are easier to deal with than abbreviated names, because you
|
||||
never need to remember what abbreviation to use. That's true, but in a
|
||||
language like Lisp which depends on compound names for important
|
||||
things like structure accessors, that can lead to painful names like
|
||||
MAKE-EXTERNAL-ENTRY-POINT-LAMBDA-EXPRESSION and associated indenting
|
||||
confusion.
|
||||
|
||||
In an effort to have some of the best of both worlds, I've attempted
|
||||
to impose standard abbreviations for some things. Ideally, you don't
|
||||
need to remember whether to abbreviate it, or what abbreviation to
|
||||
use, because it's always the same abbreviation.
|
||||
|
||||
Some of these already were used pretty consistently in CMU CL.
|
||||
Others not so much, but in sbcl-0.7.0 I put some effort into
|
||||
making them more consistent.
|
||||
ARG argument
|
||||
FUN function
|
||||
GC garbage collect(ion)
|
||||
N new: number, as in e.g. N-PASSES or N-WORD-BITS
|
||||
old: conventional prefix for temporary variables used to
|
||||
implement evaluate-only-once semantics in macros
|
||||
SB storage base (in compiler IR2)
|
||||
SC storage class (in compiler IR2)
|
||||
TN temporary name (?) (in compiler IR2)
|
||||
VAR variable
|
||||
XEP external entry point
|
||||
Making them even more consistent (within the limits of ANSI and
|
||||
MOP compatibility) would probably be good.
|
||||
2
TODO
2
TODO
|
|
@ -10,6 +10,8 @@ for 0.7.0:
|
|||
** perhaps s/DEF-FROB/DEF/ or s/DEF-FROB/DEFINE/
|
||||
** merged SB-C-CALL into SB-ALIEN
|
||||
* Perhaps rename "cold" stuff (e.g. SB-COLD and src/cold/) to "boot".
|
||||
* fixed CREDITS, since it's gone pretty stale
|
||||
* reviewed NEWS
|
||||
* pending patches and bug reports that go in (or else get handled
|
||||
somehow, rejected/logged/whatever) before 0.7.0:
|
||||
=======================================================================
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@
|
|||
"VM-SUPPORT-ROUTINES-SELECT-COMPONENT-FORMAT"
|
||||
"VM-SUPPORT-ROUTINES-MAKE-NLX-SP-TN"
|
||||
"VM-SUPPORT-ROUTINES-MAKE-DYNAMIC-STATE-TNS"
|
||||
"VM-SUPPORT-ROUTINES-MAKE-NLX-ENTRY-ARGUMENT-START-LOCATION"
|
||||
"VM-SUPPORT-ROUTINES-MAKE-NLX-ENTRY-ARG-START-LOCATION"
|
||||
"VM-SUPPORT-ROUTINES-GENERATE-CALL-SEQUENCE"
|
||||
"VM-SUPPORT-ROUTINES-GENERATE-RETURN-SEQUENCE"
|
||||
"VM-SUPPORT-ROUTINES-EMIT-NOP"
|
||||
|
|
@ -752,7 +752,7 @@ retained, possibly temporariliy, because it might be used internally."
|
|||
"RATIOP"
|
||||
|
||||
;; encapsulation
|
||||
"ARGUMENT-LIST"
|
||||
"ARG-LIST"
|
||||
"BASIC-DEFINITION"
|
||||
"ENCAPSULATE" "ENCAPSULATED-P"
|
||||
"UNENCAPSULATE"
|
||||
|
|
|
|||
|
|
@ -97,8 +97,8 @@
|
|||
(definition nil :type function))
|
||||
|
||||
;;; Replace the definition of NAME with a function that binds NAME's
|
||||
;;; arguments a variable named argument-list, binds name's definition
|
||||
;;; to a variable named basic-definition, and evaluates BODY in that
|
||||
;;; arguments to a variable named ARG-LIST, binds name's definition
|
||||
;;; to a variable named BASIC-DEFINITION, and evaluates BODY in that
|
||||
;;; context. TYPE is whatever you would like to associate with this
|
||||
;;; encapsulation for identification in case you need multiple
|
||||
;;; encapsulations of the same name.
|
||||
|
|
@ -117,8 +117,8 @@
|
|||
;; an encapsulation that no longer exists.
|
||||
(let ((info (make-encapsulation-info type (fdefn-fun fdefn))))
|
||||
(setf (fdefn-fun fdefn)
|
||||
(lambda (&rest argument-list)
|
||||
(declare (special argument-list))
|
||||
(lambda (&rest arg-list)
|
||||
(declare (special arg-list))
|
||||
(let ((basic-definition (encapsulation-info-definition info)))
|
||||
(declare (special basic-definition))
|
||||
(eval body)))))))
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@
|
|||
((nil) exp)
|
||||
(:encapsulated
|
||||
`(flet ((sb-debug:arg (n)
|
||||
(declare (special argument-list))
|
||||
(elt argument-list n)))
|
||||
(declare (special arg-list))
|
||||
(elt arg-list n)))
|
||||
(declare (ignorable #'sb-debug:arg))
|
||||
,exp))))
|
||||
(fun (coerce `(lambda () ,bod) 'function)))
|
||||
|
|
@ -254,8 +254,12 @@
|
|||
(fresh-line)
|
||||
(print-trace-indentation)
|
||||
(if (trace-info-encapsulated info)
|
||||
(locally (declare (special basic-definition argument-list))
|
||||
(prin1 `(,(trace-info-what info) ,@argument-list)))
|
||||
;; FIXME: These special variables should be given
|
||||
;; *FOO*-style names, and probably declared globally
|
||||
;; with DEFVAR.
|
||||
(locally
|
||||
(declare (special basic-definition arg-list))
|
||||
(prin1 `(,(trace-info-what info) ,@arg-list)))
|
||||
(print-frame-call frame))
|
||||
(terpri)
|
||||
(trace-print frame (trace-info-print info)))
|
||||
|
|
@ -310,11 +314,11 @@
|
|||
(let ((frame (sb-di:frame-down (sb-di:top-frame))))
|
||||
(funcall start frame nil)
|
||||
(let ((*traced-entries* *traced-entries*))
|
||||
(declare (special basic-definition argument-list))
|
||||
(declare (special basic-definition arg-list))
|
||||
(funcall cookie frame nil)
|
||||
(let ((vals
|
||||
(multiple-value-list
|
||||
(apply basic-definition argument-list))))
|
||||
(apply basic-definition arg-list))))
|
||||
(funcall (trace-end-breakpoint-fun info) frame nil vals nil)
|
||||
(values-list vals))))))
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
;;; Make a TN for the argument count passing location for a
|
||||
;;; non-local entry.
|
||||
(!def-vm-support-routine make-nlx-entry-argument-start-location ()
|
||||
(!def-vm-support-routine make-nlx-entry-arg-start-location ()
|
||||
(make-wired-tn *fixnum-primitive-type* immediate-arg-scn ocfp-offset))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@
|
|||
;; from nlx.lisp
|
||||
make-nlx-sp-tn
|
||||
make-dynamic-state-tns
|
||||
make-nlx-entry-argument-start-location
|
||||
make-nlx-entry-arg-start-location
|
||||
|
||||
;; from support.lisp
|
||||
generate-call-sequence
|
||||
|
|
|
|||
|
|
@ -417,14 +417,14 @@
|
|||
|
||||
;;;; arguments/returns
|
||||
|
||||
;;; Return a vector to be used as the
|
||||
;;; COMPILED-DEBUG-FUN-ARGUMENTS for Fun. If fun is the
|
||||
;;; MAIN-ENTRY for an optional dispatch, then look at the ARGLIST to
|
||||
;;; determine the syntax, otherwise pretend all arguments are fixed.
|
||||
;;; Return a vector to be used as the COMPILED-DEBUG-FUN-ARGS for FUN.
|
||||
;;; If FUN is the MAIN-ENTRY for an optional dispatch, then look at
|
||||
;;; the ARGLIST to determine the syntax, otherwise pretend all
|
||||
;;; arguments are fixed.
|
||||
;;;
|
||||
;;; ### This assumption breaks down in EPs other than the main-entry,
|
||||
;;; since they may or may not have supplied-p vars, etc.
|
||||
(defun compute-arguments (fun var-locs)
|
||||
(defun compute-args (fun var-locs)
|
||||
(declare (type clambda fun) (type hash-table var-locs))
|
||||
(collect ((res))
|
||||
(let ((od (lambda-optional-dispatch fun)))
|
||||
|
|
@ -505,7 +505,7 @@
|
|||
(setf (compiled-debug-fun-vars dfun)
|
||||
(compute-vars fun level var-locs))
|
||||
(setf (compiled-debug-fun-arguments dfun)
|
||||
(compute-arguments fun var-locs))))
|
||||
(compute-args fun var-locs))))
|
||||
|
||||
(when (>= level 2)
|
||||
(multiple-value-bind (blocks tlf-num) (compute-debug-blocks fun var-locs)
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@
|
|||
;;; arguments are returned in the second value as a list rather than
|
||||
;;; being accessed as a normal argument. NODE and BLOCK provide the
|
||||
;;; context for emitting any necessary type-checking code.
|
||||
(defun reference-arguments (node block args template)
|
||||
(defun reference-args (node block args template)
|
||||
(declare (type node node) (type ir2-block block) (list args)
|
||||
(type template template))
|
||||
(collect ((info-args))
|
||||
|
|
@ -593,7 +593,7 @@
|
|||
(cont (node-cont call))
|
||||
(rtypes (template-result-types template)))
|
||||
(multiple-value-bind (args info-args)
|
||||
(reference-arguments call block (combination-args call) template)
|
||||
(reference-args call block (combination-args call) template)
|
||||
(aver (not (template-more-results-type template)))
|
||||
(if (eq rtypes :conditional)
|
||||
(ir2-convert-conditional call block template args info-args
|
||||
|
|
@ -620,8 +620,7 @@
|
|||
(results (make-template-result-tns call cont template rtypes))
|
||||
(r-refs (reference-tn-list results t)))
|
||||
(multiple-value-bind (args info-args)
|
||||
(reference-arguments call block (cddr (combination-args call))
|
||||
template)
|
||||
(reference-args call block (cddr (combination-args call)) template)
|
||||
(aver (not (template-more-results-type template)))
|
||||
(aver (not (eq rtypes :conditional)))
|
||||
(aver (null info-args))
|
||||
|
|
@ -1459,7 +1458,7 @@
|
|||
(2cont (continuation-info cont))
|
||||
(2info (nlx-info-info info))
|
||||
(top-loc (ir2-nlx-info-save-sp 2info))
|
||||
(start-loc (make-nlx-entry-argument-start-location))
|
||||
(start-loc (make-nlx-entry-arg-start-location))
|
||||
(count-loc (make-arg-count-location))
|
||||
(target (ir2-nlx-info-target 2info)))
|
||||
|
||||
|
|
|
|||
|
|
@ -40,13 +40,11 @@
|
|||
;;; :BLOCK-COMPILE and :ENTRY-POINTS arguments that COMPILE-FILE was
|
||||
;;; called with.
|
||||
;;;
|
||||
;;; *BLOCK-COMPILE-ARGUMENT* holds the original value of the
|
||||
;;; :BLOCK-COMPILE argument, which overrides any internal
|
||||
;;; declarations.
|
||||
;;; *BLOCK-COMPILE-ARG* holds the original value of the :BLOCK-COMPILE
|
||||
;;; argument, which overrides any internal declarations.
|
||||
(defvar *block-compile*)
|
||||
(defvar *block-compile-argument*)
|
||||
(declaim (type (member nil t :specified)
|
||||
*block-compile* *block-compile-argument*))
|
||||
(defvar *block-compile-arg*)
|
||||
(declaim (type (member nil t :specified) *block-compile* *block-compile-arg*))
|
||||
(defvar *entry-points*)
|
||||
(declaim (list *entry-points*))
|
||||
|
||||
|
|
@ -1302,7 +1300,7 @@
|
|||
;;; Return (VALUES NIL WARNINGS-P FAILURE-P).
|
||||
(defun sub-compile-file (info)
|
||||
(declare (type source-info info))
|
||||
(let* ((*block-compile* *block-compile-argument*)
|
||||
(let* ((*block-compile* *block-compile-arg*)
|
||||
(*package* (sane-package))
|
||||
(*policy* *policy*)
|
||||
(*lexenv* (make-null-lexenv))
|
||||
|
|
@ -1415,7 +1413,7 @@
|
|||
|
||||
;; extensions
|
||||
(trace-file nil)
|
||||
((:block-compile *block-compile-argument*) nil))
|
||||
((:block-compile *block-compile-arg*) nil))
|
||||
|
||||
#!+sb-doc
|
||||
"Compile INPUT-FILE, producing a corresponding fasl file and returning
|
||||
|
|
|
|||
|
|
@ -3112,13 +3112,13 @@
|
|||
;;;; versions, and degenerate cases are flushed.
|
||||
|
||||
;;; Left-associate FIRST-ARG and MORE-ARGS using FUNCTION.
|
||||
(declaim (ftype (function (symbol t list) list) associate-arguments))
|
||||
(defun associate-arguments (function first-arg more-args)
|
||||
(declaim (ftype (function (symbol t list) list) associate-args))
|
||||
(defun associate-args (function first-arg more-args)
|
||||
(let ((next (rest more-args))
|
||||
(arg (first more-args)))
|
||||
(if (null next)
|
||||
`(,function ,first-arg ,arg)
|
||||
(associate-arguments function `(,function ,first-arg ,arg) next))))
|
||||
(associate-args function `(,function ,first-arg ,arg) next))))
|
||||
|
||||
;;; Do source transformations for transitive functions such as +.
|
||||
;;; One-arg cases are replaced with the arg and zero arg cases with
|
||||
|
|
@ -3133,7 +3133,7 @@
|
|||
`(,leaf-fun ,(first args) ,(second args))
|
||||
(values nil t)))
|
||||
(t
|
||||
(associate-arguments fun (first args) (rest args)))))
|
||||
(associate-args fun (first args) (rest args)))))
|
||||
|
||||
(define-source-transform + (&rest args)
|
||||
(source-transform-transitive '+ args 0))
|
||||
|
|
@ -3160,14 +3160,14 @@
|
|||
(0 0)
|
||||
(1 `(abs (the integer ,(first args))))
|
||||
(2 (values nil t))
|
||||
(t (associate-arguments 'gcd (first args) (rest args)))))
|
||||
(t (associate-args 'gcd (first args) (rest args)))))
|
||||
|
||||
(define-source-transform lcm (&rest args)
|
||||
(case (length args)
|
||||
(0 1)
|
||||
(1 `(abs (the integer ,(first args))))
|
||||
(2 (values nil t))
|
||||
(t (associate-arguments 'lcm (first args) (rest args)))))
|
||||
(t (associate-args 'lcm (first args) (rest args)))))
|
||||
|
||||
;;; Do source transformations for intransitive n-arg functions such as
|
||||
;;; /. With one arg, we form the inverse. With two args we pass.
|
||||
|
|
@ -3177,7 +3177,7 @@
|
|||
(case (length args)
|
||||
((0 2) (values nil t))
|
||||
(1 `(,@inverse ,(first args)))
|
||||
(t (associate-arguments function (first args) (rest args)))))
|
||||
(t (associate-args function (first args) (rest args)))))
|
||||
|
||||
(define-source-transform - (&rest args)
|
||||
(source-transform-intransitive '- args '(%negate)))
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
env))
|
||||
|
||||
;;; Make a TN for the argument count passing location for a non-local entry.
|
||||
(!def-vm-support-routine make-nlx-entry-argument-start-location ()
|
||||
(!def-vm-support-routine make-nlx-entry-arg-start-location ()
|
||||
(make-wired-tn *fixnum-primitive-type* any-reg-sc-number ebx-offset))
|
||||
|
||||
(defun catch-block-ea (tn)
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
|
||||
(in-package "SB-PCL")
|
||||
|
||||
;;; The built-in method combination types as taken from page 1-31 of 88-002R.
|
||||
;;; Note that the STANDARD method combination type is defined by hand in the
|
||||
;;; file combin.lisp.
|
||||
;;; The built-in method combination types as taken from page 1-31 of
|
||||
;;; 88-002R. Note that the STANDARD method combination type is defined
|
||||
;;; by hand in the file combin.lisp.
|
||||
(define-method-combination + :identity-with-one-argument t)
|
||||
(define-method-combination and :identity-with-one-argument t)
|
||||
(define-method-combination append :identity-with-one-argument nil)
|
||||
|
|
|
|||
|
|
@ -508,19 +508,19 @@
|
|||
(defun compute-applicable-methods-function (generic-function arguments)
|
||||
(values (compute-applicable-methods-using-types
|
||||
generic-function
|
||||
(types-from-arguments generic-function arguments 'eql))))
|
||||
(types-from-args generic-function arguments 'eql))))
|
||||
|
||||
(defmethod compute-applicable-methods
|
||||
((generic-function generic-function) arguments)
|
||||
(values (compute-applicable-methods-using-types
|
||||
generic-function
|
||||
(types-from-arguments generic-function arguments 'eql))))
|
||||
(types-from-args generic-function arguments 'eql))))
|
||||
|
||||
(defmethod compute-applicable-methods-using-classes
|
||||
((generic-function generic-function) classes)
|
||||
(compute-applicable-methods-using-types
|
||||
generic-function
|
||||
(types-from-arguments generic-function classes 'class-eq)))
|
||||
(types-from-args generic-function classes 'class-eq)))
|
||||
|
||||
(defun proclaim-incompatible-superclasses (classes)
|
||||
(setq classes (mapcar (lambda (class)
|
||||
|
|
@ -595,8 +595,7 @@
|
|||
function
|
||||
n))
|
||||
|
||||
(defun types-from-arguments (generic-function arguments
|
||||
&optional type-modifier)
|
||||
(defun types-from-args (generic-function arguments &optional type-modifier)
|
||||
(multiple-value-bind (nreq applyp metatypes nkeys arg-info)
|
||||
(get-generic-fun-info generic-function)
|
||||
(declare (ignore applyp metatypes nkeys))
|
||||
|
|
@ -1301,7 +1300,7 @@
|
|||
(format t "~&make-unordered-methods-emf ~S~%"
|
||||
(generic-function-name generic-function)))
|
||||
(lambda (&rest args)
|
||||
(let* ((types (types-from-arguments generic-function args 'eql))
|
||||
(let* ((types (types-from-args generic-function args 'eql))
|
||||
(smethods (sort-applicable-methods generic-function
|
||||
methods
|
||||
types))
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@
|
|||
;;; for internal versions, especially for internal versions off the
|
||||
;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
|
||||
|
||||
"0.pre7.138"
|
||||
"0.pre7.139"
|
||||
|
|
|
|||
Loading…
Reference in a new issue