Skip to main content

rewrite

Function rewrite 

Source
pub fn rewrite(func: &mut Func, assignment: &Assignment, env: &Env) -> Vec<Edit>
Expand description

Rewrites a function to the places it was given, and says what moves are still wanted.

§Panics

Panics if the entry block has parameters, since there is no edge into it for their moves to go on and what arrives in a function is the ABI lowering’s to say. Panics on a critical edge, on an edge carrying the wrong number of arguments, and if a class runs out of scratch registers for one instruction, all of which are the caller handing it something it was told not to.