| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 Byte flags (isExternal); | 168 Byte flags (isExternal); |
| 169 StringReference name; | 169 StringReference name; |
| 170 // A URI from which the library was created. The URI has the dart, package, | 170 // A URI from which the library was created. The URI has the dart, package, |
| 171 // file, or app scheme. For file URIs, the path is an absolute path to the | 171 // file, or app scheme. For file URIs, the path is an absolute path to the |
| 172 // .dart file from which the library was created. For app URIs, the path is | 172 // .dart file from which the library was created. For app URIs, the path is |
| 173 // relative to an application root that was specified when the binary was | 173 // relative to an application root that was specified when the binary was |
| 174 // generated. | 174 // generated. |
| 175 StringReference importUri; | 175 StringReference importUri; |
| 176 // An absolute path URI to the .dart file from which the library was created. | 176 // An absolute path URI to the .dart file from which the library was created. |
| 177 UriReference fileUri; | 177 UriReference fileUri; |
| 178 List<DeferredImport> deferredImports; |
| 178 List<Class> classes; | 179 List<Class> classes; |
| 179 List<Field> fields; | 180 List<Field> fields; |
| 180 List<Procedure> procedures; | 181 List<Procedure> procedures; |
| 181 } | 182 } |
| 182 | 183 |
| 184 type DeferredImport { |
| 185 LibraryReference importedLibrary; |
| 186 StringReference name; |
| 187 } |
| 188 |
| 189 type DeferredImportReference { |
| 190 // Index into deferredImports in the enclosing Library. |
| 191 UInt index; |
| 192 } |
| 193 |
| 183 abstract type Node { | 194 abstract type Node { |
| 184 Byte tag; | 195 Byte tag; |
| 185 } | 196 } |
| 186 | 197 |
| 187 // A class can be represented at one of three levels: type, hierarchy, or body. | 198 // A class can be represented at one of three levels: type, hierarchy, or body. |
| 188 // | 199 // |
| 189 // If the enclosing library is external, a class is either at type or | 200 // If the enclosing library is external, a class is either at type or |
| 190 // hierarchy level, depending on its isTypeLevel flag. | 201 // hierarchy level, depending on its isTypeLevel flag. |
| 191 // If the enclosing library is not external, a class is always at body level. | 202 // If the enclosing library is not external, a class is always at body level. |
| 192 // | 203 // |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 657 Byte tag = 52; | 668 Byte tag = 52; |
| 658 FunctionNode function; | 669 FunctionNode function; |
| 659 } | 670 } |
| 660 | 671 |
| 661 type Let extends Expression { | 672 type Let extends Expression { |
| 662 Byte tag = 53; | 673 Byte tag = 53; |
| 663 VariableDeclaration variable; | 674 VariableDeclaration variable; |
| 664 Expression body; | 675 Expression body; |
| 665 } | 676 } |
| 666 | 677 |
| 678 type LoadLibrary extends Expression { |
| 679 Byte tag = 14; |
| 680 DeferredImportReference import; |
| 681 } |
| 682 |
| 683 type CheckLibraryIsLoaded extends Expression { |
| 684 Byte tag = 13; |
| 685 DeferredImportReference import; |
| 686 } |
| 687 |
| 667 abstract type Statement extends Node {} | 688 abstract type Statement extends Node {} |
| 668 | 689 |
| 669 type InvalidStatement extends Statement { | 690 type InvalidStatement extends Statement { |
| 670 Byte tag = 60; | 691 Byte tag = 60; |
| 671 } | 692 } |
| 672 | 693 |
| 673 type ExpressionStatement extends Statement { | 694 type ExpressionStatement extends Statement { |
| 674 Byte tag = 61; | 695 Byte tag = 61; |
| 675 Expression expression; | 696 Expression expression; |
| 676 } | 697 } |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 | 938 |
| 918 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */ | 939 /* enum BaseClassKind { None, Exact, Subclass, Subtype, } */ |
| 919 | 940 |
| 920 type InferredValue { | 941 type InferredValue { |
| 921 ClassReference baseClass; // May be NullReference if kind = None. | 942 ClassReference baseClass; // May be NullReference if kind = None. |
| 922 Byte kind; // Index into BaseClassKind. | 943 Byte kind; // Index into BaseClassKind. |
| 923 Byte valueBits; // See lib/type_propagation/type_propagation.dart | 944 Byte valueBits; // See lib/type_propagation/type_propagation.dart |
| 924 } | 945 } |
| 925 | 946 |
| 926 ``` | 947 ``` |
| OLD | NEW |