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.



62
63
64
65
# File 'lib/ytljit/type.rb', line 62

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

Instance Method Details

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



75
76
77
# File 'lib/ytljit/type.rb', line 75

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

#alignmentObject



71
72
73
# File 'lib/ytljit/type.rb', line 71

def alignment
  @type.alignment
end

#sizeObject



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

def size
  @size * @type.size
end