mozilla/rust — Issue #1498: convert shape code to be visitor glue
Author: nikomatsakis
Created: 2012-01-12 05:06:50+00:00
State: open
Labels: rfc, rt, trans

I would like to do away with the shape code and instead have the compiler generator "visitor glue", which is glue code that walks the data structure and invokes methods on a visitor. The methods would be encoded as a struct of functions. This could replace the logging, universal equality, and other functions of glue code. If it's fast enough, we may be able to replace the take, drop, and free glue with visitor glue, but if not, we could at least tie the code generation together so that they are all driven from the same codebase.