Commit eb746422 authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Fix a DCHECK

It didn't take the recently added
--stress-concurrent-inlining-attach-code feature into account.

Bug: chromium:1250547
Change-Id: I657b030308158353b72b9b38db7909a1e4190b6c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3171153
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76952}
parent 7f2e4fc0
...@@ -390,12 +390,13 @@ void FeedbackVector::SetOptimizedCode(Handle<FeedbackVector> vector, ...@@ -390,12 +390,13 @@ void FeedbackVector::SetOptimizedCode(Handle<FeedbackVector> vector,
Handle<Code> code, Handle<Code> code,
FeedbackCell feedback_cell) { FeedbackCell feedback_cell) {
DCHECK(CodeKindIsOptimizedJSFunction(code->kind())); DCHECK(CodeKindIsOptimizedJSFunction(code->kind()));
// We should only set optimized code only when there is no valid optimized // We should set optimized code only when there is no valid optimized code or
// code or we are tiering up. // we are tiering up.
DCHECK(!vector->has_optimized_code() || DCHECK(!vector->has_optimized_code() ||
vector->optimized_code().marked_for_deoptimization() || vector->optimized_code().marked_for_deoptimization() ||
(vector->optimized_code().kind() == CodeKind::TURBOPROP && (vector->optimized_code().kind() == CodeKind::TURBOPROP &&
code->kind() == CodeKind::TURBOFAN)); code->kind() == CodeKind::TURBOFAN) ||
FLAG_stress_concurrent_inlining_attach_code);
// TODO(mythria): We could see a CompileOptimized marker here either from // TODO(mythria): We could see a CompileOptimized marker here either from
// tests that use %OptimizeFunctionOnNextCall, --always-opt or because we // tests that use %OptimizeFunctionOnNextCall, --always-opt or because we
// re-mark the function for non-concurrent optimization after an OSR. We // re-mark the function for non-concurrent optimization after an OSR. We
......
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