class SyntaxTree::YARV::AdjustStack
### Summary
‘adjuststack` accepts a single integer argument and removes that many elements from the top of the stack.
### Usage
Attributes
Public Class Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 72 def initialize(number) @number = number end
Public Instance Methods
Source
# File lib/syntax_tree/yarv/instructions.rb, line 88 def ==(other) other.is_a?(AdjustStack) && other.number == number end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 100 def call(vm) vm.pop(number) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 84 def deconstruct_keys(_keys) { number: number } end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 76 def disasm(fmt) fmt.instruction("adjuststack", [fmt.object(number)]) end
Source
# File lib/syntax_tree/yarv/instructions.rb, line 80 def to_a(_iseq) [:adjuststack, number] end