Skip to content

Commit

Permalink
Inline rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Dec 1, 2013
1 parent dcbcf4a commit b6c9d24
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions scripts/inject.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2880,7 +2880,7 @@ def optimize
end

def reset_state
@prev_inst = nil
@last_created_inst = nil
end

def remove_send_prologue(send_stack, sources)
Expand Down Expand Up @@ -2936,7 +2936,7 @@ def do_inline(send_stack, inlined_opt, code)
if inst
NextFlow.new(optimizer, inst, prologue)
prologue = arg_entry
@prev_inst.following_instruction = inlined_opt.first_instruction
@last_created_inst.following_instruction = inlined_opt.first_instruction
inlined_opt.first_instruction.preceeding_instruction = @rev_inst
end

Expand All @@ -2955,8 +2955,8 @@ def do_inline(send_stack, inlined_opt, code)
exit_insts << exit_flow.dst_inst

if prev_flow and exit_flow.is_a?(NextFlow)
@prev_inst = exit_flow.dst_inst
following_instruction = @prev_inst.following_instruction
@last_created_inst = exit_flow.dst_inst
following_instruction = @last_created_inst.following_instruction
goto = create_instruction(:goto, nil)

prev_flow.src_inst.following_instruction = goto
Expand Down Expand Up @@ -3012,11 +3012,11 @@ def create_instruction(op_code, op_rands)
inst.op_code = op_code
inst.flow_type = op_code2.control_flow

if @prev_inst
@prev_inst.following_instruction = inst
inst.preceeding_instruction = @prev_inst
if @last_created_inst
@last_created_inst.following_instruction = inst
inst.preceeding_instruction = @last_created_inst
end
@prev_inst = inst
@last_created_inst = inst

inst
end
Expand Down

0 comments on commit b6c9d24

Please sign in to comment.