Chromium Code Reviews| Index: src/hydrogen-instructions.cc |
| diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
| index a35134952da753ee932fd104ee680e06f5173d2f..1c6f76f3b157313e3a8490494b14a0c92926498a 100644 |
| --- a/src/hydrogen-instructions.cc |
| +++ b/src/hydrogen-instructions.cc |
| @@ -1566,10 +1566,11 @@ void HCheckValue::PrintDataTo(StringStream* stream) { |
| HValue* HCheckValue::Canonicalize() { |
| - return (value()->IsConstant() && |
| - HConstant::cast(value())->GetUnique() == object_) |
| - ? NULL |
| - : this; |
| + if (value()->IsConstant()) { |
| + Unique<Object> unique = HConstant::cast(value())->GetUnique(); |
|
titzer
2014/03/03 12:42:38
Can you move this logic into a method on HConstant
|
| + if (unique.IsInitialized() && unique == object_) return NULL; |
| + } |
| + return this; |
| } |