Lines Matching defs:job

717   // The compile job handle, initialized right after construction of
2039 // Removing this job will trigger the destructor, which will cancel all
2046 explicit AsyncStreamingProcessor(AsyncCompileJob* job,
2261 // {job} keeps the {this} pointer alive.
2262 std::shared_ptr<AsyncCompileJob> job =
2275 // {job} keeps the {this} pointer alive.
2276 std::shared_ptr<AsyncCompileJob> job =
2295 explicit CompilationStateCallback(AsyncCompileJob* job) : job_(job) {}
2325 // At this point, the job will already be gone, thus do not access it
2366 void Run(AsyncCompileJob* job, bool on_foreground) {
2368 HandleScope scope(job->isolate_);
2369 SaveAndSwitchContext saved_context(job->isolate_, *job->native_context_);
2370 RunInForeground(job);
2372 RunInBackground(job);
2382 CompileTask(AsyncCompileJob* job, bool on_foreground)
2387 : CancelableTask(on_foreground ? job->isolate_->cancelable_task_manager()
2388 : &job->background_task_manager_),
2389 job_(job),
2490 void RunInBackground(AsyncCompileJob* job) override {
2499 auto enabled_features = job->enabled_features_;
2501 enabled_features, job->wire_bytes_.start(), job->wire_bytes_.end(),
2502 false, kWasmOrigin, counters_, metrics_recorder_, job->context_id(),
2509 const bool lazy_module = job->wasm_lazy_compilation_;
2518 job->wire_bytes_.GetFunctionBytes(func);
2540 job->DoSync<DecodeFail>(std::move(result).error());
2547 module.get(), include_liftoff, job->dynamic_tiering_);
2548 job->DoSync<PrepareAndStartCompile>(std::move(module), true,
2568 void RunInForeground(AsyncCompileJob* job) override {
2571 return job->DecodeFailed(error_);
2587 void RunInForeground(AsyncCompileJob* job) override {
2590 const bool streaming = job->wire_bytes_.length() == 0;
2593 job->CreateNativeModule(module_, code_size_estimate_);
2594 } else if (job->GetOrCreateNativeModule(std::move(module_),
2596 job->FinishCompile(true);
2602 job->background_task_manager_.CancelAndWait();
2605 Impl(job->native_module_->compilation_state());
2607 std::make_unique<CompilationStateCallback>(job));
2609 auto compile_mode = job->stream_ == nullptr
2613 job->isolate_->async_counters(), job->isolate_->metrics_recorder(),
2614 job->context_id_, job->native_module_, compile_mode));
2619 InitializeCompilation(job->isolate(), job->native_module_.get());
2641 void RunInForeground(AsyncCompileJob* job) override {
2643 DCHECK(job->native_module_->compilation_state()->failed());
2646 return job->AsyncCompileFailed();
2678 void RunInForeground(AsyncCompileJob* job) override {
2681 job->native_module_ = cached_native_module_;
2683 DCHECK(!job->native_module_->compilation_state()->failed());
2685 job->native_module_->SampleCodeSize(job->isolate_->counters(),
2689 job->native_module_->compilation_state()->AddCallback(
2690 std::make_unique<SampleTopTierCodeSizeCallback>(job->native_module_));
2693 job->FinishCompile(cached_native_module_ != nullptr);
2706 AsyncCompileJob* job, std::shared_ptr<Counters> async_counters,
2708 : decoder_(job->enabled_features_),
2709 job_(job),
3383 // Avoid holding lock while scheduling a compile job.
3914 auto job =
3918 TaskPriority::kUserVisible, std::move(job));
3923 job->Run(nullptr);