Skip to content

Commit

Permalink
Move branch decisions further up in error message. (#2443)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriseth authored Feb 5, 2025
1 parent a79ff6d commit 323ac32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
16 changes: 8 additions & 8 deletions executor/src/witgen/jit/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,6 @@ impl<'a, T: FieldElement, FE: FixedEvaluator<T>> Error<'a, T, FE> {
)
.unwrap();
};
if !self.incomplete_identities.is_empty() {
write!(
s,
"\nThe following identities have not been fully processed:\n{}",
format_identities(&self.incomplete_identities, &self.witgen,)
)
.unwrap();
};
write!(
s,
"\nThe following branch decisions were taken:\n{}",
Expand All @@ -548,6 +540,14 @@ impl<'a, T: FieldElement, FE: FixedEvaluator<T>> Error<'a, T, FE> {
.join("\n")
)
.unwrap();
if !self.incomplete_identities.is_empty() {
write!(
s,
"\nThe following identities have not been fully processed:\n{}",
format_identities(&self.incomplete_identities, &self.witgen,)
)
.unwrap();
};
let code = self.witgen.code();
if code.is_empty() {
write!(s, "\nNo code generated so far.").unwrap();
Expand Down
4 changes: 1 addition & 3 deletions executor/src/witgen/jit/single_step_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,7 @@ VM::instr_mul[1] = 1;"
let start = e
.find("The following identities have not been fully processed:")
.unwrap();
let end = e
.find("The following branch decisions were taken:")
.unwrap();
let end = e.find("Generated code so far:").unwrap();
let expected = "\
The following identities have not been fully processed:
--------------[ identity 1 on row 1: ]--------------
Expand Down

0 comments on commit 323ac32

Please sign in to comment.