Class: YTLJit::RubyType::DefaultType0
- Includes:
- VM::TypeCodeGen::DefaultTypeCodeGen
- Defined in:
- lib/ytljit/vm_type.rb
Overview
Same as VALUE type in MRI Type0 makes you can define “Defalut” class
Instance Attribute Summary
Attributes inherited from BaseType
Instance Method Summary collapse
- #==(other) ⇒ Object
- #boxed ⇒ Object
-
#initialize ⇒ DefaultType0
constructor
A new instance of DefaultType0.
- #to_box ⇒ Object
- #to_unbox ⇒ Object
Methods included from VM::TypeCodeGen::DefaultTypeCodeGen
#gen_boxing, #gen_copy, #gen_unboxing, #have_element?, #init_type, #inspect, #instance
Methods inherited from BaseType
from_object, from_ruby_class, related_ruby_class, #ruby_type_raw, type_tab
Constructor Details
#initialize ⇒ DefaultType0
Returns a new instance of DefaultType0.
254 255 256 |
# File 'lib/ytljit/vm_type.rb', line 254 def initialize super(Object) end |
Instance Method Details
#==(other) ⇒ Object
270 271 272 273 274 275 276 277 |
# File 'lib/ytljit/vm_type.rb', line 270 def ==(other) if other then self.ruby_type == other.ruby_type and boxed == other.boxed else nil end end |
#boxed ⇒ Object
258 259 260 |
# File 'lib/ytljit/vm_type.rb', line 258 def boxed true end |
#to_box ⇒ Object
266 267 268 |
# File 'lib/ytljit/vm_type.rb', line 266 def to_box @@boxed_type_tab[ruby_type].instance end |
#to_unbox ⇒ Object
262 263 264 |
# File 'lib/ytljit/vm_type.rb', line 262 def to_unbox @@unboxed_type_tab[ruby_type].instance end |