1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/inits.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

114 lines
2.1 KiB
C
Raw Normal View History

/**********************************************************************
inits.c -
$Author$
created at: Tue Dec 28 16:01:58 JST 1993
* encoding.c: provide basic features for M17N. * parse.y: encoding aware parsing. * parse.y (pragma_encoding): encoding specification pragma. * parse.y (rb_intern3): encoding specified symbols. * string.c (rb_str_length): length based on characters. for older behavior, bytesize method added. * string.c (rb_str_index_m): index based on characters. rindex as well. * string.c (succ_char): encoding aware succeeding string. * string.c (rb_str_reverse): reverse based on characters. * string.c (rb_str_inspect): encoding aware string description. * string.c (rb_str_upcase_bang): encoding aware case conversion. downcase, capitalize, swapcase as well. * string.c (rb_str_tr_bang): tr based on characters. delete, squeeze, tr_s, count as well. * string.c (rb_str_split_m): split based on characters. * string.c (rb_str_each_line): encoding aware each_line. * string.c (rb_str_each_char): added. iteration based on characters. * string.c (rb_str_strip_bang): encoding aware whitespace stripping. lstrip, rstrip as well. * string.c (rb_str_justify): encoding aware justifying (ljust, rjust, center). * string.c (str_encoding): get encoding attribute from a string. * re.c (rb_reg_initialize): encoding aware regular expression * sprintf.c (rb_str_format): formatting (i.e. length count) based on characters. * io.c (rb_io_getc): getc to return one-character string. for older behavior, getbyte method added. * ext/stringio/stringio.c (strio_getc): ditto. * io.c (rb_io_ungetc): allow pushing arbitrary string at the current reading point. * ext/stringio/stringio.c (strio_ungetc): ditto. * ext/strscan/strscan.c: encoding support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24 23:29:39 -04:00
Copyright (C) 1993-2007 Yukihiro Matsumoto
**********************************************************************/
#include "internal/inits.h"
#include "ruby.h"
#include "builtin.h"
2019-12-28 20:07:17 -05:00
static void Init_builtin_prelude(void);
#include "prelude.rbinc"
#define CALL(n) {void Init_##n(void); Init_##n();}
void
rb_call_inits(void)
{
CALL(Thread_Mutex);
#if USE_TRANSIENT_HEAP
CALL(TransientHeap);
#endif
CALL(vm_postponed_job);
CALL(Method);
CALL(RandomSeedCore);
CALL(encodings);
CALL(sym);
CALL(var_tables);
CALL(Object);
CALL(top_self);
CALL(Encoding);
CALL(Comparable);
CALL(Enumerable);
CALL(String);
CALL(Exception);
CALL(eval);
CALL(jump);
CALL(Numeric);
CALL(Bignum);
CALL(syserr);
CALL(Array);
CALL(Hash);
CALL(Struct);
CALL(Regexp);
2019-12-28 20:07:17 -05:00
CALL(pack);
CALL(transcode);
CALL(marshal);
CALL(Range);
CALL(IO);
2021-07-02 06:41:16 -04:00
CALL(IO_Buffer)
CALL(Dir);
CALL(Time);
CALL(Random);
CALL(signal);
CALL(load);
CALL(Proc);
CALL(Binding);
CALL(Math);
2019-12-28 20:07:17 -05:00
CALL(GC);
CALL(Enumerator);
CALL(Ractor);
CALL(VM);
CALL(ISeq);
CALL(Thread);
CALL(Fiber_Scheduler);
CALL(process);
CALL(Cont);
CALL(Rational);
CALL(Complex);
CALL(MemoryView);
CALL(version);
2019-12-28 20:07:17 -05:00
CALL(vm_trace);
CALL(vm_stack_canary);
2019-12-28 20:07:17 -05:00
CALL(ast);
CALL(gc_stress);
CALL(shape);
2019-11-07 02:58:00 -05:00
// enable builtin loading
2019-11-07 02:58:00 -05:00
CALL(builtin);
}
void
rb_call_builtin_inits(void)
{
2019-12-28 20:07:17 -05:00
#define BUILTIN(n) CALL(builtin_##n)
BUILTIN(gc);
BUILTIN(ractor);
BUILTIN(numeric);
2019-12-28 20:07:17 -05:00
BUILTIN(io);
BUILTIN(dir);
2019-12-28 20:07:17 -05:00
BUILTIN(ast);
BUILTIN(trace_point);
BUILTIN(pack);
BUILTIN(warning);
BUILTIN(array);
2020-03-17 06:37:07 -04:00
BUILTIN(kernel);
2020-12-31 03:23:37 -05:00
BUILTIN(timev);
BUILTIN(thread_sync);
BUILTIN(yjit);
BUILTIN(nilclass);
BUILTIN(marshal);
#if USE_MJIT
BUILTIN(mjit);
2022-09-18 08:45:58 -04:00
BUILTIN(mjit_c);
2022-09-05 00:53:46 -04:00
BUILTIN(mjit_compiler);
#endif
2019-12-28 20:07:17 -05:00
Init_builtin_prelude();
}
#undef CALL