From 3d27521df2a8174eb470a30ce6c4fd84b7d61464 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 23 Mar 2020 06:08:45 -0700 Subject: umethod: use new dynamic args to avoid consing list. * args.c (args_cat): New function. * args.h (args_cat): Declared. * struct.c (umethod_args_fun): env parameter is now a dynamic args object. Code adjusted accordingly. (umethod): Duplicate the args into a dynamic args object instead of consing up a list and also eliminate the temporary cons since we can pass the additional argument using the car field of the dynamic args. --- args.h | 1 + 1 file changed, 1 insertion(+) (limited to 'args.h') diff --git a/args.h b/args.h index 13296ac8..c1455fd6 100644 --- a/args.h +++ b/args.h @@ -181,6 +181,7 @@ INLINE cnum args_count(struct args *args) val args_get_checked(val name, struct args *args, cnum *arg_index); struct args *args_copy(struct args *to, struct args *from); struct args *args_copy_zap(struct args *to, struct args *from); +struct args *args_cat(struct args *to, struct args *from); struct args *args_cat_zap(struct args *to, struct args *from); struct args *args_cat_zap_from(struct args *to, struct args *from, cnum index); struct args *args_copy_reverse(struct args *to, struct args *from, cnum nargs); -- cgit v1.2.3