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);
24 vm->builtin_function_table = table;
25 vm->builtin_inline_index = 0;
39 const rb_iseq_t *iseq = rb_iseq_new_with_opt(&ast->body, name_str, name_str,
Qnil, 0, NULL, 0, ISEQ_TYPE_TOP, &optimization);
40 GET_VM()->builtin_function_table = NULL;
45 if (0 && strcmp(
"prelude", feature_name) == 0) {
49#ifndef INCLUDED_BY_BUILTIN_C
50 st_insert(loaded_builtin_table, (st_data_t)feature_name, (st_data_t)iseq);
51 rb_gc_register_mark_object((
VALUE)iseq);
58rb_load_with_builtin_functions(
const char *feature_name,
const struct rb_builtin_function *table)
60 const rb_iseq_t *iseq = builtin_iseq_load(feature_name, table);
64#ifndef INCLUDED_BY_BUILTIN_C
67each_builtin_i(st_data_t key, st_data_t val, st_data_t dmy)
69 const char *feature = (
const char *)key;
78each_builtin(
VALUE self)
80 st_foreach(loaded_builtin_table, each_builtin_i, 0);
88 loaded_builtin_table = st_init_strtable();
92Init_builtin_features(
void)
95 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_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
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.