class SyntaxTree::YARV::PutObject

### Summary

‘putobject` pushes a known value onto the stack.

### Usage

~~~ruby 5 ~~~

Attributes

object[R]

Public Class Methods

new(object) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4532
def initialize(object)
  @object = object
end

Public Instance Methods

==(other) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4548
def ==(other)
  other.is_a?(PutObject) && other.object == object
end
call(vm) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4560
def call(vm)
  vm.push(object)
end
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4544
def deconstruct_keys(_keys)
  { object: object }
end
disasm(fmt) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4536
def disasm(fmt)
  fmt.instruction("putobject", [fmt.object(object)])
end
length() click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4552
def length
  2
end
pushes() click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4556
def pushes
  1
end
side_effects?() click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4564
def side_effects?
  false
end
to_a(_iseq) click to toggle source
# File lib/syntax_tree/yarv/instructions.rb, line 4540
def to_a(_iseq)
  [:putobject, object]
end