Reviewers: Benedikt Meurer,

Description:
[turbofan] Remove obsolete 'incomplete' flag from GraphDecorator.

[email protected]

Please review this at https://codereview.chromium.org/1187263003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+8, -9 lines):
  M src/compiler/graph.h
  M src/compiler/graph.cc
  M src/compiler/source-position.cc
  M src/compiler/typer.cc


Index: src/compiler/graph.cc
diff --git a/src/compiler/graph.cc b/src/compiler/graph.cc
index 07bf2ba44eb7cdb068796d0ed179f628172c444c..327fb5853c0690997ffabc6383441338dd01b4b2 100644
--- a/src/compiler/graph.cc
+++ b/src/compiler/graph.cc
@@ -22,9 +22,9 @@ Graph::Graph(Zone* zone)
       decorators_(zone) {}


-void Graph::Decorate(Node* node, bool incomplete) {
+void Graph::Decorate(Node* node) {
   for (auto const decorator : decorators_) {
-    decorator->Decorate(node, incomplete);
+    decorator->Decorate(node);
   }
 }

@@ -46,7 +46,7 @@ Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs,
   DCHECK_LE(op->ValueInputCount(), input_count);
   Node* const node =
       Node::New(zone(), NextNodeId(), op, input_count, inputs, incomplete);
-  Decorate(node, incomplete);
+  Decorate(node);
   return node;
 }

Index: src/compiler/graph.h
diff --git a/src/compiler/graph.h b/src/compiler/graph.h
index 50da168493cd1e6d81bba350495bf492f51da5cb..44258feeb2453976dc69c4387dec10678bedee8a 100644
--- a/src/compiler/graph.h
+++ b/src/compiler/graph.h
@@ -92,7 +92,7 @@ class Graph : public ZoneObject {

   size_t NodeCount() const { return next_node_id_; }

-  void Decorate(Node* node, bool incomplete);
+  void Decorate(Node* node);
   void AddDecorator(GraphDecorator* decorator);
   void RemoveDecorator(GraphDecorator* decorator);

@@ -117,7 +117,7 @@ class Graph : public ZoneObject {
 class GraphDecorator : public ZoneObject {
  public:
   virtual ~GraphDecorator() {}
-  virtual void Decorate(Node* node, bool incomplete) = 0;
+  virtual void Decorate(Node* node) = 0;
 };

 }  // namespace compiler
Index: src/compiler/source-position.cc
diff --git a/src/compiler/source-position.cc b/src/compiler/source-position.cc index 93f89e03bc0c20c541b8537302fd387ac57904e5..48361ecac771d92a2899fae83dcc014b02002424 100644
--- a/src/compiler/source-position.cc
+++ b/src/compiler/source-position.cc
@@ -15,7 +15,7 @@ class SourcePositionTable::Decorator final : public GraphDecorator {
   explicit Decorator(SourcePositionTable* source_positions)
       : source_positions_(source_positions) {}

-  void Decorate(Node* node, bool incomplete) final {
+  void Decorate(Node* node) final {
source_positions_->table_.Set(node, source_positions_->current_position_);
   }

Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index f7b3a1dc3315899d9f66870307738466ec717ec3..e7f301ecc852e5bd572807ea645cfc7425d32811 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -157,7 +157,7 @@ class LazyTypeCache final : public ZoneObject {
 class Typer::Decorator final : public GraphDecorator {
  public:
   explicit Decorator(Typer* typer) : typer_(typer) {}
-  void Decorate(Node* node, bool incomplete) final;
+  void Decorate(Node* node) final;

  private:
   Typer* typer_;
@@ -458,8 +458,7 @@ void Typer::Run() {
 }


-void Typer::Decorator::Decorate(Node* node, bool incomplete) {
-  if (incomplete) return;
+void Typer::Decorator::Decorate(Node* node) {
   if (node->op()->ValueOutputCount() > 0) {
     // Only eagerly type-decorate nodes with known input types.
// Other cases will generally require a proper fixpoint iteration with Run.


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to