2#include "internal/array.h"
7#include "miniprelude.c"
11#ifndef INCLUDED_BY_BUILTIN_C
12static struct st_table *loaded_builtin_table;
15rb_ast_t *rb_builtin_ast(
const char *feature_name,
VALUE *name_str);
21 rb_ast_t *ast = rb_builtin_ast(feature_name, &name_str);
25 rb_fatal(
"builtin_iseq_load: can not find %s; "
26 "probably miniprelude.c is out of date",
29 vm->builtin_function_table = table;
30 vm->builtin_inline_index = 0;
43 const rb_iseq_t *iseq = rb_iseq_new_with_opt(&ast->body, name_str, name_str,
Qnil, 0, NULL, 0, ISEQ_TYPE_TOP, &optimization);
44 GET_VM()->builtin_function_table = NULL;
49 if (0 && strcmp(
"prelude", feature_name) == 0) {
53#ifndef INCLUDED_BY_BUILTIN_C
54 st_insert(loaded_builtin_table, (st_data_t)feature_name, (st_data_t)iseq);
55 rb_gc_register_mark_object((
VALUE)iseq);
62rb_load_with_builtin_functions(
const char *feature_name,
const struct rb_builtin_function *table)
64 const rb_iseq_t *iseq = builtin_iseq_load(feature_name, table);
68#ifndef INCLUDED_BY_BUILTIN_C
71each_builtin_i(st_data_t key, st_data_t val, st_data_t dmy)
73 const char *feature = (
const char *)key;
83each_builtin(
VALUE self)
85 st_foreach(loaded_builtin_table, each_builtin_i, 0);
93 loaded_builtin_table = st_init_strtable();
97Init_builtin_features(
void)
100 builtin_iseq_load(
"gem_prelude", NULL);
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
#define rb_str_new2
Old name of rb_str_new_cstr.
#define Qnil
Old name of RUBY_Qnil.
VALUE rb_stdout
STDOUT constant.
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
uintptr_t VALUE
Type that represents a Ruby object.