Commit Graph

2 Commits

Author SHA1 Message Date
John McCall
5f382e6198 Change the unit-testing specifier DSL to use demangle nodes.
Creating a mangle-node tree is annoying, but it's much better
than trying to reproduce the mangling logic exactly.

Also, add support for mangling some existential types.  The
specifier for parameterized protocol types has been future-proofed
against the coming change to include the associated type names
in the mangling.
2022-04-21 23:47:01 -04:00
John McCall
a986d7434a [NFC] Implement a small DSL to create metadata objects in unit tests
Some parts of the type metadata system are difficult to unit-test
because they rely on structures that contain relative references,
which the C compiler cannot generate.  We have traditionally just
relied on integration testing with the compiler.  For constrained
existentials, I wanted to do better, so I spent a few days hacking
up this little system which can generate graphs of objects with
relative references to one another.

Currently it's missing the ability to generate a lot of things
which I didn't need in order to adequately test the metadata
system for constrained existentials.
2022-03-27 18:24:17 -04:00