Class: RubyVM::Instruction::POP

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

Instance Method Summary collapse

Instance Method Details

#bytedecode(env) ⇒ Object



757
758
759
760
761
762
763
764
765
766
767
# File 'lib/decompiler/vm/bytedecoder.rb', line 757

def bytedecode(env)
  top = env.stack[-1]
  if top.is_a?(Expression::Send) and top.is_assignment then
    # special case - the return value from the assignment gets
    # thrown away and the result is the rhs
    env.remember env.stack[-2]
    env.stack.delete_at(-2)
  end
  env.remember top
  env.stack.pop
end