Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 6875f99bd7e5a765388f70b20b55a9567c8fae6d..7ec65df28ddcf9d3d6866473dbfb5226f0359475 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -7679,26 +7679,6 @@ HValue* HGraphBuilder::TruncateToNumber(HValue* value, Handle<Type>* expected) { |
*expected = handle(Type::Number(), isolate()); |
return AddInstruction(number.value); |
} |
- return value; |
- } |
- |
- Handle<Type> expected_type = *expected; |
- Representation rep = Representation::FromType(expected_type); |
- if (!rep.IsTagged()) return value; |
- |
- // If our type feedback suggests that we can non-observably truncate to number |
- // we introduce the appropriate check here. This avoids 'value' having a |
- // tagged representation later on. |
- if (expected_type->Is(Type::Oddball())) { |
- // TODO(olivf) The BinaryOpStub only records undefined. It might pay off to |
- // also record booleans and convert them to 0/1 here. |
- IfBuilder if_nan(this); |
- if_nan.If<HCompareObjectEqAndBranch>(value, |
- graph()->GetConstantUndefined()); |
- if_nan.Then(); |
- if_nan.ElseDeopt(); |
- if_nan.End(); |
- return Add<HConstant>(OS::nan_value()); |
} |
return value; |