0245a4f9aa
The changes the way uniqueness of expressions used to compute cacheable values is modeled. Instead of using the receiver type to determine when matching expressions can be reused, an AccessKey, that includes both the receiver type (through promotions) and dependencies, is used. Closes #51260 Change-Id: I153769beb654e10a9ac2d0a8bd12c60bb2bd3fe0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282026 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
13 lines
340 B
Dart
13 lines
340 B
Dart
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
foo(dynamic x) {
|
|
switch (x) {
|
|
case [int a]:
|
|
case {'a': int a}:
|
|
return a;
|
|
default:
|
|
return 0;
|
|
}
|
|
} |