/* */
/* */
/* */
-/* (C) 2000-2002 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
+/* (C) 2000-2008 Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
#define SC_PARAM 0x0080U /* This is a function parameter */
#define SC_FUNC 0x0100U /* Function entry */
+#define SC_DEFTYPE 0x0200U /* Parameter has default type (=int, old style) */
#define SC_STORAGE 0x0400U /* Symbol with associated storage */
#define SC_DEFAULT 0x0800U /* Flag: default storage class was used */
SymEntry* Link; /* General purpose single linked list */
struct SymTable* Owner; /* Symbol table the symbol is in */
unsigned Flags; /* Symbol flags */
- type* Type; /* Symbol type */
+ Type* Type; /* Symbol type */
char* AsmName; /* Assembler name if any */
/* Data that differs for the different symbol types */
# define SymIsRef(Sym) (((Sym)->Flags & SC_REF) == SC_REF)
#endif
-void ChangeSymType (SymEntry* Entry, type* Type);
+#if defined(HAVE_INLINE)
+INLINE int SymIsRegVar (const SymEntry* Sym)
+/* Return true if the given entry is a register variable */
+/* ### HACK! Fix the ugly type flags! */
+{
+ return ((Sym->Flags & (SC_REGISTER|SC_TYPE)) == SC_REGISTER);
+}
+#else
+# define SymIsRegVar(Sym) (((Sym)->Flags & (SC_REGISTER|SC_TYPE)) == SC_REGISTER)
+#endif
+
+#if defined(HAVE_INLINE)
+INLINE const char* SymGetAsmName (const SymEntry* Sym)
+/* Return the assembler label name for the symbol (beware: may be NULL!) */
+{
+ return Sym->AsmName;
+}
+#else
+# define SymGetAsmName(Sym) ((Sym)->AsmName)
+#endif
+
+void CvtRegVarToAuto (SymEntry* Sym);
+/* Convert a register variable to an auto variable */
+
+void ChangeSymType (SymEntry* Entry, Type* T);
/* Change the type of the given symbol */
void ChangeAsmName (SymEntry* Entry, const char* NewAsmName);