From c81c32ef8a737b0cc61d3c0c6a137cab39baac73 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Tue, 9 Jul 2002 14:18:40 +0000 Subject: [PATCH] 0.7.5.7: deleted call_cmd() from ldb, since it's bitrotted deleted *!INITIAL-FDEFN-OBJECTS* from static symbols now that the C runtime doesn't need it incremented fasl file version number now that static symbols have changed deleted unused *INTERNAL-GC-TRIGGER* s/INTERNAL_GC_TRIGGER/GENCGC/ (so that all the runtime code which compiled differently depending on cpp's knowledge of the existence of the unused variable now depends on something somewhat more relevant) --- src/code/early-fasl.lisp | 3 +- src/code/early-impl.lisp | 2 -- src/code/gc.lisp | 6 ---- src/compiler/alpha/parms.lisp | 7 ++-- src/compiler/ppc/parms.lisp | 10 +++--- src/compiler/sparc/parms.lisp | 10 +++--- src/compiler/x86/parms.lisp | 7 ++-- src/runtime/globals.c | 4 +-- src/runtime/interrupt.c | 6 ++-- src/runtime/monitor.c | 80 +++-------------------------------------- src/runtime/runtime.c | 3 -- 11 files changed, 24 insertions(+), 114 deletions(-) diff --git a/src/code/early-fasl.lisp b/src/code/early-fasl.lisp index 8ab9068..4520f83 100644 --- a/src/code/early-fasl.lisp +++ b/src/code/early-fasl.lisp @@ -42,7 +42,7 @@ ;;; versions which break binary compatibility. But it certainly should ;;; be incremented for release versions which break binary ;;; compatibility. -(def!constant +fasl-file-version+ 28) +(def!constant +fasl-file-version+ 29) ;;; (record of versions before 0.7.0 deleted in 0.7.1.41) ;;; 23 = sbcl-0.7.0.1 deleted no-longer-used EVAL-STACK stuff, ;;; causing changes in *STATIC-SYMBOLS*. @@ -54,6 +54,7 @@ ;;; 27: (2002-04-08) added MIGHT-CONTAIN-OTHER-TYPES? slot to CTYPE ;;; 28: (2002-05-08) new convention for foreign symbols to support ;;; dynamic loading in OpenBSD +;;; 29: (2002-06-24) removed *!INITIAL-FDEFN-OBJECTS* from static symbols ;;; the conventional file extension for our fasl files (declaim (type simple-string *fasl-file-type*)) diff --git a/src/code/early-impl.lisp b/src/code/early-impl.lisp index fa8e9a2..4e974f2 100644 --- a/src/code/early-impl.lisp +++ b/src/code/early-impl.lisp @@ -16,7 +16,6 @@ ;;; listed here and then listed separately (and by now, 2001-06-06, ;;; slightly differently) elsewhere. (declaim (special *posix-argv* - *!initial-fdefn-objects* *read-only-space-free-pointer* sb!vm:*static-space-free-pointer* sb!vm:*initial-dynamic-space-free-pointer* @@ -37,7 +36,6 @@ *free-interrupt-context-index* sb!vm::*allocation-pointer* sb!vm::*binding-stack-pointer* - sb!vm::*internal-gc-trigger* sb!vm::*fp-constant-0d0* sb!vm::*fp-constant-1d0* sb!vm::*fp-constant-0f0* diff --git a/src/code/gc.lisp b/src/code/gc.lisp index 45577a0..e9e1eb1 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -190,12 +190,6 @@ and submit it as a patch." (declaim (type (or index null) *gc-trigger*)) -;;; On the X86, we store the GC trigger in a ``static'' symbol instead -;;; of letting magic C code handle it. It gets initialized by the -;;; startup code. -#!+x86 -(defvar sb!vm::*internal-gc-trigger*) - ;;;; The following specials are used to control when garbage collection ;;;; occurs. diff --git a/src/compiler/alpha/parms.lisp b/src/compiler/alpha/parms.lisp index 267f272..1a5f921 100644 --- a/src/compiler/alpha/parms.lisp +++ b/src/compiler/alpha/parms.lisp @@ -191,17 +191,14 @@ ;; The C startup code must fill these in. *posix-argv* - ;;lisp::lisp-environment-list - ;;lisp::lisp-command-line-list - sb!impl::*!initial-fdefn-objects* - ;; Functions that the C code needs to call + ;; functions that the C code needs to call maybe-gc sb!kernel::internal-error sb!di::handle-breakpoint sb!di::handle-fun-end-breakpoint - ;; free Pointers + ;; free pointers *read-only-space-free-pointer* *static-space-free-pointer* *initial-dynamic-space-free-pointer* diff --git a/src/compiler/ppc/parms.lisp b/src/compiler/ppc/parms.lisp index 3f2a52c..72e930f 100644 --- a/src/compiler/ppc/parms.lisp +++ b/src/compiler/ppc/parms.lisp @@ -156,25 +156,23 @@ ;; The C startup code must fill these in. *posix-argv* - sb!impl::*initial-fdefn-objects* - ;; Functions that the C code needs to call - ;; sb!impl::%initial-fun + ;; functions that the C code needs to call sb!impl::maybe-gc sb!kernel::internal-error sb!di::handle-breakpoint sb!impl::fdefinition-object - ;; Free Pointers. + ;; free pointers *read-only-space-free-pointer* *static-space-free-pointer* *initial-dynamic-space-free-pointer* - ;; Things needed for non-local-exit. + ;; things needed for non-local exit *current-catch-block* *current-unwind-protect-block* - ;; Interrupt Handling + ;; interrupt handling *free-interrupt-context-index* sb!unix::*interrupts-enabled* sb!unix::*interrupt-pending* diff --git a/src/compiler/sparc/parms.lisp b/src/compiler/sparc/parms.lisp index b6c6306..ab3adf1 100644 --- a/src/compiler/sparc/parms.lisp +++ b/src/compiler/sparc/parms.lisp @@ -204,26 +204,24 @@ ;; The C startup code must fill these in. *posix-argv* - ;;lisp::lisp-environment-list - ;;lisp::lisp-command-line-list sb!impl::*!initial-fdefn-objects* - ;; Functions that the C code needs to call + ;; functions that the C code needs to call maybe-gc sb!kernel::internal-error sb!di::handle-breakpoint sb!di::handle-fun-end-breakpoint - ;; Free Pointers. + ;; free pointers *read-only-space-free-pointer* *static-space-free-pointer* *initial-dynamic-space-free-pointer* - ;; Things needed for non-local-exit. + ;; things needed for non-local exit *current-catch-block* *current-unwind-protect-block* - ;; Interrupt Handling + ;; interrupt handling *free-interrupt-context-index* sb!unix::*interrupts-enabled* sb!unix::*interrupt-pending* diff --git a/src/compiler/x86/parms.lisp b/src/compiler/x86/parms.lisp index bf151fa..1c5c1b1 100644 --- a/src/compiler/x86/parms.lisp +++ b/src/compiler/x86/parms.lisp @@ -222,15 +222,13 @@ (defvar *allocation-pointer*) (defvar *binding-stack-pointer*) -;;; FIXME: *!INITIAL-FDEFN-OBJECTS* and !COLD-INIT probably don't need -;;; to be in the static symbols table any more. Also, if -;;; *INTERNAL-GC-TRIGGER* really is not used, we can punt it. +;;; FIXME: !COLD-INIT probably doesn't need +;;; to be in the static symbols table any more. (defparameter *static-symbols* '(t ;; The C startup code must fill these in. *posix-argv* - sb!impl::*!initial-fdefn-objects* ;; functions that the C code needs to call maybe-gc @@ -262,7 +260,6 @@ *allocation-pointer* *binding-stack-pointer* - *internal-gc-trigger* ; Not used. ;; the floating point constants *fp-constant-0d0* diff --git a/src/runtime/globals.c b/src/runtime/globals.c index 7d40faf..2dee4ce 100644 --- a/src/runtime/globals.c +++ b/src/runtime/globals.c @@ -37,7 +37,7 @@ lispobj *current_binding_stack_pointer; lispobj *dynamic_space_free_pointer; #endif -#ifndef INTERNAL_GC_TRIGGER +#ifndef GENCGC /* since GENCGC has its own way to record trigger */ lispobj *current_auto_gc_trigger; #endif @@ -51,7 +51,7 @@ void globals_init(void) /* Space, stack, and free pointer vars are initialized by * validate() and coreparse(). */ -#ifndef INTERNAL_GC_TRIGGER +#ifndef GENCGC /* since GENCGC has its own way to record trigger */ /* no GC trigger yet */ current_auto_gc_trigger = NULL; #endif diff --git a/src/runtime/interrupt.c b/src/runtime/interrupt.c index 3e308b1..5b20451 100644 --- a/src/runtime/interrupt.c +++ b/src/runtime/interrupt.c @@ -497,7 +497,7 @@ maybe_now_maybe_later(int signal, siginfo_t *info, void *void_context) * stuff to detect and handle hitting the GC trigger */ -#ifndef INTERNAL_GC_TRIGGER +#ifndef GENCGC /* since GENCGC has its own way to record trigger */ static boolean gc_trigger_hit(int signal, siginfo_t *info, os_context_t *context) { @@ -525,11 +525,11 @@ interrupt_maybe_gc(int signal, siginfo_t *info, void *void_context) os_context_t *context=(os_context_t *) void_context; if (!foreign_function_call_active -#ifndef INTERNAL_GC_TRIGGER +#ifndef GENCGC /* since GENCGC has its own way to record trigger */ && gc_trigger_hit(signal, info, context) #endif ) { -#ifndef INTERNAL_GC_TRIGGER +#ifndef GENCGC /* since GENCGC has its own way to record trigger */ clear_auto_gc_trigger(); #endif diff --git a/src/runtime/monitor.c b/src/runtime/monitor.c index 4037c92..b494aaf 100644 --- a/src/runtime/monitor.c +++ b/src/runtime/monitor.c @@ -49,7 +49,7 @@ static int ldb_in_fd = -1; typedef void cmd(char **ptr); -static cmd call_cmd, dump_cmd, print_cmd, quit_cmd, help_cmd; +static cmd dump_cmd, print_cmd, quit_cmd, help_cmd; static cmd flush_cmd, search_cmd, regs_cmd, exit_cmd; static cmd print_context_cmd; static cmd backtrace_cmd, purify_cmd, catchers_cmd; @@ -63,7 +63,6 @@ static struct cmd { {"help", "Display this help information.", help_cmd}, {"?", "(an alias for help)", help_cmd}, {"backtrace", "Backtrace up to N frames.", backtrace_cmd}, - {"call", "Call FUNCTION with ARG1, ARG2, ...", call_cmd}, {"catchers", "Print a list of all the active catchers.", catchers_cmd}, {"context", "Print interrupt context number I.", print_context_cmd}, {"dump", "Dump memory starting at ADDRESS for COUNT words.", dump_cmd}, @@ -184,8 +183,6 @@ regs_cmd(char **ptr) #if defined(__i386__) printf("ALLOC\t=\t0x%08lx\n", (unsigned long)SymbolValue(ALLOCATION_POINTER)); - printf("TRIGGER\t=\t0x%08lx\n", - (unsigned long)SymbolValue(INTERNAL_GC_TRIGGER)); #else printf("ALLOC\t=\t0x%08X\n", (unsigned long)dynamic_space_free_pointer); @@ -262,77 +259,10 @@ search_cmd(char **ptr) } } -static void -call_cmd(char **ptr) -{ - lispobj thing = parse_lispobj(ptr), function, result = 0, cons, args[3]; - int numargs; - - if (lowtag_of(thing) == OTHER_POINTER_LOWTAG) { - switch (widetag_of(*(lispobj *)(thing-OTHER_POINTER_LOWTAG))) { - case SYMBOL_HEADER_WIDETAG: - for (cons = SymbolValue(INITIAL_FDEFN_OBJECTS); - cons != NIL; - cons = CONS(cons)->cdr) { - if (FDEFN(CONS(cons)->car)->name == thing) { - thing = CONS(cons)->car; - goto fdefn; - } - } - printf("Symbol 0x%08lx is undefined.\n", (long unsigned)thing); - return; - - case FDEFN_WIDETAG: - fdefn: - function = FDEFN(thing)->fun; - if (function == NIL) { - printf("Fdefn 0x%08lx is undefined.\n", (long unsigned)thing); - return; - } - break; - default: - printf("0x%08lx is not a function pointer, symbol, " - "or fdefn object.\n", - (long unsigned)thing); - return; - } - } - else if (lowtag_of(thing) != FUN_POINTER_LOWTAG) { - printf("0x%08lx is not a function pointer, symbol, or fdefn object.\n", - (long unsigned)thing); - return; - } - else - function = thing; - - numargs = 0; - while (more_p(ptr)) { - if (numargs >= 3) { - printf("too many arguments (no more than 3 supported)\n"); - return; - } - args[numargs++] = parse_lispobj(ptr); - } - - switch (numargs) { - case 0: - result = funcall0(function); - break; - case 1: - result = funcall1(function, args[0]); - break; - case 2: - result = funcall2(function, args[0], args[1]); - break; - case 3: - result = funcall3(function, args[0], args[1], args[2]); - break; - default: - lose("unsupported arg count made it past validity check?!"); - } - - print(result); -} +/* (There used to be call_cmd() here, to call known-at-cold-init-time + * Lisp functions from ldb, but it bitrotted and was deleted in + * sbcl-0.7.5.1. See older CVS versions if you want to resuscitate + * it.) */ static void flush_cmd(char **ptr) diff --git a/src/runtime/runtime.c b/src/runtime/runtime.c index f900828..019b12f 100644 --- a/src/runtime/runtime.c +++ b/src/runtime/runtime.c @@ -276,9 +276,6 @@ More information about SBCL is available at .\n\ #ifdef BINDING_STACK_POINTER SetSymbolValue(BINDING_STACK_POINTER, BINDING_STACK_START); #endif -#if defined INTERNAL_GC_TRIGGER && !defined __i386__ - SetSymbolValue(INTERNAL_GC_TRIGGER, make_fixnum(-1)); -#endif interrupt_init(); -- 1.7.10.4