Just an update, so that people don't get confused... Not being mentally capable of anything more advanced (air travel), I spent today simplifying our AST representation a little. Most importantly, nodes no longer carry both def_ids and anns, but just a single node_id, which is an int, by which they are identified. To get from this (in-crate) id number to a full def_id, call ast::local_def on it, which returns the traditional (crate_num, node_id) pair. Most code only looks at local nodes, though, and doesn't need def_ids. This change was a bit more invasive than I originally imagined, so the patch is huge.
Beyond that, I added an ast_map pass that indexes all exprs and items by node_id, and then wired things so that that table is passed to the various passes that need such an index, instead of building one up again and again (four tables were replaced). Do use this table whenever you need to look nodes up by id, and extend it when you need nodes that are not currently indexed (local defs, methods...) Cheers, Marijn _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
