Module: YTLJit::RubyType

Defined in:
lib/ytljit/vm_type.rb

Defined Under Namespace

Classes: BaseType, DefaultType0, RubyTypeBoxed, RubyTypeUnboxed

Class Method Summary collapse

Class Method Details

.define_wraped_class(klass, base = RubyTypeBoxed) ⇒ Object



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/ytljit/vm_type.rb', line 144

def self.define_wraped_class(klass, base = RubyTypeBoxed)
  cn = nil

  if klass then
    cn = klass.name.to_sym
    basett, boxtt, unboxtt = BaseType.type_tab
    if boxtt[cn] == nil then
      BaseType.related_ruby_class(klass, base)
    end

    boxobj = boxtt[cn]
    unboxobj = unboxtt[cn]
    [boxobj, unboxobj]
  end
end