Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index d40c37b0685ed649d6af811fd92c65b00b12645c..1d437e7b4609fb2a581e53058c12b69ce92bc2b0 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -9924,9 +9924,11 @@ void HOptimizedGraphBuilder::BuildEmitInObjectProperties( |
Add<HStoreNamedField>(double_box, HObjectAccess::ForHeapNumberValue(), |
Add<HConstant>(value)); |
value_instruction = double_box; |
- } else if (representation.IsSmi() && value->IsUninitialized()) { |
- value_instruction = graph()->GetConstant0(); |
- // Ensure that Constant0 is stored as smi. |
+ } else if (representation.IsSmi()) { |
+ value_instruction = value->IsUninitialized() |
+ ? graph()->GetConstant0() |
+ : Add<HConstant>(value); |
+ // Ensure that value is stored as smi. |
access = access.WithRepresentation(representation); |
} else { |
value_instruction = Add<HConstant>(value); |