[vm] Support arbitrary superclasses for enums

With enhanced enums language feature enum classes can have a mixin, so
its superclass is an arbitrary class and not necessarily _Enum.
This change removes lookups of 'index' and '_name' fields in the
superclass of an enum class. They are now looked up once in _Enum
class and saved in the object store.

TEST=co19/LanguageFeatures/Enhanced-Enum/semantics_A01_t01

Issue: https://github.com/dart-lang/sdk/issues/47861
Change-Id: I2b93d389ab92e0274641e0f1bd65471e6407f3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228220
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>

https://dart.googlesource.com/sdk/+/5bbf141e9f679ff56a7455ac4620ed89298239d8
1 file changed
tree: 56b1e95a822e7e4b237e7c656f14d56ac34e543a
  1. commits.json