From eada1aeb3e7e86fb9d18b718102a457cdba2f724 Mon Sep 17 00:00:00 2001 From: Justin Seyster Date: Wed, 27 Oct 2010 19:49:43 -0400 Subject: [PATCH] Fixed ugly duplication bug. Sort of a hack. I've managed worse, though. --- src/aop-pointcut.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/aop-pointcut.c b/src/aop-pointcut.c index 098e9bc..fe3e47a 100644 --- a/src/aop-pointcut.c +++ b/src/aop-pointcut.c @@ -124,13 +124,21 @@ op_get_in_param (struct aop_dynval *dv) { if (index == dv->dynval_in_param.param_index) { - param = save_param (param_iter); + param = param_iter; break; } index++; } aop_assert (param != NULL); + + /* HACK: It's not necessary to save the parameter if this is an + entry join point (there won't be any time for the variable to + change). That's good because save_param() doesn't work right if + we're in the process of an aop_duplicate(). */ + if (jp->pc->kind != ATP_ENTRY) + param = save_param (param); + return param; } -- 2.34.1