4e86a006db
Previously, we would precompute the value of ClassElement.isValidMixin and store it in the Modifier.MIXIN. But this didn't really save any time, because (a) isValidMixin isn't used inside analyzer, and (b) it is easily derivable from other information already present in the element model. Also, we were computing it incorrectly when the `--supermixin` flag was present. This CL replaces the precomputation logic with a direct implementation in ClassElement.isValidMixin which is correct regardless of the presence of the `--supermixin` flag. The tests are beefed up so that (a) they validate correct behavior for both states of the flag, (b) they validate correct behavior in the presence of factory constructors, and (c) they validate that the behavior of `isValidMixin` is consistent with the error messages produced by the analyzer. In addition to fixing bugs, the removal of Modifier.MIXIN means we have one less piece of information to store in summaries. R=brianwilkerson@google.com Review URL: https://codereview.chromium.org/1635063003 .