Closed jcharum closed 4 years ago
I did this in GitHub, because @mariusae reviewed the initial switch implementation and is still the world's leading expert on flow digests. However, @swami-m, I think we should also seek to be world's leading experts.
@swami-m @prasadgopal: Could one of you have a look at this, as I think it would be good for someone at GRAIL to understand it? As it stands, switch
caching is pretty broken.
Compute a proper flow digest for switch expression evaluation continuations. The existing implementation was very incomplete and results in equivalent digests for non-equivalent expressions. The digest now includes the entire remainder of the switch expression to be evaluated.
Unit tests are added to verify.
This also contains a bit of refactoring to eliminate stutter ("evalSwitch.eval*").