Index: pkg/kernel/lib/binary/ast_to_binary.dart |
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart |
index 16d7f0cc8c9bf01c6e6b3918f0130da4936a5477..e1d3817fab3736b56af3d7972668f7cdd6654081 100644 |
--- a/pkg/kernel/lib/binary/ast_to_binary.dart |
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart |
@@ -363,18 +363,22 @@ class BinaryPrinter extends Visitor { |
writeList(annotations, writeAnnotation); |
} |
- int _encodeClassFlags( |
- bool isAbstract, bool isSyntheticMixinImplementation, ClassLevel level) { |
+ int _encodeClassFlags(bool isAbstract, bool isEnum, |
+ bool isSyntheticMixinImplementation, ClassLevel level) { |
int abstractFlag = isAbstract ? 1 : 0; |
+ int isEnumFlag = isSyntheticMixinImplementation ? 2 : 0; |
int isSyntheticMixinImplementationFlag = |
- isSyntheticMixinImplementation ? 2 : 0; |
- int levelFlags = (level.index - 1) << 2; |
- return abstractFlag | isSyntheticMixinImplementationFlag | levelFlags; |
+ isSyntheticMixinImplementation ? 4 : 0; |
+ int levelFlags = (level.index - 1) << 3; |
+ return abstractFlag | |
+ isEnumFlag | |
+ isSyntheticMixinImplementationFlag | |
+ levelFlags; |
} |
visitClass(Class node) { |
- int flags = _encodeClassFlags( |
- node.isAbstract, node.isSyntheticMixinImplementation, node.level); |
+ int flags = _encodeClassFlags(node.isAbstract, node.isEnum, |
+ node.isSyntheticMixinImplementation, node.level); |
if (node.canonicalName == null) { |
throw 'Missing canonical name for $node'; |
} |