Ruby: include/ruby/internal/intern/vm.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

vm.h
Go to the documentation of this file.
1#ifndef RBIMPL_INTERN_VM_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_INTERN_VM_H
23#include "ruby/internal/attr/noreturn.h"
24#include "ruby/internal/dllexport.h"
25#include "ruby/internal/value.h"
26
27 RBIMPL_SYMBOL_EXPORT_BEGIN()
28
29/* vm.c */
30 int rb_sourceline(void);
31 const char *rb_sourcefile(void);
32int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
33
34/* vm_eval.c */
35 VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
36 VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
37void rb_remove_method(VALUE, const char*);
38void rb_remove_method_id(VALUE, ID);
39
40 VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
41 VALUE rb_apply(VALUE, ID, VALUE);
42
43 VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
44 VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
45 VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
46 VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
47
48/* vm_method.c */
49#define HAVE_RB_DEFINE_ALLOC_FUNC 1
50 typedef VALUE (*rb_alloc_func_t)(VALUE);
51 void rb_define_alloc_func(VALUE, rb_alloc_func_t);
52void rb_undef_alloc_func(VALUE);
53 rb_alloc_func_t rb_get_alloc_func(VALUE);
54void rb_clear_constant_cache(void);
55 void rb_clear_method_cache_by_class(VALUE);
56void rb_alias(VALUE, ID, ID);
57void rb_attr(VALUE,ID,int,int,int);
58int rb_method_boundp(VALUE, ID, int);
59int rb_method_basic_definition_p(VALUE, ID);
60
61int rb_obj_respond_to(VALUE, ID, int);
62int rb_respond_to(VALUE, ID);
63
64 RBIMPL_ATTR_NORETURN()
65 VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
66#if !defined(RUBY_EXPORT) && defined(_WIN32)
67 RUBY_EXTERN VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE marker);
68#define rb_f_notimplement (*rb_f_notimplement_)
69#endif
70
71/* vm_backtrace.c */
72void rb_backtrace(void);
73 VALUE rb_make_backtrace(void);
74
75 RBIMPL_SYMBOL_EXPORT_END()
76
77#endif /* RBIMPL_INTERN_VM_H */
dllexport.h
Tewaking visibility of C variables/functions.
RUBY_EXTERN
#define RUBY_EXTERN
Definition: dllexport.h:36
RBIMPL_SYMBOL_EXPORT_END
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
Definition: dllexport.h:86
RBIMPL_SYMBOL_EXPORT_BEGIN
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
Definition: dllexport.h:77
rb_check_funcall_kw
VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE *, int)
Definition: vm_eval.c:613
rb_remove_method_id
void rb_remove_method_id(VALUE, ID)
Definition: vm_method.c:1351
rb_attr
void rb_attr(VALUE, ID, int, int, int)
Definition: vm_method.c:1508
rb_obj_instance_eval
VALUE rb_obj_instance_eval(int, const VALUE *, VALUE)
Definition: vm_eval.c:2092
rb_obj_respond_to
int rb_obj_respond_to(VALUE, ID, int)
Definition: vm_method.c:2545
rb_sourcefile
const char * rb_sourcefile(void)
Definition: vm.c:1571
rb_clear_constant_cache
void rb_clear_constant_cache(void)
Definition: vm_method.c:127
rb_check_funcall
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
Definition: vm_eval.c:619
rb_obj_instance_exec
VALUE rb_obj_instance_exec(int, const VALUE *, VALUE)
Definition: vm_eval.c:2124
rb_respond_to
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2561
rb_mod_module_eval
VALUE rb_mod_module_eval(int, const VALUE *, VALUE)
Definition: vm_eval.c:2164
rb_frame_method_id_and_class
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Definition: vm.c:2446
rb_define_alloc_func
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
rb_remove_method
void rb_remove_method(VALUE, const char *)
Definition: vm_method.c:1357
rb_alias
void rb_alias(VALUE, ID, ID)
Definition: vm_method.c:1926
rb_apply
VALUE rb_apply(VALUE, ID, VALUE)
Calls a method.
Definition: vm_eval.c:1044
rb_mod_module_exec
VALUE rb_mod_module_exec(int, const VALUE *, VALUE)
Definition: vm_eval.c:2198
rb_method_boundp
int rb_method_boundp(VALUE, ID, int)
Definition: vm_method.c:1469
rb_undef_alloc_func
void rb_undef_alloc_func(VALUE)
Definition: vm_method.c:954
rb_get_alloc_func
rb_alloc_func_t rb_get_alloc_func(VALUE)
Definition: vm_method.c:960
rb_f_notimplement
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Definition: vm_method.c:299
rb_eval_cmd_kw
VALUE rb_eval_cmd_kw(VALUE, VALUE, int)
Definition: vm_eval.c:1909
rb_clear_method_cache_by_class
void rb_clear_method_cache_by_class(VALUE)
rb_alloc_func_t
VALUE(* rb_alloc_func_t)(VALUE)
Definition: vm.h:50
rb_make_backtrace
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:1059
rb_backtrace
void rb_backtrace(void)
Definition: vm_backtrace.c:1013
rb_sourceline
int rb_sourceline(void)
Definition: vm.c:1586
rb_method_basic_definition_p
#define rb_method_basic_definition_p(...)
Definition: internal.h:78
int
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
noreturn.h
Defines RBIMPL_ATTR_NORETURN.
RBIMPL_ATTR_NORETURN
#define RBIMPL_ATTR_NORETURN()
Wraps (or simulates) [[noreturn]]
Definition: noreturn.h:38
argc
int argc
Definition: ruby.c:240
argv
char ** argv
Definition: ruby.c:241
const
#define const
Definition: strftime.c:108
value.h
Defines VALUE and ID.
VALUE
unsigned long VALUE
Definition: value.h:38
ID
unsigned long ID
Definition: value.h:39
rb_f_notimplement_
VALUE(*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE)
Definition: win32.c:8174