Closed
Description
This is mentioned by @bjorn3 in #86291 (comment) .
The goal is this:
have miri create an Allocation for the vtable and then handle it like a normal constant in cg_{clif,llvm}?
Here's the mentoring notes:
The first step would be to refactor the vtable generation in miri to create an Allocation outside of the context of a Machine. In the place of the vtable codegen in cg_{clif,ssa} this function could be called followed by a call to whatever method is used to lower Allocations to backend constants. It may also be nice to add a map from trait + type -> allocation to tcx.alloc_map or something like that to replace the interning done by the backends.