class SyntaxTree::YARV::SetLocalWC1
~~~
self.then { value = 10 }
value = 5
~~~ruby
### Usage
top of the stack as determined by the index given as its only argument.
sets the value of a local variable on the parent frame to the value at the
`setlocal_WC_1` is a specialized version of the ‘setlocal` instruction. It
### Summary
def ==(other)
def ==(other) other.is_a?(SetLocalWC1) && other.index == index end
def call(vm)
def call(vm) canonical.call(vm) end
def canonical
def canonical SetLocal.new(index, 1) end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { index: index } end
def disasm(fmt)
def disasm(fmt) fmt.instruction("setlocal_WC_1", [fmt.local(index, implicit: 1)]) end
def initialize(index)
def initialize(index) @index = index end
def length
def length 2 end
def pops
def pops 1 end
def to_a(iseq)
def to_a(iseq) [:setlocal_WC_1, iseq.parent_iseq.local_table.offset(index)] end