[baseline] Fix task queue size

last_index_ is already incremented in Enqueue and points to one past
the end of the array.

Bug: v8:12054
Change-Id: I63b9a315464af9366f39c863fbd40e58adb69f1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3233230
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77469}
This commit is contained in:
Victor Gomes 2021-10-20 13:44:21 +02:00 committed by V8 LUCI CQ
parent 58559fb7c1
commit a19359fa6f

View File

@ -279,7 +279,7 @@ void BaselineBatchCompiler::EnqueueFunction(Handle<JSFunction> function) {
}
if (FLAG_concurrent_sparkplug) {
Enqueue(shared);
concurrent_compiler_->CompileBatch(compilation_queue_, last_index_ + 1);
concurrent_compiler_->CompileBatch(compilation_queue_, last_index_);
ClearBatch();
} else {
CompileBatch(function);