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

Unified Diff: src/compiler/node.cc

Issue 1114163005: [turbofan] Fix tail call optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index 1a9c326f20be0f37fd5aa36ba049f5bf8133cc51..724c9f173ec55bff234a8de7db7eddcfd06b7c75 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -138,6 +138,21 @@ void Node::ReplaceUses(Node* that) {
}
+bool Node::OwnedBy(Node const* owner1, Node const* owner2) const {
+ unsigned mask = 0;
+ for (Use* use = first_use_; use; use = use->next) {
+ if (use->from == owner1) {
+ mask |= 1;
+ } else if (use->from == owner2) {
+ mask |= 2;
+ } else {
+ return false;
+ }
+ }
+ return mask == 3;
+}
+
+
void Node::Input::Update(Node* new_to) {
Node* old_to = this->to;
if (new_to == old_to) return; // Nothing to do.

Powered by Google App Engine
This is Rietveld 408576698