class RubyRunJs::OPCODES::TYPEOF

special unary operations

Public Class Methods

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

Public Instance Methods

eval(ctx) click to toggle source
# File lib/ruby_run_js/opcodes.rb, line 57
def eval(ctx)
  # typeof something_undefined  does not throw reference error
  val = ctx.get_binding_value(@identifier, false)
  ctx.stack.append(typeof_uop(val))
  nil
end