Class: YTLJit::AsmType::PointedData
- Inherits:
-
TypeCommon
- Object
- TypeCommon
- YTLJit::AsmType::PointedData
- Defined in:
- lib/ytljit/type.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Attributes inherited from TypeCommon
Instance Method Summary collapse
- #[](*args) ⇒ Object
- #alignment ⇒ Object
-
#initialize(type, index, offset) ⇒ PointedData
constructor
A new instance of PointedData.
- #size ⇒ Object
Constructor Details
#initialize(type, index, offset) ⇒ PointedData
Returns a new instance of PointedData.
27 28 29 30 31 |
# File 'lib/ytljit/type.rb', line 27 def initialize(type, index, offset) @type = type @index = index @offset = offset + index * type.size end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
33 34 35 |
# File 'lib/ytljit/type.rb', line 33 def index @index end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
34 35 36 |
# File 'lib/ytljit/type.rb', line 34 def offset @offset end |
Instance Method Details
#[](*args) ⇒ Object
40 41 42 |
# File 'lib/ytljit/type.rb', line 40 def [](*args) @type[*args] end |
#alignment ⇒ Object
44 45 46 |
# File 'lib/ytljit/type.rb', line 44 def alignment @type.alignment end |
#size ⇒ Object
36 37 38 |
# File 'lib/ytljit/type.rb', line 36 def size @type.size end |