Description
During global inference we are effectively building 2 call-graph representations at once. One in the typegraphnode representation, the other with the SideEfffectBuilder objects.
Our hope is that we can combine the two:
- remove SideEffectBuilders altogether
- store a SideEffect object on each member
- propagate effects through the callgraph at the end of inference.
Doing so might also let us use a canonical instance for each side-effect in the lattice (it's not that big!).
Note: this has to be done carefully if we reintroduce indirection in type-inference. Up until a92a9f1 we were using indirection for all ==
methods during inference. That was OK for computing types, but would have been a regression to use the same graph to compute the side-effects.
When using indirection, we want to make sure it is not used globally for all calls, but only for calls that have a large number of possible targets. Then simple calls will likely not be polluted with unnecessary effects.