More HHBBC preresolve logic a bit more deterministic
Summary:
While doing some A/B diffs on HHBBC, I noticed a large number of
non-deterministic differences. I tracked it down to some
non-determinism in the preresolve logic, mainly around trait
flattening. We processed every class individually (in multiple
threads), but manipulated shared per-Unit state, meaning identical
runs could get different results. We also iterated over the map of
closures, which has a non-deterministic iteration order.
Instead, do the processing on a per-Unit basis, and keep track of
insertion order of the closures.
I don't think any of this has perf implications. It just makes
comparing differences easier.
Reviewed By: mofarrell
Differential Revision:
D30203510
fbshipit-source-id:
2322f7a29975560b86897f3de0bbf3c11e3fbb5f