carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
http://docs.carbon-lang.dev/
Other
32.24k stars 1.48k forks source link

Change TypeId to be a thin wrapper around ConstantId. #4140

Closed zygoloid closed 2 months ago

zygoloid commented 2 months ago

This better follows the principle that types are simply constants of type type, and allows more uniform treatment of types as just another kind of constant from generics handling.

Use a hash table to map from TypeId to information about the complete type. This makes basic operations on types a bit simpler, and operations that actually need to access the complete class information a bit more complex.