mirror of
https://github.com/cc65/cc65.git
synced 2025-02-28 05:30:23 +00:00
Remove SCOPE_PROC. It's a .SCOPE with an owner symbol.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5098 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
72a13e1a21
commit
97cb025964
@ -817,7 +817,7 @@ static void DoEnd (void)
|
|||||||
static void DoEndProc (void)
|
static void DoEndProc (void)
|
||||||
/* Leave a lexical level */
|
/* Leave a lexical level */
|
||||||
{
|
{
|
||||||
if (GetCurrentSymTabType () != SCOPE_PROC) {
|
if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->OwnerSym == 0) {
|
||||||
/* No local scope */
|
/* No local scope */
|
||||||
ErrorSkip ("No open .PROC");
|
ErrorSkip ("No open .PROC");
|
||||||
} else {
|
} else {
|
||||||
@ -830,7 +830,7 @@ static void DoEndProc (void)
|
|||||||
static void DoEndScope (void)
|
static void DoEndScope (void)
|
||||||
/* Leave a lexical level */
|
/* Leave a lexical level */
|
||||||
{
|
{
|
||||||
if ( GetCurrentSymTabType () != SCOPE_SCOPE) {
|
if (CurrentScope->Type != SCOPE_SCOPE || CurrentScope->OwnerSym != 0) {
|
||||||
/* No local scope */
|
/* No local scope */
|
||||||
ErrorSkip ("No open .SCOPE");
|
ErrorSkip ("No open .SCOPE");
|
||||||
} else {
|
} else {
|
||||||
@ -1539,7 +1539,7 @@ static void DoProc (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Enter a new scope */
|
/* Enter a new scope */
|
||||||
SymEnterLevel (&Name, SCOPE_PROC, AddrSize, Sym);
|
SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, Sym);
|
||||||
|
|
||||||
/* Free memory for Name */
|
/* Free memory for Name */
|
||||||
SB_Done (&Name);
|
SB_Done (&Name);
|
||||||
|
@ -421,15 +421,6 @@ SymEntry* SymFindAny (SymTable* Scope, const StrBuf* Name)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned char GetCurrentSymTabType ()
|
|
||||||
/* Return the type of the current symbol table */
|
|
||||||
{
|
|
||||||
CHECK (CurrentScope != 0);
|
|
||||||
return CurrentScope->Type;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void SymCheckUndefined (SymEntry* S)
|
static void SymCheckUndefined (SymEntry* S)
|
||||||
/* Handle an undefined symbol */
|
/* Handle an undefined symbol */
|
||||||
{
|
{
|
||||||
|
@ -137,9 +137,6 @@ INLINE unsigned char GetSymTabType (const SymTable* S)
|
|||||||
# define GetSymTabType(S) ((S)->Type)
|
# define GetSymTabType(S) ((S)->Type)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned char GetCurrentSymTabType ();
|
|
||||||
/* Return the type of the current symbol table */
|
|
||||||
|
|
||||||
void SymCheck (void);
|
void SymCheck (void);
|
||||||
/* Run through all symbols and check for anomalies and errors */
|
/* Run through all symbols and check for anomalies and errors */
|
||||||
|
|
||||||
|
@ -56,8 +56,7 @@
|
|||||||
enum {
|
enum {
|
||||||
SCOPE_GLOBAL, /* Global level */
|
SCOPE_GLOBAL, /* Global level */
|
||||||
SCOPE_FILE, /* File level */
|
SCOPE_FILE, /* File level */
|
||||||
SCOPE_PROC, /* .PROC */
|
SCOPE_SCOPE, /* .SCOPE/.PROC */
|
||||||
SCOPE_SCOPE, /* .SCOPE */
|
|
||||||
SCOPE_HAS_DATA = SCOPE_SCOPE, /* Last scope that contains data */
|
SCOPE_HAS_DATA = SCOPE_SCOPE, /* Last scope that contains data */
|
||||||
SCOPE_STRUCT, /* .STRUCT/.UNION */
|
SCOPE_STRUCT, /* .STRUCT/.UNION */
|
||||||
SCOPE_ENUM, /* .ENUM */
|
SCOPE_ENUM, /* .ENUM */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user