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

Constant Summary

Constants included from AbsArch

AbsArch::AL, AbsArch::BL, AbsArch::CL, AbsArch::DL, AbsArch::FUNC_ARG, AbsArch::FUNC_ARG_YTL, AbsArch::FUNC_FLOAT_ARG, AbsArch::FUNC_FLOAT_ARG_YTL, AbsArch::INDIRECT_BPR, AbsArch::INDIRECT_RETR, AbsArch::INDIRECT_SPR, AbsArch::INDIRECT_TMPR, AbsArch::INDIRECT_TMPR2, AbsArch::INDIRECT_TMPR3

Constants included from SSE

SSE::XMM0, SSE::XMM1, SSE::XMM2, SSE::XMM3, SSE::XMM4, SSE::XMM5, SSE::XMM6, SSE::XMM7

Instance Attribute Summary

Attributes inherited from BaseType

#asm_type, #ruby_type

Instance Method Summary collapse

Methods included from VM::TypeCodeGen::DefaultTypeCodeGen

#copy_type, #gen_boxing, #gen_copy, #gen_unboxing, #have_element?, #include_nil?, #init_type, #inspect, #instance

Methods included from VM::TypeCodeGen::TypeUtil

#gen_copy_common

Methods included from VM::CommonCodeGen

#dump_context, #gen_alloca, #gen_call, #gen_save_thepr

Methods inherited from BaseType

#abnormal?, from_object, from_ruby_class, related_ruby_class, #ruby_type_raw, type_tab

Constructor Details

#initializeDefaultType0

Returns a new instance of DefaultType0.



276
277
278
# File 'lib/ytljit/vm_type.rb', line 276

def initialize
  super(Object)
end

Instance Method Details

#==(other) ⇒ Object



292
293
294
295
296
297
298
299
# File 'lib/ytljit/vm_type.rb', line 292

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

#boxedObject



280
281
282
# File 'lib/ytljit/vm_type.rb', line 280

def boxed
  true
end

#to_boxObject



288
289
290
# File 'lib/ytljit/vm_type.rb', line 288

def to_box
  @@boxed_type_tab[ruby_type].instance
end

#to_unboxObject



284
285
286
# File 'lib/ytljit/vm_type.rb', line 284

def to_unbox
  @@unboxed_type_tab[ruby_type].instance
end