| OLD | NEW |
| 1 # The dart2js compiler | 1 # The dart2js compiler |
| 2 | 2 |
| 3 Welcome to the sources of the dart2js compiler! | 3 Welcome to the sources of the dart2js compiler! |
| 4 | 4 |
| 5 ## Architecture | 5 ## Architecture |
| 6 | 6 |
| 7 The compiler is currently undergoing a long refactoring process. As you navigate | 7 The compiler is currently undergoing a long refactoring process. As you navigate |
| 8 this code you may find it helpful to understand how the compiler used to be, | 8 this code you may find it helpful to understand how the compiler used to be, |
| 9 where it is going, and where it is today. | 9 where it is going, and where it is today. |
| 10 | 10 |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 * `lib/src/closure.dart`: closures are compiled as classes, this file has the | 302 * `lib/src/closure.dart`: closures are compiled as classes, this file has the |
| 303 logic to do this kind of conversion in the Dart element model. This includes | 303 logic to do this kind of conversion in the Dart element model. This includes |
| 304 computing what needs to be boxed and creating fake element models to represent | 304 computing what needs to be boxed and creating fake element models to represent |
| 305 closures as classes. We use the fake model approach because the compiler | 305 closures as classes. We use the fake model approach because the compiler |
| 306 currently uses the same element model for Dart and JS. Our goal with the | 306 currently uses the same element model for Dart and JS. Our goal with the |
| 307 compiler rearchitecture described earlier is to have two models. The | 307 compiler rearchitecture described earlier is to have two models. The |
| 308 Dart model will be able to encode closures directly, and we'll introduce their | 308 Dart model will be able to encode closures directly, and we'll introduce their |
| 309 corresponding classes when we create the corresponding JS model, removing the | 309 corresponding classes when we create the corresponding JS model, removing the |
| 310 need of the fake elements. | 310 need of the fake elements. |
| 311 | 311 |
| 312 * `lib/src/colors.dart`: ANSII support for reporting error messages with colors. | 312 * `lib/src/colors.dart`: ANSI support for reporting error messages with colors. |
| 313 | 313 |
| 314 AI: this file should move under a utilities folder. | 314 AI: this file should move under a utilities folder. |
| 315 | 315 |
| 316 | 316 |
| 317 * Handling of options: as mentioned earlier `lib/src/dart2js.dart` has some | 317 * Handling of options: as mentioned earlier `lib/src/dart2js.dart` has some |
| 318 handling of command-line options, the rest is divided into these files: | 318 handling of command-line options, the rest is divided into these files: |
| 319 | 319 |
| 320 * `lib/src/commandline_options.dart`: defines the flags that dart2js accepts. | 320 * `lib/src/commandline_options.dart`: defines the flags that dart2js accepts. |
| 321 | 321 |
| 322 * `lib/src/options.dart`: defines first-class objects to represent options of | 322 * `lib/src/options.dart`: defines first-class objects to represent options of |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 `lib/src/types/forwarding_type_mask.dart` | 813 `lib/src/types/forwarding_type_mask.dart` |
| 814 `lib/src/types/container_type_mask.dart` | 814 `lib/src/types/container_type_mask.dart` |
| 815 `lib/src/types/constants.dart` | 815 `lib/src/types/constants.dart` |
| 816 `lib/src/types/flat_type_mask.dart` | 816 `lib/src/types/flat_type_mask.dart` |
| 817 `lib/src/types/masks.dart` | 817 `lib/src/types/masks.dart` |
| 818 `lib/src/types/value_type_mask.dart` | 818 `lib/src/types/value_type_mask.dart` |
| 819 `lib/src/types/union_type_mask.dart` | 819 `lib/src/types/union_type_mask.dart` |
| 820 | 820 |
| 821 `lib/src/hash` | 821 `lib/src/hash` |
| 822 `lib/src/hash/sha1.dart` | 822 `lib/src/hash/sha1.dart` |
| OLD | NEW |