Ruby: compile.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
compile.c File Reference
`#include "ruby/internal/config.h"`
`#include <math.h>`
`#include "encindex.h"`
`#include "gc.h"`
`#include "id_table.h"`
`#include "internal.h"`
`#include "internal/array.h"`
`#include "internal/compile.h"`
`#include "internal/complex.h"`
`#include "internal/encoding.h"`
`#include "internal/error.h"`
`#include "internal/hash.h"`
`#include "internal/numeric.h"`
`#include "internal/object.h"`
`#include "internal/rational.h"`
`#include "internal/re.h"`
`#include "internal/symbol.h"`
`#include "internal/thread.h"`
`#include "internal/variable.h"`
`#include "iseq.h"`
`#include "ruby/re.h"`
`#include "ruby/util.h"`
`#include "vm_core.h"`
`#include "vm_callinfo.h"`
`#include "vm_debug.h"`
`#include "builtin.h"`
`#include "insns.inc"`
`#include "insns_info.inc"`
`#include "optinsn.inc"`

Go to the source code of this file.

## Data Structures
struct | iseq_link_element
struct | iseq_link_anchor
struct | iseq_label_data
struct | iseq_insn_data
struct | iseq_adjust_data
struct | iseq_trace_data
struct | ensure_range
struct | iseq_compile_data_ensure_node_stack
struct | cdhash_set_label_struct
struct | accessor_args
struct | ibf_header
struct | ibf_dump_buffer
struct | ibf_dump
struct | ibf_load_buffer
struct | ibf_load
struct | pinned_list
struct | ibf_dump_iseq_list_arg
struct | ibf_object_header
struct | ibf_object_regexp
struct | ibf_object_hash
struct | ibf_object_struct_range
struct | ibf_object_bignum
struct | ibf_object_complex_rational
struct | ibf_object_symbol
struct | ibf_dump_object_list_arg

## Macros
#define | RUBY_UNTYPED_DATA_WARNING 0
#define | FIXNUM_INC(n, i) ((n)+(INT2FIX(i)&~FIXNUM_FLAG))
#define | FIXNUM_OR(n, i) ((n)|INT2FIX(i))
#define | CPDEBUG 0
| debug function(macro) interface depend on CPDEBUG if it is less than 0, runtime option is in effect. More...
#define | compile_debug CPDEBUG
#define | debugi(header, id) ((void)0)
#define | debugp(header, value) ((void)0)
#define | debugp_verbose(header, value) ((void)0)
#define | debugp_verbose_node(header, value) ((void)0)
#define | debugp_param(header, value) ((void)0)
#define | debug_node_start(node) ((void)0)
#define | debug_node_end() ((void)0)
#define | debugs if(0)printf
#define | debug_compile(msg, v) (v)
#define | LVAR_ERRINFO (1)
#define | NEW_LABEL(l) new_label_body(iseq, (l))
#define | LABEL_FORMAT "<L%03d>"
#define | NEW_ISEQ(node, name, type, line_no) new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no))
#define | NEW_CHILD_ISEQ(node, name, type, line_no) new_child_iseq(iseq, (node), rb_fstring(name), iseq, (type), (line_no))
#define | ADD_SEQ(seq1, seq2) APPEND_LIST((seq1), (seq2))
#define | ADD_INSN(seq, line, insn) ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
#define | INSERT_BEFORE_INSN(next, line, insn) ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
#define | INSERT_AFTER_INSN(prev, line, insn) ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
#define | ADD_INSN1(seq, line, insn, op1)
#define | INSERT_BEFORE_INSN1(next, line, insn, op1)
#define | INSERT_AFTER_INSN1(prev, line, insn, op1)
#define | LABEL_REF(label) ((label)->refcnt++)
#define | ADD_INSNL(seq, line, insn, label) (ADD_INSN1(seq, line, insn, label), LABEL_REF(label))
#define | ADD_INSN2(seq, line, insn, op1, op2)
#define | ADD_INSN3(seq, line, insn, op1, op2, op3)
#define | ADD_SEND(seq, line, id, argc) ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL)
#define | ADD_SEND_WITH_FLAG(seq, line, id, argc, flag) ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)(flag), NULL)
#define | ADD_SEND_WITH_BLOCK(seq, line, id, argc, block) ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(0), NULL)
#define | ADD_CALL_RECEIVER(seq, line) ADD_INSN((seq), (line), putself)
#define | ADD_CALL(seq, line, id, argc) ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
#define | ADD_CALL_WITH_BLOCK(seq, line, id, argc, block) ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL), NULL)
#define | ADD_SEND_R(seq, line, id, argc, block, flag, keywords) ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_send(iseq, (line), (id), (VALUE)(argc), (block), (VALUE)(flag), (keywords)))
#define | ADD_TRACE(seq, event) ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), 0))
#define | ADD_TRACE_WITH_DATA(seq, event, data) ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), (data)))
#define | ADD_GETLOCAL(seq, line, idx, level) iseq_add_getlocal(iseq, (seq), (line), (idx), (level))
#define | ADD_SETLOCAL(seq, line, idx, level) iseq_add_setlocal(iseq, (seq), (line), (idx), (level))
#define | ADD_LABEL(seq, label) ADD_ELEM((seq), (LINK_ELEMENT *) (label))
#define | APPEND_LABEL(seq, before, label) APPEND_ELEM((seq), (before), (LINK_ELEMENT *) (label))
#define | ADD_ADJUST(seq, line, label) ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), (line)))
#define | ADD_ADJUST_RESTORE(seq, label) ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), -1))
#define | LABEL_UNREMOVABLE(label) ((label) ? (LABEL_REF(label), (label)->unremovable=1) : 0)
#define | ADD_CATCH_ENTRY(type, ls, le, iseqv, lc)
#define | COMPILE(anchor, desc, node)
#define | COMPILE_POPPED(anchor, desc, node)
#define | COMPILE_(anchor, desc, node, popped)
#define | COMPILE_RECV(anchor, desc, node)
#define | OPERAND_AT(insn, idx) (((INSN*)(insn))->operands[(idx)])
#define | INSN_OF(insn) (((INSN*)(insn))->insn_id)
#define | IS_INSN(link) ((link)->type == ISEQ_ELEMENT_INSN)
#define | IS_LABEL(link) ((link)->type == ISEQ_ELEMENT_LABEL)
#define | IS_ADJUST(link) ((link)->type == ISEQ_ELEMENT_ADJUST)
#define | IS_TRACE(link) ((link)->type == ISEQ_ELEMENT_TRACE)
#define | IS_INSN_ID(iobj, insn) (INSN_OF(iobj) == BIN(insn))
#define | IS_NEXT_INSN_ID(link, insn) ((link)->next && IS_INSN((link)->next) && IS_INSN_ID((link)->next, insn))
#define | COMPILE_ERROR append_compile_error
#define | ERROR_ARGS_AT(n) iseq, nd_line(n),
#define | ERROR_ARGS ERROR_ARGS_AT(node)
#define | EXPECT_NODE(prefix, node, ndtype, errval)
#define | EXPECT_NODE_NONULL(prefix, parent, ndtype, errval)
#define | UNKNOWN_NODE(prefix, node, errval)
#define | COMPILE_OK 1
#define | COMPILE_NG 0
#define | CHECK(sub) if (!(sub)) {BEFORE_RETURN;return COMPILE_NG;}
#define | NO_CHECK(sub) (void)(sub)
#define | BEFORE_RETURN
#define | DECL_ANCHOR(name) LINK_ANCHOR name[1] = {{{ISEQ_ELEMENT_ANCHOR,},}}
#define | INIT_ANCHOR(name) (name->last = &name->anchor)
#define | ISEQ_ARG
#define | ISEQ_ARG_DECLARE
#define | ISEQ_LAST_LINE(iseq) (ISEQ_COMPILE_DATA(iseq)->last_line)
#define | INVALID_ISEQ_TYPE(type) ISEQ_TYPE_##type: m = #type; goto invalid_iseq_type
#define | PADDING_SIZE_MAX 0
#define | debug_list(anc, cur) ((void)0)
#define | BADINSN_DUMP(anchor, list, dest) dump_disasm_list_with_cursor(FIRST_ELEMENT(anchor), list, dest)
#define | BADINSN_ERROR
#define | SP_INSN(opt) insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt))
#define | HASH_BRACE 1
#define | FLUSH_CHUNK(newarrayinsn)
#define | FLUSH_CHUNK()
#define | MEMORY(v)
#define | BUILTIN_INLINE_PREFIX "_bi"
#define | BEFORE_RETURN debug_node_end()
#define | CHECK_EVENT(ev) if (sym == ID2SYM(rb_intern_const(#ev))) return ev;
#define | CHECK_ARRAY(v) rb_to_array_type(v)
#define | CHECK_SYMBOL(v) rb_to_symbol_type(v)
#define | SYM(s) ID2SYM(rb_intern_const(#s))
#define | INT_PARAM(F) int_param(&iseq->body->param.F, params, SYM(F))
#define | INT_PARAM(F) F = (int_param(&x, misc, SYM(F)) ? (unsigned int)x : 0)
#define | IBF_ISEQ_DEBUG 0
#define | IBF_ISEQ_ENABLE_LOCAL_BUFFER 0
#define | IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr))
#define | IBF_MAJOR_VERSION ISEQ_MAJOR_VERSION
#define | IBF_MINOR_VERSION ISEQ_MINOR_VERSION
#define | IBF_W_ALIGN(type) (RUBY_ALIGNOF(type) > 1 ? ibf_dump_align(dump, RUBY_ALIGNOF(type)) : (void)0)
#define | IBF_W(b, type, n) (IBF_W_ALIGN(type), (type *)(VALUE)IBF_WP(b, type, n))
#define | IBF_WV(variable) ibf_dump_write(dump, &(variable), sizeof(variable))
#define | IBF_WP(b, type, n) ibf_dump_write(dump, (b), sizeof(type) * (n))
#define | IBF_R(val, type, n) (type *)ibf_load_alloc(load, IBF_OFFSET(val), sizeof(type), (n))
#define | IBF_ZERO(variable) memset(&(variable), 0, sizeof(variable))
#define | IBF_BODY_OFFSET(x) (body_offset - (x))
#define | IBF_BODY_OFFSET(x) (offset - (x))
#define | IBF_OBJECT_INTERNAL FL_PROMOTED0
#define | IBF_ALIGNED_OFFSET(align, offset)
#define | IBF_OBJBODY(type, offset)

## Typedefs
typedef struct iseq_link_element | LINK_ELEMENT
typedef struct iseq_link_anchor | LINK_ANCHOR
typedef struct iseq_label_data | LABEL
typedef struct iseq_insn_data | INSN
typedef struct iseq_adjust_data | ADJUST
typedef struct iseq_trace_data | TRACE
typedef unsigned int | ibf_offset_t
typedef void(* | ibf_dump_object_function) (struct ibf_dump *dump, VALUE obj)
typedef VALUE(* | ibf_load_object_function) (const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)

## Enumerations
enum | LABEL_RESCUE_TYPE { LABEL_RESCUE_NONE , LABEL_RESCUE_BEG , LABEL_RESCUE_END , LABEL_RESCUE_TYPE_MAX }
enum | ibf_object_class_index { IBF_OBJECT_CLASS_OBJECT , IBF_OBJECT_CLASS_ARRAY , IBF_OBJECT_CLASS_STANDARD_ERROR , IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_ERROR , IBF_OBJECT_CLASS_TYPE_ERROR }
enum | ibf_object_data_type { IBF_OBJECT_DATA_ENCODING }

## Functions
VALUE | rb_iseq_compile_callback (rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func *ifunc)
VALUE | rb_iseq_compile_node (rb_iseq_t *iseq, const NODE *node)
VALUE * | rb_iseq_original_iseq (const rb_iseq_t *iseq)
VALUE | rb_node_case_when_optimizable_literal (const NODE *const node)
const char * | rb_insns_name (int i)
VALUE | rb_insns_name_array (void)
void | rb_iseq_mark_insn_storage (struct iseq_compile_data_storage *storage)
void | rb_iseq_build_from_ary (rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE params, VALUE exception, VALUE body)
int | rb_dvar_defined (ID id, const rb_iseq_t *iseq)
int | rb_local_defined (ID id, const rb_iseq_t *iseq)
const rb_iseq_t * | rb_method_for_self_aref (VALUE name, VALUE arg, const struct rb_builtin_function *func)
const rb_iseq_t * | rb_method_for_self_aset (VALUE name, VALUE arg, const struct rb_builtin_function *func)
rb_iseq_t * | iseq_alloc (void)
VALUE | rb_iseq_ibf_dump (const rb_iseq_t *iseq, VALUE opt)
void | rb_ibf_load_iseq_complete (rb_iseq_t *iseq)
const rb_iseq_t * | rb_iseq_ibf_load (VALUE str)
const rb_iseq_t * | rb_iseq_ibf_load_bytes (const char *bytes, size_t size)
VALUE | rb_iseq_ibf_load_extra_data (VALUE str)

## Variables
const ID | rb_iseq_shared_exc_local_tbl [] = {idERROR_INFO}

## Macro Definition Documentation

## ◆ ADD_ADJUST

#define ADD_ADJUST | ( |  | seq,
|  |  | line,
|  |  | label
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), (line)))

Definition at line 299 of file compile.c.

## ◆ ADD_ADJUST_RESTORE

#define ADD_ADJUST_RESTORE | ( |  | seq,
|  |  | label
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), -1))

Definition at line 302 of file compile.c.

## ◆ ADD_CALL

#define ADD_CALL | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc
| ) |  | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL)

Definition at line 272 of file compile.c.

## ◆ ADD_CALL_RECEIVER

#define ADD_CALL_RECEIVER | ( |  | seq,
|  |  | line
| ) |  | ADD_INSN((seq), (line), putself)

Definition at line 269 of file compile.c.

## ◆ ADD_CALL_WITH_BLOCK

#define ADD_CALL_WITH_BLOCK | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc,
|  |  | block
| ) |  | ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL), NULL)

Definition at line 275 of file compile.c.

## ◆ ADD_CATCH_ENTRY

#define ADD_CATCH_ENTRY | ( |  | type,
|  |  | ls,
|  |  | le,
|  |  | iseqv,
|  |  | lc
| ) |  |

Value:
do { \
VALUE _e = rb_ary_new3(5, (type), \
(VALUE)(ls) | 1, (VALUE)(le) | 1, \
(VALUE)(iseqv), (VALUE)(lc) | 1); \
LABEL_UNREMOVABLE(ls); \
LABEL_REF(le); \
LABEL_REF(lc); \
if (NIL_P(ISEQ_COMPILE_DATA(iseq)->catch_table_ary)) \
RB_OBJ_WRITE(iseq, &ISEQ_COMPILE_DATA(iseq)->catch_table_ary, rb_ary_tmp_new(3)); \
rb_ary_push(ISEQ_COMPILE_DATA(iseq)->catch_table_ary, freeze_hide_obj(_e)); \
} while (0)
rb_ary_tmp_new
VALUE rb_ary_tmp_new(long capa)
Definition: array.c:846
rb_ary_new3
#define rb_ary_new3
Definition: array.h:73
ruby::backward::cxxanyargs::type
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
NIL_P
#define NIL_P
Definition: special_consts.h:46
le
#define le(x, y)
Definition: time.c:95
VALUE
unsigned long VALUE
Definition: value.h:38

Definition at line 307 of file compile.c.

## ◆ ADD_GETLOCAL

#define ADD_GETLOCAL | ( |  | seq,
|  |  | line,
|  |  | idx,
|  |  | level
| ) |  | iseq_add_getlocal(iseq, (seq), (line), (idx), (level))

Definition at line 289 of file compile.c.

## ◆ ADD_INSN

#define ADD_INSN | ( |  | seq,
|  |  | line,
|  |  | insn
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))

Definition at line 220 of file compile.c.

## ◆ ADD_INSN1

#define ADD_INSN1 | ( |  | seq,
|  |  | line,
|  |  | insn,
|  |  | op1
| ) |  |

Value:
ADD_ELEM((seq), (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
iseq_link_element
Definition: compile.c:53

Definition at line 232 of file compile.c.

## ◆ ADD_INSN2

#define ADD_INSN2 | ( |  | seq,
|  |  | line,
|  |  | insn,
|  |  | op1,
|  |  | op2
| ) |  |

Value:
ADD_ELEM((seq), (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 2, (VALUE)(op1), (VALUE)(op2)))

Definition at line 251 of file compile.c.

## ◆ ADD_INSN3

#define ADD_INSN3 | ( |  | seq,
|  |  | line,
|  |  | insn,
|  |  | op1,
|  |  | op2,
|  |  | op3
| ) |  |

Value:
ADD_ELEM((seq), (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 3, (VALUE)(op1), (VALUE)(op2), (VALUE)(op3)))

Definition at line 255 of file compile.c.

## ◆ ADD_INSNL

#define ADD_INSNL | ( |  | seq,
|  |  | line,
|  |  | insn,
|  |  | label
| ) |  | (ADD_INSN1(seq, line, insn, label), LABEL_REF(label))

Definition at line 249 of file compile.c.

## ◆ ADD_LABEL

#define ADD_LABEL | ( |  | seq,
|  |  | label
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *) (label))

Definition at line 293 of file compile.c.

## ◆ ADD_SEND

#define ADD_SEND | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc
| ) |  | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL)

Definition at line 260 of file compile.c.

## ◆ ADD_SEND_R

#define ADD_SEND_R | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc,
|  |  | block,
|  |  | flag,
|  |  | keywords
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_send(iseq, (line), (id), (VALUE)(argc), (block), (VALUE)(flag), (keywords)))

Definition at line 278 of file compile.c.

## ◆ ADD_SEND_WITH_BLOCK

#define ADD_SEND_WITH_BLOCK | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc,
|  |  | block
| ) |  | ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(0), NULL)

Definition at line 266 of file compile.c.

## ◆ ADD_SEND_WITH_FLAG

#define ADD_SEND_WITH_FLAG | ( |  | seq,
|  |  | line,
|  |  | id,
|  |  | argc,
|  |  | flag
| ) |  | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)(flag), NULL)

Definition at line 263 of file compile.c.

## ◆ ADD_SEQ

#define ADD_SEQ | ( |  | seq1,
|  |  | seq2
| ) |  | APPEND_LIST((seq1), (seq2))

Definition at line 216 of file compile.c.

## ◆ ADD_SETLOCAL

#define ADD_SETLOCAL | ( |  | seq,
|  |  | line,
|  |  | idx,
|  |  | level
| ) |  | iseq_add_setlocal(iseq, (seq), (line), (idx), (level))

Definition at line 290 of file compile.c.

## ◆ ADD_TRACE

#define ADD_TRACE | ( |  | seq,
|  |  | event
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), 0))

Definition at line 281 of file compile.c.

## ◆ ADD_TRACE_WITH_DATA

#define ADD_TRACE_WITH_DATA | ( |  | seq,
|  |  | event,
|  |  | data
| ) |  | ADD_ELEM((seq), (LINK_ELEMENT *)new_trace_body(iseq, (event), (data)))

Definition at line 283 of file compile.c.

## ◆ APPEND_LABEL

#define APPEND_LABEL | ( |  | seq,
|  |  | before,
|  |  | label
| ) |  | APPEND_ELEM((seq), (before), (LINK_ELEMENT *) (label))

Definition at line 296 of file compile.c.

## ◆ BADINSN_DUMP

#define BADINSN_DUMP | ( |  | anchor,
|  |  | list,
|  |  | dest
| ) |  | dump_disasm_list_with_cursor(FIRST_ELEMENT(anchor), list, dest)

Definition at line 2066 of file compile.c.

## ◆ BADINSN_ERROR

#define BADINSN_ERROR

Value:
(xfree(generated_iseq), \
xfree(insns_info), \
BADINSN_DUMP(anchor, list, NULL), \
COMPILE_ERROR)
COMPILE_ERROR
#define COMPILE_ERROR
Definition: compile.c:394
NULL
#define NULL
Definition: regenc.h:69
xfree
#define xfree
Definition: xmalloc.h:49

Definition at line 2069 of file compile.c.

## ◆ BEFORE_RETURN [1/2]

#define BEFORE_RETURN

Definition at line 431 of file compile.c.

## ◆ BEFORE_RETURN [2/2]

#define BEFORE_RETURN debug_node_end()

Definition at line 431 of file compile.c.

## ◆ BUILTIN_INLINE_PREFIX

#define BUILTIN_INLINE_PREFIX "_bi"

## ◆ CHECK

#define CHECK | ( |  | sub | ) | if (!(sub)) {BEFORE_RETURN;return COMPILE_NG;}

Definition at line 429 of file compile.c.

## ◆ CHECK_ARRAY

#define CHECK_ARRAY | ( |  | v | ) | rb_to_array_type(v)

Definition at line 9523 of file compile.c.

## ◆ CHECK_EVENT

#define CHECK_EVENT | ( |  | ev | ) | if (sym == ID2SYM(rb_intern_const(#ev))) return ev;

## ◆ CHECK_SYMBOL

#define CHECK_SYMBOL | ( |  | v | ) | rb_to_symbol_type(v)

Definition at line 9524 of file compile.c.

## ◆ COMPILE

#define COMPILE | ( |  | anchor,
|  |  | desc,
|  |  | node
| ) |  |

Value:
(debug_compile("== " desc "\n", \
iseq_compile_each(iseq, (anchor), (node), 0)))
debug_compile
#define debug_compile(msg, v)
Definition: compile.c:200

Definition at line 320 of file compile.c.

## ◆ COMPILE_

#define COMPILE_ | ( |  | anchor,
|  |  | desc,
|  |  | node,
|  |  | popped
| ) |  |

Value:
(debug_compile("== " desc "\n", \
iseq_compile_each(iseq, (anchor), (node), (popped))))

Definition at line 330 of file compile.c.

## ◆ compile_debug

#define compile_debug CPDEBUG

Definition at line 145 of file compile.c.

## ◆ COMPILE_ERROR

#define COMPILE_ERROR append_compile_error

Definition at line 394 of file compile.c.

## ◆ COMPILE_NG

#define COMPILE_NG 0

Definition at line 427 of file compile.c.

## ◆ COMPILE_OK

#define COMPILE_OK 1

Definition at line 426 of file compile.c.

## ◆ COMPILE_POPPED

#define COMPILE_POPPED | ( |  | anchor,
|  |  | desc,
|  |  | node
| ) |  |

Value:
(debug_compile("== " desc "\n", \
iseq_compile_each(iseq, (anchor), (node), 1)))

Definition at line 325 of file compile.c.

## ◆ COMPILE_RECV

#define COMPILE_RECV | ( |  | anchor,
|  |  | desc,
|  |  | node
| ) |  |

Value:
(private_recv_p(node) ? \
(ADD_INSN(anchor, nd_line(node), putself), VM_CALL_FCALL) : \
COMPILE(anchor, desc, node->nd_recv) ? 0 : -1)
COMPILE
#define COMPILE(anchor, desc, node)
Definition: compile.c:320
ADD_INSN
#define ADD_INSN(seq, line, insn)
Definition: compile.c:220
nd_line
#define nd_line(n)
Definition: node.h:196
VM_CALL_FCALL
#define VM_CALL_FCALL
Definition: vm_callinfo.h:33

Definition at line 334 of file compile.c.

## ◆ CPDEBUG

#define CPDEBUG 0

debug function(macro) interface depend on CPDEBUG if it is less than 0, runtime option is in effect.

debug level: 0: no debug output 1: show node type 2: show node important parameters ... 5: show other parameters 10: show every AST array

Definition at line 141 of file compile.c.

## ◆ debug_compile

#define debug_compile | ( |  | msg,
|  |  | v
| ) |  | (v)

Definition at line 200 of file compile.c.

## ◆ debug_list

#define debug_list | ( |  | anc,
|  |  | cur
| ) |  | ((void)0)

Definition at line 1197 of file compile.c.

## ◆ debug_node_end

#define debug_node_end | ( |  | ) | ((void)0)

Definition at line 190 of file compile.c.

## ◆ debug_node_start

#define debug_node_start | ( |  | node | ) | ((void)0)

Definition at line 189 of file compile.c.

## ◆ debugi

#define debugi | ( |  | header,
|  |  | id
| ) |  | ((void)0)

Definition at line 184 of file compile.c.

## ◆ debugp

#define debugp | ( |  | header,
|  |  | value
| ) |  | ((void)0)

Definition at line 185 of file compile.c.

## ◆ debugp_param

#define debugp_param | ( |  | header,
|  |  | value
| ) |  | ((void)0)

Definition at line 188 of file compile.c.

## ◆ debugp_verbose

#define debugp_verbose | ( |  | header,
|  |  | value
| ) |  | ((void)0)

Definition at line 186 of file compile.c.

## ◆ debugp_verbose_node

#define debugp_verbose_node | ( |  | header,
|  |  | value
| ) |  | ((void)0)

Definition at line 187 of file compile.c.

## ◆ debugs

#define debugs if(0)printf

Definition at line 199 of file compile.c.

## ◆ DECL_ANCHOR

#define DECL_ANCHOR | ( |  | name | ) | LINK_ANCHOR name[1] = {{{ISEQ_ELEMENT_ANCHOR,},}}

Definition at line 435 of file compile.c.

## ◆ ERROR_ARGS

#define ERROR_ARGS ERROR_ARGS_AT(node)

Definition at line 397 of file compile.c.

## ◆ ERROR_ARGS_AT

#define ERROR_ARGS_AT | ( |  | n | ) | iseq, nd_line(n),

Definition at line 396 of file compile.c.

## ◆ EXPECT_NODE

#define EXPECT_NODE | ( |  | prefix,
|  |  | node,
|  |  | ndtype,
|  |  | errval
| ) |  |

Value:
do { \
const NODE *error_node = (node); \
enum node_type error_type = nd_type(error_node); \
if (error_type != (ndtype)) { \
COMPILE_ERROR(ERROR_ARGS_AT(error_node) \
prefix ": " #ndtype " is expected, but %s", \
ruby_node_name(error_type)); \
return errval; \
} \
} while (0)
ERROR_ARGS_AT
#define ERROR_ARGS_AT(n)
Definition: compile.c:396
prefix
unsigned short prefix[65536]
Definition: gun.c:163
ruby_node_name
const char * ruby_node_name(int node)
Definition: iseq.c:2593
node_type
node_type
Definition: node.h:21
nd_type
#define nd_type(n)
Definition: node.h:188
RNode
Definition: node.h:149

Definition at line 399 of file compile.c.

## ◆ EXPECT_NODE_NONULL

#define EXPECT_NODE_NONULL | ( |  | prefix,
|  |  | parent,
|  |  | ndtype,
|  |  | errval
| ) |  |

Value:
do { \
COMPILE_ERROR(ERROR_ARGS_AT(parent) \
prefix ": must be " #ndtype ", but 0"); \
return errval; \
} while (0)

Definition at line 411 of file compile.c.

## ◆ FIXNUM_INC

#define FIXNUM_INC | ( |  | n,
|  |  | i
| ) |  | ((n)+(INT2FIX(i)&~FIXNUM_FLAG))

Definition at line 50 of file compile.c.

## ◆ FIXNUM_OR

#define FIXNUM_OR | ( |  | n,
|  |  | i
| ) |  | ((n)|INT2FIX(i))

Definition at line 51 of file compile.c.

## ◆ FLUSH_CHUNK [1/2]

#define FLUSH_CHUNK | ( |  | ) |

Value:
if (stack_len) { \
if (first_chunk) { \
APPEND_LIST(ret, anchor); \
ADD_INSN1(ret, line, newhash, INT2FIX(stack_len)); \
} \
else { \
ADD_INSN1(ret, line, putspecialobject, INT2FIX(VM_SPECIAL_OBJECT_VMCORE)); \
ADD_INSN(ret, line, swap); \
APPEND_LIST(ret, anchor); \
ADD_SEND(ret, line, id_core_hash_merge_ptr, INT2FIX(stack_len + 1)); \
} \
INIT_ANCHOR(anchor); \
first_chunk = stack_len = 0; \
}
id_core_hash_merge_ptr
@ id_core_hash_merge_ptr
Definition: id.h:126
INT2FIX
#define INT2FIX
Definition: long.h:48
VM_SPECIAL_OBJECT_VMCORE
@ VM_SPECIAL_OBJECT_VMCORE
Definition: vm_core.h:1130

## ◆ FLUSH_CHUNK [2/2]

#define FLUSH_CHUNK | ( |  | newarrayinsn | ) |

Value:
if (stack_len) { \
ADD_INSN1(ret, line, newarrayinsn, INT2FIX(stack_len)); \
if (!first_chunk) ADD_INSN(ret, line, concatarray); \
first_chunk = stack_len = 0; \
}

## ◆ HASH_BRACE

#define HASH_BRACE 1

Definition at line 4013 of file compile.c.

## ◆ IBF_ALIGNED_OFFSET

#define IBF_ALIGNED_OFFSET | ( |  | align,
|  |  | offset
| ) |  |

Value:
/* offset > 0 */ \
((((offset) - 1) / (align) + 1) * (align))
offset
voidpf uLong offset
Definition: ioapi.h:144

Definition at line 11263 of file compile.c.

## ◆ IBF_BODY_OFFSET [1/2]

#define IBF_BODY_OFFSET | ( |  | x | ) | (body_offset - (x))

## ◆ IBF_BODY_OFFSET [2/2]

#define IBF_BODY_OFFSET | ( |  | x | ) | (offset - (x))

## ◆ IBF_ISEQ_DEBUG

#define IBF_ISEQ_DEBUG 0

Definition at line 9908 of file compile.c.

## ◆ IBF_ISEQ_ENABLE_LOCAL_BUFFER

#define IBF_ISEQ_ENABLE_LOCAL_BUFFER 0

Definition at line 9912 of file compile.c.

## ◆ IBF_MAJOR_VERSION

#define IBF_MAJOR_VERSION ISEQ_MAJOR_VERSION

Definition at line 9918 of file compile.c.

## ◆ IBF_MINOR_VERSION

#define IBF_MINOR_VERSION ISEQ_MINOR_VERSION

Definition at line 9923 of file compile.c.

## ◆ IBF_OBJBODY

#define IBF_OBJBODY | ( |  | type,
|  |  | offset
| ) |  |

Value:
(const type *)\
ibf_load_check_offset(load, IBF_ALIGNED_OFFSET(RUBY_ALIGNOF(type), offset))
RUBY_ALIGNOF
#define RUBY_ALIGNOF
Definition: stdalign.h:28
IBF_ALIGNED_OFFSET
#define IBF_ALIGNED_OFFSET(align, offset)
Definition: compile.c:11263
load
void * load(const char *name, size_t *len)
Definition: pufftest.c:60

Definition at line 11265 of file compile.c.

## ◆ IBF_OBJECT_INTERNAL

#define IBF_OBJECT_INTERNAL FL_PROMOTED0

Definition at line 11205 of file compile.c.

## ◆ IBF_OFFSET

#define IBF_OFFSET | ( |  | ptr | ) | ((ibf_offset_t)(VALUE)(ptr))

Definition at line 9916 of file compile.c.

## ◆ IBF_R

#define IBF_R | ( |  | val,
|  |  | type,
|  |  | n
| ) |  | (type *)ibf_load_alloc(load, IBF_OFFSET(val), sizeof(type), (n))

Definition at line 10128 of file compile.c.

## ◆ IBF_W

#define IBF_W | ( |  | b,
|  |  | type,
|  |  | n
| ) |  | (IBF_W_ALIGN(type), (type *)(VALUE)IBF_WP(b, type, n))

Definition at line 10125 of file compile.c.

## ◆ IBF_W_ALIGN

#define IBF_W_ALIGN | ( |  | type | ) | (RUBY_ALIGNOF(type) > 1 ? ibf_dump_align(dump, RUBY_ALIGNOF(type)) : (void)0)

Definition at line 10123 of file compile.c.

## ◆ IBF_WP

#define IBF_WP | ( |  | b,
|  |  | type,
|  |  | n
| ) |  | ibf_dump_write(dump, (b), sizeof(type) * (n))

Definition at line 10127 of file compile.c.

## ◆ IBF_WV

#define IBF_WV | ( |  | variable | ) | ibf_dump_write(dump, &(variable), sizeof(variable))

Definition at line 10126 of file compile.c.

## ◆ IBF_ZERO

#define IBF_ZERO | ( |  | variable | ) | memset(&(variable), 0, sizeof(variable))

Definition at line 10129 of file compile.c.

## ◆ INIT_ANCHOR

#define INIT_ANCHOR | ( |  | name | ) | (name->last = &name->anchor)

Definition at line 437 of file compile.c.

## ◆ INSERT_AFTER_INSN

#define INSERT_AFTER_INSN | ( |  | prev,
|  |  | line,
|  |  | insn
| ) |  | ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))

Definition at line 228 of file compile.c.

## ◆ INSERT_AFTER_INSN1

#define INSERT_AFTER_INSN1 | ( |  | prev,
|  |  | line,
|  |  | insn,
|  |  | op1
| ) |  |

Value:
ELEM_INSERT_NEXT(&(prev)->link, (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))
link
int link(const char *, const char *)
Definition: win32.c:4987

Definition at line 242 of file compile.c.

## ◆ INSERT_BEFORE_INSN

#define INSERT_BEFORE_INSN | ( |  | next,
|  |  | line,
|  |  | insn
| ) |  | ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))

Definition at line 224 of file compile.c.

## ◆ INSERT_BEFORE_INSN1

#define INSERT_BEFORE_INSN1 | ( |  | next,
|  |  | line,
|  |  | insn,
|  |  | op1
| ) |  |

Value:
ELEM_INSERT_PREV(&(next)->link, (LINK_ELEMENT *) \
new_insn_body(iseq, (line), BIN(insn), 1, (VALUE)(op1)))

Definition at line 237 of file compile.c.

## ◆ INSN_OF

#define INSN_OF | ( |  | insn | ) | (((INSN*)(insn))->insn_id)

Definition at line 342 of file compile.c.

## ◆ INT_PARAM [1/2]

#define INT_PARAM | ( |  | F | ) | int_param(&iseq->body->param.F, params, SYM(F))

## ◆ INT_PARAM [2/2]

#define INT_PARAM | ( |  | F | ) | F = (int_param(&x, misc, SYM(F)) ? (unsigned int)x : 0)

## ◆ INVALID_ISEQ_TYPE

#define INVALID_ISEQ_TYPE | ( |  | type | ) | ISEQ_TYPE_##type: m = #type; goto invalid_iseq_type

## ◆ IS_ADJUST

#define IS_ADJUST | ( |  | link | ) | ((link)->type == ISEQ_ELEMENT_ADJUST)

Definition at line 347 of file compile.c.

## ◆ IS_INSN

#define IS_INSN | ( |  | link | ) | ((link)->type == ISEQ_ELEMENT_INSN)

Definition at line 345 of file compile.c.

## ◆ IS_INSN_ID

#define IS_INSN_ID | ( |  | iobj,
|  |  | insn
| ) |  | (INSN_OF(iobj) == BIN(insn))

Definition at line 349 of file compile.c.

## ◆ IS_LABEL

#define IS_LABEL | ( |  | link | ) | ((link)->type == ISEQ_ELEMENT_LABEL)

Definition at line 346 of file compile.c.

## ◆ IS_NEXT_INSN_ID

#define IS_NEXT_INSN_ID | ( |  | link,
|  |  | insn
| ) |  | ((link)->next && IS_INSN((link)->next) && IS_INSN_ID((link)->next, insn))

Definition at line 350 of file compile.c.

## ◆ IS_TRACE

#define IS_TRACE | ( |  | link | ) | ((link)->type == ISEQ_ELEMENT_TRACE)

Definition at line 348 of file compile.c.

## ◆ ISEQ_ARG

#define ISEQ_ARG

Definition at line 458 of file compile.c.

## ◆ ISEQ_ARG_DECLARE

#define ISEQ_ARG_DECLARE

Definition at line 459 of file compile.c.

## ◆ ISEQ_LAST_LINE

#define ISEQ_LAST_LINE | ( |  | iseq | ) | (ISEQ_COMPILE_DATA(iseq)->last_line)

Definition at line 690 of file compile.c.

## ◆ LABEL_FORMAT

#define LABEL_FORMAT "<L%03d>"

Definition at line 207 of file compile.c.

## ◆ LABEL_REF

#define LABEL_REF | ( |  | label | ) | ((label)->refcnt++)

Definition at line 246 of file compile.c.

## ◆ LABEL_UNREMOVABLE

#define LABEL_UNREMOVABLE | ( |  | label | ) | ((label) ? (LABEL_REF(label), (label)->unremovable=1) : 0)

Definition at line 305 of file compile.c.

## ◆ LVAR_ERRINFO

#define LVAR_ERRINFO (1)

Definition at line 203 of file compile.c.

## ◆ MEMORY

#define MEMORY | ( |  | v | ) |

Value:
{ \
int i; \
if (memindex == memsize) return 0; \
for (i=0; i<memindex; i++) { \
if (mem[i] == (v)) return 0; \
} \
mem[memindex++] = (v); \
}

## ◆ NEW_CHILD_ISEQ

#define NEW_CHILD_ISEQ | ( |  | node,
|  |  | name,
|  |  | type,
|  |  | line_no
| ) |  | new_child_iseq(iseq, (node), rb_fstring(name), iseq, (type), (line_no))

Definition at line 212 of file compile.c.

## ◆ NEW_ISEQ

#define NEW_ISEQ | ( |  | node,
|  |  | name,
|  |  | type,
|  |  | line_no
| ) |  | new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no))

Definition at line 209 of file compile.c.

## ◆ NEW_LABEL

#define NEW_LABEL | ( |  | l | ) | new_label_body(iseq, (l))

Definition at line 206 of file compile.c.

## ◆ NO_CHECK

#define NO_CHECK | ( |  | sub | ) | (void)(sub)

Definition at line 430 of file compile.c.

## ◆ OPERAND_AT

#define OPERAND_AT | ( |  | insn,
|  |  | idx
| ) |  | (((INSN*)(insn))->operands[(idx)])

Definition at line 339 of file compile.c.

## ◆ PADDING_SIZE_MAX

#define PADDING_SIZE_MAX 0

Definition at line 921 of file compile.c.

## ◆ RUBY_UNTYPED_DATA_WARNING

#define RUBY_UNTYPED_DATA_WARNING 0

Definition at line 48 of file compile.c.

## ◆ SP_INSN

#define SP_INSN | ( |  | opt | ) | insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt))

## ◆ SYM [1/2]

#define SYM | ( |  | s | ) | ID2SYM(rb_intern_const(#s))

## ◆ SYM [2/2]

#define SYM | ( |  | s | ) | ID2SYM(rb_intern_const(#s))

## ◆ UNKNOWN_NODE

#define UNKNOWN_NODE | ( |  | prefix,
|  |  | node,
|  |  | errval
| ) |  |

Value:
do { \
const NODE *error_node = (node); \
COMPILE_ERROR(ERROR_ARGS_AT(error_node) prefix ": unknown node (%s)", \
ruby_node_name(nd_type(error_node))); \
return errval; \
} while (0)

Definition at line 418 of file compile.c.

## Typedef Documentation

## ◆ ADJUST

typedef struct iseq_adjust_data ADJUST

## ◆ ibf_dump_object_function

typedef void(* ibf_dump_object_function) (struct ibf_dump *dump, VALUE obj)

Definition at line 11643 of file compile.c.

## ◆ ibf_load_object_function

typedef VALUE(* ibf_load_object_function) (const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t offset)

Definition at line 11736 of file compile.c.

## ◆ ibf_offset_t

typedef unsigned int ibf_offset_t

Definition at line 9915 of file compile.c.

## ◆ INSN

typedef struct iseq_insn_data INSN

## ◆ LABEL

typedef struct iseq_label_data LABEL

## ◆ LINK_ANCHOR

typedef struct iseq_link_anchor LINK_ANCHOR

## ◆ LINK_ELEMENT

typedef struct iseq_link_element LINK_ELEMENT

## ◆ TRACE

typedef struct iseq_trace_data TRACE

## Enumeration Type Documentation

## ◆ ibf_object_class_index

enum ibf_object_class_index

Enumerator
IBF_OBJECT_CLASS_OBJECT |
IBF_OBJECT_CLASS_ARRAY |
IBF_OBJECT_CLASS_STANDARD_ERROR |
IBF_OBJECT_CLASS_NO_MATCHING_PATTERN_ERROR |
IBF_OBJECT_CLASS_TYPE_ERROR |

Definition at line 11220 of file compile.c.

## ◆ ibf_object_data_type

enum ibf_object_data_type

Enumerator
IBF_OBJECT_DATA_ENCODING |

Definition at line 11251 of file compile.c.

## ◆ LABEL_RESCUE_TYPE

enum LABEL_RESCUE_TYPE

Enumerator
LABEL_RESCUE_NONE |
LABEL_RESCUE_BEG |
LABEL_RESCUE_END |
LABEL_RESCUE_TYPE_MAX |

Definition at line 70 of file compile.c.

## Function Documentation

## ◆ iseq_alloc()

rb_iseq_t * iseq_alloc | ( | void |  | ) |

Referenced by rb_iseq_new_with_callback(), and rb_iseq_new_with_opt().

## ◆ rb_dvar_defined()

int rb_dvar_defined | ( | ID | id,
|  | const rb_iseq_t * | iseq
| ) |  |

Definition at line 9772 of file compile.c.

References rb_iseq_struct::body, rb_iseq_constant_body::ISEQ_TYPE_BLOCK, rb_iseq_constant_body::ISEQ_TYPE_ENSURE, rb_iseq_constant_body::ISEQ_TYPE_EVAL, rb_iseq_constant_body::ISEQ_TYPE_MAIN, rb_iseq_constant_body::ISEQ_TYPE_RESCUE, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::parent_iseq, and rb_iseq_constant_body::type.

## ◆ rb_ibf_load_iseq_complete()

void rb_ibf_load_iseq_complete | ( | rb_iseq_t * | iseq | ) |

Definition at line 11971 of file compile.c.

References rb_iseq_struct::aux, FL_UNSET, rb_iseq_struct::index, ibf_load::iseq, ISEQ_NOT_LOADED_YET, load(), rb_iseq_struct::loader, rb_iseq_struct::obj, rb_iseq_init_trace(), and RTYPEDDATA_DATA.

## ◆ rb_insns_name()

const char * rb_insns_name | ( | int | i | ) |

Definition at line 9172 of file compile.c.

Referenced by MAYBE_UNUSED().

## ◆ rb_insns_name_array()

VALUE rb_insns_name_array | ( | void |  | ) |

Definition at line 9178 of file compile.c.

References rb_ary_new_capa(), rb_ary_push(), rb_fstring_cstr, and rb_obj_freeze().

Referenced by Init_VM().

## ◆ rb_iseq_build_from_ary()

void rb_iseq_build_from_ary | ( | rb_iseq_t * | iseq,
|  | VALUE | misc,
|  | VALUE | locals,
|  | VALUE | params,
|  | VALUE | exception,
|  | VALUE | body
| ) |  |

Definition at line 9665 of file compile.c.

References ALLOC_N, rb_iseq_constant_body::ambiguous_param0, rb_iseq_struct::body, CHECK_SYMBOL, Data_Wrap_Struct, DECL_ANCHOR, FIX2LONG, FIXNUM_P, rb_iseq_constant_body::flags, rb_iseq_constant_body::has_block, rb_iseq_constant_body::has_kwrest, rb_iseq_constant_body::has_lead, rb_iseq_constant_body::has_opt, rb_iseq_constant_body::has_post, rb_iseq_constant_body::has_rest, ID2SYM, if(), INIT_ANCHOR, INT_PARAM, rb_iseq_constant_body::keyword, len, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NIL_P, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, PRIsVALUE, Qtrue, RARRAY_AREF, rb_eTypeError, rb_hash_aref(), rb_mark_set(), rb_raise(), rb_iseq_constant_body::size, st_free_table, st_init_numtable, rb_iseq_constant_body::stack_max, SYM, SYM2ID, T_ARRAY, TRUE, and ZALLOC.

## ◆ rb_iseq_compile_callback()

VALUE rb_iseq_compile_callback | ( | rb_iseq_t * | iseq,
|  | const struct rb_iseq_new_with_callback_callback_func * | ifunc
| ) |  |

Definition at line 715 of file compile.c.

References ADD_INSN, CHECK, rb_iseq_new_with_callback_callback_func::data, DECL_ANCHOR, rb_iseq_new_with_callback_callback_func::func, and INIT_ANCHOR.

Referenced by rb_iseq_new_with_callback().

## ◆ rb_iseq_compile_node()

VALUE rb_iseq_compile_node | ( | rb_iseq_t * | iseq,
|  | const NODE * | node
| ) |  |

Definition at line 729 of file compile.c.

References ADD_CATCH_ENTRY, ADD_GETLOCAL, ADD_INSN, ADD_INSN1, ADD_LABEL, ADD_TRACE, rb_iseq_struct::body, CHECK, rb_iseq_location_struct::code_location, COMPILE, COMPILE_ERROR, COMPILE_NG, COMPILE_POPPED, DECL_ANCHOR, rb_code_location_struct::end_pos, ERROR_ARGS, rb_iseq_location_struct::first_lineno, FIX2INT, imemo_ifunc, IMEMO_TYPE_P, INIT_ANCHOR, INT2FIX, INVALID_ISEQ_TYPE, LABEL_RESCUE_BEG, LABEL_RESCUE_END, rb_code_position_struct::lineno, rb_iseq_constant_body::location, LVAR_ERRINFO, nd_line, nd_type, NEW_LABEL, NO_CHECK, NODE_SCOPE, NULL, rb_eArgError, rb_raise(), iseq_label_data::rescued, RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_END, RUBY_EVENT_RETURN, and rb_iseq_constant_body::type.

Referenced by rb_iseq_new_with_opt().

## ◆ rb_iseq_ibf_dump()

VALUE rb_iseq_ibf_dump | ( | const rb_iseq_t * | iseq,
|  | VALUE | opt
| ) |  |

Definition at line 11913 of file compile.c.

References rb_iseq_struct::body, DATA_PTR, ibf_header::extra_size, ibf_dump::global_buffer, ibf_header::global_object_list_offset, ibf_header::global_object_list_size, IBF_MAJOR_VERSION, IBF_MINOR_VERSION, ISEQ_COVERAGE, rb_iseq_constant_body::local_iseq, ibf_header::magic, ibf_header::major_version, ibf_header::minor_version, NULL, rb_iseq_constant_body::parent_iseq, ptr, rb_eRuntimeError, RB_GC_GUARD, rb_raise(), RTEST, RUBY_PLATFORM, ibf_header::size, ibf_dump_buffer::str, str, StringValuePtr, strlen(), and TypedData_Make_Struct.

## ◆ rb_iseq_ibf_load()

const rb_iseq_t * rb_iseq_ibf_load | ( | VALUE | str | ) |

Definition at line 12136 of file compile.c.

References ibf_load::iseq, load(), ibf_load::loader_obj, RB_GC_GUARD, str, and TypedData_Make_Struct.

## ◆ rb_iseq_ibf_load_bytes()

const rb_iseq_t * rb_iseq_ibf_load_bytes | ( | const char * | bytes,
|  | size_t | size
| ) |  |

Definition at line 12150 of file compile.c.

References ibf_load::iseq, load(), ibf_load::loader_obj, RB_GC_GUARD, and TypedData_Make_Struct.

Referenced by rb_load_with_builtin_functions().

## ◆ rb_iseq_ibf_load_extra_data()

VALUE rb_iseq_ibf_load_extra_data | ( | VALUE | str | ) |

Definition at line 12164 of file compile.c.

References load(), ibf_load::loader_obj, RB_GC_GUARD, rb_str_new, str, and TypedData_Make_Struct.

## ◆ rb_iseq_mark_insn_storage()

void rb_iseq_mark_insn_storage | ( | struct iseq_compile_data_storage * | storage | ) |

Definition at line 9611 of file compile.c.

References iseq_compile_data_storage::buff, if(), iseq_insn_data::insn_id, int(), iseq_compile_data_storage::next, OPERAND_AT, iseq_insn_data::operands, iseq_compile_data_storage::pos, rb_gc_mark(), iseq_compile_data_storage::size, SPECIAL_CONST_P, and types.

Referenced by rb_iseq_mark().

## ◆ rb_iseq_original_iseq()

VALUE * rb_iseq_original_iseq | ( | const rb_iseq_t * | iseq | ) |

Definition at line 863 of file compile.c.

References rb_iseq_struct::body, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, MEMCPY, and rb_vm_insn_addr2insn().

Referenced by rb_vmdebug_debug_print_pre().

## ◆ rb_local_defined()

int rb_local_defined | ( | ID | id,
|  | const rb_iseq_t * | iseq
| ) |  |

Definition at line 9797 of file compile.c.

References rb_iseq_struct::body, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::local_table, and rb_iseq_constant_body::local_table_size.

## ◆ rb_method_for_self_aref()

const rb_iseq_t * rb_method_for_self_aref | ( | VALUE | name,
|  | VALUE | arg,
|  | const struct rb_builtin_function * | func
| ) |  |

Definition at line 9891 of file compile.c.

References name.

## ◆ rb_method_for_self_aset()

const rb_iseq_t * rb_method_for_self_aset | ( | VALUE | name,
|  | VALUE | arg,
|  | const struct rb_builtin_function * | func
| ) |  |

Definition at line 9900 of file compile.c.

References name.

## ◆ rb_node_case_when_optimizable_literal()

VALUE rb_node_case_when_optimizable_literal | ( | const NODE *const | node | ) |

Definition at line 4480 of file compile.c.

References FIXABLE, LONG2FIX, nd_type, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_STR, NODE_TRUE, Qfalse, Qnil, Qtrue, Qundef, rb_cNumeric, rb_dbl2big(), rb_fstring(), rb_obj_is_kind_of(), RFLOAT_VALUE, SYMBOL_P, and T_FLOAT.

## Variable Documentation

## ◆ rb_iseq_shared_exc_local_tbl

const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO}

Definition at line 125 of file compile.c.

Referenced by rb_iseq_free().