More global namespace fixes

This commit is contained in:
drmortalwombat 2025-04-21 18:29:01 +02:00
parent 449acece05
commit ab06ce74c5
2 changed files with 22 additions and 5 deletions

View File

@ -697,13 +697,17 @@ bool NativeCodeInstruction::IsUsedResultInstructions(NumberSet& requiredTemps)
} }
else else
{ {
#if 0 if (mLinkerObject)
{
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
{ {
if (mLinkerObject->mZeroPageSet[BC_REG_ACCU + i])
requiredTemps -= BC_REG_ACCU + i; requiredTemps -= BC_REG_ACCU + i;
if (mLinkerObject->mZeroPageSet[BC_REG_WORK + i])
requiredTemps -= BC_REG_WORK + i; requiredTemps -= BC_REG_WORK + i;
} }
#endif }
if (mFlags & NICF_USE_WORKREGS) if (mFlags & NICF_USE_WORKREGS)
{ {
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)

View File

@ -877,7 +877,19 @@ Declaration* Parser::ParseBaseTypeDeclaration(uint64 flags, bool qualified, Decl
} }
break; break;
case TK_COLCOLON:
case TK_IDENT: case TK_IDENT:
{
DeclarationScope* scope = mScope;
if (mScanner->mToken == TK_COLCOLON)
{
mScanner->NextToken();
while (scope->mLevel > SLEVEL_STATIC)
scope = scope->mParent;
if (!ExpectToken(TK_IDENT))
break;
}
pident = mScanner->mTokenIdent; pident = mScanner->mTokenIdent;
mScanner->NextToken(); mScanner->NextToken();
@ -964,6 +976,7 @@ Declaration* Parser::ParseBaseTypeDeclaration(uint64 flags, bool qualified, Decl
mErrors->Error(mScanner->mLocation, EERR_OBJECT_NOT_FOUND, "Identifier not defined", pident); mErrors->Error(mScanner->mLocation, EERR_OBJECT_NOT_FOUND, "Identifier not defined", pident);
break; break;
}
case TK_ENUM: case TK_ENUM:
{ {