fix bug in subr-call and smob-call
authorAndy Wingo <wingo@pobox.com>
Sat, 9 Jan 2010 20:48:16 +0000 (21:48 +0100)
committerAndy Wingo <wingo@pobox.com>
Sat, 9 Jan 2010 20:48:16 +0000 (21:48 +0100)
* 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

index cc32804f7fbe63c1aa12148d4789130a67894c0c..2e1dae9d0b5c11e6957b7aa6ebd62d4e1b609fad 100644 (file)
@@ -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)))
     {