Class: Furnace::AVM2::ABC::TraitSlot

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

Constant Summary

Constants included from RecordWithValue

RecordWithValue::XlatTable

Instance Attribute Summary

Attributes inherited from Binary::Record

#root

Instance Method Summary collapse

Methods included from RecordWithValue

#printable_value, #ruby_value, #value

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



17
18
19
20
21
22
23
# File 'lib/furnace-avm2/abc/metadata/trait_slot.rb', line 17

def collect_ns(options)
  if type
    type.collect_ns(options)
  else
    []
  end
end

#to_astlet(trait) ⇒ Object



13
14
15
# File 'lib/furnace-avm2/abc/metadata/trait_slot.rb', line 13

def to_astlet(trait)
  AST::Node.new(:slot, [ (trait.name ? trait.name.to_astlet : nil), (type ? type.to_astlet : nil), value, idx ])
end