class RubyRunJs::OPCODES::LOAD_OBJECT
Public Class Methods
new(props)
click to toggle source
props are string pairs (prop_name, kind) kind can be either i, g or s. (init, get, set)
# File lib/ruby_run_js/opcodes.rb, line 390 def initialize(props) @props = props end
Public Instance Methods
eval(ctx)
click to toggle source
# File lib/ruby_run_js/opcodes.rb, line 394 def eval(ctx) obj = ctx.builtin.new_object() if @props.length > 0 obj.init_with_props(@props, ctx.stack.pop(@props.length)) end ctx.stack.append(obj) nil end