Commit 87b2f50
[flow analysis] Align _attachFinally with the specification.
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 <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent 3175e42 commit 87b2f50
2 files changed
+289
-194
lines changed
0 commit comments