From 40d8bff76b8495a9d42a7bd96c059ccfee593b5c Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Sun, 8 Mar 1992 18:42:41 +0000 Subject: [PATCH] Changed uses of call_into_lisp to work with new fdefn objects. --- ldb/breakpoint.c | 3 +-- ldb/interrupt.c | 18 ++++++---------- ldb/ldb.c | 5 ++--- ldb/monitor.c | 56 ++++++++++-------------------------------------- 4 files changed, 20 insertions(+), 62 deletions(-) diff --git a/ldb/breakpoint.c b/ldb/breakpoint.c index 21d6fdbc1..4c51d611c 100644 --- a/ldb/breakpoint.c +++ b/ldb/breakpoint.c @@ -112,8 +112,7 @@ lispobj code; args[0] = fixnum(calc_offset(codeptr, scp->sc_pc)); args[1] = code; args[2] = alloc_sap(scp); - call_into_lisp(HANDLE_BREAKPOINT, SymbolFunction(HANDLE_BREAKPOINT), - args, 3); + funcall_sym(HANDLE_BREAKPOINT, args, 3); scp->sc_mask = sigblock(0); } diff --git a/ldb/interrupt.c b/ldb/interrupt.c index f6107ec32..86573850f 100644 --- a/ldb/interrupt.c +++ b/ldb/interrupt.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.31 1991/11/07 00:08:17 wlott Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/interrupt.c,v 1.32 1992/03/08 18:42:36 wlott Exp $ */ /* Interrupt handing magic. */ @@ -128,8 +128,7 @@ void undo_fake_foreign_function_call(context) } #define call_maybe_gc() \ - call_into_lisp(MAYBE_GC, SymbolFunction(MAYBE_GC), \ - current_control_stack_pointer, 0) + funcall_sym(MAYBE_GC, current_control_stack_pointer, 0) void interrupt_internal_error(signal, code, context, continuable) struct sigcontext *context; @@ -147,8 +146,7 @@ void interrupt_internal_error(signal, code, context, continuable) args[1] = T; else args[1] = NIL; - call_into_lisp(INTERNAL_ERROR, SymbolFunction(INTERNAL_ERROR), - args, 2); + funcall_sym(INTERNAL_ERROR, args, 2); undo_fake_foreign_function_call(context); if (continuable) arch_skip_instruction(context); @@ -202,7 +200,7 @@ struct sigcontext *context; int were_in_lisp; union interrupt_handler handler; lispobj *args; - lispobj callname, function; + lispobj function; handler = interrupt_handlers[signal]; @@ -232,12 +230,8 @@ struct sigcontext *context; args[0] = fixnum(signal); args[1] = fixnum(code); args[2] = alloc_sap(context); - callname = handler.lisp; - if (LowtagOf(callname) == type_FunctionPointer) - function = callname; - else - function = ((struct symbol *)PTR(callname))->function; - call_into_lisp(callname, function, args, 3); + function = handler.lisp; + call_into_lisp(function, function, args, 3); } if (were_in_lisp) diff --git a/ldb/ldb.c b/ldb/ldb.c index ce3ee058b..e2f9c58c0 100644 --- a/ldb/ldb.c +++ b/ldb/ldb.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/ldb.c,v 1.15 1991/10/22 18:38:09 wlott Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/ldb.c,v 1.16 1992/03/08 18:42:40 wlott Exp $ */ /* Lisp kernel core debugger */ #include <stdio.h> @@ -146,8 +146,7 @@ char *envp[]; if (restore_state) restore(); else - call_into_lisp(INITIAL_FUNCTION, SymbolFunction(INITIAL_FUNCTION), - current_control_stack_pointer, 0); + funcall_sym(INITIAL_FUNCTION, current_control_stack_pointer, 0); printf("%INITIAL-FUNCTION returned?"); } while (1) diff --git a/ldb/monitor.c b/ldb/monitor.c index fb967758f..c107b2f54 100644 --- a/ldb/monitor.c +++ b/ldb/monitor.c @@ -1,4 +1,4 @@ -/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/monitor.c,v 1.16 1991/10/22 18:38:12 wlott Exp $ */ +/* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/ldb/Attic/monitor.c,v 1.17 1992/03/08 18:42:41 wlott Exp $ */ #include <stdio.h> #include <setjmp.h> @@ -206,31 +206,14 @@ char **ptr; { extern lispobj call_into_lisp(); - lispobj call_name = parse_lispobj(ptr); - lispobj function, result, *args; + lispobj function = parse_lispobj(ptr); + lispobj result, *args; int numargs; - if (LowtagOf(call_name) == type_OtherPointer) { - struct symbol *sym = (struct symbol *)PTR(call_name); - - if (TypeOf(sym->header) == type_SymbolHeader) { - function = sym->function; - if (LowtagOf(function) != type_FunctionPointer) { - printf("undefined function: ``%s''\n", (char *)PTR(sym->name) + 8); - return; - } - } - else { - printf("0x%x is not a function pointer.\n", call_name); - return; - } - } - else if (LowtagOf(call_name) != type_FunctionPointer) { - printf("0x%x is not a function pointer.\n", call_name); + if (LowtagOf(function) != type_FunctionPointer) { + printf("0x%x is not a function pointer.\n", function); return; } - else - function = call_name; numargs = 0; args = current_control_stack_pointer; @@ -240,7 +223,7 @@ char **ptr; numargs++; } - result = call_into_lisp(call_name, function, args, numargs); + result = call_into_lisp(function, function, args, numargs); print(result); } @@ -259,34 +242,17 @@ char **ptr; lispobj args[16]; - lispobj call_name = parse_lispobj(ptr); - lispobj function, result, *argptr; + lispobj function = parse_lispobj(ptr); + lispobj result, *argptr; int numargs; struct timeval start_tv, stop_tv; struct rusage start_rusage, stop_rusage; double real_time, system_time, user_time; - if (LowtagOf(call_name) == type_OtherPointer) { - struct symbol *sym = (struct symbol *)PTR(call_name); - - if (TypeOf(sym->header) == type_SymbolHeader) { - function = sym->function; - if (LowtagOf(function) != type_FunctionPointer) { - printf("undefined function: ``%s''\n", (char *)PTR(sym->name) + 8); - return; - } - } - else { - printf("0x%x is not a function pointer.\n", call_name); - return; - } - } - else if (LowtagOf(call_name) != type_FunctionPointer) { - printf("0x%x is not a function pointer.\n", call_name); + if (LowtagOf(function) != type_FunctionPointer) { + printf("0x%x is not a function pointer.\n", function); return; } - else - function = call_name; numargs = 0; argptr = args; @@ -299,7 +265,7 @@ char **ptr; getrusage(RUSAGE_SELF, &start_rusage); gettimeofday(&start_tv, (struct timezone *) 0); - result = call_into_lisp(call_name, function, args, numargs); + result = call_into_lisp(function, function, args, numargs); gettimeofday(&stop_tv, (struct timezone *) 0); getrusage(RUSAGE_SELF, &stop_rusage); -- GitLab