Skip to content

Commit a85f6ff

Browse files
mralephcommit-bot@chromium.org
authored andcommitted
[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 flutter/flutter#35613 Change-Id: I9662c2dd0deaabbbb73ddde30cc4ee32235bad67 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108276 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Vyacheslav Egorov <[email protected]>
1 parent 48e9366 commit a85f6ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/vm/compiler/backend/type_propagator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ CompileType AssertAssignableInstr::ComputeType() const {
11121112
return *value_type;
11131113
}
11141114

1115-
return CompileType::Create(value_type->ToCid(), dst_type());
1115+
return CompileType::FromAbstractType(dst_type(), value_type->is_nullable());
11161116
}
11171117

11181118
bool AssertAssignableInstr::RecomputeType() {

0 commit comments

Comments
 (0)