Chromium Code Reviews| 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); |