Class: SyntaxTree::YARV::PutObjectInt2Fix1
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::PutObjectInt2Fix1
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
Overview
### Summary
putobject_INT2FIX_1_ pushes 1 on the stack. It is a specialized instruction resulting from the operand unification optimization. It is equivalent to ‘putobject 1`.
### Usage
~~~ruby 1 ~~~
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
4323 4324 4325 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4323 def call(vm) canonical.call(vm) end |
#canonical ⇒ Object
4319 4320 4321 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4319 def canonical PutObject.new(1) end |
#disasm(fmt) ⇒ Object
4299 4300 4301 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4299 def disasm(fmt) fmt.instruction("putobject_INT2FIX_1_") end |
#length ⇒ Object
4307 4308 4309 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4307 def length 1 end |
#pops ⇒ Object
4311 4312 4313 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4311 def pops 0 end |
#pushes ⇒ Object
4315 4316 4317 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4315 def pushes 1 end |
#to_a(_iseq) ⇒ Object
4303 4304 4305 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4303 def to_a(_iseq) [:putobject_INT2FIX_1_] end |