/* */
/* */
/* */
-/* (C) 1998-2003 Ullrich von Bassewitz */
+/* (C) 1998-2004 Ullrich von Bassewitz */
/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* cc65 */
#include "error.h"
-#include "loop.h"
+#include "loop.h"
+#include "stackptr.h"
-LoopDesc* AddLoop (unsigned SP, unsigned BreakLabel, unsigned ContinueLabel)
+LoopDesc* AddLoop (unsigned BreakLabel, unsigned ContinueLabel)
/* Create and add a new loop descriptor. */
{
/* Allocate a new struct */
LoopDesc* L = xmalloc (sizeof (LoopDesc));
/* Fill in the data */
- L->StackPtr = SP;
+ L->StackPtr = StackPtr;
L->BreakLabel = BreakLabel;
L->ContinueLabel = ContinueLabel;
/*****************************************************************************/
/* */
-/* loop.h */
+/* loop.h */
/* */
-/* Loop management */
+/* Loop management */
/* */
/* */
/* */
-/* (C) 1998-2003 Ullrich von Bassewitz */
+/* (C) 1998-2004 Ullrich von Bassewitz */
/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
-LoopDesc* AddLoop (unsigned SP, unsigned BreakLabel, unsigned ContinueLabel);
+LoopDesc* AddLoop (unsigned BreakLabel, unsigned ContinueLabel);
/* Create and add a new loop descriptor. */
LoopDesc* CurrentLoop (void);
NextToken ();
/* Add the loop to the loop stack */
- AddLoop (StackPtr, BreakLabel, ContinueLabel);
+ AddLoop (BreakLabel, ContinueLabel);
/* Define the loop label */
g_defcodelabel (LoopLabel);
/* Add the loop to the loop stack. In case of a while loop, the loop head
* label is used for continue statements.
*/
- AddLoop (StackPtr, BreakLabel, LoopLabel);
+ AddLoop (BreakLabel, LoopLabel);
/* Define the head label */
g_defcodelabel (LoopLabel);
/* Add the loop to the loop stack. A continue jumps to the start of the
* the increment condition.
*/
- AddLoop (StackPtr, BreakLabel, IncLabel);
+ AddLoop (BreakLabel, IncLabel);
/* Skip the opening paren */
ConsumeLParen ();
ExprLoad (CF_NONE, &Expr);
}
/* If the statement didn't generate code, and is not of type
- * void, emit a warning
+ * void, emit a warning
*/
if (GetCodePos () == Start && !IsTypeVoid (Expr.Type)) {
Warning ("Statement has no effect");
#include "global.h"
#include "loop.h"
#include "scanner.h"
-#include "stackptr.h"
#include "stmt.h"
#include "swstmt.h"
ExitLabel = GetLocalLabel ();
/* Create a loop so we may use break. */
- AddLoop (StackPtr, ExitLabel, 0);
+ AddLoop (ExitLabel, 0);
/* Create the collection for the case node tree */
Nodes = NewCollection ();