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
4628
4629
4630
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4628
def ==(other)
other.is_a?(PutObjectInt2Fix1)
end
|
#call(vm) ⇒ Object
4640
4641
4642
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4640
def call(vm)
canonical.call(vm)
end
|
#canonical ⇒ Object
4636
4637
4638
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4636
def canonical
PutObject.new(1)
end
|
#deconstruct_keys(_keys) ⇒ Object
4624
4625
4626
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4624
def deconstruct_keys(_keys)
{}
end
|
#disasm(fmt) ⇒ Object
4616
4617
4618
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4616
def disasm(fmt)
fmt.instruction("putobject_INT2FIX_1_")
end
|
#pushes ⇒ Object
4632
4633
4634
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4632
def pushes
1
end
|
#side_effects? ⇒ Boolean
4644
4645
4646
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4644
def side_effects?
false
end
|
#to_a(_iseq) ⇒ Object
4620
4621
4622
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 4620
def to_a(_iseq)
[:putobject_INT2FIX_1_]
end
|