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

Unified Diff: src/compiler/node.h

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/machine-operator-reducer.cc ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.h
diff --git a/src/compiler/node.h b/src/compiler/node.h
index bd129653bc3397510a53169c0ce48ae9ef411004..d6a9b39a56419b4682f1234234b9211e60563418 100644
--- a/src/compiler/node.h
+++ b/src/compiler/node.h
@@ -49,7 +49,6 @@ class Node final {
void Kill();
const Operator* op() const { return op_; }
- void set_op(const Operator* op) { op_ = op; }
IrOpcode::Value opcode() const {
DCHECK(op_->opcode() <= IrOpcode::kLast);
@@ -284,6 +283,9 @@ class Node final {
void* operator new(size_t, void* location) { return location; }
+ // Only NodeProperties should manipulate the op.
+ void set_op(const Operator* op) { op_ = op; }
+
// Only NodeProperties should manipulate the type.
Type* type() const { return type_; }
void set_type(Type* type) { type_ = type; }
« no previous file with comments | « src/compiler/machine-operator-reducer.cc ('k') | src/compiler/node-properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698