Share TeX hyphenation patterns and reuse verified state fingerprints
This commit is contained in:
1 parent
3ffa452fd1
commit
48c980c871
5 files changed
+150
-24
No files matched your search
@@ -292,7 +292,7 @@ impl EntryCheckpoint {
|
||||
files: &mut impl SourceProvider,
|
||||
cancellation: Cancellation,
|
||||
) -> Option<Result<Execution, ExecutionFailure>> {
|
||||
self.resume_observed(source, files, cancellation, None, |_, _, _| {})
|
||||
self.resume_observed(source, files, cancellation, None, None, |_, _, _| {})
|
||||
}
|
||||
|
||||
pub(super) fn resume_capturing_entries_after_host_replay<F: SourceProvider, S>(
|
||||
@@ -301,6 +301,7 @@ impl EntryCheckpoint {
|
||||
files: &mut F,
|
||||
cancellation: Cancellation,
|
||||
line_break_cache: std::sync::Arc<super::LineBreakCache>,
|
||||
previous: Option<&Execution>,
|
||||
select: impl FnMut(usize, usize) -> Option<S>,
|
||||
capture: impl FnMut(S, EntryCheckpoint, &mut F),
|
||||
) -> Option<Result<Execution, ExecutionFailure>> {
|
||||
@@ -309,6 +310,7 @@ impl EntryCheckpoint {
|
||||
files,
|
||||
cancellation,
|
||||
Some(line_break_cache),
|
||||
previous,
|
||||
Executor::entry_observer(self.incoming_state, select, capture),
|
||||
)
|
||||
}
|
||||
@@ -319,6 +321,7 @@ impl EntryCheckpoint {
|
||||
files: &mut F,
|
||||
cancellation: Cancellation,
|
||||
line_break_cache: Option<std::sync::Arc<super::LineBreakCache>>,
|
||||
previous: Option<&Execution>,
|
||||
capture_boundary: impl FnMut(&mut Executor, usize, &mut F),
|
||||
) -> Option<Result<Execution, ExecutionFailure>> {
|
||||
if !self.accepts_entry(&source) {
|
||||
@@ -335,7 +338,7 @@ impl EntryCheckpoint {
|
||||
.check_cancellation()
|
||||
.and_then(|_| executor.run_active_input(self.initial_depth, files, capture_boundary));
|
||||
let result = executor.finish_observed_input(result, files);
|
||||
Some(executor.finish_execution(result, self.incoming_state))
|
||||
Some(executor.finish_execution(result, self.incoming_state, previous))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3037,7 +3040,7 @@ impl Executor {
|
||||
) -> Result<Execution, ExecutionFailure> {
|
||||
let incoming_state = self.state.fingerprint();
|
||||
let result = self.run_observed(file, files, |_, _, _| {});
|
||||
self.finish_execution(result, incoming_state)
|
||||
self.finish_execution(result, incoming_state, None)
|
||||
}
|
||||
/// Capture the first eligible entry command boundary at or beyond the
|
||||
/// requested physical byte. The callback captures the matching host state.
|
||||
@@ -3086,7 +3089,7 @@ impl Executor {
|
||||
files,
|
||||
Self::entry_observer(incoming_state, select, capture),
|
||||
);
|
||||
self.finish_execution(result, incoming_state)
|
||||
self.finish_execution(result, incoming_state, None)
|
||||
}
|
||||
|
||||
fn entry_observer<F: SourceProvider, S>(
|
||||
@@ -3146,6 +3149,7 @@ impl Executor {
|
||||
mut self,
|
||||
result: Result<(), Error>,
|
||||
incoming_state: u64,
|
||||
previous: Option<&Execution>,
|
||||
) -> Result<Execution, ExecutionFailure> {
|
||||
self.collect_meaning_reads();
|
||||
if let Err(error) = result {
|
||||
@@ -3183,6 +3187,11 @@ impl Executor {
|
||||
evidence,
|
||||
});
|
||||
}
|
||||
// An identical completed state has the same fingerprint. Compare
|
||||
// the entire state, including token source spans and assignments.
|
||||
let outgoing_state = previous
|
||||
.filter(|last| last.state == self.state)
|
||||
.map_or_else(|| self.state.fingerprint(), |last| last.outgoing_state);
|
||||
Ok(Execution {
|
||||
format_dumped: self.format_dumped,
|
||||
job_name: self.job_name,
|
||||
@@ -3191,7 +3200,7 @@ impl Executor {
|
||||
events: self.events.into_vec(),
|
||||
native_page: self.native_page,
|
||||
split_discards: self.split_discards,
|
||||
outgoing_state: self.state.fingerprint(),
|
||||
outgoing_state,
|
||||
state: self.state,
|
||||
io: self.io,
|
||||
input_position: self.input_position,
|
||||
|
||||
Reference in new issue
Block a user