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
|
} |
} |
} |