6b4b1a0fef
This replaces the previous implementation (and the topological sort of classes, on which it was based) which was O(|vertices|*|edges|). The new implementation is O(|vertices|+|edges|). Change-Id: I4f5f1e63b4c7dd67d6f17c087724c20d4d33bf83 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221820 Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>