Class: Optimize::IR::LineEntry
- Inherits:
-
Struct
- Object
- Struct
- Optimize::IR::LineEntry
- Defined in:
- lib/optimize/ir/line_entry.rb
Overview
One entry in an iseq’s line-info table.
inst — the IR::Instruction whose start slot is at or before this entry's
YARV slot position. For most entries this is the instruction annotated
by this line entry. For "adjust" entries (added by CRuby for continuation
points after block calls), the slot may fall inside an instruction's
operand range — in that case inst is the containing instruction and
slot_offset records the delta from that instruction's start slot.
slot_offset — delta from inst's YARV start slot to the actual insns_info slot
position. 0 for the vast majority of entries; >0 only for adjust-
style entries that point to a mid-instruction YARV slot.
line_no — source line number (1-based), absolute (not delta-encoded)
node_id — parser node id (opaque integer; preserved on round-trip)
events — flags bitmap for tracepoint events (RUBY_EVENT_LINE, etc.)
Instance Attribute Summary collapse
-
#events ⇒ Object
Returns the value of attribute events.
-
#inst ⇒ Object
Returns the value of attribute inst.
-
#line_no ⇒ Object
Returns the value of attribute line_no.
-
#node_id ⇒ Object
Returns the value of attribute node_id.
-
#slot_offset ⇒ Object
Returns the value of attribute slot_offset.
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events
19 20 21 |
# File 'lib/optimize/ir/line_entry.rb', line 19 def events @events end |
#inst ⇒ Object
Returns the value of attribute inst
19 20 21 |
# File 'lib/optimize/ir/line_entry.rb', line 19 def inst @inst end |
#line_no ⇒ Object
Returns the value of attribute line_no
19 20 21 |
# File 'lib/optimize/ir/line_entry.rb', line 19 def line_no @line_no end |
#node_id ⇒ Object
Returns the value of attribute node_id
19 20 21 |
# File 'lib/optimize/ir/line_entry.rb', line 19 def node_id @node_id end |
#slot_offset ⇒ Object
Returns the value of attribute slot_offset
19 20 21 |
# File 'lib/optimize/ir/line_entry.rb', line 19 def slot_offset @slot_offset end |