summaryrefslogtreecommitdiff
path: root/src/codegen/struct_layout.rs
diff options
context:
space:
mode:
authorNick Fitzgerald <fitzgen@gmail.com>2017-02-10 17:00:53 -0800
committerNick Fitzgerald <fitzgen@gmail.com>2017-02-13 14:08:59 -0800
commit67ff630d656e3c422f28b02c6b6e2c057ab3282d (patch)
tree9b8cbe9d88082be171de5e5d5c167608ac4cce16 /src/codegen/struct_layout.rs
parenta0bb2ce70e71d8758213b65a2d61fd5a8a97ab89 (diff)
Refactor IR graph traversal infrastructure
This makes the IR traversal infrastructure generic. It makes it so we can use the same traversal code for whitelisting traversals and asserting no dangling item references. Therefore the queue of items to visit is generic (whitelisting uses DFS, while asserting against dangling uses BFS), the storage for the seen set (whitelisting uses a simple set, asserting against dangling uses a map from item to the item from which it was discovered). It also introduces the concept of different kinds of edges in the IR graph, and the ability to choose which edges to follow. This means we can simplify non-transitive whitelisting to a simple function that always returns "no do not follow this edge". It plays an important part for future analysis of which template declaration type parameters are used or not.
Diffstat (limited to 'src/codegen/struct_layout.rs')
0 files changed, 0 insertions, 0 deletions