]> git.sur5r.net Git - cc65/blobdiff - src/ca65/symentry.h
Finished implemenation of commands to delete macros. Added the new commands to
[cc65] / src / ca65 / symentry.h
index 36ea6aed361c00fc9c6a8ebfc075212f72404ede..82ca46c551d957ba0c450805903d5a89b9c501d5 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2008 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -67,7 +67,6 @@
 #define SF_LABEL        0x0080          /* Used as a label */
 #define SF_VAR          0x0100          /* Variable symbol */
 #define SF_FORCED       0x0400          /* Forced import, SF_IMPORT also set */
-#define SF_INDEXED     0x0800          /* Index is valid */
 #define SF_MULTDEF             0x2000          /* Multiply defined symbol */
 #define        SF_DEFINED      0x4000          /* Defined */
 #define SF_REFERENCED  0x8000          /* Referenced */
@@ -87,7 +86,7 @@ struct SymEntry {
         struct SymTable*    Tab;               /* Table this symbol is in */
         struct SymEntry*    Entry;
     } Sym;
-    FilePos                    Pos;            /* File position for this symbol */
+    Collection          LineInfos;      /* Line infos for this symbol */
     FilePos*            GuessedUse[1];  /* File position where symbol
                                          * address size was guessed, and the
                                          * smallest possible addressing was NOT
@@ -95,7 +94,8 @@ struct SymEntry {
                                          * addressing
                                          */
     unsigned            Flags;         /* Symbol flags */
-    unsigned           Index;          /* Index of import/export entries */
+    unsigned            DebugSymId;     /* Debug symbol id */
+    unsigned                   ImportId;       /* Id of import if this is one */
     struct ExprNode*    Expr;          /* Symbol expression */
     Collection          ExprRefs;       /* Expressions using this symbol */
     unsigned char       ExportSize;     /* Export address size */
@@ -246,7 +246,7 @@ INLINE int SymIsVar (const SymEntry* S)
 #  define SymIsVar(S)   (((S)->Flags & SF_VAR) != 0)
 #endif
 
-int SymIsConst (SymEntry* Sym, long* Val);
+int SymIsConst (const SymEntry* Sym, long* Val);
 /* Return true if the given symbol has a constant value. If Val is not NULL
  * and the symbol has a constant value, store it's value there.
  */
@@ -335,18 +335,18 @@ long GetSymVal (SymEntry* Sym);
  * in case the symbol is undefined or not constant.
  */
 
-unsigned GetSymIndex (const SymEntry* Sym);
-/* Return the symbol index for the given symbol */
+unsigned GetSymImportId (const SymEntry* Sym);
+/* Return the import id for the given symbol */
 
-#if defined(HAVE_INLINE)
-INLINE const FilePos* GetSymPos (const SymEntry* S)
+unsigned GetSymInfoFlags (const SymEntry* Sym, long* ConstVal);
+/* Return a set of flags used when writing symbol information into a file.
+ * If the SYM_CONST bit is set, ConstVal will contain the constant value
+ * of the symbol. The result does not include the condes count.
+ * See common/symdefs.h for more information.
+ */
+
+const FilePos* GetSymPos (const SymEntry* S);
 /* Return the position of first occurence in the source for the given symbol */
-{
-    return &S->Pos;
-}
-#else
-#  define GetSymPos(S)   (&(S)->Pos)
-#endif