Class: YTLJit::AsmType::Array
- Inherits:
-
TypeCommon
- Object
- TypeCommon
- YTLJit::AsmType::Array
- Defined in:
- lib/ytljit/type.rb
Instance Attribute Summary
Attributes inherited from TypeCommon
Instance Method Summary collapse
- #[](n = 0, offset = 0) ⇒ Object
- #alignment ⇒ Object
-
#initialize(type, size) ⇒ Array
constructor
A new instance of Array.
- #size ⇒ Object
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 |
#alignment ⇒ Object
71 72 73 |
# File 'lib/ytljit/type.rb', line 71 def alignment @type.alignment end |
#size ⇒ Object
67 68 69 |
# File 'lib/ytljit/type.rb', line 67 def size @size * @type.size end |