Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 4936a16ca30c1f4bb74acff37a0b6bf2c90dc2b5..cca95b9b5f233198a59486586132dcf3c6d94606 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -2526,11 +2526,9 @@ void HConstant::Initialize(Representation r) { |
bool HConstant::EmitAtUses() { |
ASSERT(IsLinked()); |
- if (block()->graph()->has_osr() && |
- block()->graph()->IsStandardConstant(this)) { |
- return true; |
+ if (block()->graph()->has_osr()) { |
+ return block()->graph()->IsStandardConstant(this); |
} |
- if (UseCount() == 0) return true; |
if (IsCell()) return false; |
if (representation().IsDouble()) return false; |
return true; |
@@ -2575,6 +2573,10 @@ Maybe<HConstant*> HConstant::CopyToTruncatedInt32(Zone* zone) { |
Representation::Integer32(), |
is_not_in_new_space_, |
handle_); |
+ } else { |
+ ASSERT(!HasNumberValue()); |
+ Maybe<HConstant*> number = CopyToTruncatedNumber(zone); |
+ if (number.has_value) return number.value->CopyToTruncatedInt32(zone); |
} |
return Maybe<HConstant*>(res != NULL, res); |
} |