Module: YTLJit

Defined in:
lib/ytljit/asmext.rb,
lib/ytljit.rb,
lib/ytljit/vm.rb,
lib/runtime/gc.rb,
lib/ytljit/asm.rb,
lib/ytljit/type.rb,
lib/ytljit/util.rb,
lib/ytljit/arena.rb,
lib/ytljit/error.rb,
lib/ytljit/struct.rb,
lib/runtime/object.rb,
lib/ytljit/asmutil.rb,
lib/ytljit/marshal.rb,
lib/ytljit/vm_type.rb,
lib/ytljit/vm_trans.rb,
lib/ytljit/codespace.rb,
lib/ytljit/asmext_x64.rb,
lib/ytljit/asmext_x86.rb,
lib/ytljit/vm_codegen.rb,
lib/ytljit/vm_inspect.rb,
lib/ytljit/vm_typeinf.rb,
lib/ytljit/dyna_method.rb,
lib/ytljit/instruction.rb,
lib/ytljit/vm_sendnode.rb,
lib/ytljit/vm_type_gen.rb,
lib/ytljit/vm_cruby_obj.rb,
lib/ytljit/instruction_ia.rb,
lib/ytljit/instruction_x64.rb,
lib/ytljit/instruction_x86.rb,
lib/ytljit/vm_inline_method.rb,
ext/ytljit.c

Overview


Extended Specication of Assembler Level Layer

Defined Under Namespace

Modules: AbsArch, AsmType, AssemblerUtilIA, AssemblerUtilIAModrm, AssemblerUtilX64, AssemblerUtilX86, FuncArgX64CommonMixin, FunctionArgumentX64MixinCommon, FunctionArgumentX64MixinFloat, FunctionArgumentX64MixinInt, FunctionArgumentX86Mixin, GeneratorExtendMixin, GeneratorExtendX64Mixin, GeneratorExtendX86Mixin, InternalRubyType, OpVarValueMixin, RubyType, Runtime, SSE, SSE64, TypeUtil, VM, X64, X86 Classes: AsmError, Assembler, ClassClassWrapper, CodeSpace, CuckooHash, DummyOutputStream, FileOutputStream, FuncArgInfo, FunctionArgument, FunctionArgumentFloat, FunctionArgumentInt, Generator, GeneratorExtend, GeneratorIABinary, IlligalOperand, OpAL, OpBL, OpCL, OpDL, OpEAX, OpEBP, OpEBX, OpECX, OpEDI, OpEDX, OpESI, OpESP, OpImmidiate, OpImmidiate16, OpImmidiate32, OpImmidiate64, OpImmidiate8, OpIndirect, OpMem16, OpMem32, OpMem64, OpMem8, OpMemory, OpR10, OpR11, OpR12, OpR13, OpR14, OpR15, OpR8, OpR9, OpRAX, OpRBP, OpRBX, OpRCX, OpRDI, OpRDX, OpRSI, OpRSP, OpRXMM0, OpRXMM1, OpRXMM10, OpRXMM11, OpRXMM12, OpRXMM13, OpRXMM14, OpRXMM15, OpRXMM2, OpRXMM3, OpRXMM4, OpRXMM5, OpRXMM6, OpRXMM7, OpRXMM8, OpRXMM9, OpReg32, OpReg64, OpReg8, OpRegXMM, OpRegistor, OpVarImmidiate32, OpVarImmidiate64, OpVarMem32, OpVarMem64, Operand, OutputStream, StepHandler, TypedData, ValueSpace

Constant Summary collapse

VERSION =
"0.0.9"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.address_of(symstr) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'ext/ytljit.c', line 21

VALUE 
ytl_address_of(VALUE self, VALUE symstr)
{
  int i;
  char *sym;
  void *add;

  sym = StringValuePtr(symstr);
  for (i = 0; i < used_dl_handles; i++) {
    if ((add = dlsym(dl_handles[i], sym)) != NULL) {
      return ULONG2NUM((uintptr_t)add);
    }
  }

  return Qnil;
}

.memref(addr) ⇒ Object



213
214
215
216
217
# File 'ext/ytljit.c', line 213

VALUE 
ytl_memref(VALUE self, VALUE addr)
{
  return ULONG2NUM(*((uintptr_t *)NUM2LONG(addr)));
}

.variable_argument?(para) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
29
30
# File 'lib/ytljit/util.rb', line 26

def variable_argument?(para)
  para.any? {|item|
    item[0] != :req
  }
end

Instance Method Details

#boxingObject



48
49
50
# File 'lib/ytljit/util.rb', line 48

def boxing
  self
end

#unboxing(value) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/ytljit/util.rb', line 33

def unboxing(value)
  if value & 1 then
    # fixnum

    value >> 1
  elsif value == 4
    nil
  elsif value == 2
    true
  elsif value == 0
    false
  else
    value
  end
end