Increase some size limits.

The new value of maxLocalLabel is aligned with the C99+ requirement to support "511 identifiers with block scope declared in one block".

The value of maxLabel is now the maximum it can be while keeping the size of the labelTab array under 32 KiB. (I'm not entirely sure the address calculations in the code generated by ORCA/Pascal would work correctly beyond that.)
This commit is contained in:
Stephen Heumann 2022-07-08 21:30:14 -05:00
parent f0d827eade
commit 00e7fe7125
3 changed files with 4 additions and 4 deletions

View File

@ -679,7 +679,7 @@ implementation
const
{Note: maxLabel is also defined in cgi.pas}
{Note: maxlabel is also defined in CGC.asm}
maxLabel = 3200; {max # compiler generated labels}
maxLabel = 3275; {max # compiler generated labels}
{spinner}
{-------}

View File

@ -235,7 +235,7 @@ rval ds 10
****************************************************************
*
InitLabels start cg
maxLabel equ 3200
maxLabel equ 3275
! with labelTab[0] do begin
lda #-1 val := -1;

View File

@ -208,8 +208,8 @@ const
maxCBuff = 191; {length of constant buffer}
{Note: maxlabel is also defined in CCommon.pas}
{Note: maxlabel is also defined in CGC.asm}
maxLabel = 3200; {max # of internal labels}
maxLocalLabel = 220; {max # local variables}
maxLabel = 3275; {max # of internal labels}
maxLocalLabel = 512; {max # local variables}
maxString = 32760; {max # chars in string space}
{size of internal types}