class SyntaxTree::YARV::OptNot
### Summary
‘opt_not` negates the value on top of the stack by calling the `!` method on it. It pops the receiver off the stack and pushes on the result.
### Usage
~~~ruby !true ~~~
Attributes
calldata[R]
Public Class Methods
new(calldata)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3948 def initialize(calldata) @calldata = calldata end
Public Instance Methods
==(other)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3964 def ==(other) other.is_a?(OptNot) && other.calldata == calldata end
call(vm)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3984 def call(vm) canonical.call(vm) end
canonical()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3980 def canonical Send.new(calldata, nil) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3960 def deconstruct_keys(_keys) { calldata: calldata } end
disasm(fmt)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3952 def disasm(fmt) fmt.instruction("opt_not", [fmt.calldata(calldata)]) end
length()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3968 def length 2 end
pops()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3972 def pops 1 end
pushes()
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3976 def pushes 1 end
to_a(_iseq)
click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 3956 def to_a(_iseq) [:opt_not, calldata.to_h] end