Class: Rubinius::CompiledMethod

Inherits:
Executable
  • Object
show all
Defined in:
app/method.rb

Instance Method Summary collapse

Instance Method Details

#first_ip_on_line_after(line, start_ip) ⇒ Fixnum

Returns the address of the first instruction.

Returns:

  • (Fixnum)

    the address of the first instruction



140
141
142
143
144
145
146
147
148
149
150
151
152
# File 'app/method.rb', line 140

def first_ip_on_line_after(line, start_ip)
  i = 0
  last_i = @lines.size - 1
  while i < last_i
    ip = @lines.at(i)
    cur_line = @lines.at(i+1)
    if cur_line >= line and ip >= start_ip
      return ip
    end
    i += 2
  end
  nil
end