Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: pkg/kernel/lib/binary/ast_to_binary.dart

Issue 2669303002: Support for modular mixin resolution. (Closed)
Patch Set: Fix a bug Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/core_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6d3dabda980afd5aa453172db000a029a3974d87..b838d5ee39d8f82e2340790931acdea68bb2ac3a 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -283,11 +283,14 @@ class BinaryPrinter extends Visitor {
writeList(annotations, writeAnnotation);
}
+ int _encodeClassFlags(bool isAbstract, ClassLevel level) {
+ int abstactFlag = isAbstract ? 1 : 0;
+ int levelFlags = (level.index - 1) << 1;
+ return abstactFlag | levelFlags;
+ }
+
visitClass(Class node) {
- int flags = node.isAbstract ? 1 : 0;
- if (node.level == ClassLevel.Type) {
- flags |= 0x2;
- }
+ int flags = _encodeClassFlags(node.isAbstract, node.level);
if (node.isMixinApplication) {
writeByte(Tag.MixinClass);
writeOffset(node, node.fileOffset);
« no previous file with comments | « pkg/kernel/lib/binary/ast_from_binary.dart ('k') | pkg/kernel/lib/core_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698