class SyntaxTree::YARV::OptNEq


~~~
2 != 2
~~~ruby
### Usage
result.
pops both the receiver and the argument off the stack and pushes on the
`opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It
the result. This allows ‘opt_neq` to use the fast paths optimized in
the stack are not equal by testing their equality and calling the `!` on
`opt_neq` is an optimization that tests whether two values at the top of
### Summary

def ==(other)

def ==(other)
  other.is_a?(OptNEq) && other.eq_calldata == eq_calldata &&
    other.neq_calldata == neq_calldata
end

def call(vm)

def call(vm)
  receiver, argument = vm.pop(2)
  vm.push(receiver != argument)
end

def deconstruct_keys(_keys)

def deconstruct_keys(_keys)
  { eq_calldata: eq_calldata, neq_calldata: neq_calldata }
end

def disasm(fmt)

def disasm(fmt)
  fmt.instruction(
    "opt_neq",
    [fmt.calldata(eq_calldata), fmt.calldata(neq_calldata)]
  )
end

def initialize(eq_calldata, neq_calldata)

def initialize(eq_calldata, neq_calldata)
  @eq_calldata = eq_calldata
  @neq_calldata = neq_calldata
end

def length

def length
  3
end

def pops

def pops
  2
end

def pushes

def pushes
  1
end

def to_a(_iseq)

def to_a(_iseq)
  [:opt_neq, eq_calldata.to_h, neq_calldata.to_h]
end