Class: Optimize::IR::CatchEntry

Inherits:
Struct
  • Object
show all
Defined in:
lib/optimize/ir/catch_entry.rb

Overview

One entry in a function’s catch table. Positions are references to IR::Instruction objects by identity, so mutations to the instruction list don’t invalidate them.

type         — one of :rescue, :ensure, :retry, :break, :redo, :next
iseq_index   — index into the iseq-list for the handler iseq
               (nil for entries without a handler iseq, such as :retry)
start_inst   — IR::Instruction marking the start of the covered range
end_inst     — IR::Instruction marking the end (exclusive)
cont_inst    — IR::Instruction where control resumes after handling
               (always present; for :retry entries this points to slot 0)
stack_depth  — operand-stack depth at which the handler runs

Instance Attribute Summary collapse

Instance Attribute Details

#cont_instObject

Returns the value of attribute cont_inst

Returns:

  • (Object)

    the current value of cont_inst



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def cont_inst
  @cont_inst
end

#end_instObject

Returns the value of attribute end_inst

Returns:

  • (Object)

    the current value of end_inst



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def end_inst
  @end_inst
end

#iseq_indexObject

Returns the value of attribute iseq_index

Returns:

  • (Object)

    the current value of iseq_index



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def iseq_index
  @iseq_index
end

#stack_depthObject

Returns the value of attribute stack_depth

Returns:

  • (Object)

    the current value of stack_depth



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def stack_depth
  @stack_depth
end

#start_instObject

Returns the value of attribute start_inst

Returns:

  • (Object)

    the current value of start_inst



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def start_inst
  @start_inst
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



17
18
19
# File 'lib/optimize/ir/catch_entry.rb', line 17

def type
  @type
end