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

Side by Side Diff: src/compiler/node-properties.cc

Issue 1420093005: [turbofan] Sanitize typing rules for function calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/typer.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "src/compiler/operator-properties.h" 8 #include "src/compiler/operator-properties.h"
9 #include "src/compiler/verifier.h" 9 #include "src/compiler/verifier.h"
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 bool NodeProperties::IsExceptionalCall(Node* node) { 123 bool NodeProperties::IsExceptionalCall(Node* node) {
124 for (Edge const edge : node->use_edges()) { 124 for (Edge const edge : node->use_edges()) {
125 if (!NodeProperties::IsControlEdge(edge)) continue; 125 if (!NodeProperties::IsControlEdge(edge)) continue;
126 if (edge.from()->opcode() == IrOpcode::kIfException) return true; 126 if (edge.from()->opcode() == IrOpcode::kIfException) return true;
127 } 127 }
128 return false; 128 return false;
129 } 129 }
130 130
131 131
132 // static 132 // static
133 void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) {
134 DCHECK(index < node->op()->ValueInputCount());
135 node->ReplaceInput(FirstValueIndex(node) + index, value);
136 }
137
138
139 // static
133 void NodeProperties::ReplaceContextInput(Node* node, Node* context) { 140 void NodeProperties::ReplaceContextInput(Node* node, Node* context) {
134 node->ReplaceInput(FirstContextIndex(node), context); 141 node->ReplaceInput(FirstContextIndex(node), context);
135 } 142 }
136 143
137 144
138 // static 145 // static
139 void NodeProperties::ReplaceControlInput(Node* node, Node* control) { 146 void NodeProperties::ReplaceControlInput(Node* node, Node* control) {
140 node->ReplaceInput(FirstControlIndex(node), control); 147 node->ReplaceInput(FirstControlIndex(node), control);
141 } 148 }
142 149
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 // static 288 // static
282 bool NodeProperties::IsInputRange(Edge edge, int first, int num) { 289 bool NodeProperties::IsInputRange(Edge edge, int first, int num) {
283 if (num == 0) return false; 290 if (num == 0) return false;
284 int const index = edge.index(); 291 int const index = edge.index();
285 return first <= index && index < first + num; 292 return first <= index && index < first + num;
286 } 293 }
287 294
288 } // namespace compiler 295 } // namespace compiler
289 } // namespace internal 296 } // namespace internal
290 } // namespace v8 297 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/node-properties.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698