Class: SyntaxTree::YARV::Leave
Overview
### Summary
‘leave` exits the current frame.
### Usage
~~~ruby ;; ~~~
Instance Method Summary
collapse
Methods inherited from Instruction
#branch_targets, #canonical, #falls_through?, #length, #side_effects?
Instance Method Details
#==(other) ⇒ Object
2329
2330
2331
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2329
def ==(other)
other.is_a?(Leave)
end
|
#call(vm) ⇒ Object
2343
2344
2345
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2343
def call(vm)
vm.leave
end
|
#deconstruct_keys(_keys) ⇒ Object
2325
2326
2327
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2325
def deconstruct_keys(_keys)
{}
end
|
#disasm(fmt) ⇒ Object
2317
2318
2319
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2317
def disasm(fmt)
fmt.instruction("leave")
end
|
#leaves? ⇒ Boolean
2347
2348
2349
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2347
def leaves?
true
end
|
#pops ⇒ Object
2333
2334
2335
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2333
def pops
1
end
|
#pushes ⇒ Object
2337
2338
2339
2340
2341
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2337
def pushes
0
end
|
#to_a(_iseq) ⇒ Object
2321
2322
2323
|
# File 'lib/syntax_tree/yarv/instructions.rb', line 2321
def to_a(_iseq)
[:leave]
end
|