Class: SyntaxTree::YARV::PutObjectInt2Fix1
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
Methods inherited from Instruction
#branch_targets, #falls_through?, #leaves?, #length, #pops
Instance Method Details
#==(other) ⇒ Object
4739
4740
4741
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4739
def ==(other)
other.is_a?(PutObjectInt2Fix1)
end
|
#call(vm) ⇒ Object
4751
4752
4753
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4751
def call(vm)
canonical.call(vm)
end
|
#canonical ⇒ Object
4747
4748
4749
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4747
def canonical
PutObject.new(1)
end
|
#deconstruct_keys(_keys) ⇒ Object
4735
4736
4737
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4735
def deconstruct_keys(_keys)
{}
end
|
#disasm(fmt) ⇒ Object
4727
4728
4729
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4727
def disasm(fmt)
fmt.instruction("putobject_INT2FIX_1_")
end
|
#pushes ⇒ Object
4743
4744
4745
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4743
def pushes
1
end
|
#side_effects? ⇒ Boolean
4755
4756
4757
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4755
def side_effects?
false
end
|
#to_a(_iseq) ⇒ Object
4731
4732
4733
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4731
def to_a(_iseq)
[:putobject_INT2FIX_1_]
end
|