Commit 08419a09 authored by mythria's avatar mythria Committed by Commit bot

[Interpreter] StateValuesRequireUpdate handles cases when deoptimization is disabled.

Fixes StateValuesRequireUpdate function to return false if deoptimization is not enabled.
When deoptimization is not enabled there is no need to create nodes for state values.

BUG=v8:4280
LOG=N

Review URL: https://codereview.chromium.org/1551363002

Cr-Commit-Position: refs/heads/master@{#33116}
parent 3b473d7a
......@@ -261,16 +261,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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment