dart-sdk/runtime
Tess Strickland 727eaf1a0f [vm/compiler] Fix type propagation for Redefinitions.
In addition to the underlying type (stored as either a cid or an
AbstractType), CompileTypes also store two flags: whether a value of the
type can be null and whether it can be a sentinel.

When constraining the type of a definition via a RedefinitionInstr, the
resulting type should be nullable only if both the original and
constrained type are. Similarly, the resulting type should only allow
the sentinel value if both the original and constrained type do.

When the underlying type is represented by a cid, this was already
the case. When it is represented by an AbstractType, only nullability
was appropriately handled. This CL fixes it so that the possibility of
being a sentinel is also handled correctly in the latter case.

TEST=vm/cc/TypePropagator_RedefineCanBeSentinelWithCannotBe

Bug: https://github.com/dart-lang/sdk/issues/47739
Change-Id: I9d51b1c14ff385d522309f9c984a25dc6bdfbbf4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220767
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-11-19 16:35:27 +00:00
..
bin [vm] Elaborate on DartDev missing error. 2021-11-18 06:56:57 +00:00
docs [vm/infra] Improve IL testing framework 2021-11-16 12:39:11 +00:00
include [vm] runtime/include fix documentation 2021-11-19 09:43:38 +00:00
lib [vm/isolates] Ensure spawnUri'ed isolates keep their own origin_id. 2021-11-13 02:36:52 +00:00
observatory [ VM / Service ] Stream light-weight version of CpuSamples for CPU 2021-11-18 19:45:26 +00:00
observatory_2 [ VM / Service ] Stream light-weight version of CpuSamples for CPU 2021-11-18 19:45:26 +00:00
platform [vm, gc] Include starting concurrent marking in --verbose_gc output. 2021-10-28 18:20:18 +00:00
tests [vm/compiler] Fix generation of Smi immediates when using compressed pointers 2021-11-18 17:12:18 +00:00
third_party [tools] Update all iteritems -> items 2021-05-20 11:36:52 +00:00
tools Stop using getResolvedLibrary2 in dartfuzz. 2021-10-30 01:22:31 +00:00
vm [vm/compiler] Fix type propagation for Redefinitions. 2021-11-19 16:35:27 +00:00
.clang-tidy
.gitignore
BUILD.gn Allow deprecated copy on fuchsia 2021-08-11 01:14:22 +00:00
codereview.settings
configs.gni
CPPLINT.cfg
PRESUBMIT.py [python3] Migrate PRESUBMIT.py files 2021-08-16 08:29:54 +00:00
runtime_args.gni [wasm] Remove deprecated dart_enable_wasm flag. 2021-04-01 22:45:07 +00:00