Class: Furnace::AVM2::ABC::MultinameKindMultiname

Inherits:
Record show all
Defined in:
lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb

Instance Attribute Summary

Attributes inherited from Binary::Record

#root

Instance Method Summary collapse

Methods inherited from Record

abc_array_of, flag, pool_array, pool_array_of, pool_ref, subset, xlat_direct, xlat_field, xlat_inverse

Methods inherited from Binary::Record

#byte_length, codegen, codegen_each, inherited, #inspect, method_missing, register, #to_hash, trace, trace_scope, trace_value

Instance Method Details

#collect_ns(options) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb', line 14

def collect_ns(options)
  ns = ns_set.ns[0]
  return if options[:no_ns].include?(ns)

  names = options[:names]
  if names[name].nil?
    options[:ns].add ns if ns
    names[name] = ns
  elsif names[name] != ns
    options[:no_ns].add ns if ns
  end
end

#context_sizeObject



27
28
29
# File 'lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb', line 27

def context_size
  0
end

#to_astletObject



10
11
12
# File 'lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb', line 10

def to_astlet
  AST::Node.new(:m, [ ns_set.to_astlet, name ])
end

#to_sObject



6
7
8
# File 'lib/furnace-avm2/abc/metadata/multiname_kind_multiname.rb', line 6

def to_s
  "#{ns_set}::#{name || '*'}"
end