Write scopes in id order, so we don't need to write out the id itself. Add the

size of the scope to the output file and a flag bit that tells us if the scope
has a size.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5097 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-07-31 15:37:51 +00:00
parent 8ec6f66bf0
commit 72a13e1a21
7 changed files with 82 additions and 47 deletions

View File

@@ -817,7 +817,7 @@ static void DoEnd (void)
static void DoEndProc (void)
/* Leave a lexical level */
{
if (GetCurrentSymTabType () != SCOPETYPE_PROC) {
if (GetCurrentSymTabType () != SCOPE_PROC) {
/* No local scope */
ErrorSkip ("No open .PROC");
} else {
@@ -830,7 +830,7 @@ static void DoEndProc (void)
static void DoEndScope (void)
/* Leave a lexical level */
{
if ( GetCurrentSymTabType () != SCOPETYPE_SCOPE) {
if ( GetCurrentSymTabType () != SCOPE_SCOPE) {
/* No local scope */
ErrorSkip ("No open .SCOPE");
} else {
@@ -1539,7 +1539,7 @@ static void DoProc (void)
}
/* Enter a new scope */
SymEnterLevel (&Name, SCOPETYPE_PROC, AddrSize, Sym);
SymEnterLevel (&Name, SCOPE_PROC, AddrSize, Sym);
/* Free memory for Name */
SB_Done (&Name);
@@ -1666,7 +1666,7 @@ static void DoScope (void)
AddrSize = OptionalAddrSize ();
/* Enter the new scope */
SymEnterLevel (&Name, SCOPETYPE_SCOPE, AddrSize, 0);
SymEnterLevel (&Name, SCOPE_SCOPE, AddrSize, 0);
/* Free memory for Name */
SB_Done (&Name);
@@ -1760,7 +1760,7 @@ static void DoTag (void)
ErrorSkip ("Unknown struct");
return;
}
if (GetSymTabType (Struct) != SCOPETYPE_STRUCT) {
if (GetSymTabType (Struct) != SCOPE_STRUCT) {
ErrorSkip ("Not a struct");
return;
}