// 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. #ifndef V8_MAGLEV_MAGLEV_CONCURRENT_DISPATCHER_H_ #define V8_MAGLEV_MAGLEV_CONCURRENT_DISPATCHER_H_ #ifdef V8_ENABLE_MAGLEV #include <memory> #include "src/codegen/compiler.h" // For OptimizedCompilationJob. #include "src/maglev/maglev-pipeline-statistics.h" #include "src/utils/locked-queue.h" namespace v8 { namespace internal { class Isolate; namespace maglev { class MaglevCompilationInfo; // TODO(v8:7700): While basic infrastructure now exists, there are many TODOs // that should still be addressed soon: // - Full tracing support through --trace-opt. // - Concurrent codegen. // - Concurrent InstructionStream object creation (optional?). // - Test support for concurrency (see %FinalizeOptimization). // Exports needed functionality without exposing implementation details. class ExportedMaglevCompilationInfo final { … }; // The job is a single actual compilation task. class MaglevCompilationJob final : public OptimizedCompilationJob { … }; // The public API for Maglev concurrent compilation. // Keep this as minimal as possible. class V8_EXPORT_PRIVATE MaglevConcurrentDispatcher final { … }; } // namespace maglev } // namespace internal } // namespace v8 #endif // V8_ENABLE_MAGLEV #endif // V8_MAGLEV_MAGLEV_CONCURRENT_DISPATCHER_H_