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

Unified Diff: src/compiler/node-properties.cc

Issue 1466643002: [turbofan] Initial support for Array constructor specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Michi's comments. Created 5 years, 1 month 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
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node-properties.cc
diff --git a/src/compiler/node-properties.cc b/src/compiler/node-properties.cc
index 2719749546f8c5cd43eb02dcb25e06d83336e4ee..cb6c3c43d83c694bc9eebadeb5b893ff53ef2a91 100644
--- a/src/compiler/node-properties.cc
+++ b/src/compiler/node-properties.cc
@@ -139,6 +139,17 @@ void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) {
// static
+void NodeProperties::ReplaceValueInputs(Node* node, Node* value) {
+ int value_input_count = node->op()->ValueInputCount();
+ DCHECK_LE(1, value_input_count);
+ node->ReplaceInput(0, value);
+ while (--value_input_count > 0) {
+ node->RemoveInput(value_input_count);
+ }
+}
+
+
+// static
void NodeProperties::ReplaceContextInput(Node* node, Node* context) {
node->ReplaceInput(FirstContextIndex(node), context);
}
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698