From 11408dc2cd45462fe5617dd87568bac0c7bbeddc Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 31 Jan 2009 12:35:45 -0700 Subject: [PATCH] fix popIndex calculation in CallEvent ctor --- src/compiler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compiler.cpp b/src/compiler.cpp index 1dd3b3efba..0a0a088c53 100644 --- a/src/compiler.cpp +++ b/src/compiler.cpp @@ -2189,13 +2189,13 @@ class CallEvent: public Event { ++ frameIndex; } - fprintf(stderr, "%d %d\n", - stackBefore ? stackBefore->index + 1 - stackArgumentFootprint : 0, - c->localFootprint); + popIndex + = c->alignedFrameSize + + c->parameterFootprint + - (stackBefore ? stackBefore->index + 1 - stackArgumentFootprint : 0) + - c->localFootprint; - popIndex = ::frameIndex - (c, (stackBefore ? stackBefore->index - stackArgumentFootprint : 0) - + c->localFootprint); + assert(c, static_cast(popIndex) >= 0); saveLocals(c, this); }