]> git.ipfire.org Git - thirdparty/gcc.git/commit
modula2: use groups in the type resolver of the bootstrap tool mc
authorGaius Mulley <gaiusmod2@gmail.com>
Tue, 21 May 2024 14:46:46 +0000 (15:46 +0100)
committerGaius Mulley <gaiusmod2@gmail.com>
Tue, 21 May 2024 14:46:46 +0000 (15:46 +0100)
commit20e6f36771df7e3a8857628dd367eecfe77ba4fc
treebb0019c3160de5d6f92eb1ff6cb0ede7aeadd589
parent49c87d22535ac4f8aacf088b3f462861c26cacb4
modula2: use groups in the type resolver of the bootstrap tool mc

This patch introduces groups to maintain the lists used when resolving
types in the bootstrap tool mc.  The groups and type resolver are very
similar to that used in cc1gm2.  Specifically the resolver uses the group
to detect any change to any element in any list within a group.  This is
much cleaner and safer than the previous list length comparisons.

gcc/m2/ChangeLog:

* Make-lang.in (MC_EXTENDED_OPAQUE): New definition.
* mc-boot/GDynamicStrings.cc: Rebuild.
* mc-boot/GDynamicStrings.h: Rebuild.
* mc-boot/Galists.cc: Rebuild.
* mc-boot/Galists.h: Rebuild.
* mc-boot/Gdecl.cc: Rebuild.
* mc/alists.def (equalList): New procedure.
* mc/alists.mod (equalList): New procedure implementation.
* mc/decl.mod (group): New type.
(freeGroup): New variable.
(globalGroup): Ditto.
(todoQ): Remove declaration and prefix all occurances with globalGroup^.
(partialQ): Ditto.
(doneQ): Ditto.
(newGroup): New procedure.
(initGroup): Ditto.
(killGroup): Ditto.
(dupGroup): Ditto.
(equalGroup): Ditto.
(topologicallyOut): Rewrite.

Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
gcc/m2/Make-lang.in
gcc/m2/mc-boot/GDynamicStrings.cc
gcc/m2/mc-boot/GDynamicStrings.h
gcc/m2/mc-boot/Galists.cc
gcc/m2/mc-boot/Galists.h
gcc/m2/mc-boot/Gdecl.cc
gcc/m2/mc/alists.def
gcc/m2/mc/alists.mod
gcc/m2/mc/decl.mod