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

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

Issue 2669303002: Support for modular mixin resolution. (Closed)
Patch Set: Update binary format 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
Index: pkg/kernel/lib/binary/ast_from_binary.dart
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 8c940f69fe5586c80a9aab09cc9354c5f8db56a9..15f8c37ded6d239a8884787a4dbc03af5920aa1a 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -324,9 +324,8 @@ class BinaryBuilder {
node.fileOffset = readOffset();
int flags = readByte();
node.isAbstract = flags & 0x1 != 0;
- node.level = _currentLibrary.isExternal
- ? (flags & 0x2 != 0) ? ClassLevel.Type : ClassLevel.Hierarchy
- : ClassLevel.Body;
+ int levelIndex = (flags >> 1) & 0x3;
+ node.level = ClassLevel.values[levelIndex];
Kevin Millikin (Google) 2017/02/09 10:44:34 Isn't this levelIndex + 1?
asgerf 2017/02/13 12:43:35 You are right, thanks.
node.name = readStringOrNullIfEmpty();
node.fileUri = readUriReference();
node.annotations = readAnnotationList(node);
@@ -351,9 +350,8 @@ class BinaryBuilder {
node.fileOffset = readOffset();
int flags = readByte();
node.isAbstract = flags & 0x1 != 0;
- node.level = _currentLibrary.isExternal
- ? (flags & 0x2 != 0) ? ClassLevel.Type : ClassLevel.Hierarchy
- : ClassLevel.Body;
+ int levelIndex = (flags >> 1) & 0x3;
+ node.level = ClassLevel.values[levelIndex];
node.name = readStringOrNullIfEmpty();
node.fileUri = readUriReference();
node.annotations = readAnnotationList(node);

Powered by Google App Engine
This is Rietveld 408576698