Commit Graph

5 Commits

Author SHA1 Message Date
Paul Berry 4b47910994 Change DependencyWalker.walk to avoid walking already-evaluated nodes.
Previously this was the responsibility of the client, but not all
clients of `DependencyWalker` were doing this, causing potentially
duplicate work in the analyzer.

Change-Id: Ice68b371a75c290fbd6b144fc927b48a5dd87620
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-29 20:34:49 +00:00
Paul Berry c2c1cdc153 Move DependencyWalker from analyzer into _fe_analyzer_shared.
For https://github.com/dart-lang/language/issues/731 (improved
inference for fold etc.), I want to re-use this logic as part of the
algorithm for computing the order in which to visit an invocation's
closure arguments.  That algorithm, in turn, will be shared between
the front end and the analyzer, so the DependencyWalker needs to move
into _fe_analyzer_shared first.

Change-Id: I953e027448cbd660dc30f92d1bdcce26a8d7bda3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238920
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-28 12:47:10 +00:00
Johnni Winther b4cd3a844b [dart2js] Use 'include' to share lib spec between dart2js and dart2js_server
This CL uses the recently added 'include' tag in libraries
specification to share common library definitions between targets
'dart2js' and 'dart2js_server' through the "private" target
'_dart2js_common'.

Change-Id: I12f85d0d71803c6adcb94e37385ba837f7cdc9ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224953
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-01-05 13:25:22 +00:00
Johnni Winther 4e283a7e08 [_fe_analyzer_shared] Support 'include' tag in libraries specification
This adds support for an 'include' tag in libraries specifications
that enable composite declarations. With this, we can avoid relying on
copied portions of (other) specifications.

Closes https://github.com/dart-lang/sdk/issues/47998

Change-Id: I694d5c006741e6625feb7cdd5898946cc6caee50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224952
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-01-05 08:13:23 +00:00
Sam Rawlins 228e1062ee Move front_end's libraries.json parser to _fe_analyzer_shared
Bug: https://github.com/dart-lang/sdk/issues/35081
Change-Id: Idd1c68a871ace37e45970e5452a59fd655445fd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-10-11 17:59:43 +00:00