Files
sdk/pkg/front_end/test
Paul Berry 1110192d62 Flow analysis: refactor pattern variable initialization logic.
In order to handle variable patterns inside logical-or patterns, flow
analysis will need to model the implicit temporary variables that
represent the variables before they are joined to form the final
variable value.  This CL adds the necessary logic to model this:

- `declaredVariablePattern` is now responsible for initializing the
  temporary variable (the client no longer needs to call `initialize`
  when analyzing a variable pattern).  It returns an integer
  representing the implicit temporary variable.

- A new API call, `assignMatchedPatternVariable` can be used by the
  client to transfer the variable from the implicit temporary variable
  to a user-accessible variable.  For now, the shared analysis logic
  always calls this from `analyzeDeclaredVariablePattern`, after
  calling `declaredVariablePattern`.  However, in the future, it will
  postpone the call until after these temporary variables are
  implicitly joined by logical-or patterns.

Bug: https://github.com/dart-lang/sdk/issues/50419
Change-Id: I2b78a46c11d0d46c8e0a8691c2a2ce49dceb2a24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279078
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-01-19 19:49:24 +00:00
..
2022-10-20 10:50:25 +00:00
2023-01-18 22:12:27 +00:00
2022-12-02 15:18:27 +00:00
2023-01-18 22:12:27 +00:00
2022-06-28 16:02:53 +00:00