You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change prepares VM for enhanced enums language feature.
List of enum values is now queried using 'values' static field
and not inferred from the list of fields (as enhanced enums allow
arbitrary fields).
TEST=ci
Issue: #47861
Change-Id: Id6eabb6c4ac5a5f03b22ceb67d57431082e22576
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225020
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
VM queries the list of enum elements during class finalization
in order to be prepared for the future hot reload. This is done by
reading 'values' field. However, 'values' field can be missing if
running from a dill file which was tree-shaken. This change avoids
crash in that case and handles missing 'values' field as if it was
declared with an empty list.
TEST=Manually tested in g3.
Issue: #47861
Bug: b/213584901
Change-Id: Ic7271476ee115aa93a73a824af3a867784b820eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226981
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
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: #47861
Change-Id: I2b93d389ab92e0274641e0f1bd65471e6407f3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228220
Reviewed-by: Ben Konyi <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
See #47849 for the main tracking issue.
The text was updated successfully, but these errors were encountered: