Class: RubyVM::Instruction::NEWARRAY

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

Instance Method Summary collapse

Instance Method Details

#bytedecode(env) ⇒ Object



584
585
586
587
588
589
590
591
592
# File 'lib/decompiler/vm/bytedecoder.rb', line 584

def bytedecode(env)
  i = @operands[0]
  args = []
  while i > 0 do
    args.unshift env.stack.pop
    i -= 1
  end
  env.stack.push Expression::Array.new(env.pc, args)
end