Reuse validated checkpoint executors during native preview

This commit is contained in:
gloamxun committed 2026-11-19 11:16:40 +08:00
1 parent 69de8a6599
commit 43231a48c0
8 files changed
+160 -50

No files matched your search

+7 -3
View File
@@ -264,6 +264,7 @@ impl SelectedCheckpoint {
)
})),
EffectMode::Draft,
KernelPreparation::Resume,
)?;
for call in &self.set.calls[..checkpoint.replay_count] {
check(cancellation)?;
@@ -524,9 +525,11 @@ fn prefix_guard_checks_actual_dependencies_and_preserves_live_artifacts_on_rejec
let initial = files.preparation().generated_initial.clone().unwrap();
let mut recording = checkpoint_probe::RecordingHost::new(&mut files);
let (executed, checkpoint) =
executor.run_capturing_entry(source, &mut recording, PREFIX.len() - 25, |host| {
(host.capture(), host.resource_usage().unwrap().unwrap())
});
executor
.unwrap()
.run_capturing_entry(source, &mut recording, PREFIX.len() - 25, |host| {
(host.capture(), host.resource_usage().unwrap().unwrap())
});
assert!(executed.is_ok());
let (checkpoint, (recorded, usage)) = checkpoint.unwrap();
let (calls, trace) = recorded.unwrap();
@@ -560,6 +563,7 @@ fn prefix_guard_checks_actual_dependencies_and_preserves_live_artifacts_on_rejec
Ok(())
})),
effects,
KernelPreparation::Resume,
)
};
let rejected = |candidate: &CompileRequest, reason: &str| {