chromium/v8/src/maglev/maglev-concurrent-dispatcher.cc

// Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 compiler

namespace maglev {

namespace {

constexpr char kMaglevCompilerName[] =;

// LocalIsolateScope encapsulates the phase where persistent handles are
// attached to the LocalHeap inside {local_isolate}.
class V8_NODISCARD LocalIsolateScope final {};

}  // namespace

Zone* ExportedMaglevCompilationInfo::zone() const {}

void ExportedMaglevCompilationInfo::set_canonical_handles(
    std::unique_ptr<CanonicalHandlesMap>&& canonical_handles) {}

// static
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) {}

}  // namespace

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() {}

// The JobTask is posted to V8::GetCurrentPlatform(). It's responsible for
// processing the incoming queue on a worker thread.
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) {}

}  // namespace maglev
}  // namespace internal
}  // namespace v8