Home | History | Annotate | Download | only in compiler

Lines Matching refs:Node

5 #include "src/compiler/node.h"
11 Node::OutOfLineInputs* Node::OutOfLineInputs::New(Zone* zone, int capacity) {
13 sizeof(OutOfLineInputs) + capacity * (sizeof(Node*) + sizeof(Use));
15 Node::OutOfLineInputs* outline =
23 void Node::OutOfLineInputs::ExtractFrom(Use* old_use_ptr, Node** old_input_ptr,
28 Node** new_input_ptr = inputs_;
34 Node* old_to = *old_input_ptr;
52 Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
53 Node* const* inputs, bool has_extensible_inputs) {
54 Node** input_ptr;
56 Node* node;
63 FATAL("Node::New() Error: #%d:%s[%d] is nullptr", static_cast<int>(id),
75 // Allocate node.
76 void* node_buffer = zone->New(sizeof(Node));
77 node = new (node_buffer) Node(id, op, kOutlineMarker, 0);
78 node->inputs_.outline_ = outline;
80 outline->node_ = node;
87 // Allocate node with inline inputs.
94 size_t size = sizeof(Node) + capacity * (sizeof(Node*) + sizeof(Use));
99 node = new (node_buffer) Node(id, op, input_count, capacity);
100 input_ptr = node->inputs_.inline_;
101 use_ptr = reinterpret_cast<Use*>(node);
107 Node* to = *inputs++;
114 node->Verify();
115 return node;
119 Node* Node::Clone(Zone* zone, NodeId id, const Node* node) {
120 int const input_count = node->InputCount();
121 Node* const* const inputs = node->has_inline_inputs()
122 ? node->inputs_.inline_
123 : node->inputs_.outline_->inputs_;
124 Node* const clone = New(zone, id, node->op(), input_count, inputs, false);
125 clone->set_type(node->type());
130 void Node::Kill() {
137 void Node::AppendInput(Zone* zone, Node* new_to) {
184 void Node::InsertInput(Zone* zone, int index, Node* new_to) {
196 void Node::InsertInputs(Zone* zone, int index, int count) {
213 void Node::RemoveInput(int index) {
224 void Node::ClearInputs(int start, int count) {
225 Node** input_ptr = GetInputPtr(start);
229 Node* input = *input_ptr;
239 void Node::NullAllInputs() { ClearInputs(0, InputCount()); }
242 void Node::TrimInputCount(int new_input_count) {
255 int Node::UseCount() const {
264 void Node::ReplaceUses(Node* that) {
284 bool Node::OwnedBy(Node const* owner1, Node const* owner2) const {
287 Node* from = use->from();
299 void Node::Print() const {
302 for (Node* input : this->inputs()) {
307 std::ostream& operator<<(std::ostream& os, const Node& n) {
324 Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity)
336 void Node::AppendUse(Use* use) {
346 void Node::RemoveUse(Use* use) {
362 void Node::Verify() {
377 for (Node* input : this->inputs()) {
398 Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) {
405 Node::Inputs::const_iterator Node::Inputs::const_iterator::operator++(int n) {
412 Node::UseEdges::iterator Node::UseEdges::iterator::operator++(int n) {
419 bool Node::UseEdges::empty() const { return begin() == end(); }
422 Node::Uses::const_iterator Node::Uses::const_iterator::operator++(int n) {
429 bool Node::Uses::empty() const { return begin() == end(); }