mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:56:57 +00:00
Mark normal classes that were originally mixin applications
To implement dart:mirrors correctly, a backend like the VM needs to know that a class was originally a mixin application. Use the `isSyntheticMixinImplementation` flag which was already there and ignored by the VM. Now the property is: - if `isSyntheticMixinImplementation` is set on a class with a mixed-in type, then it was originally an anonymous mixin application - if `isSyntheticMixinImplementation` is set on a normal class then it was originally a mixin application of some kind and the mixed-in type can be found as the last impelemented type Bug: https://github.com/dart-lang/sdk/issues/33240 Change-Id: I004adc6bfe08e583efba8e511076a6c603c0c687 Reviewed-on: https://dart-review.googlesource.com/56760 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Kevin Millikin <kmillikin@google.com>
This commit is contained in:
parent
6b7f3d5f54
commit
53cd0b4af1
|
@ -286,7 +286,8 @@ type Class extends Node {
|
|||
UriReference fileUri;
|
||||
FileOffset fileOffset;
|
||||
FileOffset fileEndOffset;
|
||||
Byte flags (isAbstract, isEnum, xx); // Where xx is index into ClassLevel
|
||||
Byte flags (isAbstract, isEnum, isSyntheticMixinApplication,
|
||||
xx); // Where xx is index into ClassLevel
|
||||
StringReference name;
|
||||
List<Expression> annotations;
|
||||
List<TypeParameter> typeParameters;
|
||||
|
|
|
@ -232,11 +232,13 @@ class MixinFullResolution {
|
|||
}
|
||||
}
|
||||
|
||||
// This class implements the mixin type.
|
||||
// This class implements the mixin type. Implementations can rely on it
|
||||
// occurring last.
|
||||
class_.implementedTypes.add(class_.mixedInType);
|
||||
|
||||
// This class is now a normal class.
|
||||
class_.mixedInType = null;
|
||||
class_.isSyntheticMixinImplementation = true;
|
||||
}
|
||||
|
||||
Constructor buildForwardingConstructor(
|
||||
|
|
Loading…
Reference in a new issue