Class: SyntaxTree::YARV::PutObjectInt2Fix0
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::PutObjectInt2Fix0
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
Overview
### Summary
putobject_INT2FIX_0_ pushes 0 on the stack. It is a specialized instruction resulting from the operand unification optimization. It is equivalent to ‘putobject 0`.
### Usage
~~~ruby 0 ~~~
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
4281 4282 4283 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4281 def call(vm) canonical.call(vm) end |
#canonical ⇒ Object
4277 4278 4279 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4277 def canonical PutObject.new(0) end |
#disasm(fmt) ⇒ Object
4257 4258 4259 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4257 def disasm(fmt) fmt.instruction("putobject_INT2FIX_0_") end |
#length ⇒ Object
4265 4266 4267 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4265 def length 1 end |
#pops ⇒ Object
4269 4270 4271 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4269 def pops 0 end |
#pushes ⇒ Object
4273 4274 4275 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4273 def pushes 1 end |
#to_a(_iseq) ⇒ Object
4261 4262 4263 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4261 def to_a(_iseq) [:putobject_INT2FIX_0_] end |