This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit 506ac7f
Rework linker type inference using ExprBuilder.
This CL changes the way linker type inference works. Instead of
walking the operations in an UnlinkedExpr in order and inferring types
directly, it first builds an AST for the expression using ExprBuilder,
then uses ResolverVisitor to resolve the AST and perform type
inference.
This helps ensure that summary type inference and ordinary AST-based
type inference produce the same result, since they now use the same
core algorithm. In particular, this means that summary type inference
now does downwards inference properly.
Since the ResolverVisitor makes greater use of the element model than
the rest of the linker, this required implementing additional methods
in the linker's element model.
This CL includes some minor fixes to ExprBuilder that were uncovered
during testing. It also contains some minor changes to
ResolverVisitor to make it work during linking.
Fixes #32525.
Fixes #32394.
Change-Id: I5ec9b2bf5565ad30b8cc856475334323dc118da8
Reviewed-on: https://dart-review.googlesource.com/48741
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>1 parent 494b861 commit 506ac7f
File tree
9 files changed
+683
-896
lines changed- pkg
- analysis_server/test/services/correction
- analyzer
- lib/src
- generated
- summary
- test
- generated
- src/summary
- tests/language_2
9 files changed
+683
-896
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7043 | 7043 | | |
7044 | 7044 | | |
7045 | 7045 | | |
| 7046 | + | |
7046 | 7047 | | |
7047 | | - | |
| 7048 | + | |
7048 | 7049 | | |
7049 | 7050 | | |
7050 | 7051 | | |
7051 | 7052 | | |
7052 | 7053 | | |
7053 | 7054 | | |
7054 | | - | |
| 7055 | + | |
7055 | 7056 | | |
7056 | 7057 | | |
7057 | 7058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4999 | 4999 | | |
5000 | 5000 | | |
5001 | 5001 | | |
5002 | | - | |
| 5002 | + | |
| 5003 | + | |
5003 | 5004 | | |
5004 | 5005 | | |
5005 | 5006 | | |
| |||
5723 | 5724 | | |
5724 | 5725 | | |
5725 | 5726 | | |
5726 | | - | |
| 5727 | + | |
| 5728 | + | |
5727 | 5729 | | |
5728 | 5730 | | |
5729 | 5731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
| |||
570 | 569 | | |
571 | 570 | | |
572 | 571 | | |
| 572 | + | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
580 | 583 | | |
581 | 584 | | |
582 | 585 | | |
| |||
0 commit comments