Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index 12d944407f10f2cca250fa306559f2eac0b0da74..8d9aace7aa50f0911fb4da22f0908159ed7d5975 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -250,16 +250,18 @@ void BytecodeGraphBuilder::Environment::PrepareForLoop() { |
bool BytecodeGraphBuilder::Environment::StateValuesRequireUpdate( |
Node** state_values, int offset, int count) { |
- Node** env_values = (count == 0) ? nullptr : &values()->at(offset); |
+ if (!builder()->info()->is_deoptimization_enabled()) { |
+ return false; |
+ } |
if (*state_values == nullptr) { |
return true; |
- } else { |
- DCHECK_EQ((*state_values)->InputCount(), count); |
- DCHECK_LE(static_cast<size_t>(offset + count), values()->size()); |
- for (int i = 0; i < count; i++) { |
- if ((*state_values)->InputAt(i) != env_values[i]) { |
- return true; |
- } |
+ } |
+ DCHECK_EQ((*state_values)->InputCount(), count); |
+ DCHECK_LE(static_cast<size_t>(offset + count), values()->size()); |
+ Node** env_values = (count == 0) ? nullptr : &values()->at(offset); |
+ for (int i = 0; i < count; i++) { |
+ if ((*state_values)->InputAt(i) != env_values[i]) { |
+ return true; |
} |
} |
return false; |