mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 14:05:02 +02:00
15 lines
359 B
Ruby
15 lines
359 B
Ruby
module RubyVM::MJIT
|
|
class JITState < Struct.new(
|
|
:iseq,
|
|
:pc, # @param [Integer] The JIT target PC
|
|
:cfp, # @param `RubyVM::MJIT::CPointer::Struct_rb_control_frame_t` The JIT source CFP (before MJIT is called)
|
|
)
|
|
def operand(index)
|
|
C.VALUE.new(pc)[index + 1]
|
|
end
|
|
|
|
def at_current_insn?
|
|
pc == cfp.pc.to_i
|
|
end
|
|
end
|
|
end
|