Class: YTLJit::VM::Node::SendNewArenaNode

Inherits:
SendNewNode
  • Object
show all
Defined in:
lib/ytl/accmem.rb

Instance Method Summary collapse

Instance Method Details

#collect_candidate_type_regident(context, slf) ⇒ Object



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/ytl/accmem.rb', line 245

def collect_candidate_type_regident(context, slf)
  slfcls = @arguments[2].get_constant_value
  tt = RubyType::BaseType.from_ruby_class(slfcls[0])
  if tt.ruby_type == Runtime::Arena then
    add_type(context.to_signature, tt)
      
    if @initmethod.is_a?(SendInitializeNode) then
      # Get alloc method call node
      @initmethod = @initmethod.arguments[2]
    end

    return context
  end

  return super
end

#traverse_childlen {|@func| ... } ⇒ Object

Yields:

  • (@func)


237
238
239
240
241
242
243
# File 'lib/ytl/accmem.rb', line 237

def traverse_childlen
  @arguments.each do |arg|
    yield arg
  end
  yield @func
  yield @body
end