Chromium Code Reviews| Index: src/compiler/typer.cc |
| diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
| index 2f5ee5db1557ab5945c793faba3394a74a0084cb..a006356e0ab5a19cd1fb8a6ee102f8ab4aa781f7 100644 |
| --- a/src/compiler/typer.cc |
| +++ b/src/compiler/typer.cc |
| @@ -485,8 +485,6 @@ Bounds Typer::Visitor::TypeJSInstanceOf(Node* node) { |
| // JS context operators. |
| Bounds Typer::Visitor::TypeJSLoadContext(Node* node) { |
| -// TODO(rossberg): Fix this once we actually use the lower bound anywhere. |
| -#if 0 |
| Bounds outer = OperandType(node, 0); |
| DCHECK(outer.upper->Maybe(Type::Internal())); |
| // TODO(rossberg): More precisely, instead of the above assertion, we should |
| @@ -509,7 +507,7 @@ Bounds Typer::Visitor::TypeJSLoadContext(Node* node) { |
| if (context_type->IsConstant()) { |
| context = Handle<Context>::cast(context_type->AsConstant()->Value()); |
| } |
| - } else { |
| + } else if (context_type->IsConstant()) { |
|
rossberg
2014/09/08 14:04:22
I think "if (!context.is_null())" would be more ad
Michael Starzinger
2014/09/08 14:28:50
Done.
|
| context = handle(context.ToHandleChecked()->previous(), isolate()); |
| } |
| } |
| @@ -521,9 +519,6 @@ Bounds Typer::Visitor::TypeJSLoadContext(Node* node) { |
| Type* lower = TypeConstant(value); |
| return Bounds(lower, Type::Any(zone())); |
| } |
| -#else |
| - return Bounds::Unbounded(zone()); |
| -#endif |
| } |