why use the "instance" rather than implementing a block visitor to build the callgraph?
ffanyq opened this issue · 2 comments
ffanyq commented
why use the "instance" rather than implementing a block visitor to build the callgraph?
BurtonQin commented
The implementation uses Instance::resolve
to get the callee instance.
lockbud/src/analysis/callgraph/mod.rs
Line 211 in 69e1399
An instance is more suitable than a function's def_id
in the analysis in that
i) the instance here is fully instantiated, providing concrete type info and handy APIs.
and ii) eliminating dead functions.
ffanyq commented
Thanks for your answer!