Remove deprecated NodeData class.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/768853002

Cr-Commit-Position: refs/heads/master@{#25575}
This commit is contained in:
mstarzinger 2014-11-28 10:38:31 -08:00 committed by Commit bot
parent 557bf53b79
commit a2564da19c
2 changed files with 32 additions and 32 deletions

View File

@ -11,8 +11,7 @@ namespace internal {
namespace compiler {
Node::Node(Graph* graph, int input_count, int reserve_input_count)
: NodeData(graph->zone()),
input_count_(input_count),
: input_count_(input_count),
reserve_input_count_(reserve_input_count),
has_appendable_inputs_(false),
use_count_(0),

View File

@ -30,34 +30,8 @@ class Graph;
// {NodeMarker} has a range of values that indicate states of a node.
typedef uint32_t Mark;
class NodeData {
public:
const Operator* op() const { return op_; }
void set_op(const Operator* op) { op_ = op; }
IrOpcode::Value opcode() const {
DCHECK(op_->opcode() <= IrOpcode::kLast);
return static_cast<IrOpcode::Value>(op_->opcode());
}
protected:
const Operator* op_;
Bounds bounds_;
Mark mark_;
explicit NodeData(Zone* zone) {}
friend class NodeProperties;
template <typename State>
friend class NodeMarker;
Bounds bounds() { return bounds_; }
void set_bounds(Bounds b) { bounds_ = b; }
// Only NodeMarkers should manipulate the marks on nodes.
Mark mark() { return mark_; }
void set_mark(Mark mark) { mark_ = mark; }
};
// NodeIds are identifying numbers for nodes that can be used to index auxiliary
// out-of-line data associated with each node.
typedef int NodeId;
// A Node is the basic primitive of graphs. Nodes are chained together by
@ -69,7 +43,7 @@ typedef int NodeId;
// compilation, e.g. during lowering passes. Other information that needs to be
// associated with Nodes during compilation must be stored out-of-line indexed
// by the Node's id.
class Node FINAL : public NodeData {
class Node FINAL {
public:
void Initialize(const Operator* op) {
set_op(op);
@ -82,7 +56,15 @@ class Node FINAL : public NodeData {
void CollectProjections(ZoneVector<Node*>* projections);
Node* FindProjection(size_t projection_index);
inline NodeId id() const { return id_; }
const Operator* op() const { return op_; }
void set_op(const Operator* op) { op_ = op; }
IrOpcode::Value opcode() const {
DCHECK(op_->opcode() <= IrOpcode::kLast);
return static_cast<IrOpcode::Value>(op_->opcode());
}
NodeId id() const { return id_; }
int InputCount() const { return input_count_; }
Node* InputAt(int index) const { return GetInputRecordPtr(index)->to; }
@ -182,10 +164,25 @@ class Node FINAL : public NodeData {
typedef ZoneDeque<Input> InputDeque;
friend class NodeProperties;
template <typename State>
friend class NodeMarker;
// Only NodeProperties should manipulate the bounds.
Bounds bounds() { return bounds_; }
void set_bounds(Bounds b) { bounds_ = b; }
// Only NodeMarkers should manipulate the marks on nodes.
Mark mark() { return mark_; }
void set_mark(Mark mark) { mark_ = mark; }
static const int kReservedInputCountBits = 2;
static const int kMaxReservedInputs = (1 << kReservedInputCountBits) - 1;
static const int kDefaultReservedInputs = kMaxReservedInputs;
const Operator* op_;
Bounds bounds_;
Mark mark_;
NodeId id_;
int input_count_ : 29;
unsigned int reserve_input_count_ : kReservedInputCountBits;
@ -205,6 +202,7 @@ class Node FINAL : public NodeData {
DISALLOW_COPY_AND_ASSIGN(Node);
};
// An encapsulation for information associated with a single use of node as a
// input from another node, allowing access to both the defining node and
// the ndoe having the input.
@ -227,6 +225,7 @@ class Node::Edge {
Node::Input* input_;
};
// A forward iterator to visit the nodes which are depended upon by a node
// in the order of input.
class Node::Inputs::iterator {
@ -266,6 +265,7 @@ class Node::Inputs::iterator {
int index_;
};
// A forward iterator to visit the uses of a node. The uses are returned in
// the order in which they were added as inputs.
class Node::Uses::iterator {
@ -309,6 +309,7 @@ class Node::Uses::iterator {
int index_;
};
std::ostream& operator<<(std::ostream& os, const Node& n);
typedef GenericGraphVisit::NullNodeVisitor NullNodeVisitor;