Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
IMEMO: Internal memo object. More...
#include "ruby/internal/config.h"
#include <stddef.h>
#include "internal/array.h"
#include "internal/gc.h"
#include "ruby/internal/stdbool.h"
#include "ruby/ruby.h"
Go to the source code of this file.
Data Structures | |
struct | vm_svar |
SVAR (Special VARiable) More... | |
struct | vm_throw_data |
THROW_DATA. More... | |
struct | vm_ifunc_argc |
struct | vm_ifunc |
IFUNC (Internal FUNCtion) More... | |
struct | rb_imemo_tmpbuf_struct |
struct | MEMO |
MEMO. More... | |
Macros | |
#define | IMEMO_DEBUG 0 |
#define | IMEMO_MASK 0x0f |
#define | IMEMO_FL_USHIFT (FL_USHIFT + 4) |
#define | IMEMO_FL_USER0 FL_USER4 |
#define | IMEMO_FL_USER1 FL_USER5 |
#define | IMEMO_FL_USER2 FL_USER6 |
#define | IMEMO_FL_USER3 FL_USER7 |
#define | IMEMO_FL_USER4 FL_USER8 |
#define | IMEMO_FL_USER5 FL_USER9 |
#define | THROW_DATA_CONSUMED IMEMO_FL_USER0 |
#define | THROW_DATA_P(err) imemo_throw_data_p((VALUE)err) |
#define | MEMO_CAST(m) ((struct MEMO *)(m)) |
#define | MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0)) |
#define | MEMO_FOR(type, value) ((type *)RARRAY_PTR(value)) |
#define | NEW_MEMO_FOR(type, value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value)) |
#define | NEW_PARTIAL_MEMO_FOR(type, value, member) |
#define | IMEMO_TYPE_P(v, t) imemo_type_p((VALUE)v, t) |
Typedefs | |
typedef struct rb_imemo_tmpbuf_struct | rb_imemo_tmpbuf_t |
Enumerations | |
enum | imemo_type { imemo_env = 0, imemo_cref = 1, imemo_svar = 2, imemo_throw_data = 3, imemo_ifunc = 4, imemo_memo = 5, imemo_ment = 6, imemo_iseq = 7, imemo_tmpbuf = 8, imemo_ast = 9, imemo_parser_strterm = 10, imemo_callinfo = 11, imemo_callcache = 12, imemo_constcache = 13 } |
Functions | |
VALUE | rb_imemo_new (enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0) |
rb_imemo_tmpbuf_t * | rb_imemo_tmpbuf_parser_heap (void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt) |
struct vm_ifunc * | rb_vm_ifunc_new (rb_block_call_func_t func, const void *data, int min_argc, int max_argc) |
void | rb_strterm_mark (VALUE obj) |
const char * | rb_imemo_name (enum imemo_type type) |
IMEMO: Internal memo object.
Definition in file imemo.h.
#define MEMO_FOR | ( | type, | |
value | |||
) | ((type *)RARRAY_PTR(value)) |
#define MEMO_NEW | ( | a, | |
b, | |||
c | |||
) | ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0)) |
#define NEW_MEMO_FOR | ( | type, | |
value | |||
) | ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value)) |
#define NEW_PARTIAL_MEMO_FOR | ( | type, | |
value, | |||
member | |||
) |
#define THROW_DATA_CONSUMED IMEMO_FL_USER0 |
typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t |
enum imemo_type |
const char* rb_imemo_name | ( | enum imemo_type | type | ) |
Definition at line 2628 of file gc.c.
References env, and IMEMO_NAME.
Definition at line 2655 of file gc.c.
References FL_USHIFT, heap_page::flags, size, and T_IMEMO.
Referenced by rb_vm_ifunc_new().
rb_imemo_tmpbuf_t* rb_imemo_tmpbuf_parser_heap | ( | void * | buf, |
rb_imemo_tmpbuf_t * | old_heap, | ||
size_t | cnt | ||
) |
void rb_strterm_mark | ( | VALUE | obj | ) |
Definition at line 828 of file parse.c.
References rb_strterm_struct::heredoc, rb_strterm_heredoc_struct::lastline, rb_gc_mark(), RBASIC, STRTERM_HEREDOC, and rb_strterm_struct::u.
struct vm_ifunc* rb_vm_ifunc_new | ( | rb_block_call_func_t | func, |
const void * | data, | ||
int | min_argc, | ||
int | max_argc | ||
) |
Definition at line 718 of file proc.c.
References vm_ifunc::argc, CHAR_BIT, imemo_ifunc, rb_eRangeError, rb_imemo_new(), rb_raise(), ret, SIZEOF_VALUE, and UNLIMITED_ARGUMENTS.
Referenced by rb_func_lambda_new(), and rb_lambda_call().