Skip to content

Refactor: have miri create an Allocation for the vtable #86324

Closed
@crlf0710

Description

@crlf0710

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions