Relocate source provenance when native suffixes move
This commit is contained in:
1 parent
6acd82dbfa
commit
41a459b4ca
16 files changed
+1507
-79
No files matched your search
@@ -178,6 +178,7 @@ impl<'a> RecordingHost<'a> {
|
||||
&mut self,
|
||||
calls: &[Call],
|
||||
offset: StepOffset,
|
||||
resize: Option<(usize, usize)>,
|
||||
cancellation: &Cancellation,
|
||||
) -> Result<(), String> {
|
||||
let recorded = self.calls.as_mut().ok_or("host calls are unavailable")?;
|
||||
@@ -187,9 +188,16 @@ impl<'a> RecordingHost<'a> {
|
||||
for call in calls {
|
||||
check(cancellation).map_err(|error| error.to_string())?;
|
||||
let call = match call {
|
||||
Call::EndStatistics(report) if !offset.is_identity() => Call::EndStatistics(
|
||||
Arc::new(report.with_step_offset(offset).ok_or("invalid replayed statistics")?),
|
||||
),
|
||||
Call::EndStatistics(report) if !offset.is_identity() || resize.is_some() => {
|
||||
let report = report.with_step_offset(offset).ok_or("invalid replayed statistics")?;
|
||||
let report = if let Some((previous, current)) = resize {
|
||||
report.with_suffix_entry_resize(previous, current)
|
||||
.ok_or("invalid replayed entry size in statistics")?
|
||||
} else {
|
||||
report
|
||||
};
|
||||
Call::EndStatistics(Arc::new(report))
|
||||
}
|
||||
call => call.clone(),
|
||||
};
|
||||
call.replay(self.files, None)?;
|
||||
|
||||
Reference in new issue
Block a user