class SyntaxTree::YARV::OptGetConstantPath
~~~
::Object
~~~ruby
### Usage
the value of the constant onto the stack.
names. It accepts as its argument an array of constant names, and pushes
`opt_getconstant_path` performs a constant lookup on a chain of constant
### Summary
def ==(other)
def ==(other) other.is_a?(OptGetConstantPath) && other.names == names end
def call(vm)
def call(vm) current = vm.frame._self current = current.class unless current.is_a?(Class) names.each do |name| current = name == :"" ? Object : current.const_get(name) end vm.push(current) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { names: names } end
def disasm(fmt)
def disasm(fmt) cache = "<ic:0 #{names.join("::")}>" fmt.instruction("opt_getconstant_path", [cache]) end
def initialize(names)
def initialize(names) @names = names end
def length
def length 2 end
def pushes
def pushes 1 end
def to_a(_iseq)
def to_a(_iseq) [:opt_getconstant_path, names] end