eliminate need of flex
[fw/sdcc] / src / SDCCsymt.h
index 353f41f6f9fd0164ffc0f20077182b825932d8cb..318c2efb295d28d0d7673fc17af59141cb755c7c 100644 (file)
@@ -298,6 +298,7 @@ typedef struct symbol
     struct iCode *rematiCode;  /* rematerialse with which instruction */
     struct operand *reqv;      /* register equivalent of a local variable */
     struct symbol *prereqv;    /* symbol before register equiv. substituion */
+    struct symbol *psbase;     /* if pseudo symbol, the symbol it is based on */
     union
       {
        struct symbol *spillLoc;        /* register spil location */
@@ -466,6 +467,9 @@ extern sym_link *validateLink(sym_link      *l,
 #define IS_CODE(x)      (IS_SPEC(x)  && SPEC_SCLS(x) == S_CODE)
 #define IS_REGPARM(x)   (IS_SPEC(x) && SPEC_REGPARM(x))
 
+/* symbol check macros */
+#define IS_AUTO(x) (x->level && !IS_STATIC(x->etype) && !IS_EXTERN(x->etype))
+
 /* forward declaration for the global vars */
 extern bucket *SymbolTab[];
 extern bucket *StructTab[];
@@ -541,6 +545,7 @@ value *checkStructIval (symbol *, value *);
 value *checkArrayIval (sym_link *, value *);
 value *checkIval (sym_link *, value *);
 unsigned int getSize (sym_link *);
+unsigned int getAllocSize (sym_link *);
 unsigned int bitsForType (sym_link *);
 sym_link *newIntLink ();
 sym_link *newCharLink ();