| Index: runtime/vm/flow_graph_type_propagator.cc
|
| diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
|
| index 0501f6a944faa1ea535e2d1ad5a2cee2c6c317cb..78177fa458d0b54e0751ff6e1c9e6969c4e4103d 100644
|
| --- a/runtime/vm/flow_graph_type_propagator.cc
|
| +++ b/runtime/vm/flow_graph_type_propagator.cc
|
| @@ -1042,7 +1042,7 @@ CompileType ConstraintInstr::ComputeType() const {
|
| }
|
|
|
| // Note that MintOp may produce Smi-s as result of an
|
| -// appended BoxIntegerInstr node.
|
| +// appended BoxInt64Instr node.
|
| CompileType BinaryMintOpInstr::ComputeType() const {
|
| return CompileType::Int();
|
| }
|
| @@ -1059,29 +1059,11 @@ CompileType UnaryMintOpInstr::ComputeType() const {
|
|
|
|
|
| CompileType BoxIntegerInstr::ComputeType() const {
|
| - if (is_smi()) {
|
| - return CompileType::FromCid(kSmiCid);
|
| - }
|
| - return CompileType::Int();
|
| -}
|
| -
|
| -
|
| -bool BoxIntegerInstr::RecomputeType() {
|
| - return UpdateType(ComputeType());
|
| -}
|
| -
|
| -
|
| -CompileType BoxIntNInstr::ComputeType() const {
|
| return ValueFitsSmi() ? CompileType::FromCid(kSmiCid) : CompileType::Int();
|
| }
|
|
|
|
|
| -CompileType UnboxIntNInstr::ComputeType() const {
|
| - return CompileType::Int();
|
| -}
|
| -
|
| -
|
| -bool BoxIntNInstr::RecomputeType() {
|
| +bool BoxIntegerInstr::RecomputeType() {
|
| return UpdateType(ComputeType());
|
| }
|
|
|
| @@ -1288,43 +1270,48 @@ CompileType MathMinMaxInstr::ComputeType() const {
|
| }
|
|
|
|
|
| -CompileType UnboxDoubleInstr::ComputeType() const {
|
| - return CompileType::FromCid(kDoubleCid);
|
| -}
|
| +CompileType UnboxInstr::ComputeType() const {
|
| + switch (representation()) {
|
| + case kUnboxedDouble:
|
| + return CompileType::FromCid(kDoubleCid);
|
|
|
| + case kUnboxedFloat32x4:
|
| + return CompileType::FromCid(kFloat32x4Cid);
|
|
|
| -CompileType BoxDoubleInstr::ComputeType() const {
|
| - return CompileType::FromCid(kDoubleCid);
|
| -}
|
| -
|
| + case kUnboxedFloat64x2:
|
| + return CompileType::FromCid(kFloat64x2Cid);
|
|
|
| -CompileType UnboxFloat32x4Instr::ComputeType() const {
|
| - return CompileType::FromCid(kFloat32x4Cid);
|
| -}
|
| -
|
| -
|
| -CompileType BoxFloat32x4Instr::ComputeType() const {
|
| - return CompileType::FromCid(kFloat32x4Cid);
|
| -}
|
| + case kUnboxedInt32x4:
|
| + return CompileType::FromCid(kInt32x4Cid);
|
|
|
| + case kUnboxedMint:
|
| + return CompileType::Int();
|
|
|
| -CompileType UnboxFloat64x2Instr::ComputeType() const {
|
| - return CompileType::FromCid(kFloat64x2Cid);
|
| + default:
|
| + UNREACHABLE();
|
| + return CompileType::Dynamic();
|
| + }
|
| }
|
|
|
|
|
| -CompileType BoxFloat64x2Instr::ComputeType() const {
|
| - return CompileType::FromCid(kFloat64x2Cid);
|
| -}
|
| +CompileType BoxInstr::ComputeType() const {
|
| + switch (from_representation()) {
|
| + case kUnboxedDouble:
|
| + return CompileType::FromCid(kDoubleCid);
|
|
|
| + case kUnboxedFloat32x4:
|
| + return CompileType::FromCid(kFloat32x4Cid);
|
|
|
| -CompileType UnboxInt32x4Instr::ComputeType() const {
|
| - return CompileType::FromCid(kInt32x4Cid);
|
| -}
|
| + case kUnboxedFloat64x2:
|
| + return CompileType::FromCid(kFloat64x2Cid);
|
|
|
| + case kUnboxedInt32x4:
|
| + return CompileType::FromCid(kInt32x4Cid);
|
|
|
| -CompileType BoxInt32x4Instr::ComputeType() const {
|
| - return CompileType::FromCid(kInt32x4Cid);
|
| + default:
|
| + UNREACHABLE();
|
| + return CompileType::Dynamic();
|
| + }
|
| }
|
|
|
|
|
|
|