@@ -661,6 +661,14 @@ CompileType CompileType::Int() {
661661 return FromAbstractType (Type::ZoneHandle (Type::IntType ()), kNonNullable );
662662}
663663
664+ CompileType CompileType::Int32 () {
665+ #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64)
666+ return FromCid (kSmiCid );
667+ #else
668+ return Int ();
669+ #endif
670+ }
671+
664672CompileType CompileType::NullableInt () {
665673 return FromAbstractType (Type::ZoneHandle (Type::IntType ()), kNullable );
666674}
@@ -1431,6 +1439,22 @@ CompileType LoadCodeUnitsInstr::ComputeType() const {
14311439 }
14321440}
14331441
1442+ CompileType BinaryUint32OpInstr::ComputeType () const {
1443+ return CompileType::Int32 ();
1444+ }
1445+
1446+ CompileType ShiftUint32OpInstr::ComputeType () const {
1447+ return CompileType::Int32 ();
1448+ }
1449+
1450+ CompileType SpeculativeShiftUint32OpInstr::ComputeType () const {
1451+ return CompileType::Int32 ();
1452+ }
1453+
1454+ CompileType UnaryUint32OpInstr::ComputeType () const {
1455+ return CompileType::Int32 ();
1456+ }
1457+
14341458CompileType BinaryInt32OpInstr::ComputeType () const {
14351459 // TODO(vegorov): range analysis information shall be used here.
14361460 return CompileType::Int ();
@@ -1672,9 +1696,8 @@ CompileType LoadIndexedInstr::ComputeType() const {
16721696
16731697 case kTypedDataInt32ArrayCid :
16741698 case kTypedDataUint32ArrayCid :
1675- #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM64)
1676- return CompileType::FromCid (kSmiCid );
1677- #endif
1699+ return CompileType::Int32 ();
1700+
16781701 case kTypedDataInt64ArrayCid :
16791702 case kTypedDataUint64ArrayCid :
16801703 return CompileType::Int ();
0 commit comments