]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] modula2: use groups in the type resolver of the bootstrap tool mc
authorGaius Mulley <gaiusmod2@gmail.com>
Wed, 20 Nov 2024 00:17:23 +0000 (00:17 +0000)
committerGaius Mulley <gaiusmod2@gmail.com>
Wed, 20 Nov 2024 00:17:23 +0000 (00:17 +0000)
commit9a23dff4f8eb92150074223098af30ea91a4d3da
tree4aa1bebfc4df83a42ccb0a6b86298bd8dfdd1ed2
parentb1d2c143e8004535ee205eb374cf96d592f2f445
[PATCH] 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.

(cherry picked from commit 20e6f36771df7e3a8857628dd367eecfe77ba4fc)

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