Description
Ever since we got the graphviz visualizations of our IR graph, it has become immediately clear that we have a TON of ResolvedTypeRef
s all over the place. In fact, 8 out of 15 IR items (more than half!) are ResolvedTypeRef
s in this example I happen to be looking at:
A pass over the IR items where we replace all references to ResolvedTypeRef
s 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.