Index: src/compiler/typer.cc |
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
index 2f5ee5db1557ab5945c793faba3394a74a0084cb..c6d1516339e9cbbf44dd8d945bd008c0fe293d2b 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.is_null()) { |
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 |
} |