Class: RubyVM::Instruction::SETN

Inherits:
Object
  • Object
show all
Defined in:
lib/decompiler/vm/bytedecoder.rb

Instance Method Summary collapse

Instance Method Details

#bytedecode(env) ⇒ Object

set nth stack entry to stack top



737
738
739
740
741
742
743
744
# File 'lib/decompiler/vm/bytedecoder.rb', line 737

def bytedecode(env)
  n = @operands[0]
  dest = -(n+1)
  if env.stack[dest].is_a?(Expression) then
    env.remember env.stack[dest]
  end
  env.stack[dest] = env.stack[-1]
end