mirror of
https://github.com/dart-lang/sdk
synced 2024-10-01 19:29:09 +00:00
[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:
parent
48e9366923
commit
a85f6ff348
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue