581db69c7a
The fragment emitter already tries to skip the call to `addRules` if the ruleset is empty, but this occurs too early. The ruleset encoder strips tautologies like `T <: T` and `InterfaceType <: Object`, but this occurs after the empty check. This CL removes the preprocessing from the encoder and instead performs checks when entries are added to the ruleset, fixing the issue. Change-Id: I62f937e0ff6abac12973f82b2c89d8ea6f3162b4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258040 Reviewed-by: Joshua Litt <joshualitt@google.com> Commit-Queue: Mayank Patke <fishythefish@google.com>