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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2617123002: [turbofan] Allow indexed access to node inputs/input_edges (Closed)
Patch Set: [turbofan] Allow indexed access to node inputs/inputedges Created 3 years, 11 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 | « no previous file | src/compiler/branch-elimination.cc » ('j') | src/compiler/branch-elimination.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 3318fac942720afe1695f023acb3381c9c68a0eb..972c5a15b2088a1710ba2375367be9b55336bcd8 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -658,14 +658,19 @@ void AstGraphBuilder::Environment::UpdateStateValues(Node** state_values,
int offset, int count) {
bool should_update = false;
Node** env_values = (count == 0) ? nullptr : &values()->at(offset);
- if (*state_values == nullptr || (*state_values)->InputCount() != count) {
+ if (*state_values == nullptr) {
should_update = true;
} else {
- DCHECK(static_cast<size_t>(offset + count) <= values()->size());
- for (int i = 0; i < count; i++) {
- if ((*state_values)->InputAt(i) != env_values[i]) {
- should_update = true;
- break;
+ Node::Inputs inputs = (*state_values)->inputs();
+ if (inputs.count() != count) {
+ should_update = true;
+ } else {
+ DCHECK(static_cast<size_t>(offset + count) <= values()->size());
+ for (int i = 0; i < count; i++) {
+ if (inputs[i] != env_values[i]) {
+ should_update = true;
+ break;
+ }
Jarin 2017/01/10 10:53:38 This looks longer and harder to read. Do we have t
Leszek Swirski 2017/01/10 12:03:38 We don't, especially since this code is dying soon
}
}
}
« no previous file with comments | « no previous file | src/compiler/branch-elimination.cc » ('j') | src/compiler/branch-elimination.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698