Index: src/compiler/typer.cc |
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
index 20a39d94493ff1eed1463e1a142d7cd037c90655..97b43f4aefb989ac69e732a14c3fa77b954920a9 100644 |
--- a/src/compiler/typer.cc |
+++ b/src/compiler/typer.cc |
@@ -1119,9 +1119,10 @@ Bounds Typer::Visitor::TypeJSLoadNamed(Node* node) { |
// in the graph. In the current implementation, we are |
// increasing the limits to the closest power of two. |
Type* Typer::Visitor::Weaken(Type* current_type, Type* previous_type) { |
- Type::RangeType* previous = previous_type->GetRange(); |
- Type::RangeType* current = current_type->GetRange(); |
- if (previous != NULL && current != NULL) { |
+ if (current_type->IsRange() && previous_type->IsRange()) { |
+ Type::RangeType* previous = previous_type->AsRange(); |
+ Type::RangeType* current = current_type->AsRange(); |
+ |
double current_min = current->Min()->Number(); |
Handle<Object> new_min = current->Min(); |
@@ -1151,9 +1152,7 @@ Type* Typer::Visitor::Weaken(Type* current_type, Type* previous_type) { |
} |
} |
- return Type::Union(current_type, |
- Type::Range(new_min, new_max, typer_->zone()), |
- typer_->zone()); |
+ return Type::Range(new_min, new_max, typer_->zone()); |
} |
return current_type; |
} |