carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
https://github.com/carbon-language/carbon-lang/blob/trunk/README.md
Other
32.31k stars 1.48k forks source link

Track a list of dependent instructions created within a generic #4092

Open zygoloid opened 2 days ago

zygoloid commented 2 days ago

When checking a declaration or definition of a generic, track a list of created instructions that depend on the generic's parameters in some way, along with information on how they depend on the parameters. This will eventually be used to determine what information we need to compute when creating instances of the generic, but for now we're just building the list.

Information is tracked separately for the declaration region and the definition region of the generic, because in general these may be first provided in separate declarations, and they should be substituted into at different times.