Module: YTLJit::VM::TypeCodeGen::ArrayTypeCommonCodeGen
- Included in:
- ArrayTypeBoxedCodeGen, ArrayTypeUnboxedCodeGen
- Defined in:
- lib/ytljit/vm_type_gen.rb
Instance Attribute Summary collapse
-
#element_type ⇒ Object
Returns the value of attribute element_type.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #have_element? ⇒ Boolean
- #init ⇒ Object
-
#inspect ⇒ Object
def eql?(other) if other then oc = other.ruby_type sc = self.ruby_type.
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
167 168 169 |
# File 'lib/ytljit/vm_type_gen.rb', line 167 def element_type @element_type end |
Instance Method Details
#==(other) ⇒ Object
173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# File 'lib/ytljit/vm_type_gen.rb', line 173 def ==(other) if other then oc = other.ruby_type sc = self.ruby_type sc == oc and ((other.element_type == nil and @element_type == nil) or (other.element_type and @element_type and @element_type[nil] == other.element_type[nil])) and boxed == other.boxed else false end end |
#have_element? ⇒ Boolean
169 170 171 |
# File 'lib/ytljit/vm_type_gen.rb', line 169 def have_element? true end |
#init ⇒ Object
163 164 165 |
# File 'lib/ytljit/vm_type_gen.rb', line 163 def init @element_type = nil end |
#inspect ⇒ Object
def eql?(other)
if other then
oc = other.ruby_type
sc = self.ruby_type
sc == oc and
boxed == other.boxed
else
false
end
end
202 203 204 205 |
# File 'lib/ytljit/vm_type_gen.rb', line 202 def inspect etype = @element_type.inspect "{ #{boxed ? "BOXED" : "UNBOXED"} #{@ruby_type} (#{etype})}" end |