Class: SyntaxTree::YARV::Pop
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::Pop
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
Overview
### Summary
pop pops the top value off the stack.
### Usage
~~~ruby a ||= 2 ~~~
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
4744 4745 4746 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4744 def ==(other) other.is_a?(Pop) end |
#call(vm) ⇒ Object
4764 4765 4766 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4764 def call(vm) vm.pop end |
#canonical ⇒ Object
4760 4761 4762 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4760 def canonical self end |
#deconstruct_keys(_keys) ⇒ Object
4740 4741 4742 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4740 def deconstruct_keys(_keys) {} end |
#disasm(fmt) ⇒ Object
4732 4733 4734 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4732 def disasm(fmt) fmt.instruction("pop") end |
#length ⇒ Object
4748 4749 4750 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4748 def length 1 end |
#pops ⇒ Object
4752 4753 4754 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4752 def pops 1 end |
#pushes ⇒ Object
4756 4757 4758 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4756 def pushes 0 end |
#to_a(_iseq) ⇒ Object
4736 4737 4738 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4736 def to_a(_iseq) [:pop] end |