class RubyRunJs::OPCODES::LOAD_N_TUPLE

Public Class Methods

new(n) click to toggle source

loads the tuple composed of n last elements on stack. elements are popped.

# File lib/ruby_run_js/opcodes.rb, line 290
def initialize(n)
  @n = n
end

Public Instance Methods

eval(ctx) click to toggle source
# File lib/ruby_run_js/opcodes.rb, line 294
def eval(ctx)
  tup = ctx.stack.pop(@n)
  ctx.stack.append(tup)
  nil
end