Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
Data Structures | Macros | Typedefs | Enumerations | Functions
vm_callinfo.h File Reference
#include "debug_counter.h"

Go to the source code of this file.

Data Structures

struct  rb_callinfo_kwarg
 
struct  rb_callinfo
 
struct  rb_callcache
 
struct  rb_call_data
 
struct  rb_class_cc_entries
 
struct  rb_class_cc_entries::rb_class_cc_entries_entry
 

Macros

#define VM_CALL_ARGS_SPLAT   (0x01 << VM_CALL_ARGS_SPLAT_bit)
 
#define VM_CALL_ARGS_BLOCKARG   (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
 
#define VM_CALL_FCALL   (0x01 << VM_CALL_FCALL_bit)
 
#define VM_CALL_VCALL   (0x01 << VM_CALL_VCALL_bit)
 
#define VM_CALL_ARGS_SIMPLE   (0x01 << VM_CALL_ARGS_SIMPLE_bit)
 
#define VM_CALL_BLOCKISEQ   (0x01 << VM_CALL_BLOCKISEQ_bit)
 
#define VM_CALL_KWARG   (0x01 << VM_CALL_KWARG_bit)
 
#define VM_CALL_KW_SPLAT   (0x01 << VM_CALL_KW_SPLAT_bit)
 
#define VM_CALL_TAILCALL   (0x01 << VM_CALL_TAILCALL_bit)
 
#define VM_CALL_SUPER   (0x01 << VM_CALL_SUPER_bit)
 
#define VM_CALL_ZSUPER   (0x01 << VM_CALL_ZSUPER_bit)
 
#define VM_CALL_OPT_SEND   (0x01 << VM_CALL_OPT_SEND_bit)
 
#define VM_CALL_KW_SPLAT_MUT   (0x01 << VM_CALL_KW_SPLAT_MUT_bit)
 
#define USE_EMBED_CI   1
 
#define CI_EMBED_FLAG   0x01
 
#define CI_EMBED_ARGC_SHFT   (CI_EMBED_TAG_bits)
 
#define CI_EMBED_ARGC_MASK   ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)
 
#define CI_EMBED_FLAG_SHFT   (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)
 
#define CI_EMBED_FLAG_MASK   ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)
 
#define CI_EMBED_ID_SHFT   (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)
 
#define CI_EMBED_ID_MASK   ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)
 
#define vm_ci_new(mid, flag, argc, kwarg)   vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)
 
#define vm_ci_new_runtime(mid, flag, argc, kwarg)   vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)
 
#define VM_CI_EMBEDDABLE_P(mid, flag, argc, kwarg)
 
#define vm_ci_new_id(mid, flag, argc, must_zero)
 
#define VM_CALLINFO_NOT_UNDER_GC   IMEMO_FL_USER0
 
#define VM_CI_ON_STACK(mid_, flags_, argc_, kwarg_)
 
#define VM_CALLCACHE_UNMARKABLE   IMEMO_FL_USER0
 
#define VM_CC_ON_STACK(clazz, call, aux, cme)
 
#define vm_cc_empty()   rb_vm_empty_cc()
 

Typedefs

typedef VALUE(* vm_call_handler) (struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling)
 

Enumerations

enum  vm_call_flag_bits {
  VM_CALL_ARGS_SPLAT_bit , VM_CALL_ARGS_BLOCKARG_bit , VM_CALL_FCALL_bit , VM_CALL_VCALL_bit ,
  VM_CALL_ARGS_SIMPLE_bit , VM_CALL_BLOCKISEQ_bit , VM_CALL_KWARG_bit , VM_CALL_KW_SPLAT_bit ,
  VM_CALL_TAILCALL_bit , VM_CALL_SUPER_bit , VM_CALL_ZSUPER_bit , VM_CALL_OPT_SEND_bit ,
  VM_CALL_KW_SPLAT_MUT_bit , VM_CALL__END
}
 

Functions

const struct rb_callcacherb_vm_empty_cc (void)
 
void rb_vm_ccs_free (struct rb_class_cc_entries *ccs)
 

Detailed Description

Author
Ruby developers ruby-.nosp@m.core.nosp@m.@ruby.nosp@m.-lan.nosp@m.g.org

Definition in file vm_callinfo.h.

Macro Definition Documentation

◆ CI_EMBED_ARGC_MASK

#define CI_EMBED_ARGC_MASK   ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)

Definition at line 91 of file vm_callinfo.h.

◆ CI_EMBED_ARGC_SHFT

#define CI_EMBED_ARGC_SHFT   (CI_EMBED_TAG_bits)

Definition at line 90 of file vm_callinfo.h.

◆ CI_EMBED_FLAG

#define CI_EMBED_FLAG   0x01

Definition at line 89 of file vm_callinfo.h.

◆ CI_EMBED_FLAG_MASK

#define CI_EMBED_FLAG_MASK   ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)

Definition at line 93 of file vm_callinfo.h.

◆ CI_EMBED_FLAG_SHFT

#define CI_EMBED_FLAG_SHFT   (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)

Definition at line 92 of file vm_callinfo.h.

◆ CI_EMBED_ID_MASK

#define CI_EMBED_ID_MASK   ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)

Definition at line 95 of file vm_callinfo.h.

◆ CI_EMBED_ID_SHFT

#define CI_EMBED_ID_SHFT   (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)

Definition at line 94 of file vm_callinfo.h.

◆ USE_EMBED_CI

#define USE_EMBED_CI   1

Definition at line 70 of file vm_callinfo.h.

◆ VM_CALL_ARGS_BLOCKARG

#define VM_CALL_ARGS_BLOCKARG   (0x01 << VM_CALL_ARGS_BLOCKARG_bit)

Definition at line 32 of file vm_callinfo.h.

◆ VM_CALL_ARGS_SIMPLE

#define VM_CALL_ARGS_SIMPLE   (0x01 << VM_CALL_ARGS_SIMPLE_bit)

Definition at line 35 of file vm_callinfo.h.

◆ VM_CALL_ARGS_SPLAT

#define VM_CALL_ARGS_SPLAT   (0x01 << VM_CALL_ARGS_SPLAT_bit)

Definition at line 31 of file vm_callinfo.h.

◆ VM_CALL_BLOCKISEQ

#define VM_CALL_BLOCKISEQ   (0x01 << VM_CALL_BLOCKISEQ_bit)

Definition at line 36 of file vm_callinfo.h.

◆ VM_CALL_FCALL

#define VM_CALL_FCALL   (0x01 << VM_CALL_FCALL_bit)

Definition at line 33 of file vm_callinfo.h.

◆ VM_CALL_KW_SPLAT

#define VM_CALL_KW_SPLAT   (0x01 << VM_CALL_KW_SPLAT_bit)

Definition at line 38 of file vm_callinfo.h.

◆ VM_CALL_KW_SPLAT_MUT

#define VM_CALL_KW_SPLAT_MUT   (0x01 << VM_CALL_KW_SPLAT_MUT_bit)

Definition at line 43 of file vm_callinfo.h.

◆ VM_CALL_KWARG

#define VM_CALL_KWARG   (0x01 << VM_CALL_KWARG_bit)

Definition at line 37 of file vm_callinfo.h.

◆ VM_CALL_OPT_SEND

#define VM_CALL_OPT_SEND   (0x01 << VM_CALL_OPT_SEND_bit)

Definition at line 42 of file vm_callinfo.h.

◆ VM_CALL_SUPER

#define VM_CALL_SUPER   (0x01 << VM_CALL_SUPER_bit)

Definition at line 40 of file vm_callinfo.h.

◆ VM_CALL_TAILCALL

#define VM_CALL_TAILCALL   (0x01 << VM_CALL_TAILCALL_bit)

Definition at line 39 of file vm_callinfo.h.

◆ VM_CALL_VCALL

#define VM_CALL_VCALL   (0x01 << VM_CALL_VCALL_bit)

Definition at line 34 of file vm_callinfo.h.

◆ VM_CALL_ZSUPER

#define VM_CALL_ZSUPER   (0x01 << VM_CALL_ZSUPER_bit)

Definition at line 41 of file vm_callinfo.h.

◆ VM_CALLCACHE_UNMARKABLE

#define VM_CALLCACHE_UNMARKABLE   IMEMO_FL_USER0

Definition at line 293 of file vm_callinfo.h.

◆ VM_CALLINFO_NOT_UNDER_GC

#define VM_CALLINFO_NOT_UNDER_GC   IMEMO_FL_USER0

Definition at line 239 of file vm_callinfo.h.

◆ vm_cc_empty

#define vm_cc_empty ( )    rb_vm_empty_cc()

Definition at line 385 of file vm_callinfo.h.

◆ VM_CC_ON_STACK

#define VM_CC_ON_STACK (   clazz,
  call,
  aux,
  cme 
)
Value:
(struct rb_callcache) { \
.flags = T_IMEMO | \
.klass = clazz, \
.cme_ = cme, \
.call_ = call, \
.aux_ = aux, \
}
#define FL_USHIFT
Definition: fl_type.h:61
@ imemo_callcache
Definition: imemo.h:47
const VALUE klass
Definition: vm_callinfo.h:278
const vm_call_handler call_
Definition: vm_callinfo.h:284
const struct rb_callable_method_entry_struct *const cme_
Definition: vm_callinfo.h:283
union rb_callcache::@184 aux_
#define T_IMEMO
Definition: value_type.h:66
#define VM_CALLCACHE_UNMARKABLE
Definition: vm_callinfo.h:293

Definition at line 305 of file vm_callinfo.h.

◆ VM_CI_EMBEDDABLE_P

#define VM_CI_EMBEDDABLE_P (   mid,
  flag,
  argc,
  kwarg 
)
Value:
(((mid ) & ~CI_EMBED_ID_MASK) ? false : \
((flag) & ~CI_EMBED_FLAG_MASK) ? false : \
((argc) & ~CI_EMBED_ARGC_MASK) ? false : \
(kwarg) ? false : true)
int argc
Definition: ruby.c:240
#define CI_EMBED_ID_MASK
Definition: vm_callinfo.h:95
#define CI_EMBED_ARGC_MASK
Definition: vm_callinfo.h:91
#define CI_EMBED_FLAG_MASK
Definition: vm_callinfo.h:93

Definition at line 184 of file vm_callinfo.h.

◆ vm_ci_new

#define vm_ci_new (   mid,
  flag,
  argc,
  kwarg 
)    vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)

Definition at line 180 of file vm_callinfo.h.

◆ vm_ci_new_id

#define vm_ci_new_id (   mid,
  flag,
  argc,
  must_zero 
)
Value:
((const struct rb_callinfo *) \
((((VALUE)(mid )) << CI_EMBED_ID_SHFT) | \
@ RUBY_FIXNUM_FLAG
VALUE flag
Definition: vm_callinfo.h:65
unsigned long VALUE
Definition: value.h:38
#define CI_EMBED_ARGC_SHFT
Definition: vm_callinfo.h:90
#define CI_EMBED_FLAG_SHFT
Definition: vm_callinfo.h:92
#define CI_EMBED_ID_SHFT
Definition: vm_callinfo.h:94

Definition at line 190 of file vm_callinfo.h.

◆ vm_ci_new_runtime

#define vm_ci_new_runtime (   mid,
  flag,
  argc,
  kwarg 
)    vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)

Definition at line 181 of file vm_callinfo.h.

◆ VM_CI_ON_STACK

#define VM_CI_ON_STACK (   mid_,
  flags_,
  argc_,
  kwarg_ 
)
Value:
(struct rb_callinfo) { \
.flags = T_IMEMO | \
.mid = mid_, \
.flag = flags_, \
.argc = argc_, \
.kwarg = kwarg_, \
}
@ imemo_callinfo
Definition: imemo.h:46
VALUE argc
Definition: vm_callinfo.h:66
const struct rb_callinfo_kwarg * kwarg
Definition: vm_callinfo.h:63
#define VM_CALLINFO_NOT_UNDER_GC
Definition: vm_callinfo.h:239

Definition at line 256 of file vm_callinfo.h.

Typedef Documentation

◆ vm_call_handler

typedef VALUE(* vm_call_handler) (struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling)

Definition at line 267 of file vm_callinfo.h.

Enumeration Type Documentation

◆ vm_call_flag_bits

Enumerator
VM_CALL_ARGS_SPLAT_bit 
VM_CALL_ARGS_BLOCKARG_bit 
VM_CALL_FCALL_bit 
VM_CALL_VCALL_bit 
VM_CALL_ARGS_SIMPLE_bit 
VM_CALL_BLOCKISEQ_bit 
VM_CALL_KWARG_bit 
VM_CALL_KW_SPLAT_bit 
VM_CALL_TAILCALL_bit 
VM_CALL_SUPER_bit 
VM_CALL_ZSUPER_bit 
VM_CALL_OPT_SEND_bit 
VM_CALL_KW_SPLAT_MUT_bit 
VM_CALL__END 

Definition at line 14 of file vm_callinfo.h.

Function Documentation

◆ rb_vm_ccs_free()

void rb_vm_ccs_free ( struct rb_class_cc_entries ccs)

Definition at line 2649 of file gc.c.

References NULL, Qundef, RB_DEBUG_COUNTER_INC, and TRUE.

◆ rb_vm_empty_cc()

const struct rb_callcache * rb_vm_empty_cc ( void  )

Definition at line 4100 of file vm.c.

Referenced by rb_iseq_mark().