From 00e7fe71256b740a3402c9221bee6a6d419f7060 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Fri, 8 Jul 2022 21:30:14 -0500 Subject: [PATCH] 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.) --- CCommon.pas | 2 +- CGC.asm | 2 +- CGI.pas | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CCommon.pas b/CCommon.pas index 84146ae..9f1b5de 100644 --- a/CCommon.pas +++ b/CCommon.pas @@ -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} {-------} diff --git a/CGC.asm b/CGC.asm index a446c93..33a2a70 100644 --- a/CGC.asm +++ b/CGC.asm @@ -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; diff --git a/CGI.pas b/CGI.pas index a03be6e..1c63f83 100644 --- a/CGI.pas +++ b/CGI.pas @@ -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}