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
- #call(vm) ⇒ Object
- #canonical ⇒ Object
- #disasm(fmt) ⇒ Object
- #length ⇒ Object
- #pops ⇒ Object
- #pushes ⇒ Object
- #to_a(_iseq) ⇒ Object
Instance Method Details
#call(vm) ⇒ Object
4153 4154 4155 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4153 def call(vm) vm.pop end |
#canonical ⇒ Object
4149 4150 4151 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4149 def canonical self end |
#disasm(fmt) ⇒ Object
4129 4130 4131 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4129 def disasm(fmt) fmt.instruction("pop") end |
#length ⇒ Object
4137 4138 4139 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4137 def length 1 end |
#pops ⇒ Object
4141 4142 4143 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4141 def pops 1 end |
#pushes ⇒ Object
4145 4146 4147 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4145 def pushes 0 end |
#to_a(_iseq) ⇒ Object
4133 4134 4135 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 4133 def to_a(_iseq) [:pop] end |