Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/node-properties.cc')
-rw-r--r--deps/v8/src/compiler/node-properties.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/node-properties.cc b/deps/v8/src/compiler/node-properties.cc
index ab4ced69ab6..3b78872437c 100644
--- a/deps/v8/src/compiler/node-properties.cc
+++ b/deps/v8/src/compiler/node-properties.cc
@@ -158,6 +158,21 @@ void NodeProperties::MergeControlToEnd(Graph* graph,
graph->end()->set_op(common->End(graph->end()->InputCount()));
}
+void NodeProperties::RemoveControlFromEnd(Graph* graph,
+ CommonOperatorBuilder* common,
+ Node* node) {
+ int index_to_remove = -1;
+ for (int i = 0; i < graph->end()->op()->ControlInputCount(); i++) {
+ int index = NodeProperties::FirstControlIndex(graph->end()) + i;
+ if (graph->end()->InputAt(index) == node) {
+ index_to_remove = index;
+ break;
+ }
+ }
+ CHECK_NE(-1, index_to_remove);
+ graph->end()->RemoveInput(index_to_remove);
+ graph->end()->set_op(common->End(graph->end()->InputCount()));
+}
// static
void NodeProperties::ReplaceUses(Node* node, Node* value, Node* effect,