Class: SyntaxTree::YARV::Nop
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::Nop
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
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
- #call(vm) ⇒ Object
- #canonical ⇒ Object
- #disasm(fmt) ⇒ Object
- #length ⇒ Object
- #pops ⇒ Object
- #pushes ⇒ Object
- #to_a(_iseq) ⇒ Object
Instance Method Details
#call(vm) ⇒ Object
2404 2405 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2404 def call(vm) end |
#canonical ⇒ Object
2400 2401 2402 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2400 def canonical self end |
#disasm(fmt) ⇒ Object
2380 2381 2382 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2380 def disasm(fmt) fmt.instruction("nop") end |
#length ⇒ Object
2388 2389 2390 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2388 def length 1 end |
#pops ⇒ Object
2392 2393 2394 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2392 def pops 0 end |
#pushes ⇒ Object
2396 2397 2398 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2396 def pushes 0 end |
#to_a(_iseq) ⇒ Object
2384 2385 2386 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2384 def to_a(_iseq) [:nop] end |