Class: YTLJit::RubyType::DefaultType0

Inherits:
BaseType show all
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

#asm_type, #ruby_type

Instance Method Summary collapse

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, type_tab

Constructor Details

#initializeDefaultType0

Returns a new instance of DefaultType0.



230
231
232
# File 'lib/ytljit/vm_type.rb', line 230

def initialize
  super(Object)
end

Instance Method Details

#==(other) ⇒ Object



246
247
248
249
250
251
252
253
# File 'lib/ytljit/vm_type.rb', line 246

def ==(other)
  if other then
    self.ruby_type == other.ruby_type and 
      boxed == other.boxed
  else
    nil
  end
end

#boxedObject



234
235
236
# File 'lib/ytljit/vm_type.rb', line 234

def boxed
  true
end

#to_boxObject



242
243
244
# File 'lib/ytljit/vm_type.rb', line 242

def to_box
  self
end

#to_unboxObject



238
239
240
# File 'lib/ytljit/vm_type.rb', line 238

def to_unbox
  self
end