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

Side by Side Diff: src/compiler/simplified-operator-reducer.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, 2 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 unified diff | Download patch
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/tail-call-optimization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-operator-reducer.h" 5 #include "src/compiler/simplified-operator-reducer.h"
6 6
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/machine-operator.h" 8 #include "src/compiler/machine-operator.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 break; 93 break;
94 } 94 }
95 return NoChange(); 95 return NoChange();
96 } 96 }
97 97
98 98
99 Reduction SimplifiedOperatorReducer::Change(Node* node, const Operator* op, 99 Reduction SimplifiedOperatorReducer::Change(Node* node, const Operator* op,
100 Node* a) { 100 Node* a) {
101 DCHECK_EQ(node->InputCount(), OperatorProperties::GetTotalInputCount(op)); 101 DCHECK_EQ(node->InputCount(), OperatorProperties::GetTotalInputCount(op));
102 DCHECK_LE(1, node->InputCount()); 102 DCHECK_LE(1, node->InputCount());
103 node->set_op(op);
104 node->ReplaceInput(0, a); 103 node->ReplaceInput(0, a);
104 NodeProperties::ChangeOp(node, op);
105 return Changed(node); 105 return Changed(node);
106 } 106 }
107 107
108 108
109 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) { 109 Reduction SimplifiedOperatorReducer::ReplaceFloat64(double value) {
110 return Replace(jsgraph()->Float64Constant(value)); 110 return Replace(jsgraph()->Float64Constant(value));
111 } 111 }
112 112
113 113
114 Reduction SimplifiedOperatorReducer::ReplaceInt32(int32_t value) { 114 Reduction SimplifiedOperatorReducer::ReplaceInt32(int32_t value) {
(...skipping 14 matching lines...) Expand all
129 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); } 129 Graph* SimplifiedOperatorReducer::graph() const { return jsgraph()->graph(); }
130 130
131 131
132 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const { 132 MachineOperatorBuilder* SimplifiedOperatorReducer::machine() const {
133 return jsgraph()->machine(); 133 return jsgraph()->machine();
134 } 134 }
135 135
136 } // namespace compiler 136 } // namespace compiler
137 } // namespace internal 137 } // namespace internal
138 } // namespace v8 138 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/tail-call-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698