class RubyRunJs::OPCODES::STORE_OP

Public Class Methods

new(identifier, op) click to toggle source
# File lib/ruby_run_js/opcodes.rb, line 540
def initialize(identifier, op)
  @identifier = identifier
  @op = op
end

Public Instance Methods

eval(ctx) click to toggle source
# File lib/ruby_run_js/opcodes.rb, line 545
def eval(ctx)
  value = ctx.stack.pop()
  new_value = binary_operation(@op, ctx.get_binding_value(@identifier), value)
  ctx.set_binding(@identifier, new_value)
  ctx.stack.append(new_value)
  nil
end