Commit 5282f5c7 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[turboprop] Fix DCHECK in SetOptimizedCode

With --always-opt it is possible that we set optimized code even
when the marker is LogFirstExecution.

Bug=v8:9684
TBR=rmcilroy@chromium.org

Change-Id: Ic45db4a6344a7345bee7ffd075b390d442c540fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2505710Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70844}
parent 44a20ad8
......@@ -391,12 +391,9 @@ void FeedbackVector::SetOptimizedCode(Handle<FeedbackVector> vector,
// TODO(mythria): We could see a CompileOptimized marker here either from
// tests that use %OptimizeFunctionOnNextCall or because we re-mark the
// function for non-concurrent optimization after an OSR. We should avoid
// these cases and remove the CompileOptimized expectation from this DCHECK.
DCHECK(vector->optimization_marker() == OptimizationMarker::kNone ||
vector->optimization_marker() ==
OptimizationMarker::kInOptimizationQueue ||
vector->optimization_marker() ==
OptimizationMarker::kCompileOptimized);
// these cases and also check that marker isn't kCompileOptimized.
DCHECK(vector->optimization_marker() !=
OptimizationMarker::kCompileOptimizedConcurrent);
vector->set_maybe_optimized_code(HeapObjectReference::Weak(*code));
int32_t state = vector->flags();
state = OptimizationTierBits::update(state, GetTierForCodeKind(code->kind()));
......
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