mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
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:
co-authored by
Jon Ross-Perkins
parent
2424ea16ea
commit
abf23ae7fe
@@ -329,6 +329,9 @@ auto TryEvalInst(Context& context, SemIR::InstId inst_id, SemIR::Inst inst)
|
||||
return RebuildIfFieldsAreConstant(context, inst,
|
||||
&SemIR::BoundMethod::object_id,
|
||||
&SemIR::BoundMethod::function_id);
|
||||
case SemIR::InterfaceWitness::Kind:
|
||||
return RebuildIfFieldsAreConstant(context, inst,
|
||||
&SemIR::InterfaceWitness::table_id);
|
||||
case SemIR::PointerType::Kind:
|
||||
return RebuildIfFieldsAreConstant(context, inst,
|
||||
&SemIR::PointerType::pointee_id);
|
||||
|
||||
Reference in New Issue
Block a user