9be13288b0
When lowering patterns, front-end can add multiple distinct local variables with the same name into the same local scope. Previously, VM identified local variables in a local scope by name. However, this no longer works with patterns. With this change, local variables are now identified by pair (name, kernel offset). Name is still taken into account as compiler can add extra variables which do not correspond to kernel variables, such as 'this'. TEST=runtime/tests/vm/dart/regress_51091_test.dart Fixes https://github.com/dart-lang/sdk/issues/51091 Issue https://github.com/dart-lang/sdk/issues/49755 Change-Id: I0263769cb31f3f8d9652f5d6534800510ac882fb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279650 Reviewed-by: Slava Egorov <vegorov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com>