mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Add a debug assertion in code builder
This commit is contained in:
parent
64603a480c
commit
e4db06cbdd
1 changed files with 3 additions and 4 deletions
|
@ -127,14 +127,13 @@ impl CodeBuilder {
|
||||||
match next_insertion {
|
match next_insertion {
|
||||||
Some((&insert_pos, insert_inst)) if insert_pos == pos => {
|
Some((&insert_pos, insert_inst)) if insert_pos == pos => {
|
||||||
final_code.push(insert_inst.to_owned());
|
final_code.push(insert_inst.to_owned());
|
||||||
final_code.push(instruction);
|
|
||||||
next_insertion = insertions_iter.next();
|
next_insertion = insertions_iter.next();
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {}
|
||||||
final_code.push(instruction);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
final_code.push(instruction);
|
||||||
}
|
}
|
||||||
|
debug_assert!(next_insertion == None);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Total number of instructions in the final output
|
/// Total number of instructions in the final output
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue