Class: SyntaxTree::YARV::Nop
Overview
### Summary
nop is a no-operation instruction. It is used to pad the instruction sequence so there is a place for other instructions to jump to.
### Usage
~~~ruby raise rescue true ~~~
Instance Method Summary
collapse
Methods inherited from Instruction
#branch_targets, #canonical, #falls_through?, #leaves?, #length, #pops, #pushes
Instance Method Details
#==(other) ⇒ Object
2478
2479
2480
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2478
def ==(other)
other.is_a?(Nop)
end
|
#call(vm) ⇒ Object
2482
2483
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2482
def call(vm)
end
|
#deconstruct_keys(_keys) ⇒ Object
2474
2475
2476
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2474
def deconstruct_keys(_keys)
{}
end
|
#disasm(fmt) ⇒ Object
2466
2467
2468
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2466
def disasm(fmt)
fmt.instruction("nop")
end
|
#side_effects? ⇒ Boolean
2485
2486
2487
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2485
def side_effects?
false
end
|
#to_a(_iseq) ⇒ Object
2470
2471
2472
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2470
def to_a(_iseq)
[:nop]
end
|