Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index ce76fbecac93a909854dfe53c8604e52a170f06e..1589066374be9d7f5337bd3200462b7aef2c291a 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -2834,6 +2834,10 @@ void HConstant::Initialize(Representation r) { |
// could cause heap object checks not to get emitted. |
object_ = Unique<Object>(Handle<Object>::null()); |
} |
+ if (r.IsSmiOrInteger32()) { |
+ // If it's not a heap object, it can't be in new space. |
+ bit_field_ = IsNotInNewSpaceField::update(bit_field_, true); |
+ } |
set_representation(r); |
SetFlag(kUseGVN); |
} |