| Index: src/hydrogen-instructions.h
|
| diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
|
| index 815a6c69f5d7ff66adb2384c66695f76d4bbef19..8a80f79f171588570793298ab2311d6051df8e76 100644
|
| --- a/src/hydrogen-instructions.h
|
| +++ b/src/hydrogen-instructions.h
|
| @@ -802,6 +802,8 @@ class HValue: public ZoneObject {
|
|
|
| // Returns true if the flag specified is set for all uses, false otherwise.
|
| bool CheckUsesForFlag(Flag f);
|
| + // Same as before and the first one without the flag is returned in value.
|
| + bool CheckUsesForFlag(Flag f, HValue** value);
|
| // Returns true if the flag specified is set for all uses, and this set
|
| // of uses is non-empty.
|
| bool HasAtLeastOneUseWithFlagAndNoneWithout(Flag f);
|
| @@ -1530,7 +1532,10 @@ class HChange: public HUnaryOperation {
|
| set_representation(to);
|
| SetFlag(kUseGVN);
|
| if (allow_undefined_as_nan) SetFlag(kAllowUndefinedAsNaN);
|
| - if (is_truncating_to_smi) SetFlag(kTruncatingToSmi);
|
| + if (is_truncating_to_smi) {
|
| + SetFlag(kTruncatingToSmi);
|
| + SetFlag(kTruncatingToInt32);
|
| + }
|
| if (is_truncating_to_int32) SetFlag(kTruncatingToInt32);
|
| if (value->representation().IsSmi() || value->type().IsSmi()) {
|
| set_type(HType::Smi());
|
| @@ -4434,7 +4439,6 @@ class HMul: public HArithmeticBinaryOperation {
|
| virtual void UpdateRepresentation(Representation new_rep,
|
| HInferRepresentationPhase* h_infer,
|
| const char* reason) {
|
| - if (new_rep.IsSmi()) new_rep = Representation::Integer32();
|
| HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason);
|
| }
|
|
|
| @@ -4646,6 +4650,7 @@ class HBitwise: public HBitwiseBinaryOperation {
|
| right->representation().IsSmi() &&
|
| HConstant::cast(right)->Integer32Value() >= 0))) {
|
| SetFlag(kTruncatingToSmi);
|
| + SetFlag(kTruncatingToInt32);
|
| // BIT_OR with a smi-range negative value will always set the entire
|
| // sign-extension of the smi-sign.
|
| } else if (op == Token::BIT_OR &&
|
| @@ -4656,6 +4661,7 @@ class HBitwise: public HBitwiseBinaryOperation {
|
| right->representation().IsSmi() &&
|
| HConstant::cast(right)->Integer32Value() < 0))) {
|
| SetFlag(kTruncatingToSmi);
|
| + SetFlag(kTruncatingToInt32);
|
| }
|
| }
|
|
|
|
|