Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: src/compiler/typer.cc

Issue 549133002: Fix lower bound in JSLoadContext typer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Andreas Rossberg. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698