function name mess, continued...
...used NAMED-LAMBDA in DEFMACRO-MUNDANELY DEFUN
...tweaked non-toplevel handling of COLD-FSET so that it
notifies the compiler about the source name (using
NAMED-LAMBDA to do so)
deleted dead symbols from package-data-list.lisp-expr as per
APD sbcl-devel 2001-12-30
deleted bug 128 as per NJF sbcl-devel 2001-12-30
merged DB patch sbcl-devel 2001-12-30 for (mostly)
conditional-on-SB-LDB gross errors dating back to
all the global substitutions I was doing a while
ago (and added :SB-LDB to my default
customize-target-features.lisp, in hopes that maybe
I can catch more such problems myself)
structure classes related by inheritance. As of 0.7.0, SBCL still
doesn't follow it.
-128:
- READ-SEQUENCE doesn't work for Gray streams. (reported by Nathan
- Froyd sbcl-devel 2001-10-15) As per subsequent discussion on the
- list, the Gray streams proposal doesn't mention READ-SEQUENCE and
- WRITE-SEQUENCE because it predates them, generalizing it to
- cover them is an obvious extension, ACL does it, and there's a
- patch for for CMU CL which does it too.
-
129:
insufficient syntax checking in MACROLET:
(defun foo (x)
* patches postponed until after 0.7.0:
** Christophe Rhodes "rough patch to fix bug 106" 2001-10-28
+ ** Alexey Dejneka "bug 111" 2001-12-30
* building with CLISP (or explaining why not)
* urgent EVAL/EVAL-WHEN/%COMPILE/DEFUN/DEFSTRUCT cleanup:
** fixed bug 137
;; Build SBCL with the old CMU CL low level debugger, "ldb". If
;; are aren't messing with CMU CL at a very low level (e.g.
- ;; trying to diagnose GC problems) you shouldn't need this.
+ ;; trying to diagnose GC problems, or trying to debug assembly
+ ;; code for a port to a new CPU) you shouldn't need this.
; :sb-ldb
;; This isn't really a target Lisp feature at all, but controls
;; whether the build process produces an after-xc.core file. This
- ;; can be useful for shortening the edit/compile/debug cycle if
- ;; you're messing around with low-level internals of the system,
- ;; as in slam.sh. Otherwise you don't need it.
+ ;; can be useful for shortening the edit/compile/debug cycle when
+ ;; you modify SBCL's own source code, as in slam.sh. Otherwise
+ ;; you don't need it.
; :sb-after-xc-core
;; Enable extra debugging output in the assem.lisp assembler/scheduler
;; ..and variables to control compiler policy
"*INLINE-EXPANSION-LIMIT*"
"*USE-IMPLEMENTATION-TYPES*"
- "*BYTE-COMPILE-TOPLEVEL*"
- "*BYTE-COMPILE-DEFAULT*"
"*DERIVE-FUNCTION-TYPES*"
;; a special form for breaking out of our "declarations
:use ("CL" "SB!ALIEN" "SB!C-CALL" "SB!GRAY" "SB!FASL" "SB!SYS")
:export ("*AFTER-SAVE-INITIALIZATIONS*" "*BEFORE-SAVE-INITIALIZATIONS*"
- "*ALL-MODIFIER-NAMES*"
- "*BACKUP-EXTENSION*"
-
;; lambda list keyword extensions
"&MORE"
"ONCE-ONLY"
"DEFENUM"
"DEFPRINTER"
- "AVER" "AVER-TYPE" "ENFORCE-TYPE"
+ "AVER" "ENFORCE-TYPE"
;; ..and DEFTYPEs..
"INDEX"
;; encapsulation
"ARGUMENT-LIST"
"BASIC-DEFINITION"
- "ENCAPSULATE" "ENCAPSULATED-DEFINITION" "ENCAPSULATED-P"
+ "ENCAPSULATE" "ENCAPSULATED-P"
"UNENCAPSULATE"
;; various CHAR-CODEs
;; time
"FORMAT-DECODED-TIME"
"FORMAT-UNIVERSAL-TIME"
- "PARSE-TIME"
;; indenting
"MAKE-INDENTING-STREAM"
(unless (symbol-package (fun-name-block-name name))
(warn "DEFUN of uninterned symbol ~S (tricky for GENESIS)" name))
(multiple-value-bind (forms decls doc) (parse-body body)
- (let* (;; stuff shared between LAMBDA and INLINE-LAMBDA
+ (let* (;; stuff shared between LAMBDA and INLINE-LAMBDA and NAMED-LAMBDA
(lambda-guts `(,args
,@decls
(block ,(fun-name-block-name name)
,@forms)))
(lambda `(lambda ,@lambda-guts))
+ (named-lambda `(named-lambda ,name ,@lambda-guts))
(inline-lambda
(cond (;; Does the user not even want to inline?
(not (inline-fun-name-p name))
;; In cross-compilation of toplevel DEFUNs, we arrange
;; for the LAMBDA to be statically linked by GENESIS.
+ ;;
+ ;; It may seem strangely inconsistent not to use NAMED-LAMBDA
+ ;; here instead of LAMBDA. The reason is historical:
+ ;; COLD-FSET was written before NAMED-LAMBDA, and has special
+ ;; logic of its own to notify the compiler about NAME.
#+sb-xc-host
(cold-fset ,name ,lambda)
;; where the compiled LAMBDA first appears. In
;; cross-compilation, we manipulate the
;; previously-statically-linked LAMBDA here.
- #-sb-xc-host ,lambda
+ #-sb-xc-host ,named-lambda
#+sb-xc-host (fdefinition ',name)
,doc)))))
#-sb-xc-host
;;; If COLD-FSET occurs not at top level, just treat it as an ordinary
-;;; assignment. That way things like
+;;; assignment instead of doing cold static linking. That way things like
;;; (FLET ((FROB (X) ..))
;;; (DEFUN FOO (X Y) (FROB X) ..)
;;; (DEFUN BAR (Z) (AND (FROB X) ..)))
"~@<COLD-FSET ~S not cross-compiled at top level: demoting to ~
(SETF FDEFINITION)~:@>"
name)
- `(setf (fdefinition ',name) ,lambda))
+ ;; We convert the LAMBDA expression to the corresponding NAMED-LAMBDA
+ ;; expression so that the compiler can use NAME in debug names etc.
+ (destructuring-bind (lambda-symbol &rest lambda-rest) lambda
+ (assert (eql lambda-symbol 'lambda)) ; else dunno how to do conversion
+ `(setf (fdefinition ',name)
+ (named-lambda ,name ,@lambda-rest))))
\f
;;;; ONCE-ONLY
;;;;
(return-pc :target return-pc-temp)
(vals :more t))
(:temporary (:sc any-reg :from (:argument 0)) ocfp-temp)
- (:temporary (:sc descriptor-reg any-reg :from (:argument 1))
+ (:temporary (:sc any-reg :from (:argument 1))
return-pc-temp)
(:temporary (:scs (interior-reg)) lip)
(:move-args :known-return)
;;; Temp-TN is a non- descriptor temp (which may be randomly used by
;;; the body.) The body is placed inside the PSEUDO-ATOMIC, and
;;; presumably initializes the object.
-(defmacro with-fixed-allocation ((result-tn temp-tn widetagsize)
+(defmacro with-fixed-allocation ((result-tn temp-tn widetag size)
&body body)
`(pseudo-atomic (:extra (pad-data-block ,size))
(inst bis alloc-tn other-pointer-lowtag ,result-tn)
;;;; SIMPLE-FUN-DEBUG-INFO slot holding a tagged object which needs
;;;; to be GCed, you need to tweak scav_code_header() and
;;;; verify_space() in gencgc.c, and the corresponding code in gc.c.
+;;;; * The src/runtime/print.c code (used by LDB) is implemented
+;;;; using hand-written lists of slot names, which aren't automatically
+;;;; generated from the code in this file.
;;;; * Various code (e.g. STATIC-FSET in genesis.lisp) is hard-wired
;;;; to know the name of the last slot of the object the code works
;;;; with, and implicitly to know that the last slot is special (being
closure_tramp_offset:
ldl reg_LEXENV, FDEFN_FUN_OFFSET(reg_FDEFN)
ldl reg_L0, CLOSURE_FUN_OFFSET(reg_LEXENV)
- addl reg_L0, FUN_CODE_OFFSET, reg_LIP
+ addl reg_L0, SIMPLE_FUN_CODE_OFFSET, reg_LIP
jmp reg_ZERO,(reg_LIP)
.end closure_tramp
#include "gc.h"
#include "search.h"
#include "purify.h"
+#include "globals.h"
+#include "lispregs.h"
+#include "interrupt.h"
/* When we need to do command input, we use this stream, which is not
* in general stdin, so that things will "work" (as well as being
#include "print.h"
#include "runtime.h"
+#include "sbcl.h"
/* This file can be skipped if we're not supporting LDB. */
#if defined(LISP_FEATURE_SB_LDB)
default:
idx = type >> 2;
- if (idx < (sizeof(SUBNAMES_WIDETAG) / sizeof(char *)))
- printf("%s", SUBNAMES_WIDETAG[idx]);
+ if (idx < (sizeof(lowtag_Names) / sizeof(char *)))
+ printf("%s", lowtag_Names[idx]);
else
printf("unknown type (0x%0x)", type);
break;
type = widetag_of(obj);
idx = type >> 2;
- if (idx < (sizeof(SUBNAMES_WIDETAG) / sizeof(char *)))
- printf(", %s", SUBNAMES_WIDETAG[idx]);
+ if (idx < (sizeof(lowtag_Names) / sizeof(char *)))
+ printf(", %s", lowtag_Names[idx]);
else
printf(", unknown type (0x%0x)", type);
}
}
-/* FIXME: Yikes again! This, like SUBNAMES_WIDETAG[], needs to depend
- * on the values in sbcl.h. */
+/* FIXME: Yikes again! This, like subtype_Names[], needs to depend
+ * on the values in sbcl.h (or perhaps be generated automatically
+ * by GENESIS as part of sbcl.h). */
static char *symbol_slots[] = {"value: ", "unused: ",
"plist: ", "name: ", "package: ", NULL};
static char *ratio_slots[] = {"numer: ", "denom: ", NULL};
;;; for internal versions, especially for internal versions off the
;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre7.108"
+"0.pre7.109"