Initial scaffolding for building a witness table for an impl. (#3743)

Add an instruction to hold the witness table, along with a corresponding
type to keep things simpler. Add `check/impl.{h,cpp}` to house the new
logic. No checking of impls against interfaces is performed yet.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Richard Smith
2024-03-07 23:10:14 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent 2424ea16ea
commit abf23ae7fe
27 changed files with 216 additions and 29 deletions
+3 -1
View File
@@ -699,6 +699,7 @@ class TypeCompleter {
case SemIR::BuiltinKind::NamespaceType:
case SemIR::BuiltinKind::FunctionType:
case SemIR::BuiltinKind::BoundMethodType:
case SemIR::BuiltinKind::WitnessType:
return MakeCopyValueRepr(type_id);
case SemIR::BuiltinKind::StringType:
@@ -842,10 +843,11 @@ class TypeCompleter {
case SemIR::FunctionDecl::Kind:
case SemIR::ImplDecl::Kind:
case SemIR::Import::Kind:
case SemIR::ImportRefUnused::Kind:
case SemIR::InitializeFrom::Kind:
case SemIR::InterfaceDecl::Kind:
case SemIR::InterfaceWitness::Kind:
case SemIR::IntLiteral::Kind:
case SemIR::ImportRefUnused::Kind:
case SemIR::NameRef::Kind:
case SemIR::Namespace::Kind:
case SemIR::Param::Kind: