Ruby: inits.c Source File

Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)

inits.c
1/**********************************************************************
2
3 inits.c -
4
5 $Author$
6 created at: Tue Dec 28 16:01:58 JST 1993
7
8 Copyright (C) 1993-2007 Yukihiro Matsumoto
9
10**********************************************************************/
11
12#include "internal/inits.h"
13#include "ruby.h"
14#include "builtin.h"
15static void Init_builtin_prelude(void);
16#include "prelude.rbinc"
17
18#define CALL(n) {void Init_##n(void); Init_##n();}
19
20void
21rb_call_inits(void)
22{
23 CALL(default_shapes);
24 CALL(Thread_Mutex);
25 CALL(RandomSeedCore);
26 CALL(encodings);
27 CALL(sym);
28 CALL(var_tables);
29 CALL(Object);
30 CALL(top_self);
31 CALL(Encoding);
32 CALL(Comparable);
33 CALL(Enumerable);
34 CALL(String);
35 CALL(Exception);
36 CALL(eval);
37 CALL(jump);
38 CALL(Numeric);
39 CALL(Bignum);
40 CALL(syserr);
41 CALL(Array);
42 CALL(Hash);
43 CALL(Struct);
44 CALL(Regexp);
45 CALL(pack);
46 CALL(transcode);
47 CALL(marshal);
48 CALL(Range);
49 CALL(IO);
50 CALL(IO_Buffer)
51 CALL(Dir);
52 CALL(Time);
53 CALL(Random);
54 CALL(load);
55 CALL(Proc);
56 CALL(Binding);
57 CALL(Math);
58 CALL(GC);
59 CALL(WeakMap);
60 CALL(Enumerator);
61 CALL(Ractor);
62 CALL(VM);
63 CALL(ISeq);
64 CALL(Thread);
65 CALL(signal);
66 CALL(Fiber_Scheduler);
67 CALL(process);
68 CALL(Cont);
69 CALL(Rational);
70 CALL(Complex);
71 CALL(MemoryView);
72 CALL(version);
73 CALL(vm_trace);
74 CALL(vm_stack_canary);
75 CALL(ast);
76 CALL(shape);
77 CALL(Prism);
78
79 // enable builtin loading
80 CALL(builtin);
81}
82
83void
84rb_call_builtin_inits(void)
85{
86#define BUILTIN(n) CALL(builtin_##n)
87 BUILTIN(kernel);
88 BUILTIN(yjit);
89 // BUILTIN(yjit_hook) is called after rb_yjit_init()
90 BUILTIN(gc);
91 BUILTIN(ractor);
92 BUILTIN(numeric);
93 BUILTIN(io);
94 BUILTIN(dir);
95 BUILTIN(ast);
96 BUILTIN(trace_point);
97 BUILTIN(pack);
98 BUILTIN(warning);
99 BUILTIN(array);
100 BUILTIN(hash);
101 BUILTIN(symbol);
102 BUILTIN(timev);
103 BUILTIN(thread_sync);
104 BUILTIN(nilclass);
105 BUILTIN(marshal);
106 BUILTIN(rjit_c);
107 BUILTIN(rjit);
108 Init_builtin_prelude();
109}
110#undef CALL
Regexp
struct re_pattern_buffer Regexp
Old name of re_pattern_buffer.
Definition rmatch.h:52