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

Unified Diff: src/compiler/typer.cc

Issue 701473002: Make generic algorithm less generic. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Jaro. Created 6 years, 1 month 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 | « src/compiler/typer.h ('k') | src/compiler/verifier.cc » ('j') | 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 6b32258d111bdc277bce729b4b6324487654e051..a721862d77dd83d6420bd4ea71dd0cb2da0564e3 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -251,44 +251,19 @@ class Typer::RunVisitor : public Typer::Visitor {
: Visitor(typer),
redo(NodeSet::key_compare(), NodeSet::allocator_type(typer->zone())) {}
- GenericGraphVisit::Control Post(Node* node) {
+ void Post(Node* node) {
if (node->op()->ValueOutputCount() > 0) {
Bounds bounds = TypeNode(node);
NodeProperties::SetBounds(node, bounds);
// Remember incompletely typed nodes for least fixpoint iteration.
if (!NodeProperties::AllValueInputsAreTyped(node)) redo.insert(node);
}
- return GenericGraphVisit::CONTINUE;
}
NodeSet redo;
};
-class Typer::NarrowVisitor : public Typer::Visitor {
- public:
- explicit NarrowVisitor(Typer* typer) : Visitor(typer) {}
-
- GenericGraphVisit::Control Pre(Node* node) {
- if (node->op()->ValueOutputCount() > 0) {
- Bounds previous = NodeProperties::GetBounds(node);
- Bounds current = TypeNode(node);
- NodeProperties::SetBounds(node, Bounds::Both(current, previous, zone()));
- DCHECK(current.Narrows(previous));
- // Stop when nothing changed (but allow re-entry in case it does later).
- return previous.Narrows(current) ? GenericGraphVisit::DEFER
- : GenericGraphVisit::REENTER;
- } else {
- return GenericGraphVisit::SKIP;
- }
- }
-
- GenericGraphVisit::Control Post(Node* node) {
- return GenericGraphVisit::REENTER;
- }
-};
-
-
class Typer::WidenVisitor : public Typer::Visitor {
public:
explicit WidenVisitor(Typer* typer)
@@ -361,12 +336,6 @@ void Typer::Run() {
}
-void Typer::Narrow(Node* start) {
- NarrowVisitor typing(this);
- graph_->VisitNodeUsesFrom(start, &typing);
-}
-
-
void Typer::Decorator::Decorate(Node* node) {
if (node->op()->ValueOutputCount() > 0) {
// Only eagerly type-decorate nodes with known input types.
« no previous file with comments | « src/compiler/typer.h ('k') | src/compiler/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698