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

Side by Side Diff: pkg/kernel/binary.md

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 unified diff | Download patch
« no previous file with comments | « pkg/kernel/bin/dartk.dart ('k') | pkg/kernel/lib/analyzer/loader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 This file describes the binary format of Dart Kernel. 1 This file describes the binary format of Dart Kernel.
2 2
3 Notation 3 Notation
4 -------- 4 --------
5 Bitmasks are described with the syntax: 5 Bitmasks are described with the syntax:
6 ```scala 6 ```scala
7 Byte flags (flag1, flag2, ..., flagN) 7 Byte flags (flag1, flag2, ..., flagN)
8 ``` 8 ```
9 where 'flag<N>' is the N-th least significant bit, 9 where 'flag<N>' is the N-th least significant bit,
10 (so flag1 is the least significant bit). 10 (so flag1 is the least significant bit).
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 UriReference fileUri; 177 UriReference fileUri;
178 List<Class> classes; 178 List<Class> classes;
179 List<Field> fields; 179 List<Field> fields;
180 List<Procedure> procedures; 180 List<Procedure> procedures;
181 } 181 }
182 182
183 abstract type Node { 183 abstract type Node {
184 Byte tag; 184 Byte tag;
185 } 185 }
186 186
187 enum ClassLevel { Type = 0, Hierarchy = 1, Mixin = 2, Body = 3, }
188
187 // A class can be represented at one of three levels: type, hierarchy, or body. 189 // A class can be represented at one of three levels: type, hierarchy, or body.
188 // 190 //
189 // If the enclosing library is external, a class is either at type or 191 // If the enclosing library is external, a class is either at type or
190 // hierarchy level, depending on its isTypeLevel flag. 192 // hierarchy level, depending on its isTypeLevel flag.
191 // If the enclosing library is not external, a class is always at body level. 193 // If the enclosing library is not external, a class is always at body level.
192 // 194 //
193 // See ClassLevel in ast.dart for the details of each loading level. 195 // See ClassLevel in ast.dart for the details of each loading level.
194 196
195 abstract type Class extends Node {} 197 abstract type Class extends Node {}
196 198
197 type NormalClass extends Class { 199 type NormalClass extends Class {
198 Byte tag = 2; 200 Byte tag = 2;
199 FileOffset fileOffset; 201 FileOffset fileOffset;
200 Byte flags (isAbstract, isTypeLevel); 202 Byte flags (isAbstract, xx); // Where xx is index into ClassLevel
201 StringReference name; 203 StringReference name;
202 // An absolute path URI to the .dart file from which the class was created. 204 // An absolute path URI to the .dart file from which the class was created.
203 UriReference fileUri; 205 UriReference fileUri;
204 List<Expression> annotations; 206 List<Expression> annotations;
205 List<TypeParameter> typeParameters; 207 List<TypeParameter> typeParameters;
206 Option<InterfaceType> superClass; 208 Option<InterfaceType> superClass;
207 List<InterfaceType> implementedClasses; 209 List<InterfaceType> implementedClasses;
208 List<Field> fields; 210 List<Field> fields;
209 List<Constructor> constructors; 211 List<Constructor> constructors;
210 List<Procedure> procedures; 212 List<Procedure> procedures;
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 919
918 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */ 920 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */
919 921
920 type InferredValue { 922 type InferredValue {
921 ClassReference baseClass; // May be NullReference if kind = None. 923 ClassReference baseClass; // May be NullReference if kind = None.
922 Byte kind; // Index into BaseClassKind. 924 Byte kind; // Index into BaseClassKind.
923 Byte valueBits; // See lib/type_propagation/type_propagation.dart 925 Byte valueBits; // See lib/type_propagation/type_propagation.dart
924 } 926 }
925 927
926 ``` 928 ```
OLDNEW
« no previous file with comments | « pkg/kernel/bin/dartk.dart ('k') | pkg/kernel/lib/analyzer/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698