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

Side by Side Diff: src/compiler/node.h

Issue 1114163005: [turbofan] Fix tail call optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_NODE_H_ 5 #ifndef V8_COMPILER_NODE_H_
6 #define V8_COMPILER_NODE_H_ 6 #define V8_COMPILER_NODE_H_
7 7
8 #include "src/compiler/opcodes.h" 8 #include "src/compiler/opcodes.h"
9 #include "src/compiler/operator.h" 9 #include "src/compiler/operator.h"
10 #include "src/types-inl.h" 10 #include "src/types-inl.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 Node* node_; 139 Node* node_;
140 }; 140 };
141 141
142 Uses uses() { return Uses(this); } 142 Uses uses() { return Uses(this); }
143 143
144 // Returns true if {owner} is the user of {this} node. 144 // Returns true if {owner} is the user of {this} node.
145 bool OwnedBy(Node* owner) const { 145 bool OwnedBy(Node* owner) const {
146 return first_use_ && first_use_->from == owner && !first_use_->next; 146 return first_use_ && first_use_->from == owner && !first_use_->next;
147 } 147 }
148 148
149 // Returns true if {owner1} and {owner2} are the only users of {this} node.
150 bool OwnedBy(Node const* owner1, Node const* owner2) const;
151
149 private: 152 private:
150 struct Use final : public ZoneObject { 153 struct Use final : public ZoneObject {
151 Node* from; 154 Node* from;
152 Use* next; 155 Use* next;
153 Use* prev; 156 Use* prev;
154 int input_index; 157 int input_index;
155 }; 158 };
156 159
157 class Input final { 160 class Input final {
158 public: 161 public:
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 479
477 void Node::ReplaceInput(int index, Node* new_to) { 480 void Node::ReplaceInput(int index, Node* new_to) {
478 GetInputRecordPtr(index)->Update(new_to); 481 GetInputRecordPtr(index)->Update(new_to);
479 } 482 }
480 483
481 } // namespace compiler 484 } // namespace compiler
482 } // namespace internal 485 } // namespace internal
483 } // namespace v8 486 } // namespace v8
484 487
485 #endif // V8_COMPILER_NODE_H_ 488 #endif // V8_COMPILER_NODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698