From fc7648637b356078988ca1ed598e74c394beeaaa Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sat, 9 Jan 2010 21:48:16 +0100 Subject: [PATCH] fix bug in subr-call and smob-call * libguile/vm-i-system.c (subr-call, smob-call): Unlike the previous situation, in which a call to a subr or a smob didn't actually build a frame, we no longer need to explicitly pop the procedure and its arguments. Indeed the procedure and its arguments must remain on the stack, for hooks and ticks and such always to see frames with valid procedures. Two lines out, two bugs less, and faster to boot. --- libguile/vm-i-system.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c index cc32804f7..2e1dae9d0 100644 --- a/libguile/vm-i-system.c +++ b/libguile/vm-i-system.c @@ -887,7 +887,6 @@ VM_DEFINE_INSTRUCTION (80, subr_call, "subr-call", 1, -1, -1) } NULLSTACK_FOR_NONLOCAL_EXIT (); - DROPN (nargs + 1); /* drop args and procedure */ if (SCM_UNLIKELY (SCM_VALUESP (ret))) { @@ -935,7 +934,6 @@ VM_DEFINE_INSTRUCTION (81, smob_call, "smob-call", 1, -1, -1) } NULLSTACK_FOR_NONLOCAL_EXIT (); - DROPN (nargs + 1); /* drop args and procedure */ if (SCM_UNLIKELY (SCM_VALUESP (ret))) {