-/* Compute the number of locals in the frame. This is equal to the
- number of actual arguments when a function is first called, plus
- one for the function. */
-#define FRAME_LOCALS_COUNT() \
- (vp->sp + 1 - (fp - 1))
+/* Compute the number of locals in the frame. At a call, this is equal
+ to the number of actual arguments when a function is first called,
+ plus one for the function. */
+#define FRAME_LOCALS_COUNT_FROM(slot) \
+ (vp->sp + 1 - LOCAL_ADDRESS (slot))
+#define FRAME_LOCALS_COUNT() \
+ FRAME_LOCALS_COUNT_FROM (0)