Add some comments to the frontend code.
This commit is contained in:
@@ -41,8 +41,17 @@ pub struct FunctionBuilder<'a> {
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
struct EbbData {
|
||||
filled: bool,
|
||||
/// An Ebb is "pristine" iff no instructions have been added since the last
|
||||
/// call to `switch_to_block()`.
|
||||
pristine: bool,
|
||||
|
||||
/// An Ebb is "filled" iff a terminator instruction has been inserted since
|
||||
/// the last call to `switch_to_block()`.
|
||||
///
|
||||
/// A filled block cannot be pristine.
|
||||
filled: bool,
|
||||
|
||||
/// Count of parameters not supplied implicitly by the SSABuilder.
|
||||
user_param_count: usize,
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@ impl FuncTranslator {
|
||||
let entry_block = builder.create_ebb();
|
||||
builder.append_ebb_params_for_function_params(entry_block);
|
||||
builder.switch_to_block(entry_block); // This also creates values for the arguments.
|
||||
builder.seal_block(entry_block);
|
||||
builder.seal_block(entry_block); // Declare all predecessors known.
|
||||
|
||||
// Make sure the entry block is inserted in the layout before we make any callbacks to
|
||||
// `environ`. The callback functions may need to insert things in the entry block.
|
||||
builder.ensure_inserted_ebb();
|
||||
|
||||
Reference in New Issue
Block a user