Class: YTLJit::AsmType::Array

Inherits:
TypeCommon show all
Defined in:
lib/ytljit/type.rb

Instance Attribute Summary

Attributes inherited from TypeCommon

#type

Instance Method Summary collapse

Constructor Details

#initialize(type, size) ⇒ Array

Returns a new instance of Array.



68
69
70
71
# File 'lib/ytljit/type.rb', line 68

def initialize(type, size)
  @type = type
  @size = size
end

Instance Method Details

#[](n = 0, offset = 0) ⇒ Object



81
82
83
# File 'lib/ytljit/type.rb', line 81

def [](n = 0, offset = 0)
  PointedData.new(@type, n, offset)
end

#alignmentObject



77
78
79
# File 'lib/ytljit/type.rb', line 77

def alignment
  @type.alignment
end

#sizeObject



73
74
75
# File 'lib/ytljit/type.rb', line 73

def size
  @size * @type.size
end