kernel/common/compiled_method.rb
# Returns the address (IP) of the first instruction in this CompiledMethod
# that is on the specified line, or the address of the first instruction on
# the next code line after the specified line if there are no instructions
# on the requested line.
# This method only looks at instructions within the current CompiledMethod;
# see #locate_line for an alternate method that also searches inside the child
# CompiledMethods.
Returns the address (IP) of the first instruction in this CompiledMethod
that is on the specified line, or the address of the first instruction on
the next code line after the specified line if there are no instructions
on the requested line.
This method only looks at instructions within the current CompiledMethod;
see #locate_line for an alternate method that also searches inside the child
CompiledMethods.
Returns the address ( IP ) of the first instruction in this CompiledMethod that is on the specified line or the address of the first instruction on the next code line after the specified line if there are no instructions on the requested line . This method only looks at instructions within the current CompiledMethod ; see #locate_line for an alternate method that also searches inside the child CompiledMethods .
def first_ip_on_line(line)
    i = 1
    total = @lines.size
    while i < total
      cur_line = @lines.at(i)
      if cur_line >= line
        return @lines.at(i-1)
      end
      i += 2
    end
    return -1
  end
def first_ip_on_line ( line ) i = 1 total = @lines . size while i < total cur_line = @lines . at ( i ) if cur_line >= line return @lines . at ( i - 1 ) end i += 2 end return - 1 end
Returns the address (IP) of the first instruction in this CompiledMethod
that is on the specified line, or the address of the first instruction on
the next code line after the specified line if there are no instructions
on the requested line.
Returns the address ( IP ) of the first instruction in this CompiledMethod that is on the specified line or the address of the first instruction on the next code line after the specified line if there are no instructions on the requested line .
line
<not_specific>