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
- #==(other) ⇒ Object
- #call(vm) ⇒ Object
- #canonical ⇒ Object
- #deconstruct_keys(_keys) ⇒ Object
- #disasm(fmt) ⇒ Object
- #length ⇒ Object
- #pops ⇒ Object
- #pushes ⇒ Object
- #to_a(_iseq) ⇒ Object
Instance Method Details
#==(other) ⇒ Object
4946 4947 4948 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4946 def ==(other) other.is_a?(PutObjectInt2Fix1) end |
#call(vm) ⇒ Object
4966 4967 4968 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4966 def call(vm) canonical.call(vm) end |
#canonical ⇒ Object
4962 4963 4964 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4962 def canonical PutObject.new(1) end |
#deconstruct_keys(_keys) ⇒ Object
4942 4943 4944 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4942 def deconstruct_keys(_keys) {} end |
#disasm(fmt) ⇒ Object
4934 4935 4936 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4934 def disasm(fmt) fmt.instruction("putobject_INT2FIX_1_") end |
#length ⇒ Object
4950 4951 4952 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4950 def length 1 end |
#pops ⇒ Object
4954 4955 4956 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4954 def pops 0 end |
#pushes ⇒ Object
4958 4959 4960 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4958 def pushes 1 end |
#to_a(_iseq) ⇒ Object
4938 4939 4940 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4938 def to_a(_iseq) [:putobject_INT2FIX_1_] end |