mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +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 {
|
||||
Some((&insert_pos, insert_inst)) if insert_pos == pos => {
|
||||
final_code.push(insert_inst.to_owned());
|
||||
final_code.push(instruction);
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue