[m-rev.] for post-commit review: improve debug code in polymorphism_type_class_info.m

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Sep 10 20:30:36 AEST 2026


This helped me to track down the source of one of the problems
in the tci_liveness_abort test case: the creation of a stray base typeclass
info. As the attached trace output file (for a cutdown version of that
test case) shows,

- we generate the same value as the base typeclass info for both
  foo(list(T)) and foo(list(list(T))), but

- we do not reuse the variable holding the first base typeclass info
  when we need the second, because we look for them in different
  "slots" in the typeclass info map.

This diff makes no algorithmic changes in non-debug code; that is
for later diffs.

For review by anyone.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.ptci
Type: application/octet-stream
Size: 1017 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260910/761cd634/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.ptci
Type: application/octet-stream
Size: 49836 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260910/761cd634/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: F.OUT
Type: application/octet-stream
Size: 2397 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260910/761cd634/attachment-0005.obj>


More information about the reviews mailing list