Class: RubyVM
- Defined in:
- ext/internal/vm/vm.c,
ext/internal/vm/iseq/iseq.c,
ext/internal/thread/thread.c,
ext/internal/vm/constants/constants.c,
ext/internal/vm/instruction/instruction.c,
ext/internal/vm/inline_cache/inline_cache.c,
ext/internal/vm/control_frame/control_frame.c
Defined Under Namespace
Classes: ControlFrame, InlineCache, Instruction
Constant Summary collapse
- CALL_ARGS_SPLAT_BIT =
INT2NUM(VM_CALL_ARGS_SPLAT_BIT)
- CALL_ARGS_BLOCKARG_BIT =
INT2NUM(VM_CALL_ARGS_BLOCKARG_BIT)
- CALL_FCALL_BIT =
INT2NUM(VM_CALL_FCALL_BIT)
- CALL_VCALL_BIT =
INT2NUM(VM_CALL_VCALL_BIT)
- CALL_TAILCALL_BIT =
INT2NUM(VM_CALL_TAILCALL_BIT)
- CALL_TAILRECURSION_BIT =
INT2NUM(VM_CALL_TAILRECURSION_BIT)
- CALL_SUPER_BIT =
INT2NUM(VM_CALL_SUPER_BIT)
- CALL_SEND_BIT =
INT2NUM(VM_CALL_SEND_BIT)
- SPECIAL_OBJECT_VMCORE =
INT2NUM(VM_SPECIAL_OBJECT_VMCORE)
- SPECIAL_OBJECT_CBASE =
INT2NUM(VM_SPECIAL_OBJECT_CBASE)
Class Method Summary collapse
-
.current ⇒ RubyVM
Returns the current ruby VM.
Instance Method Summary collapse
-
#top_self ⇒ Object
Returns the VM’s “top self”.
Class Method Details
.current ⇒ RubyVM
Returns the current ruby VM.
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'ext/internal/vm/vm.c', line 31 static VALUE vm_current(VALUE klass) { #ifdef HAVE_TYPE_STRUCT_RTYPEDDATA VALUE thread = rb_thread_current(); rb_thread_t * th; ID * local_tbl; GetThreadPtr(thread, th); return th->vm->self; #else return ruby_current_vm->self; #endif } |
Instance Method Details
#top_self ⇒ Object
Returns the VM’s “top self”.
50 51 52 53 54 55 56 57 |
# File 'ext/internal/vm/vm.c', line 50 static VALUE vm_top_self(VALUE self) { rb_vm_t * vm; Data_Get_Struct(self, rb_vm_t, vm); return vm->top_self; } |