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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 */ | 323 */ |
324 | 324 |
325 type FunctionNode { | 325 type FunctionNode { |
326 Byte tag = 3; | 326 Byte tag = 3; |
327 FileOffset fileOffset; | 327 FileOffset fileOffset; |
328 FileOffset fileEndOffset; | 328 FileOffset fileEndOffset; |
329 Byte asyncMarker; // Index into AsyncMarker above. | 329 Byte asyncMarker; // Index into AsyncMarker above. |
330 Byte dartAsyncMarker; // Index into AsyncMarker above. | 330 Byte dartAsyncMarker; // Index into AsyncMarker above. |
331 List<TypeParameter> typeParameters; | 331 List<TypeParameter> typeParameters; |
| 332 UInt parameterCount; // positionalParameters.length + namedParameters.length. |
332 UInt requiredParameterCount; | 333 UInt requiredParameterCount; |
333 List<VariableDeclaration> positionalParameters; | 334 List<VariableDeclaration> positionalParameters; |
334 List<VariableDeclaration> namedParameters; | 335 List<VariableDeclaration> namedParameters; |
335 DartType returnType; | 336 DartType returnType; |
336 Option<Statement> body; | 337 Option<Statement> body; |
337 } | 338 } |
338 | 339 |
339 type VariableReference { | 340 type VariableReference { |
340 // Reference to the Nth variable in scope, with 0 being the | 341 // Reference to the Nth variable in scope, with 0 being the |
341 // first variable declared in the outermost scope, and larger | 342 // first variable declared in the outermost scope, and larger |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
995 Option<DartType> bound; | 996 Option<DartType> bound; |
996 } | 997 } |
997 | 998 |
998 type TypeParameter { | 999 type TypeParameter { |
999 // Note: there is no tag on TypeParameter | 1000 // Note: there is no tag on TypeParameter |
1000 StringReference name; // Cosmetic, may be empty, not unique. | 1001 StringReference name; // Cosmetic, may be empty, not unique. |
1001 DartType bound; // 'dynamic' if no explicit bound was given. | 1002 DartType bound; // 'dynamic' if no explicit bound was given. |
1002 } | 1003 } |
1003 | 1004 |
1004 ``` | 1005 ``` |
OLD | NEW |