[vm/compiler] Do not create intersection types in type propagation.

AssertAssignable::ComputeType used to compute an intersection type
between cid available in the type of the value and abstract destination
type. This lead to creation of confusing impossible types like
{cid: kDoubleCid, type: int} and lead to problems in subsequent optimization
passes.

Fixes https://github.com/flutter/flutter/issues/35613

Change-Id: I9662c2dd0deaabbbb73ddde30cc4ee32235bad67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108276
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
Vyacheslav Egorov 2019-07-08 16:41:47 +00:00 committed by commit-bot@chromium.org
parent 48e9366923
commit a85f6ff348

View file

@ -1112,7 +1112,7 @@ CompileType AssertAssignableInstr::ComputeType() const {
return *value_type;
}
return CompileType::Create(value_type->ToCid(), dst_type());
return CompileType::FromAbstractType(dst_type(), value_type->is_nullable());
}
bool AssertAssignableInstr::RecomputeType() {