Commit 28f95fc
[cfe] Track dependencies in the incremental compiler
The objective of this CL is to allow the incremental compiler to track
which dill input libraries it actually used (in order to - in a modular
context - be able to ignore changes to dependencies we didn't really
use).
This is done by:
* Making the dill library builder lazy (and mark if it has been used).
* Making kernels class hierarchy record which classes it has been
asked questions about.
* Add special handling to redirecting factory constructors as they
bypass the fasta-builders and directly use the kernel ast.
Please note that:
* This has to be enabled, but kernels class hierarchy always records
which classes it was asked about (even if disabled,
or not running though the incremental compiler).
There might potentially be some overhead to this (though setting
a bool to true is probably comparably cheap - we did just do a
map lookup).
* This was designed to be used together with modules
(e.g. setModulesToLoadOnNextComputeDelta) - as used via for instance
api_unstable/bazel_worker.dart. It might not function the way you'd
expect in other circumstances.
* The incremental compiler (potentially) gives you the full kernel tree
despite not having marked all of those libraries as 'used'. If a
client use such libraries it is the clients responsibility to take
that into account when answering any questions about this
libraries/dill files was used.
* This feature works on the library level. In practice it is most likely
needed at the dill-filename level. A translation from library to
dill-filename is up to the client.
* This is a new feature, and we cannot promise that 100% of actually
used libraries are marked. If you find used but un-marked libraries
please report a bug.
Change-Id: I01d7ff95b9baac9550b77d8e09ea772d43173641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107280
Commit-Queue: Jens Johansen <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>1 parent afac6b1 commit 28f95fc
File tree
17 files changed
+830
-76
lines changed- pkg
- front_end
- lib/src/fasta
- dill
- kernel
- testcases/incremental_initialize_from_dill
- test
- fasta
- kernel/lib
17 files changed
+830
-76
lines changedLines changed: 64 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
54 | 79 | | |
55 | 80 | | |
56 | 81 | | |
| |||
64 | 89 | | |
65 | 90 | | |
66 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
67 | 99 | | |
68 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
69 | 124 | | |
70 | 125 | | |
71 | 126 | | |
| |||
174 | 229 | | |
175 | 230 | | |
176 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
177 | 240 | | |
178 | 241 | | |
179 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 64 | + | |
68 | 65 | | |
69 | 66 | | |
70 | 67 | | |
| |||
74 | 71 | | |
75 | 72 | | |
76 | 73 | | |
77 | | - | |
| 74 | + | |
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| 97 | + | |
| 98 | + | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
| |||
301 | 307 | | |
302 | 308 | | |
303 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
304 | 323 | | |
305 | 324 | | |
306 | 325 | | |
| |||
324 | 343 | | |
325 | 344 | | |
326 | 345 | | |
| 346 | + | |
327 | 347 | | |
328 | 348 | | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
329 | 363 | | |
330 | 364 | | |
331 | 365 | | |
| |||
388 | 422 | | |
389 | 423 | | |
390 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
391 | 495 | | |
392 | 496 | | |
393 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | | - | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
906 | 946 | | |
907 | 947 | | |
908 | 948 | | |
| |||
927 | 967 | | |
928 | 968 | | |
929 | 969 | | |
930 | | - | |
| 970 | + | |
931 | 971 | | |
932 | 972 | | |
933 | 973 | | |
| |||
3355 | 3395 | | |
3356 | 3396 | | |
3357 | 3397 | | |
3358 | | - | |
| 3398 | + | |
3359 | 3399 | | |
3360 | 3400 | | |
3361 | 3401 | | |
| |||
3664 | 3704 | | |
3665 | 3705 | | |
3666 | 3706 | | |
3667 | | - | |
| 3707 | + | |
3668 | 3708 | | |
3669 | 3709 | | |
3670 | 3710 | | |
| |||
3690 | 3730 | | |
3691 | 3731 | | |
3692 | 3732 | | |
3693 | | - | |
| 3733 | + | |
| 3734 | + | |
3694 | 3735 | | |
3695 | 3736 | | |
3696 | 3737 | | |
| |||
5408 | 5449 | | |
5409 | 5450 | | |
5410 | 5451 | | |
| 5452 | + | |
| 5453 | + | |
| 5454 | + | |
| 5455 | + | |
| 5456 | + | |
5411 | 5457 | | |
5412 | 5458 | | |
5413 | 5459 | | |
| |||
0 commit comments