Commit Graph

6 Commits

Author SHA1 Message Date
Alejandro Alonso
7eb93b877a Update SpecifierDSL.h 2024-09-04 15:13:29 -07:00
Slava Pestov
32caa17b11 Runtime: Finish removing the 'extra argument' notion 2023-03-03 02:21:08 -05:00
Slava Pestov
480a917fa2 Runtime: Sketch out metadata for variadic generic types 2023-02-28 17:33:06 -05:00
Robert Widmann
dde0d8f609 Generalize the Mangling of Constrained Existential Types
Upgrade the old mangling from a list of argument types to a
list of requiremnets. For now, only same-type requirements
may actually be mangled since those are all that are available
to the surface language.

Reconstruction of existential types now consists of demangling (a list of)
base protocol(s), decoding the constraints, and converting the same-type
constraints back into a list of arguments.

rdar://96088707
2022-06-30 15:32:37 -07:00
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