]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR modula2/109969 Linking large project causes an ICE
authorGaius Mulley <gaiusmod2@gmail.com>
Thu, 7 Mar 2024 19:41:58 +0000 (19:41 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Thu, 7 Mar 2024 19:41:58 +0000 (19:41 +0000)
commit99309b98c2e80a42886da36668e1e8d3d082699e
tree22821f92d3ff2306c5d7ca829e91741a22e21a17
parent9f915684624413f96e1a5ffada398ccd1c533e38
PR modula2/109969 Linking large project causes an ICE

This patch contains a re-write of M2LexBuf.mod which removes the linked
list of token buckets and simplifies the implementation using a dynamic
array.  It contains more checking (for empty source files for example).
The patch also contains a fix for an ICE in gcc/m2/gm2-gcc/builtins.cc

gcc/m2/ChangeLog:

PR modula2/109969
* gm2-compiler/M2LexBuf.def (TokenToLineNo): Rename parameter.
(TokenToColumnNo): Rename parameter.
(TokenToLocation): Rename parameter.
(FindFileNameFromToken): Rename parameter.
(DumpTokens): Rewrite comment.
* gm2-compiler/M2LexBuf.mod: Rewrite.
* gm2-compiler/P0SyntaxCheck.bnf (CheckInsertCandidate):
DumpTokens before and after inserting recovery token.
* gm2-gcc/m2builtins.cc (do_target_support_exists): Add
bf_c99_compl case.
* gm2-libs/Indexing.def (InitIndexTuned): New procedure
function.
(IsEmpty): New procedure function.
* gm2-libs/Indexing.mod (InitIndexTuned): New procedure
function.
(IsEmpty): New procedure function.
(Index): New field GrowFactor.
(PutIndice): Use GrowFactor to extend dynamic array.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/gm2-compiler/M2LexBuf.def
gcc/m2/gm2-compiler/M2LexBuf.mod
gcc/m2/gm2-compiler/P0SyntaxCheck.bnf
gcc/m2/gm2-gcc/m2builtins.cc
gcc/m2/gm2-libs/Indexing.def
gcc/m2/gm2-libs/Indexing.mod