OLD | NEW |
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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 List<Procedure> procedures; | 255 List<Procedure> procedures; |
256 } | 256 } |
257 | 257 |
258 abstract type Member extends Node {} | 258 abstract type Member extends Node {} |
259 | 259 |
260 type Field extends Member { | 260 type Field extends Member { |
261 Byte tag = 4; | 261 Byte tag = 4; |
262 CanonicalNameReference canonicalName; | 262 CanonicalNameReference canonicalName; |
263 FileOffset fileOffset; | 263 FileOffset fileOffset; |
264 FileOffset fileEndOffset; | 264 FileOffset fileEndOffset; |
265 Byte flags (isFinal, isConst, isStatic); | 265 Byte flags (isFinal, isConst, isStatic, isCovariant); |
266 Name name; | 266 Name name; |
267 // An absolute path URI to the .dart file from which the field was created. | 267 // An absolute path URI to the .dart file from which the field was created. |
268 UriReference fileUri; | 268 UriReference fileUri; |
269 StringReference documentationComment; | 269 StringReference documentationComment; |
270 List<Expression> annotations; | 270 List<Expression> annotations; |
271 DartType type; | 271 DartType type; |
272 Option<Expression> initializer; | 272 Option<Expression> initializer; |
273 } | 273 } |
274 | 274 |
275 type Constructor extends Member { | 275 type Constructor extends Member { |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 | 925 |
926 type VariableDeclaration { | 926 type VariableDeclaration { |
927 // The offset for the variable declaration, i.e. the offset of the start of | 927 // The offset for the variable declaration, i.e. the offset of the start of |
928 // the declaration. | 928 // the declaration. |
929 FileOffset fileOffset; | 929 FileOffset fileOffset; |
930 | 930 |
931 // The offset for the equal sign in the declaration (if it contains one). | 931 // The offset for the equal sign in the declaration (if it contains one). |
932 // If it does not contain one this should be -1. | 932 // If it does not contain one this should be -1. |
933 FileOffset fileEqualsOffset; | 933 FileOffset fileEqualsOffset; |
934 | 934 |
935 Byte flags (isFinal, isConst); | 935 Byte flags (isFinal, isConst, isCovariant); |
936 // For named parameters, this is the parameter name. | 936 // For named parameters, this is the parameter name. |
937 // For other variables, the name is cosmetic, may be empty, | 937 // For other variables, the name is cosmetic, may be empty, |
938 // and is not necessarily unique. | 938 // and is not necessarily unique. |
939 StringReference name; | 939 StringReference name; |
940 DartType type; | 940 DartType type; |
941 | 941 |
942 // For statements and for-loops, this is the initial value. | 942 // For statements and for-loops, this is the initial value. |
943 // For optional parameters, this is the default value (if given). | 943 // For optional parameters, this is the default value (if given). |
944 // In all other contexts, it must be Nothing. | 944 // In all other contexts, it must be Nothing. |
945 Option<Expression> initializer; | 945 Option<Expression> initializer; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1037 Option<DartType> bound; | 1037 Option<DartType> bound; |
1038 } | 1038 } |
1039 | 1039 |
1040 type TypeParameter { | 1040 type TypeParameter { |
1041 // Note: there is no tag on TypeParameter | 1041 // Note: there is no tag on TypeParameter |
1042 StringReference name; // Cosmetic, may be empty, not unique. | 1042 StringReference name; // Cosmetic, may be empty, not unique. |
1043 DartType bound; // 'dynamic' if no explicit bound was given. | 1043 DartType bound; // 'dynamic' if no explicit bound was given. |
1044 } | 1044 } |
1045 | 1045 |
1046 ``` | 1046 ``` |
OLD | NEW |