Class: SyntaxTree::YARV::PutNil
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::PutNil
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
Overview
### Summary
putnil pushes a global nil object onto the stack.
### Usage
~~~ruby nil ~~~
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
4193 4194 4195 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4193 def call(vm) canonical.call(vm) end |
#canonical ⇒ Object
4189 4190 4191 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4189 def canonical PutObject.new(nil) end |
#disasm(fmt) ⇒ Object
4169 4170 4171 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4169 def disasm(fmt) fmt.instruction("putnil") end |
#length ⇒ Object
4177 4178 4179 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4177 def length 1 end |
#pops ⇒ Object
4181 4182 4183 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4181 def pops 0 end |
#pushes ⇒ Object
4185 4186 4187 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4185 def pushes 1 end |
#to_a(_iseq) ⇒ Object
4173 4174 4175 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4173 def to_a(_iseq) [:putnil] end |