Class: YTLJit::AsmType::Union
Instance Attribute Summary
Attributes inherited from TypeCommon
#alignment, #type
Instance Method Summary
collapse
Methods inherited from Struct
#initialize, #type_of
Methods inherited from TypeCommon
#initialize
Instance Method Details
#[](name, base = 0) ⇒ Object
120
121
122
|
# File 'lib/ytljit/struct.rb', line 120
def [](name, base = 0)
StructMember.new(type_of(name), base)
end
|
#offset_of(name, base = 0) ⇒ Object
104
105
106
|
# File 'lib/ytljit/struct.rb', line 104
def offset_of(name, base = 0)
base
end
|
108
109
110
111
112
113
114
115
116
117
118
|
# File 'lib/ytljit/struct.rb', line 108
def size
if @size then
@size
else
@size = 0
@member.each do |e|
@size = [@size, e[2] ? e[2] : e[0].size].max
end
@size
end
end
|