Commit 6640495b authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

Revert "[cleanup] Remove RecursivelyExecuteUnoptimizedCompilationJobs"

This reverts commit 4bdc9097.

Reason for revert: So that [1] can revert cleanly, for TSAN
failures like [2].

[1] https://chromium-review.googlesource.com/c/v8/v8/+/3226780
[2] https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux64%20TSAN/39084/overview

Original change's description:
> [cleanup] Remove RecursivelyExecuteUnoptimizedCompilationJobs
>
> Change-Id: Ibc33de815e869462bd0946b13867cf2667bd1c3b
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3253353
> 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@{#77622}

Change-Id: Ic3f0ba99b6227286b2799e9e7b61df8e30b140d3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3254180
Owners-Override: Shu-yu Guo <syg@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77629}
parent 41c297fc
...@@ -714,6 +714,33 @@ ExecuteSingleUnoptimizedCompilationJob( ...@@ -714,6 +714,33 @@ ExecuteSingleUnoptimizedCompilationJob(
return job; return job;
} }
bool RecursivelyExecuteUnoptimizedCompilationJobs(
ParseInfo* parse_info, FunctionLiteral* literal,
AccountingAllocator* allocator,
UnoptimizedCompilationJobList* function_jobs) {
std::vector<FunctionLiteral*> eager_inner_literals;
// We need to pass nullptr here because we are on the background
// thread but don't have a LocalIsolate.
DCHECK_NULL(LocalHeap::Current());
std::unique_ptr<UnoptimizedCompilationJob> job =
ExecuteSingleUnoptimizedCompilationJob(parse_info, literal, allocator,
&eager_inner_literals, nullptr);
if (!job) return false;
// Recursively compile eager inner literals.
for (FunctionLiteral* inner_literal : eager_inner_literals) {
if (!RecursivelyExecuteUnoptimizedCompilationJobs(
parse_info, inner_literal, allocator, function_jobs)) {
return false;
}
}
function_jobs->emplace_front(std::move(job));
return true;
}
template <typename IsolateT> template <typename IsolateT>
bool IterativelyExecuteAndFinalizeUnoptimizedCompilationJobs( bool IterativelyExecuteAndFinalizeUnoptimizedCompilationJobs(
IsolateT* isolate, Handle<SharedFunctionInfo> outer_shared_info, IsolateT* isolate, Handle<SharedFunctionInfo> outer_shared_info,
......
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