#include "src/maglev/maglev-concurrent-dispatcher.h"
#include "src/codegen/compiler.h"
#include "src/compiler/compilation-dependencies.h"
#include "src/compiler/js-heap-broker.h"
#include "src/execution/isolate.h"
#include "src/execution/local-isolate-inl.h"
#include "src/flags/flags.h"
#include "src/handles/handles-inl.h"
#include "src/handles/persistent-handles.h"
#include "src/heap/local-heap-inl.h"
#include "src/heap/parked-scope.h"
#include "src/maglev/maglev-code-generator.h"
#include "src/maglev/maglev-compilation-info.h"
#include "src/maglev/maglev-compiler.h"
#include "src/maglev/maglev-graph-labeller.h"
#include "src/maglev/maglev-pipeline-statistics.h"
#include "src/objects/js-function-inl.h"
#include "src/utils/identity-map.h"
#include "src/utils/locked-queue-inl.h"
namespace v8 {
namespace internal {
namespace compiler {
void JSHeapBroker::AttachLocalIsolateForMaglev(
maglev::MaglevCompilationInfo* info, LocalIsolate* local_isolate) { … }
void JSHeapBroker::DetachLocalIsolateForMaglev(
maglev::MaglevCompilationInfo* info) { … }
}
namespace maglev {
namespace {
constexpr char kMaglevCompilerName[] = …;
class V8_NODISCARD LocalIsolateScope final { … };
}
Zone* ExportedMaglevCompilationInfo::zone() const { … }
void ExportedMaglevCompilationInfo::set_canonical_handles(
std::unique_ptr<CanonicalHandlesMap>&& canonical_handles) { … }
std::unique_ptr<MaglevCompilationJob> MaglevCompilationJob::New(
Isolate* isolate, Handle<JSFunction> function, BytecodeOffset osr_offset) { … }
namespace {
MaglevPipelineStatistics* CreatePipelineStatistics(
Isolate* isolate, MaglevCompilationInfo* compilation_info,
compiler::ZoneStats* zone_stats) { … }
}
MaglevCompilationJob::MaglevCompilationJob(
Isolate* isolate, std::unique_ptr<MaglevCompilationInfo>&& info)
: … { … }
MaglevCompilationJob::~MaglevCompilationJob() = default;
CompilationJob::Status MaglevCompilationJob::PrepareJobImpl(Isolate* isolate) { … }
CompilationJob::Status MaglevCompilationJob::ExecuteJobImpl(
RuntimeCallStats* stats, LocalIsolate* local_isolate) { … }
CompilationJob::Status MaglevCompilationJob::FinalizeJobImpl(Isolate* isolate) { … }
GlobalHandleVector<Map> MaglevCompilationJob::CollectRetainedMaps(
Isolate* isolate, DirectHandle<Code> code) { … }
void MaglevCompilationJob::DisposeOnMainThread(Isolate* isolate) { … }
MaybeHandle<Code> MaglevCompilationJob::code() const { … }
Handle<JSFunction> MaglevCompilationJob::function() const { … }
BytecodeOffset MaglevCompilationJob::osr_offset() const { … }
bool MaglevCompilationJob::is_osr() const { … }
bool MaglevCompilationJob::specialize_to_function_context() const { … }
void MaglevCompilationJob::RecordCompilationStats(Isolate* isolate) const { … }
uint64_t MaglevCompilationJob::trace_id() const { … }
void MaglevCompilationJob::BeginPhaseKind(const char* name) { … }
void MaglevCompilationJob::EndPhaseKind() { … }
class MaglevConcurrentDispatcher::JobTask final : public v8::JobTask { … };
MaglevConcurrentDispatcher::MaglevConcurrentDispatcher(Isolate* isolate)
: … { … }
MaglevConcurrentDispatcher::~MaglevConcurrentDispatcher() { … }
void MaglevConcurrentDispatcher::EnqueueJob(
std::unique_ptr<MaglevCompilationJob>&& job) { … }
void MaglevConcurrentDispatcher::FinalizeFinishedJobs() { … }
void MaglevConcurrentDispatcher::AwaitCompileJobs() { … }
void MaglevConcurrentDispatcher::Flush(BlockingBehavior behavior) { … }
}
}
}