]> git.sur5r.net Git - cc65/blobdiff - src/cc65/symtab.h
New/changed optimizations
[cc65] / src / cc65 / symtab.h
index 996941ebf1ec29658ce242d638636974ce19e38b..317d8f8b808682958e27c5418190da679cb55fdd 100644 (file)
@@ -117,11 +117,14 @@ void LeaveStructLevel (void);
 SymEntry* FindSym (const char* Name);
 /* Find the symbol with the given name */
 
-SymEntry* FindStructSym (const char* Name);
-/* Find the symbol with the given name in the struct table */
+SymEntry* FindGlobalSym (const char* Name);
+/* Find the symbol with the given name in the global symbol table only */
 
-SymEntry* FindEnumSym (const char* Name);
-/* Find the symbol with the given name in the enum table */
+SymEntry* FindLocalSym (const char* Name);
+/* Find the symbol with the given name in the current symbol table only */
+
+SymEntry* FindTagSym (const char* Name);
+/* Find the symbol with the given name in the tag table */
 
 SymEntry* FindStructField (const type* TypeArray, const char* Name);
 /* Find a struct field in the fields list */
@@ -137,16 +140,16 @@ SymEntry* FindStructField (const type* TypeArray, const char* Name);
 SymEntry* AddStructSym (const char* Name, unsigned Size, SymTable* Tab);
 /* Add a struct/union entry and return it */
 
-SymEntry* AddEnumSym (const char* Name, int Val);
-/* Add an enum symbol to the symbol table and return it */
+SymEntry* AddConstSym (const char* Name, const type* Type, unsigned Flags, long Val);
+/* Add an constant symbol to the symbol table and return it */
 
 SymEntry* AddLabelSym (const char* Name, unsigned Flags);
 /* Add a goto label to the symbol table */
 
-SymEntry* AddLocalSym (const char* Name, type* Type, unsigned Flags, int Offs);
+SymEntry* AddLocalSym (const char* Name, const type* Type, unsigned Flags, int Offs);
 /* Add a local symbol and return the symbol entry */
 
-SymEntry* AddGlobalSym (const char* Name, type* Type, unsigned Flags);
+SymEntry* AddGlobalSym (const char* Name, const type* Type, unsigned Flags);
 /* Add an external or global symbol to the symbol table and return the entry */
 
 
@@ -160,10 +163,11 @@ SymEntry* AddGlobalSym (const char* Name, type* Type, unsigned Flags);
 SymTable* GetSymTab (void);
 /* Return the current symbol table */
 
-int EqualTypes (const type* t1, const type* t2);
-/* Recursively compare two types. Return 1 if the types match, return 0
- * otherwise.
- */
+SymTable* GetGlobalSymTab (void);
+/* Return the global symbol table */
+
+int SymIsLocal (SymEntry* Sym);
+/* Return true if the symbol is defined in the highest lexical level */
 
 void MakeZPSym (const char* Name);
 /* Mark the given symbol as zero page symbol */
@@ -182,6 +186,3 @@ void EmitExternals (void);
 
 
 
-
-
-