Sha256: ce31bb61c48436496c778918230c6bca0f03a5ae53f5535a02e78002b7321b2a

Contents?: true

Size: 650 Bytes

Versions: 1

Compression:

Stored size: 650 Bytes

Contents

#include "cruby.h"

VALUE vm_get_cbase(const VALUE *ep);
VALUE vm_get_const_base(const VALUE *ep);
VALUE
llrb_insn_putspecialobject(rb_num_t value_type) {
  enum vm_special_object_type type = (enum vm_special_object_type)value_type;

  switch (type) {
    case VM_SPECIAL_OBJECT_VMCORE:
      return rb_mRubyVMFrozenCore;
    case VM_SPECIAL_OBJECT_CBASE: {
      rb_thread_t *th = GET_THREAD();
      return vm_get_cbase(th->cfp->ep);
    }
    case VM_SPECIAL_OBJECT_CONST_BASE: {
      rb_thread_t *th = GET_THREAD();
      return vm_get_const_base(th->cfp->ep);
    }
    default:
      rb_bug("putspecialobject insn: unknown value_type");
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
llrb-0.0.1 ext/llrb_insn_putspecialobject.c