20 #define tc_closure_traced tc_sys_1 22 static LISP sym_traced =
NIL;
23 static LISP sym_quote =
NIL;
24 static LISP sym_begin =
NIL;
27 LISP
ltrace_1(LISP fcn_name,LISP env);
28 LISP
ltrace(LISP fcn_names,LISP env);
31 static void ct_gc_scan(LISP ptr);
32 static LISP ct_gc_mark(LISP ptr);
34 LISP
ct_eval(LISP ct,LISP *px,LISP *penv);
51 fcn =
leval(fcn_name,env);
54 code = fcn->storage_as.closure.code;
64 err(
"not a closure, cannot trace",fcn);}
81 err(
"not a closure, cannot untrace",fcn);}
90 static void ct_gc_scan(LISP ptr)
94 static LISP ct_gc_mark(LISP ptr)
95 {
gc_mark(ptr->storage_as.closure.code);
96 return(ptr->storage_as.closure.env);}
99 {
fput_st(f,
"#<CLOSURE(TRACED) ");
106 {LISP fcn_name,args,env,result,l;
116 car(ct->storage_as.closure.code),
117 ct->storage_as.closure.env);
118 result =
leval(
cdr(ct->storage_as.closure.code),env);
144 "(trace FUNCS ENV)\n\ #define tc_closure_traced
void ct_prin1(LISP ptr, FILE *f)
void set_eval_hooks(long type, LISP(*fcn)(LISP, LISP *, LISP *))
LISP extend_env(LISP actuals, LISP formals, LISP env)
LISP ct_eval(LISP ct, LISP *px, LISP *penv)
void init_fsubr(const char *name, LISP(*fcn)(LISP, LISP), const char *doc)
void set_print_hooks(long type, void(*prin1)(LISP, FILE *), void(*print_string)(LISP, char *))
LISP setcdr(LISP cell, LISP value)
void err(const char *message, LISP x) EST_NORETURN
void gc_protect_sym(LISP *location, const char *st)
LISP cons(LISP x, LISP y)
void fput_st(FILE *f, const char *st)
LISP setvar(LISP var, LISP val, LISP env)
LISP luntrace_1(LISP fcn)
LISP leval_args(LISP l, LISP env)
void init_lsubr(const char *name, LISP(*fcn)(LISP), const char *doc)
LISP leval(LISP x, LISP env)
LISP ltrace_fcn_name(LISP body)
LISP lprin1f(LISP exp, FILE *f)
void set_gc_hooks(long type, int gc_free_once, LISP(*rel)(LISP), LISP(*mark)(LISP), void(*scan)(LISP), void(*free)(LISP), void(*clear)(LISP), long *kind)
LISP ltrace_1(LISP fcn_name, LISP env)
LISP ltrace(LISP fcn_names, LISP env)