From a6fa35d2877745ba0b285093c40c1a3aad82a0e8 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 23 Aug 2015 19:23:07 -0700 Subject: Use of new args for function calls in interpreter. * args.c (args_copy_to_list): New function. * args.h (ARGS_MIN): New preprocessor symbol. (args_add_list): New inline function. (args_copy_to_list): Declared. * debug.c (debug): Args in debug frame are now struct args *. Pull them out nondestructively for printing using args_copy_to_list. * eval.c (do_eval_args): Fill struct args argument list rather than returning evaluated list. Dot position evaluation is handled by installing the dot position value as args->list. (do_eval): Allocate args of at least ARGS_MAX for the call to do_eval_args. Then use generic_funcall to invoke the function rather than apply. (eval_args_lisp1): Modified similarly to do_eval_args. (eval_lisp1): New static function. (expand_macro): Construct struct args argument list for the sake of debug_frame. (op_dwim): Allocate args which are filled by eval_args_lisp1, and applied to the function/object with generic_funcall. The object expression is separately evaluated with eval_lisp1. * match.c (h_fun, v_fun): Construct struct args arglist for the sake of debug_frame call. * unwind.c (uw_push_debug): args argument becomes struct args *. * unwind.h (struct uw_debug): args member becomes struct args *. (uw_push_debug): Declaration updated. * txr.1: Update documentation about dot position argument in function calls. (list . a) now works, which previously didn't. --- unwind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unwind.c') diff --git a/unwind.c b/unwind.c index 6f646bd8..f3f6f74f 100644 --- a/unwind.c +++ b/unwind.c @@ -173,7 +173,7 @@ val uw_set_match_context(val context) return context; } -void uw_push_debug(uw_frame_t *fr, val func, val args, +void uw_push_debug(uw_frame_t *fr, val func, struct args *args, val ub_p_a_pairs, val env, val data, val line, val chr) { -- cgit v1.2.3