Skip to content

Add a phase that removes ResolvedTypeRefs before codegen #534

Open
@fitzgen

Description

@fitzgen

Ever since we got the graphviz visualizations of our IR graph, it has become immediately clear that we have a TON of ResolvedTypeRefs all over the place. In fact, 8 out of 15 IR items (more than half!) are ResolvedTypeRefs in this example I happen to be looking at:

using

A pass over the IR items where we replace all references to ResolvedTypeRefs with references to the type being transitively referenced via the ResolvedTypeRef would probably give us speed ups in codegen and analysis, because we wouldn't have to look at useless items anymore. It would also make looking at these graphs easier, since there would be less visual noise :-P

A good time to do this would be in ir::context::BindgenContext::gen, after we resolve unresolved type refs in resolve_typerefs. https://github.com/servo/rust-bindgen/blob/master/src/ir/context.rs#L529

I can mentor whoever would like to take a stab at this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions