Module: YTLJit::VM::TypeCodeGen::DefaultTypeCodeGen

Includes:
TypeUtil
Included in:
RubyType::DefaultType0, RubyType::RubyTypeBoxed, RubyType::RubyTypeUnboxed
Defined in:
lib/ytljit/vm_type_gen.rb

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 Method Summary collapse

Methods included from TypeUtil

#gen_copy_common

Methods included from CommonCodeGen

#dump_context, #gen_alloca, #gen_call, #gen_save_thepr

Instance Method Details

#==(other) ⇒ Object



72
73
74
75
76
# File 'lib/ytljit/vm_type_gen.rb', line 72

def ==(other)
  other and
    self.ruby_type == other.ruby_type and
    self.boxed == other.boxed
end

#copy_typeObject



67
68
69
70
# File 'lib/ytljit/vm_type_gen.rb', line 67

def copy_type
  # Do not copy. It is immutable
  self
end

#gen_boxing(context) ⇒ Object



51
52
53
# File 'lib/ytljit/vm_type_gen.rb', line 51

def gen_boxing(context)
  context
end

#gen_copy(context) ⇒ Object



59
60
61
# File 'lib/ytljit/vm_type_gen.rb', line 59

def gen_copy(context)
  gen_copy_common(context, 'rb_obj_dup')
end

#gen_unboxing(context) ⇒ Object



55
56
57
# File 'lib/ytljit/vm_type_gen.rb', line 55

def gen_unboxing(context)
  context
end

#have_element?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/ytljit/vm_type_gen.rb', line 42

def have_element?
  false
end

#include_nil?Boolean

Can represent nil by this format

Returns:

  • (Boolean)


47
48
49
# File 'lib/ytljit/vm_type_gen.rb', line 47

def include_nil?
  true
end

#init_typeObject



39
40
# File 'lib/ytljit/vm_type_gen.rb', line 39

def init_type
end

#inspectObject



63
64
65
# File 'lib/ytljit/vm_type_gen.rb', line 63

def inspect
  "{ #{boxed ? "BOXED" : "UNBOXED"} #{@ruby_type}}"
end

#instanceObject



35
36
37
# File 'lib/ytljit/vm_type_gen.rb', line 35

def instance
  self
end