fn append_code_sequence(&mut self, another: &Box<ASMCode>, start_inst: usize, n_insts: usize) {
        let base_line = self.number_of_insts();

        for i in 0..n_insts {
            let cur_line_in_self = base_line + i;
            let cur_line_from_copy = start_inst + i;
            let mut inst = another.code[cur_line_from_copy].clone();

            // fix info
            for locs in inst.defines.values_mut() {
                for loc in locs {
                    debug_assert!(loc.line == i);
                    loc.line = cur_line_in_self;
                }
            }
            for locs in inst.uses.values_mut() {
                for loc in locs {
                    debug_assert!(loc.line == i);
                    loc.line = cur_line_in_self;
                }
            }
            // ignore preds/succs

            // add to self
            self.code.push(inst);
        }
    }
/// appends a given part of assembly code sequence at the end of current code
/// During appending, we need to fix line number.
appends a given part of assembly code sequence at the end of current code
During appending, we need to fix line number.
appends a given part of assembly code sequence at the end of current code During appending we need to fix line number .
fn append_code_sequence(&mut self, another: &Box<ASMCode>, start_inst: usize, n_insts: usize) {
        let base_line = self.number_of_insts();
        for i in 0..n_insts {
            let cur_line_in_self = base_line + i;
            let cur_line_from_copy = start_inst + i;
            let mut inst = another.code[cur_line_from_copy].clone();
            // fix info
            for locs in inst.defines.values_mut() {
                for loc in locs {
                    debug_assert!(loc.line == i);
                    loc.line = cur_line_in_self;
                }
            }
            for locs in inst.uses.values_mut() {
                for loc in locs {
                    debug_assert!(loc.line == i);
                    loc.line = cur_line_in_self;
                }
            }
            // ignore preds/succs
            // add to self
            self.code.push(inst);
        }
    }
fn append_code_sequence ( & mut self , another : & Box < ASMCode > , start_inst : usize , n_insts : usize ) { let base_line = self . number_of_insts ( ) ; for i in 0 .. n_insts { let cur_line_in_self = base_line + i ; let cur_line_from_copy = start_inst + i ; let mut inst = another . code [ cur_line_from_copy ] . clone ( ) ; // fix info for locs in inst . defines . values_mut ( ) { for loc in locs { debug_assert ! ( loc line i ) ; loc . line = cur_line_in_self ; } } for locs in inst . uses . values_mut ( ) { for loc in locs { debug_assert ! ( loc line i ) ; loc . line = cur_line_in_self ; } } // ignore preds/succs // add to self self . code . push ( inst ) ; } }
appends a given part of assembly code sequence at the end of current code
During appending, we need to fix line number.
appends a given part of assembly code sequence at the end of current code During appending we need to fix line number .
&mut self
another
&Box<ASMCode>
start_inst
usize
n_insts
usize
&mut self
another
&Box<ASMCode>
start_inst
usize
n_insts
usize