mbox

[0/3] Type equality refactor and instrumentation

Message ID 20200708095315.948634-1-gprocida@google.com
Headers

Message

Giuliano Procida July 8, 2020, 9:53 a.m. UTC
  Hi Dodji.

This series refactors various operator== methods making their common
functionality evident.

The first patch is just a prelude to make the second smaller.

The second patch does the refactoring. I'm not attached to the name
'equality_helper'.

The third patch is not intended for direct inclusion in libabigail but
builds on the refactoring to investigate how equality and canonical
types work in practice. It identifies some potential discrepancies,
but they may be entirely expected.

In general, it can be risky to define operator== in a way where
reflexivity, symmetry and transitivity do not obviously hold or can be
sensitive to small code changes or in way where equality, say for
class_decl_sptr, can be affected by something like canonicalisation.
More instrumentation could be added to check behaviour.

Giuliano Procida (3):
  abg-ir.cc: Tidy some operator== definitions
  abg-ir.cc: Refactor operator== methods with helper
  Add some type equality paranoia.

 src/abg-ir.cc | 185 +++++++++++++++++++++++++++++---------------------
 1 file changed, 106 insertions(+), 79 deletions(-)