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

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

Instance Method Summary collapse

Instance Method Details

#copy_typeObject



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

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

#gen_boxing(context) ⇒ Object



21
22
23
# File 'lib/ytljit/vm_type_gen.rb', line 21

def gen_boxing(context)
  context
end

#gen_copy(context) ⇒ Object



29
30
31
# File 'lib/ytljit/vm_type_gen.rb', line 29

def gen_copy(context)
  context
end

#gen_unboxing(context) ⇒ Object



25
26
27
# File 'lib/ytljit/vm_type_gen.rb', line 25

def gen_unboxing(context)
  context
end

#have_element?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/ytljit/vm_type_gen.rb', line 12

def have_element?
  false
end

#include_nil?Boolean

Can represent nil by this format

Returns:

  • (Boolean)


17
18
19
# File 'lib/ytljit/vm_type_gen.rb', line 17

def include_nil?
  true
end

#init_typeObject



9
10
# File 'lib/ytljit/vm_type_gen.rb', line 9

def init_type
end

#inspectObject



33
34
35
# File 'lib/ytljit/vm_type_gen.rb', line 33

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

#instanceObject



5
6
7
# File 'lib/ytljit/vm_type_gen.rb', line 5

def instance
  self
end