Class: SyntaxTree::YARV::Leave
- Inherits:
-
Object
- Object
- SyntaxTree::YARV::Leave
- Defined in:
- lib/syntax_tree/yarv/instructions.rb
Overview
### Summary
leave exits the current frame.
### Usage
~~~ruby ;; ~~~
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
2166 2167 2168 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2166 def call(vm) vm.leave end |
#canonical ⇒ Object
2162 2163 2164 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2162 def canonical self end |
#disasm(fmt) ⇒ Object
2140 2141 2142 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2140 def disasm(fmt) fmt.instruction("leave") end |
#length ⇒ Object
2148 2149 2150 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2148 def length 1 end |
#pops ⇒ Object
2152 2153 2154 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2152 def pops 1 end |
#pushes ⇒ Object
2156 2157 2158 2159 2160 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2156 def pushes # TODO: This is wrong. It should be 1. But it's 0 for now because # otherwise the stack size is incorrectly calculated. 0 end |
#to_a(_iseq) ⇒ Object
2144 2145 2146 |
# File 'lib/syntax_tree/yarv/instructions.rb', line 2144 def to_a(_iseq) [:leave] end |