From: Justin Seyster Date: Wed, 27 Oct 2010 23:49:43 +0000 (-0400) Subject: Fixed ugly duplication bug. X-Git-Tag: release-v1.0~7 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=eada1aeb3e7e86fb9d18b718102a457cdba2f724;p=interaspect.git Fixed ugly duplication bug. Sort of a hack. I've managed worse, though. --- 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; }