BSD 4_3_Tahoe release
[unix-history] / usr / src / ucb / pascal / pdx / tree.h
index d0ab8c3..1e744ae 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)tree.h      5.1 (Berkeley) 6/6/85
+ *     @(#)tree.h      5.3 (Berkeley) 1/3/88
  */
 
 /*
  */
 
 /*
@@ -27,18 +27,24 @@ typedef char STACK;
 
 #define WMASK                  (sizeof(int) - 1)
 
 
 #define WMASK                  (sizeof(int) - 1)
 
+#ifdef tahoe
+#define push(type, value)      ((*(type *)sp) = value, sp += (sizeof(type) + WMASK) & ~WMASK, value)
+#define        pop(type)               (sp -= (sizeof(type) + WMASK) & ~WMASK, (*((type *) sp)))
+#else
 #define push(type, value)      ((type *) (sp += sizeof(type)))[-1] = (value)
 #define pop(type)              (*((type *) (sp -= sizeof(type))))
 #define push(type, value)      ((type *) (sp += sizeof(type)))[-1] = (value)
 #define pop(type)              (*((type *) (sp -= sizeof(type))))
+#endif
 #define alignstack()           sp = (char *) (( ((int) sp) + WMASK)&~WMASK)
 #define alignstack()           sp = (char *) (( ((int) sp) + WMASK)&~WMASK)
+#define downalignstack()       sp = (char *) (( ((int) sp))&~WMASK)
 
 STACK stack[];
 STACK *sp;
 
 NODE *build();         /* create a node in the parse tree */
 
 STACK stack[];
 STACK *sp;
 
 NODE *build();         /* create a node in the parse tree */
-prtree();              /* print a tree in source form */
-eval();                        /* evaluate a tree, leaving value on stack */
+int prtree();          /* print a tree in source form */
+int eval();            /* evaluate a tree, leaving value on stack */
 long popsmall();       /* pop a small item from the stack given its type */
 long popsmall();       /* pop a small item from the stack given its type */
-tfree();               /* release storage for a tree */
+int tfree();           /* release storage for a tree */
 BOOLEAN tr_equal();    /* test if two trees are structurally equivalent */
 BOOLEAN cond();                /* evaluate a node for a conditional */
 ADDRESS lval();                /* return the object address of a node */
 BOOLEAN tr_equal();    /* test if two trees are structurally equivalent */
 BOOLEAN cond();                /* evaluate a node for a conditional */
 ADDRESS lval();                /* return the object address of a node */