Ruby 3.5.0dev (2025-07-06 revision 4d7e6220646a6465b4e42029e89fdc94bdf4b68e)
inits.c (4d7e6220646a6465b4e42029e89fdc94bdf4b68e)
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(Cont);
67 CALL(Fiber_Scheduler);
68 CALL(process);
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 CALL(unicode_version);
79 CALL(Set);
80 CALL(Namespace);
81
82 // enable builtin loading
83 CALL(builtin);
84}
85
86void
87rb_call_builtin_inits(void)
88{
89#define BUILTIN(n) CALL(builtin_##n)
90 BUILTIN(kernel);
91 BUILTIN(yjit);
92 // BUILTIN(yjit_hook) is called after rb_yjit_init()
93 BUILTIN(gc);
94 BUILTIN(ractor);
95 BUILTIN(numeric);
96 BUILTIN(io);
97 BUILTIN(dir);
98 BUILTIN(ast);
99 BUILTIN(trace_point);
100 BUILTIN(pack);
101 BUILTIN(warning);
102 BUILTIN(array);
103 BUILTIN(hash);
104 BUILTIN(symbol);
105 BUILTIN(timev);
106 BUILTIN(thread_sync);
107 BUILTIN(nilclass);
108 BUILTIN(marshal);
109 BUILTIN(zjit);
110 Init_builtin_prelude();
111}
112#undef CALL
Defines RBIMPL_HAS_BUILTIN.