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

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

Issue 1366753003: [turbofan] Make Node::set_op safer via wrapper. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 5 years, 3 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
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/osr.cc » ('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 19ca5dd1b655c8bf727799fb4c7d75b46161f61f..80031eb2dcb32a163e3fb501e7e2fa7c2b64fb45 100644
--- a/src/compiler/node-properties.cc
+++ b/src/compiler/node-properties.cc
@@ -196,6 +196,13 @@ void NodeProperties::ReplaceUses(Node* node, Node* value, Node* effect,
// static
+void NodeProperties::ChangeOp(Node* node, const Operator* new_op) {
+ DCHECK_EQ(OperatorProperties::GetTotalInputCount(new_op), node->InputCount());
+ node->set_op(new_op);
+}
+
+
+// static
Node* NodeProperties::FindProjection(Node* node, size_t projection_index) {
for (auto use : node->uses()) {
if (use->opcode() == IrOpcode::kProjection &&
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698