Tidy up unneeded references.
This commit is contained in:
@@ -363,7 +363,7 @@ def gen_xform_group(xgrp, fmt, type_sets):
|
|||||||
with fmt.indented(') -> bool {', '}'):
|
with fmt.indented(') -> bool {', '}'):
|
||||||
fmt.line('use ir::InstBuilder;')
|
fmt.line('use ir::InstBuilder;')
|
||||||
fmt.line('use cursor::{Cursor, FuncCursor};')
|
fmt.line('use cursor::{Cursor, FuncCursor};')
|
||||||
fmt.line('let pos = &mut FuncCursor::new(func).at_inst(inst);')
|
fmt.line('let mut pos = FuncCursor::new(func).at_inst(inst);')
|
||||||
fmt.line('pos.use_srcloc(inst);')
|
fmt.line('pos.use_srcloc(inst);')
|
||||||
|
|
||||||
# Group the xforms by opcode so we can generate a big switch.
|
# Group the xforms by opcode so we can generate a big switch.
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ mod tests {
|
|||||||
let jmp_ebb1_ebb2;
|
let jmp_ebb1_ebb2;
|
||||||
|
|
||||||
{
|
{
|
||||||
let cur = &mut FuncCursor::new(&mut func);
|
let mut cur = FuncCursor::new(&mut func);
|
||||||
|
|
||||||
cur.insert_ebb(ebb0);
|
cur.insert_ebb(ebb0);
|
||||||
br_ebb0_ebb2 = cur.ins().brnz(cond, ebb2, &[]);
|
br_ebb0_ebb2 = cur.ins().brnz(cond, ebb2, &[]);
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ impl FuncTranslator {
|
|||||||
assert_eq!(func.dfg.num_insts(), 0, "Function must be empty");
|
assert_eq!(func.dfg.num_insts(), 0, "Function must be empty");
|
||||||
|
|
||||||
// This clears the `ILBuilder`.
|
// This clears the `ILBuilder`.
|
||||||
let builder = &mut FunctionBuilder::new(func, &mut self.il_builder);
|
let mut builder = FunctionBuilder::new(func, &mut self.il_builder);
|
||||||
let entry_block = builder.create_ebb();
|
let entry_block = builder.create_ebb();
|
||||||
builder.switch_to_block(entry_block, &[]); // This also creates values for the arguments.
|
builder.switch_to_block(entry_block, &[]); // This also creates values for the arguments.
|
||||||
builder.seal_block(entry_block);
|
builder.seal_block(entry_block);
|
||||||
@@ -88,15 +88,15 @@ impl FuncTranslator {
|
|||||||
// `environ`. The callback functions may need to insert things in the entry block.
|
// `environ`. The callback functions may need to insert things in the entry block.
|
||||||
builder.ensure_inserted_ebb();
|
builder.ensure_inserted_ebb();
|
||||||
|
|
||||||
let num_args = declare_wasm_arguments(builder);
|
let num_args = declare_wasm_arguments(&mut builder);
|
||||||
|
|
||||||
// Set up the translation state with a single pushed control block representing the whole
|
// Set up the translation state with a single pushed control block representing the whole
|
||||||
// function and its return values.
|
// function and its return values.
|
||||||
let exit_block = builder.create_ebb();
|
let exit_block = builder.create_ebb();
|
||||||
self.state.initialize(&builder.func.signature, exit_block);
|
self.state.initialize(&builder.func.signature, exit_block);
|
||||||
|
|
||||||
parse_local_decls(&mut reader, builder, num_args)?;
|
parse_local_decls(&mut reader, &mut builder, num_args)?;
|
||||||
parse_function_body(reader, builder, &mut self.state, environ)
|
parse_function_body(reader, &mut builder, &mut self.state, environ)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user