Translate logical step counts when replaying native suffixes
This commit is contained in:
1 parent
9a6c162b46
commit
465a574124
8 files changed
+337
-86
No files matched your search
@@ -416,8 +416,11 @@ impl<'a> CapturedEntries<'a> {
|
||||
let project = self.request.project.as_deref().expect("settled replay uses a project");
|
||||
let bytes = project.file(&completed.guard.entry).expect("settled entry").data.len();
|
||||
let stride = bytes.div_ceil(SOURCE_INTERVALS).max(1);
|
||||
let offset = texrra_tex_core::execution::StepOffset::new(
|
||||
prior.entry.completed_steps(), current.completed_steps(),
|
||||
);
|
||||
let mut later = [const { None }; SOURCE_INTERVALS];
|
||||
if let Some(rebase) = current.prepare_suffix_rebase(&prior.entry, &completed.result.execution) {
|
||||
if let Some(mut rebase) = current.prepare_suffix_rebase(&prior.entry, &completed.result.execution) {
|
||||
// Keep the deepest compatible settled continuation per source interval.
|
||||
for (&page, anchor) in completed.settled.range((std::ops::Bound::Excluded(page), std::ops::Bound::Unbounded)).rev() {
|
||||
let interval = (anchor.entry.frontier() - 1) / stride;
|
||||
@@ -438,7 +441,7 @@ impl<'a> CapturedEntries<'a> {
|
||||
let Some(calls) = completed.calls.get(replayed..anchor.call_count) else {
|
||||
continue;
|
||||
};
|
||||
host.replay_suffix(calls, cancellation)?;
|
||||
host.replay_suffix(calls, offset, cancellation)?;
|
||||
replayed = anchor.call_count;
|
||||
if anchor.host == host.files().replay_boundary() {
|
||||
let regular = CaptureSlots {
|
||||
@@ -451,7 +454,7 @@ impl<'a> CapturedEntries<'a> {
|
||||
self.capture(Capture::Settled { page, regular: Some(regular) }, Arc::new(entry), host);
|
||||
}
|
||||
}
|
||||
host.replay_suffix(&completed.calls[replayed..], cancellation)?;
|
||||
host.replay_suffix(&completed.calls[replayed..], offset, cancellation)?;
|
||||
completed.guard.verify_replayed_inputs(host.files(), project).map_err(|error| error.to_string())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user