87b2f50c5c
This change refactors the `_attachFinally` method in `_FlowAnalysisImpl` to better align with the flow analysis specification. Notable changes include: - Moving `attachFinally` to the `FlowAnalysisImpl` class rather than implicitly passing the `afterTry` model as `this`. This makes the arguments to `attachFinally` match those in the spec. - Extracting the handling of a single variable to a separate function, `attachFinallyV`, to align with the spec. - Renaming local variables to match variable names in the spec. - Adding comments that refer to specific spec language. - Adding parenthetical "OPTIMIZATION:" comments to document differences between the implementation and spec that are for the purpose of efficiency and don't affect behavior. - Adding parenthetical "UNSPECIFIED:" comments to documented differences between the implementaiton and spec that reflect flow analysis features that haven't been documented yet. - Adding comments that directly reference the `attachFinally` and `attachFinallyV` sections of the specification. - Reordering logic to more closely follow the structure of the specification. This is a pure refactoring and does not change the behavior of flow analysis. Change-Id: I6a6a6964bd76b87102facf4251b195e5604c7c32 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/445780 Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
FE/analyzer shared code
This package contains logic that is shared between the front_end and analyzer packages. It is intended solely to facilitate development of the Dart SDK, and is not intended for use by end users. In particular, this package has no public API, so no guarantee is made of compatibility between one version of the package and the next.
End users should consider using the analyzer package to analyze Dart source code.