diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-04-09 01:10:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-04-09 01:10:15 -0700 |
commit | 3376e74aef0bd84a8dd3ef7c0c08a6a2d298dd7d (patch) | |
tree | 57050afdb62cf26ea305ab0d1055174bcd46c299 /eval.c | |
parent | e2f97e2e063f7c9b93407d2af4e8b6f163bea2ac (diff) | |
download | txr-3376e74aef0bd84a8dd3ef7c0c08a6a2d298dd7d.tar.gz txr-3376e74aef0bd84a8dd3ef7c0c08a6a2d298dd7d.tar.bz2 txr-3376e74aef0bd84a8dd3ef7c0c08a6a2d298dd7d.zip |
debug support: crude debugger removed.
* debug.c (debug_depth, debug_quit_s): Variables removed.
(step_mode, next_depth, breakpoints, last_command, cols):
Static variables removed.
(debug_check): C99 inline instantiation removed.
(help, show_bindings): Static functions removed.
(debug): Function removed.
(debug_set_state): Now takes one int argument, returns int.
It's anticipated that the new debug system will have a
simple on-off switch; there won't be a debug_depth hack.
(debug_restore_state): Function removed.
(debug_init): Emptied.
* debug.h (debug_depth, debug_state_t): Declarations removed.
(debug_enter, debug_leave, debug_return): Macros removed.
(debug_check): Inline function removed.
(debug_set_state): Declaration updated.
(debug_restore_state): Declaration removed.
(debug_frame, debug_end): Macros removed.
* eval.c (do_eval, me_interp_macro): Debugging support scrubbed.
* lisplib.c (lisplib_try_load): Adapt to debug_set_state
interface change.
* match.c (h_fun, do_match_line, v_fun, match_files,
match_fun): Debugging support scrubbed.
* parser.y (parse_once): Adapt to debug_set_state interface
change.
* protsym.c: Regenerated.
* signal.h (debug_depth): Declaration removed.
(EJ_DBG_MEMB, EJ_DBG_SAVE, EJ_DBG_REST): Macros removed.
(EJ_OPT_MEMB, EJ_OPT_SAVE, EJ_OPT_REST): Reduced to
unconditionally empty definitions for future use.
* unwind.c (uw_push_debug): Function removed.
* unwind.h (uw_frtype_t): UW_DBG enum member removed.
(struct uw_debug): struct declaration removed.
(union uw_frame): db member removed.
(uw_push_debug): Declaration removed.
* txr.1: Debugger doc removed.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 28 |
1 files changed, 7 insertions, 21 deletions
@@ -1486,20 +1486,17 @@ val eval_intrinsic_noerr(val form, val env, val *error_p) static val do_eval(val form, val env, val ctx, val (*lookup)(val env, val sym)) { - debug_enter; - - debug_check(consp(form) ? form : ctx, env, nil, nil, nil, nil); sig_check_fast(); if (nilp(form)) { - debug_return (nil); + return nil; } else if (symbolp(form)) { if (!bindable(form)) { - debug_return (form); + return form; } else { val binding = lookup(env, form); if (binding) - debug_return (cdr(binding)); + return cdr(binding); eval_error(ctx, lit("unbound variable ~s"), form, nao); abort(); } @@ -1513,7 +1510,7 @@ static val do_eval(val form, val env, val ctx, last_form_evaled = form; ret = fp(form, env); last_form_evaled = lfe_save; - debug_return (ret); + return ret; } else { val fbinding = lookup_fun(env, oper); @@ -1534,20 +1531,16 @@ static val do_eval(val form, val env, val ctx, last_form_evaled = form; do_eval_args(rest(form), env, form, &lookup_var, args); - debug_frame(oper, args, nil, env, nil, nil, nil); ret = generic_funcall(cdr(fbinding), args); - debug_end; last_form_evaled = lfe_save; - debug_return (ret); + return ret; } } } else { - debug_return (form); + return form; } - - debug_leave; } val eval(val form, val env, val ctx) @@ -2020,8 +2013,6 @@ static val op_defun(val form, val env) static val me_interp_macro(val expander, val form, val menv) { - debug_enter; - val name = car(form); val arglist = rest(form); val env = car(expander); val params = cadr(expander); @@ -2029,15 +2020,10 @@ static val me_interp_macro(val expander, val form, val menv) val saved_de = set_dyn_env(make_env(nil, nil, dyn_env)); val exp_env = bind_macro_params(env, menv, params, arglist, nil, form); val result; - args_decl_list(args, ARGS_MIN, arglist); - - debug_frame(name, args, nil, env, nil, nil, nil); result = eval_progn(body, exp_env, body); - debug_end; set_dyn_env(saved_de); set_origin(result, form); - debug_return(result); - debug_leave; + return result; } static val op_defmacro(val form, val env) |