Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "internal.h"
#include "ruby/re.h"
#include "encindex.h"
#include <math.h>
#include "vm_core.h"
#include "iseq.h"
#include "insns.inc"
#include "insns_info.inc"
#include "id_table.h"
#include "gc.h"
#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 | ensure_range |
struct | iseq_compile_data_ensure_node_stack |
struct | cdhash_set_label_struct |
struct | accessor_args |
struct | ibf_header |
struct | ibf_id_entry |
struct | ibf_dump |
struct | ibf_load |
struct | ibf_dump_id_list_i_arg |
struct | ibf_object_header |
struct | ibf_object_string |
struct | ibf_object_regexp |
struct | ibf_object_array |
struct | ibf_object_hash |
struct | ibf_object_struct_range |
struct | ibf_object_bignum |
struct | ibf_object_complex_rational |
struct | ibf_object_symbol |
Macros | |
#define | USE_INSN_STACK_INCREASE 1 |
#define | RUBY_UNTYPED_DATA_WARNING 0 |
#define | ISEQ_TYPE_ONCE_GUARD ISEQ_TYPE_DEFINED_GUARD |
#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) r_id(id) |
#define | debugp(header, value) r_value(value) |
#define | debugp_verbose(header, value) r_value(value) |
#define | debugp_verbose_node(header, value) r_value(value) |
#define | debugp_param(header, value) r_value(value) |
#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 | iseq_path(iseq) ((iseq)->body->location.path) |
#define | iseq_absolute_path(iseq) ((iseq)->body->location.absolute_path) |
#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(prev, line, insn) INSERT_ELEM_PREV(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0)) |
#define | ADD_INSN1(seq, line, insn, op1) |
#define | INSERT_BEFORE_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, line, event) |
#define | ADD_GETLOCAL(seq, line, idx, level) |
#define | ADD_SETLOCAL(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_INSN_ID(iobj, insn) (INSN_OF(iobj) == BIN(insn)) |
#define | COMPILE_ERROR prepare_compile_error(iseq) |
#define | ERROR_ARGS_AT(n) iseq, nd_line(n), |
#define | ERROR_ARGS ERROR_ARGS_AT(node) |
#define | EXPECT_NODE(prefix, node, ndtype) |
#define | EXPECT_NODE_NONULL(prefix, parent, ndtype) |
#define | UNKNOWN_NODE(prefix, node) |
#define | COMPILE_OK 1 |
#define | COMPILE_NG 0 |
#define | CHECK(sub) if (!(sub)) {BEFORE_RETURN;return COMPILE_NG;} |
#define | BEFORE_RETURN |
#define | DECL_ANCHOR(name) LINK_ANCHOR name[1] = {{{0,},}} |
#define | INIT_ANCHOR(name) (name->last = &name->anchor) |
#define | ISEQ_ARG |
#define | ISEQ_ARG_DECLARE |
#define | ruby_sourcefile RSTRING_PTR(iseq->body->location.path) |
#define | PADDING_SIZE_MAX 0 |
#define | IS_TRACE_LINE(insn) |
#define | SP_INSN(opt) insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt)) |
#define | MEMORY(v) |
#define | private_recv_p(node) (nd_type((node)->nd_recv) == NODE_SELF) |
#define | defined_expr defined_expr0 |
#define | BEFORE_RETURN debug_node_end() |
#define | rb_intern(str) rb_intern_const(str) |
#define | CHECK_ARRAY(v) rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
#define | CHECK_SYMBOL(v) rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
#define | SYM(s) ID2SYM(rb_intern(#s)) |
#define | SYM(s) ID2SYM(rb_intern(#s)) |
#define | INT_PARAM(F) int_param(&iseq->body->param.F, params, SYM(F)) |
#define | IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr)) |
#define | IBF_W(b, type, n) (type *)(VALUE)ibf_dump_write(dump, (b), sizeof(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_OBJECT_INTERNAL FL_PROMOTED0 |
#define | IBF_OBJHEADER(offset) (struct ibf_object_header *)(load->buff + (offset)) |
#define | IBF_OBJBODY(type, offset) (type *)(load->buff + sizeof(struct ibf_object_header) + (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 void(* | compile_error_func) (rb_iseq_t *, int, const char *,...) |
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) |
Variables | |
static const struct st_hash_type | cdhash_type |
static ibf_dump_object_function | dump_object_functions [RUBY_T_MASK+1] |
static ibf_load_object_function | load_object_functions [RUBY_T_MASK+1] |
static const rb_data_type_t | ibf_dump_type |
static const rb_data_type_t | ibf_load_type |
#define ADD_ADJUST | ( | seq, | |
line, | |||
label | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), (line))) |
Definition at line 288 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_ADJUST_RESTORE | ( | seq, | |
label | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), -1)) |
Definition at line 291 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_CALL | ( | seq, | |
line, | |||
id, | |||
argc | |||
) | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(VM_CALL_FCALL), NULL) |
Definition at line 248 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_CALL_RECEIVER | ( | seq, | |
line | |||
) | ADD_INSN((seq), (line), putself) |
Definition at line 245 of file compile.c.
Referenced by iseq_compile_each().
#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 251 of file compile.c.
Referenced by build_postexe_iseq(), and iseq_compile_each().
#define ADD_CATCH_ENTRY | ( | type, | |
ls, | |||
le, | |||
iseqv, | |||
lc | |||
) |
Definition at line 296 of file compile.c.
Referenced by defined_expr(), iseq_build_from_ary_exception(), iseq_compile_each(), and rb_iseq_compile_node().
#define ADD_GETLOCAL | ( | seq, | |
line, | |||
idx, | |||
level | |||
) |
Definition at line 271 of file compile.c.
Referenced by for_self_aset(), iseq_compile_each(), and rb_iseq_compile_node().
#define ADD_INSN | ( | seq, | |
line, | |||
insn | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0)) |
Definition at line 205 of file compile.c.
Referenced by adjust_stack(), compile_array_(), compile_colon2(), compile_massign(), compile_massign_lhs(), compile_massign_opt(), compile_named_capture_assign(), defined_expr(), for_self_aset(), iseq_compile_each(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define ADD_INSN1 | ( | seq, | |
line, | |||
insn, | |||
op1 | |||
) |
Definition at line 213 of file compile.c.
Referenced by build_postexe_iseq(), compile_array_(), compile_colon2(), compile_cpath(), compile_dstr(), compile_dstr_fragments(), compile_flip_flop(), compile_massign(), compile_named_capture_assign(), defined_expr(), for_self_aref(), for_self_aset(), iseq_compile_each(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define ADD_INSN2 | ( | seq, | |
line, | |||
insn, | |||
op1, | |||
op2 | |||
) |
Definition at line 227 of file compile.c.
Referenced by compile_dregx(), compile_flip_flop(), compile_massign(), compile_named_capture_assign(), and iseq_compile_each().
#define ADD_INSN3 | ( | seq, | |
line, | |||
insn, | |||
op1, | |||
op2, | |||
op3 | |||
) |
Definition at line 231 of file compile.c.
Referenced by defined_expr(), and iseq_compile_each().
Definition at line 225 of file compile.c.
Referenced by compile_branch_condition(), compile_flip_flop(), compile_named_capture_assign(), defined_expr(), iseq_compile_each(), and when_vals().
#define ADD_LABEL | ( | seq, | |
label | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) (label)) |
Definition at line 282 of file compile.c.
Referenced by add_ensure_iseq(), compile_branch_condition(), compile_flip_flop(), compile_named_capture_assign(), defined_expr(), iseq_build_from_ary_body(), iseq_compile_each(), iseq_set_arguments(), and rb_iseq_compile_node().
#define ADD_SEND | ( | seq, | |
line, | |||
id, | |||
argc | |||
) | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)INT2FIX(0), NULL) |
Definition at line 236 of file compile.c.
Referenced by compile_array_(), and iseq_compile_each().
#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 254 of file compile.c.
Referenced by iseq_compile_each().
#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 242 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_SEND_WITH_FLAG | ( | seq, | |
line, | |||
id, | |||
argc, | |||
flag | |||
) | ADD_SEND_R((seq), (line), (id), (argc), NULL, (VALUE)(flag), NULL) |
Definition at line 239 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_SEQ | ( | seq1, | |
seq2 | |||
) | APPEND_LIST((seq1), (seq2)) |
Definition at line 201 of file compile.c.
Referenced by add_ensure_iseq(), compile_massign(), compile_massign_lhs(), iseq_compile_each(), and setup_args().
#define ADD_SETLOCAL | ( | seq, | |
line, | |||
idx, | |||
level | |||
) |
Definition at line 276 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_TRACE | ( | seq, | |
line, | |||
event | |||
) |
Definition at line 257 of file compile.c.
Referenced by iseq_compile_each(), and rb_iseq_compile_node().
#define APPEND_LABEL | ( | seq, | |
before, | |||
label | |||
) | APPEND_ELEM((seq), (before), (LINK_ELEMENT *) (label)) |
Definition at line 285 of file compile.c.
Referenced by defined_expr().
#define BEFORE_RETURN debug_node_end() |
#define CHECK | ( | sub | ) | if (!(sub)) {BEFORE_RETURN;return COMPILE_NG;} |
Definition at line 408 of file compile.c.
Referenced by compile_branch_condition(), compile_colon2(), compile_dregx(), compile_dstr(), compile_dstr_fragments(), compile_flip_flop(), compile_massign(), compile_massign_lhs(), compile_massign_opt_lhs(), iseq_compile_each(), main(), obj_free(), rb_iseq_compile_node(), vm_stackoverflow(), yaml_emitter_analyze_scalar(), yaml_emitter_write_double_quoted_scalar(), yaml_emitter_write_folded_scalar(), yaml_emitter_write_plain_scalar(), yaml_emitter_write_single_quoted_scalar(), yaml_emitter_write_tag_content(), yaml_parser_fetch_next_token(), yaml_parser_scan_anchor(), yaml_parser_scan_block_scalar(), yaml_parser_scan_directive(), yaml_parser_scan_flow_scalar(), yaml_parser_scan_plain_scalar(), yaml_parser_scan_tag(), yaml_parser_scan_tag_handle(), yaml_parser_scan_tag_uri(), yaml_parser_scan_to_next_token(), yaml_parser_scan_uri_escapes(), and yaml_parser_scan_version_directive_value().
#define CHECK_ARRAY | ( | v | ) | rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
Definition at line 6835 of file compile.c.
Referenced by iseq_build_kw().
#define CHECK_SYMBOL | ( | v | ) | rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
Definition at line 6836 of file compile.c.
Referenced by rb_iseq_build_from_ary().
#define COMPILE | ( | anchor, | |
desc, | |||
node | |||
) |
Definition at line 307 of file compile.c.
Referenced by compile_array_(), compile_array_keyword_arg(), compile_branch_condition(), compile_colon2(), compile_cpath(), compile_dstr_fragments(), compile_flip_flop(), compile_massign(), compile_massign_opt(), defined_expr(), iseq_compile_each(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define COMPILE_ | ( | anchor, | |
desc, | |||
node, | |||
popped | |||
) |
Definition at line 317 of file compile.c.
Referenced by compile_array_(), and iseq_compile_each().
#define compile_debug CPDEBUG |
Definition at line 117 of file compile.c.
Referenced by iseq_setup(), prepare_compile_error(), and verify_list().
#define COMPILE_ERROR prepare_compile_error(iseq) |
Definition at line 376 of file compile.c.
Referenced by iseq_build_from_ary_body(), iseq_compile_each(), iseq_insns_unification(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), rb_iseq_compile_node(), and validate_label().
#define COMPILE_NG 0 |
Definition at line 406 of file compile.c.
Referenced by iseq_build_from_ary_body(), iseq_compile_each(), iseq_insns_unification(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), iseq_setup(), and rb_iseq_compile_node().
#define COMPILE_OK 1 |
Definition at line 405 of file compile.c.
Referenced by compile_branch_condition(), compile_colon2(), compile_dregx(), compile_dstr(), compile_dstr_fragments(), compile_flip_flop(), compile_massign(), compile_massign_lhs(), compile_massign_opt_lhs(), insn_set_specialized_instruction(), iseq_add_mark_object(), iseq_add_mark_object_compile_time(), iseq_build_from_ary_body(), iseq_build_from_ary_exception(), iseq_compile_each(), iseq_insns_unification(), iseq_optimize(), iseq_peephole_optimize(), iseq_set_arguments(), iseq_set_exception_local_table(), iseq_set_exception_table(), iseq_set_local_table(), iseq_set_optargs_table(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), iseq_setup(), iseq_specialized_instruction(), and rb_iseq_translate_threaded_code().
#define COMPILE_POPPED | ( | anchor, | |
desc, | |||
node | |||
) |
Definition at line 312 of file compile.c.
Referenced by add_ensure_iseq(), compile_massign_lhs(), compile_massign_opt(), compile_named_capture_assign(), iseq_compile_each(), iseq_set_arguments(), iseq_set_arguments_keywords(), and rb_iseq_compile_node().
#define COMPILE_RECV | ( | anchor, | |
desc, | |||
node | |||
) |
Definition at line 321 of file compile.c.
Referenced by iseq_compile_each().
#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 113 of file compile.c.
Referenced by compile_array_().
#define debug_node_end | ( | ) | ((void)0) |
Definition at line 174 of file compile.c.
Referenced by iseq_compile_each().
#define debug_node_start | ( | node | ) | ((void)0) |
Definition at line 173 of file compile.c.
Referenced by iseq_compile_each().
Definition at line 168 of file compile.c.
Referenced by compile_colon2(), and iseq_compile_each().
#define debugp_param | ( | header, | |
value | |||
) | r_value(value) |
Definition at line 172 of file compile.c.
Referenced by compile_dstr_fragments(), iseq_compile_each(), and when_vals().
#define debugp_verbose_node | ( | header, | |
value | |||
) | r_value(value) |
#define debugs if(0)printf |
Definition at line 182 of file compile.c.
Referenced by iseq_compile_each(), iseq_set_arguments(), iseq_set_local_table(), iseq_setup(), and new_child_iseq().
#define DECL_ANCHOR | ( | name | ) | LINK_ANCHOR name[1] = {{{0,},}} |
Definition at line 413 of file compile.c.
Referenced by add_ensure_iseq(), compile_array_(), compile_massign(), compile_massign_lhs(), compile_named_capture_assign(), iseq_compile_each(), rb_iseq_build_from_ary(), rb_iseq_compile_node(), and setup_args().
#define defined_expr defined_expr0 |
Definition at line 3510 of file compile.c.
Referenced by defined_expr(), and iseq_compile_each().
#define ERROR_ARGS ERROR_ARGS_AT(node) |
Definition at line 379 of file compile.c.
Referenced by compile_array_(), compile_dstr_fragments(), iseq_compile_each(), and rb_iseq_compile_node().
#define ERROR_ARGS_AT | ( | n | ) | iseq, nd_line(n), |
Definition at line 378 of file compile.c.
Referenced by iseq_compile_each().
#define EXPECT_NODE | ( | prefix, | |
node, | |||
ndtype | |||
) |
Definition at line 381 of file compile.c.
Referenced by compile_array_(), and iseq_set_arguments().
#define EXPECT_NODE_NONULL | ( | prefix, | |
parent, | |||
ndtype | |||
) |
Definition at line 392 of file compile.c.
Referenced by iseq_compile_each().
#define FIXNUM_INC | ( | n, | |
i | |||
) | ((n)+(INT2FIX(i)&~FIXNUM_FLAG)) |
Definition at line 34 of file compile.c.
Referenced by iseq_compile_each().
#define IBF_OBJBODY | ( | type, | |
offset | |||
) | (type *)(load->buff + sizeof(struct ibf_object_header) + (offset)) |
Definition at line 7910 of file compile.c.
Referenced by ibf_load_object(), ibf_load_object_array(), ibf_load_object_bignum(), ibf_load_object_class(), ibf_load_object_complex_rational(), ibf_load_object_data(), ibf_load_object_float(), ibf_load_object_hash(), ibf_load_object_regexp(), ibf_load_object_string(), ibf_load_object_struct(), and ibf_load_object_symbol().
#define IBF_OBJECT_INTERNAL FL_PROMOTED0 |
#define IBF_OBJHEADER | ( | offset | ) | (struct ibf_object_header *)(load->buff + (offset)) |
Definition at line 7909 of file compile.c.
Referenced by ibf_load_object().
#define IBF_OFFSET | ( | ptr | ) | ((ibf_offset_t)(VALUE)(ptr)) |
Definition at line 7161 of file compile.c.
Referenced by ibf_load_catch_table(), ibf_load_ci_entries(), and ibf_load_param_opt_table().
#define IBF_R | ( | val, | |
type, | |||
n | |||
) | (type *)ibf_load_alloc(load, IBF_OFFSET(val), sizeof(type) * (n)) |
Definition at line 7245 of file compile.c.
Referenced by ibf_load_code(), ibf_load_line_info_table(), ibf_load_local_table(), and ibf_load_param_keyword().
#define IBF_W | ( | b, | |
type, | |||
n | |||
) | (type *)(VALUE)ibf_dump_write(dump, (b), sizeof(type) * (n)) |
Definition at line 7242 of file compile.c.
Referenced by ibf_dump_code(), ibf_dump_line_info_table(), ibf_dump_local_table(), ibf_dump_param_keyword(), and ibf_dump_param_opt_table().
#define IBF_WP | ( | b, | |
type, | |||
n | |||
) | ibf_dump_write(dump, (b), sizeof(type) * (n)) |
Definition at line 7244 of file compile.c.
Referenced by ibf_dump_object_bignum(), ibf_dump_object_data(), and ibf_dump_object_string().
#define IBF_WV | ( | variable | ) | ibf_dump_write(dump, &(variable), sizeof(variable)) |
Definition at line 7243 of file compile.c.
Referenced by ibf_dump_object_array(), ibf_dump_object_bignum(), ibf_dump_object_complex_rational(), ibf_dump_object_data(), ibf_dump_object_hash(), ibf_dump_object_hash_i(), ibf_dump_object_list(), ibf_dump_object_regexp(), ibf_dump_object_string(), ibf_dump_object_struct(), ibf_dump_object_symbol(), and lbf_dump_object_object().
Definition at line 415 of file compile.c.
Referenced by add_ensure_iseq(), compile_array_(), compile_massign(), compile_massign_lhs(), compile_named_capture_assign(), iseq_compile_each(), rb_iseq_build_from_ary(), rb_iseq_compile_node(), and setup_args().
#define INSERT_BEFORE_INSN | ( | prev, | |
line, | |||
insn | |||
) | INSERT_ELEM_PREV(&(prev)->link, (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0)) |
Definition at line 209 of file compile.c.
Referenced by compile_massign_lhs().
#define INSERT_BEFORE_INSN1 | ( | prev, | |
line, | |||
insn, | |||
op1 | |||
) |
Definition at line 218 of file compile.c.
Referenced by compile_massign_lhs().
#define INSN_OF | ( | insn | ) | (((INSN*)(insn))->insn_id) |
Definition at line 329 of file compile.c.
Referenced by iseq_compile_each(), iseq_peephole_optimize(), and remove_unreachable_chunk().
Referenced by rb_iseq_build_from_ary().
Definition at line 334 of file compile.c.
Referenced by get_destination_insn(), get_next_insn(), and get_prev_insn().
Definition at line 332 of file compile.c.
Referenced by compile_massign(), get_destination_insn(), get_next_insn(), get_prev_insn(), iseq_compile_each(), iseq_insns_unification(), iseq_optimize(), iseq_peephole_optimize(), iseq_specialized_instruction(), and remove_unreachable_chunk().
#define IS_INSN_ID | ( | iobj, | |
insn | |||
) | (INSN_OF(iobj) == BIN(insn)) |
Definition at line 335 of file compile.c.
Referenced by compile_massign(), iseq_compile_each(), iseq_peephole_optimize(), iseq_specialized_instruction(), and remove_unreachable_chunk().
Definition at line 333 of file compile.c.
Referenced by iseq_optimize(), and remove_unreachable_chunk().
#define IS_TRACE_LINE | ( | insn | ) |
Referenced by iseq_peephole_optimize().
#define iseq_absolute_path | ( | iseq | ) | ((iseq)->body->location.absolute_path) |
Definition at line 192 of file compile.c.
Referenced by new_child_iseq().
#define ISEQ_ARG_DECLARE |
Definition at line 437 of file compile.c.
Referenced by INSERT_LIST().
#define iseq_path | ( | iseq | ) | ((iseq)->body->location.path) |
Definition at line 191 of file compile.c.
Referenced by new_child_iseq().
#define ISEQ_TYPE_ONCE_GUARD ISEQ_TYPE_DEFINED_GUARD |
Definition at line 32 of file compile.c.
Referenced by iseq_compile_each().
#define LABEL_REF | ( | label | ) | ((label)->refcnt++) |
Definition at line 222 of file compile.c.
Referenced by iseq_compile_each(), and register_label().
#define LABEL_UNREMOVABLE | ( | label | ) | ((label) ? (LABEL_REF(label), (label)->unremovable=1) : 0) |
Definition at line 294 of file compile.c.
Referenced by new_adjust_body().
#define LVAR_ERRINFO (1) |
Definition at line 186 of file compile.c.
Referenced by iseq_compile_each(), and rb_iseq_compile_node().
#define MEMORY | ( | v | ) |
Referenced by compile_massign_opt().
#define NEW_CHILD_ISEQ | ( | node, | |
name, | |||
type, | |||
line_no | |||
) | new_child_iseq(iseq, (node), rb_fstring(name), iseq, (type), (line_no)) |
Definition at line 197 of file compile.c.
Referenced by build_postexe_iseq(), defined_expr(), and iseq_compile_each().
#define NEW_ISEQ | ( | node, | |
name, | |||
type, | |||
line_no | |||
) | new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no)) |
Definition at line 194 of file compile.c.
Referenced by iseq_compile_each().
#define NEW_LABEL | ( | l | ) | new_label_body(iseq, (l)) |
Definition at line 189 of file compile.c.
Referenced by add_ensure_iseq(), compile_branch_condition(), compile_flip_flop(), compile_named_capture_assign(), defined_expr(), iseq_compile_each(), iseq_set_arguments(), rb_iseq_compile_node(), and register_label().
#define OPERAND_AT | ( | insn, | |
idx | |||
) | (((INSN*)(insn))->operands[(idx)]) |
Definition at line 326 of file compile.c.
Referenced by compile_massign(), get_destination_insn(), insn_data_to_s_detail(), iseq_compile_each(), iseq_insns_unification(), iseq_peephole_optimize(), iseq_specialized_instruction(), remove_unreachable_chunk(), replace_destination(), and unref_destination().
#define PADDING_SIZE_MAX 0 |
Definition at line 764 of file compile.c.
Referenced by compile_data_alloc().
Definition at line 3508 of file compile.c.
Referenced by defined_expr(), and iseq_compile_each().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
#define ruby_sourcefile RSTRING_PTR(iseq->body->location.path) |
Definition at line 542 of file compile.c.
Referenced by when_vals().
#define SP_INSN | ( | opt | ) | insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt)) |
Referenced by iseq_specialized_instruction().
Referenced by iseq_build_kw(), and rb_iseq_build_from_ary().
#define UNKNOWN_NODE | ( | prefix, | |
node | |||
) |
Definition at line 398 of file compile.c.
Referenced by iseq_compile_each(), and setup_args().
typedef struct iseq_adjust_data ADJUST |
typedef VALUE(* ibf_load_object_function) (const struct ibf_load *load, const struct ibf_object_header *header, ibf_offset_t) |
typedef unsigned int ibf_offset_t |
typedef struct iseq_insn_data INSN |
typedef struct iseq_label_data LABEL |
typedef struct iseq_link_anchor LINK_ANCHOR |
typedef struct iseq_link_element LINK_ELEMENT |
enum compile_array_type_t |
enum ibf_object_data_type |
enum LABEL_RESCUE_TYPE |
|
static |
Definition at line 507 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
Referenced by iseq_build_from_ary_body().
|
static |
Definition at line 3768 of file compile.c.
References add_ensure_range(), ADD_LABEL, ADD_SEQ, COMPILE_POPPED, DECL_ANCHOR, iseq_compile_data_ensure_node_stack::ensure_node, iseq_compile_data_ensure_node_stack::erange, INIT_ANCHOR, ISEQ_COMPILE_DATA, NEW_LABEL, and iseq_compile_data_ensure_node_stack::prev.
Referenced by iseq_compile_each().
|
static |
Definition at line 3750 of file compile.c.
References ensure_range::begin, compile_data_alloc(), ensure_range::end, ne, and ensure_range::next.
Referenced by add_ensure_iseq().
|
static |
Definition at line 341 of file compile.c.
References rb_iseq_struct::body, err, ISEQ_COMPILE_DATA, rb_iseq_constant_body::location, NIL_P, NULL, rb_iseq_location_struct::path, RB_OBJ_WRITE, rb_set_errinfo(), and rb_syntax_error_append().
Referenced by prepare_compile_error().
|
static |
Definition at line 519 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
|
static |
Definition at line 950 of file compile.c.
References iseq_link_anchor::anchor, iseq_link_anchor::last, iseq_link_element::next, iseq_link_element::prev, and verify_list().
Referenced by compile_array_().
|
static |
Definition at line 3885 of file compile.c.
References ADD_CALL_WITH_BLOCK, ADD_INSN1, argc, rb_iseq_struct::body, id_core_set_postexe, INT2FIX, iseq_set_local_table(), make_name_for_block(), nd_line, NEW_CHILD_ISEQ, rb_iseq_constant_body::parent_iseq, Qnil, and VM_SPECIAL_OBJECT_VMCORE.
Referenced by iseq_compile_each().
|
static |
Definition at line 6348 of file compile.c.
References iseq_insn_data::insn_id, and iseq_insn_data::operands.
Referenced by iseq_set_sequence().
Definition at line 7067 of file compile.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_struct::body, rb_thread_struct::cfp, GET_THREAD, rb_control_frame_struct::iseq, rb_iseq_constant_body::location, rb_iseq_location_struct::path, rb_fstring_cstr(), rb_vm_get_ruby_level_next_cfp(), and rb_vm_get_sourceline().
Referenced by method_for_self().
Definition at line 3177 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(), RB_TYPE_P, RFLOAT_VALUE, SYMBOL_P, and T_FLOAT.
Referenced by when_vals().
Definition at line 1510 of file compile.c.
References BUILTIN_TYPE, rb_eql(), rb_str_hash_cmp(), SPECIAL_CONST_P, and T_STRING.
|
static |
Definition at line 1526 of file compile.c.
References FIX2LONG, hval, rb_hash(), rb_str_hash(), RB_TYPE_P, SPECIAL_CONST_P, and T_STRING.
Definition at line 1548 of file compile.c.
References cdhash_set_label_struct::hash, INT2FIX, cdhash_set_label_struct::len, cdhash_set_label_struct::pos, iseq_label_data::position, rb_hash_aset(), and ST_CONTINUE.
Referenced by iseq_set_sequence().
|
static |
Definition at line 3171 of file compile.c.
References compile_array_(), and NULL.
Referenced by iseq_compile_each(), and setup_args().
|
static |
Definition at line 3008 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_SEND, APPEND_LIST(), COMPILE, COMPILE_, compile_array_keyword_arg(), COMPILE_ARRAY_TYPE_ARGS, COMPILE_ARRAY_TYPE_ARRAY, COMPILE_ARRAY_TYPE_HASH, compile_bug(), CPDEBUG, DECL_ANCHOR, ERROR_ARGS, EXPECT_NODE, id_core_hash_from_ary, id_core_hash_merge_ary, id_core_hash_merge_kwd, id_core_hash_merge_ptr, INIT_ANCHOR, INT2FIX, iseq_add_mark_object_compile_time(), len, max(), nd_line, nd_type, NODE_ARRAY, NODE_ZARRAY, NULL, OBJ_FREEZE, rb_ary_cat(), rb_ary_push(), rb_ary_tmp_new(), rb_intern, static_literal_node_p(), static_literal_value(), and VM_SPECIAL_OBJECT_VMCORE.
Referenced by compile_array(), iseq_compile_each(), and setup_args().
|
static |
|
static |
Definition at line 2870 of file compile.c.
References ADD_INSNL, ADD_LABEL, CHECK, COMPILE, compile_flip_flop(), COMPILE_OK, FALSE, nd_line, nd_type, NEW_LABEL, NODE_AND, NODE_FALSE, NODE_FLIP2, NODE_FLIP3, NODE_LAMBDA, NODE_LIT, NODE_NIL, NODE_OR, NODE_STR, NODE_TRUE, NODE_ZARRAY, and TRUE.
Referenced by iseq_compile_each().
Definition at line 358 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::location, NOINLINE(), rb_iseq_location_struct::path, prepare_compile_error(), and rb_report_bug_valist().
Referenced by compile_array_(), compile_dstr_fragments(), iseq_compile_each(), iseq_set_sequence(), prepare_compile_error(), and rb_iseq_compile_node().
|
static |
Definition at line 3461 of file compile.c.
References ADD_INSN, ADD_INSN1, CHECK, COMPILE, COMPILE_OK, debugi, ID2SYM, nd_line, nd_type, NODE_COLON2, NODE_COLON3, NODE_CONST, and rb_cObject.
Referenced by iseq_compile_each().
|
static |
Definition at line 3488 of file compile.c.
References ADD_INSN1, COMPILE, INT2FIX, nd_line, nd_type, NODE_COLON3, Qfalse, Qtrue, rb_cObject, and VM_SPECIAL_OBJECT_CONST_BASE.
Referenced by iseq_compile_each().
|
static |
Definition at line 794 of file compile.c.
References ALLOC_N, iseq_compile_data_storage::buff, ISEQ_COMPILE_DATA, iseq_compile_data_storage::next, PADDING_SIZE_MAX, iseq_compile_data_storage::pos, rb_memerror(), size, iseq_compile_data_storage::size, and SIZEOF_ISEQ_COMPILE_DATA_STORAGE.
Referenced by add_ensure_range(), compile_data_alloc_adjust(), compile_data_alloc_insn(), compile_data_alloc_label(), insn_set_specialized_instruction(), iseq_build_from_ary_body(), iseq_optimize(), new_callinfo(), new_insn_body(), and new_insn_send().
Definition at line 846 of file compile.c.
References compile_data_alloc().
Referenced by new_adjust_body().
Definition at line 834 of file compile.c.
References compile_data_alloc().
Referenced by new_insn_core().
Definition at line 840 of file compile.c.
References compile_data_alloc().
Referenced by new_label_body().
|
static |
Definition at line 2828 of file compile.c.
References ADD_INSN2, CHECK, cnt, compile_dstr_fragments(), COMPILE_OK, INT2FIX, and nd_line.
Referenced by iseq_compile_each().
|
static |
Definition at line 2819 of file compile.c.
References ADD_INSN1, CHECK, cnt, compile_dstr_fragments(), COMPILE_OK, INT2FIX, and nd_line.
Referenced by iseq_compile_each().
|
static |
Definition at line 2777 of file compile.c.
References ADD_INSN1, CHECK, cnt, COMPILE, compile_bug(), COMPILE_OK, debugp_param, ERROR_ARGS, LAST_ELEMENT(), list, nd_line, nd_type, NIL_P, NODE_STR, Qnil, rb_builtin_type_name(), rb_fstring(), RB_TYPE_P, REMOVE_ELEM(), RSTRING_LEN, T_STRING, and TYPE.
Referenced by compile_dregx(), and compile_dstr().
|
static |
Definition at line 2837 of file compile.c.
References ADD_INSN1, ADD_INSN2, ADD_INSNL, ADD_LABEL, rb_iseq_struct::body, CHECK, cnt, COMPILE, COMPILE_OK, INT2FIX, ISEQ_FLIP_CNT_INCREMENT(), key, rb_iseq_constant_body::local_iseq, nd_line, NEW_LABEL, Qfalse, Qtrue, and VM_SVAR_FLIPFLOP_START.
Referenced by compile_branch_condition().
|
static |
Definition at line 3376 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_INSN2, ADD_SEQ, adjust_stack(), CHECK, COMPILE, compile_massign_lhs(), compile_massign_opt(), COMPILE_OK, DECL_ANCHOR, FIX2INT, rb_call_info::flag, if(), INIT_ANCHOR, iseq_insn_data::insn_id, INT2FIX, IS_INSN, IS_INSN_ID, iseq_link_anchor::last, last, iseq_insn_data::link, nd_line, nd_type, NODE_POSTARG, OPERAND_AT, iseq_insn_data::operand_size, and POP_ELEMENT().
Referenced by iseq_compile_each().
|
static |
Definition at line 3244 of file compile.c.
References ADD_INSN, ADD_SEQ, CHECK, COMPILE_OK, COMPILE_POPPED, DECL_ANCHOR, FIRST_ELEMENT(), rb_call_info::flag, get_prev_insn(), INIT_ANCHOR, INSERT_BEFORE_INSN, INSERT_BEFORE_INSN1, INT2FIX, LAST_ELEMENT(), nd_line, nd_type, NODE_ATTRASGN, NODE_MASGN, iseq_insn_data::operands, rb_call_info::orig_argc, REMOVE_ELEM(), and VM_CALL_ARGS_SPLAT.
Referenced by compile_massign(), and compile_massign_opt_lhs().
|
static |
Definition at line 3300 of file compile.c.
References ADD_INSN, COMPILE, compile_massign_opt_lhs(), COMPILE_POPPED, MEMORY, nd_line, nd_type, NODE_ARRAY, NODE_CVASGN, NODE_DASGN, NODE_DASGN_CURR, NODE_IASGN, NODE_IASGN2, NODE_LASGN, and numberof.
Referenced by compile_massign().
|
static |
Definition at line 3290 of file compile.c.
References CHECK, compile_massign_lhs(), and COMPILE_OK.
Referenced by compile_massign_opt().
|
static |
Definition at line 3898 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_INSN2, ADD_INSNL, ADD_LABEL, COMPILE_POPPED, DECL_ANCHOR, idAREF, INIT_ANCHOR, INSERT_ELEM_PREV(), INT2FIX, iseq_link_anchor::last, last, nd_line, new_insn_send(), NEW_LABEL, iseq_link_element::next, NULL, iseq_link_element::prev, and rb_global_entry().
Referenced by iseq_compile_each().
|
static |
Definition at line 3512 of file compile.c.
References ADD_CATCH_ENTRY, ADD_INSN, ADD_INSN1, ADD_INSN3, ADD_INSNL, ADD_LABEL, APPEND_LABEL, rb_iseq_struct::body, COMPILE, DEFINED_ASGN, DEFINED_CONST, DEFINED_CVAR, DEFINED_EXPR, defined_expr, DEFINED_FALSE, DEFINED_FUNC, DEFINED_GVAR, DEFINED_IVAR, DEFINED_LVAR, DEFINED_METHOD, DEFINED_NIL, DEFINED_REF, DEFINED_SELF, DEFINED_TRUE, DEFINED_YIELD, DEFINED_ZSUPER, RNode::id, ID2SYM, INT2FIX, rb_iseq_location_struct::label, LABEL_RESCUE_BEG, LABEL_RESCUE_END, iseq_link_anchor::last, rb_iseq_constant_body::location, nd_line, nd_type, NEW_CHILD_ISEQ, NEW_LABEL, NEW_NIL, NODE_AND, NODE_ARRAY, NODE_ATTRASGN, NODE_BACK_REF, NODE_CALL, NODE_CDECL, NODE_COLON2, NODE_COLON3, NODE_CONST, NODE_CVAR, NODE_CVASGN, NODE_CVDECL, NODE_DASGN, NODE_DASGN_CURR, NODE_DVAR, NODE_FALSE, NODE_FCALL, NODE_GASGN, NODE_GVAR, NODE_IASGN, NODE_IVAR, NODE_LASGN, NODE_LIT, NODE_LVAR, NODE_MASGN, NODE_NIL, NODE_NTH_REF, NODE_OP_ASGN1, NODE_OP_ASGN2, NODE_OP_ASGN_AND, NODE_OP_ASGN_OR, NODE_OR, NODE_SELF, NODE_STR, NODE_SUPER, NODE_TRUE, NODE_VCALL, NODE_YIELD, NODE_ZARRAY, NODE_ZSUPER, NULL, private_recv_p, Qfalse, Qtrue, rb_cObject, rb_is_const_id(), rb_iseq_defined_string(), rb_str_concat(), rb_str_new2, iseq_label_data::rescued, and iseq_link_element::type.
|
static |
Definition at line 6465 of file compile.c.
References FIX2LONG, insn_data_length(), insn_data_to_s_detail(), iseq_link_element::ISEQ_ELEMENT_ADJUST, iseq_link_element::ISEQ_ELEMENT_INSN, iseq_link_element::ISEQ_ELEMENT_LABEL, iseq_link_element::ISEQ_ELEMENT_NONE, iseq_adjust_data::label, iseq_label_data::label_no, iseq_insn_data::line_no, iseq_link_element::next, rb_eSyntaxError, rb_raise(), StringValueCStr, and iseq_link_element::type.
Referenced by INSERT_LIST(), iseq_insns_unification(), iseq_set_sequence(), and iseq_setup().
|
static |
Definition at line 907 of file compile.c.
References iseq_link_anchor::anchor, and iseq_link_element::next.
Referenced by compile_massign_lhs(), INSERT_LIST(), iseq_insns_unification(), iseq_optimize(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), and iseq_setup().
|
static |
Definition at line 7108 of file compile.c.
References ADD_INSN1, accessor_args::arg, rb_iseq_struct::body, accessor_args::func, iseq_set_local_table(), rb_iseq_constant_body::lead_num, accessor_args::line, rb_iseq_constant_body::param, Qnil, and rb_iseq_constant_body::size.
Referenced by rb_method_for_self_aref().
|
static |
Definition at line 7123 of file compile.c.
References ADD_GETLOCAL, ADD_INSN, ADD_INSN1, accessor_args::arg, rb_iseq_struct::body, accessor_args::func, iseq_set_local_table(), rb_iseq_constant_body::lead_num, accessor_args::line, numberof, rb_iseq_constant_body::param, Qnil, and rb_iseq_constant_body::size.
Referenced by rb_method_for_self_aset().
Definition at line 419 of file compile.c.
References OBJ_FREEZE, and RBASIC_CLEAR_CLASS.
Referenced by iseq_set_sequence().
|
static |
Definition at line 1955 of file compile.c.
References IS_ADJUST, IS_INSN, iseq_label_data::link, list, iseq_link_element::next, and OPERAND_AT.
Referenced by iseq_peephole_optimize().
Definition at line 1239 of file compile.c.
References rb_iseq_struct::body, get_dyna_var_idx_at_raw(), rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::parent_iseq, and rb_bug().
Referenced by iseq_compile_each().
Definition at line 1214 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::local_table, and rb_iseq_constant_body::local_table_size.
Referenced by get_dyna_var_idx(), get_local_var_idx(), iseq_set_arguments(), and iseq_set_arguments_keywords().
Definition at line 6547 of file compile.c.
References ID2SYM, PRIsVALUE, rb_eSyntaxError, rb_intern, and rb_raise().
Referenced by iseq_build_from_ary_exception().
Definition at line 1558 of file compile.c.
References rb_iseq_struct::body, INT2FIX, rb_iseq_constant_body::is_size, ISEQ_COMPILE_DATA, rb_id_table_create(), rb_id_table_insert(), rb_id_table_lookup(), and val.
Referenced by iseq_compile_each().
Definition at line 1227 of file compile.c.
References rb_iseq_struct::body, get_dyna_var_idx_at_raw(), rb_iseq_constant_body::local_iseq, and rb_bug().
Referenced by iseq_compile_each().
Definition at line 1203 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::local_iseq, and rb_iseq_constant_body::parent_iseq.
Referenced by iseq_compile_each().
|
static |
Definition at line 1971 of file compile.c.
References IS_ADJUST, IS_INSN, iseq_insn_data::link, list, and iseq_link_element::next.
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 1985 of file compile.c.
References IS_ADJUST, IS_INSN, iseq_insn_data::link, list, and iseq_link_element::prev.
Referenced by compile_massign_lhs(), and iseq_peephole_optimize().
|
static |
Definition at line 7321 of file compile.c.
References rb_call_info::flag, ibf_dump_iseq_each(), Qfalse, Qtrue, and VM_CALL_KWARG.
Referenced by ibf_dump_code().
|
static |
Definition at line 7604 of file compile.c.
References ALLOCA_N, rb_iseq_struct::body, rb_iseq_constant_body::catch_table, ibf_dump_iseq(), ibf_dump_write(), iseq_catch_table_bytes(), and NULL.
Referenced by ibf_dump_iseq_each().
|
static |
Definition at line 7644 of file compile.c.
References ALLOCA_N, rb_iseq_struct::body, rb_call_info_with_kwarg::ci, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, ibf_dump_id(), ibf_dump_object(), ibf_dump_write(), rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, rb_call_info_with_kwarg::kw_arg, memcpy, and rb_call_info::mid.
Referenced by ibf_dump_iseq_each().
Definition at line 7358 of file compile.c.
References ALLOCA_N, assert, rb_iseq_struct::body, ibf_dump_callinfo(), ibf_dump_gentry(), ibf_dump_id(), ibf_dump_iseq(), ibf_dump_object(), IBF_W, rb_iseq_constant_body::is_entries, rb_iseq_constant_body::is_size, rb_iseq_constant_body::iseq_size, rb_eRuntimeError, rb_iseq_original_iseq(), and rb_raise().
Referenced by ibf_dump_iseq_each().
|
static |
Definition at line 8406 of file compile.c.
References ibf_dump::id_table, ibf_dump::iseq_table, ruby_xfree(), and st_free_table.
Referenced by iseq_ibf_dump().
|
static |
Definition at line 7345 of file compile.c.
References ibf_dump_id(), and rb_global_entry::id.
Referenced by ibf_dump_code().
Definition at line 7291 of file compile.c.
References ibf_table_index(), ibf_dump::id_table, and st_data_t.
Referenced by ibf_dump_ci_entries(), ibf_dump_code(), ibf_dump_gentry(), ibf_dump_local_table(), and ibf_dump_param_keyword().
|
static |
Definition at line 7828 of file compile.c.
References ALLOCA_N, ibf_dump_id_list_i_arg::current_i, ibf_dump_id_list_i_arg::dump, ibf_dump_id_list_i(), ibf_dump_write(), ibf_header::id_list_offset, ibf_header::id_list_size, ibf_dump::id_table, ibf_dump_id_list_i_arg::list, st_table::num_entries, size, st_data_t, and st_foreach.
Referenced by iseq_ibf_dump().
Definition at line 7809 of file compile.c.
References assert, ibf_dump_id_list_i_arg::current_i, ibf_dump_id_list_i_arg::dump, ibf_dump_object(), ibf_dump_id_list_i_arg::list, rb_id2name(), rb_id2str, and ST_CONTINUE.
Referenced by ibf_dump_id_list().
Definition at line 7329 of file compile.c.
References ibf_dump_iseq_each(), ibf_table_index(), ibf_table_lookup(), ibf_dump::iseq_list, ibf_dump::iseq_table, LONG2NUM, NULL, rb_ary_store(), rb_iseq_check(), and st_data_t.
Referenced by ibf_dump_catch_table(), ibf_dump_code(), ibf_dump_iseq_each(), and iseq_ibf_dump().
|
static |
Definition at line 7709 of file compile.c.
References rb_iseq_struct::body, ibf_dump_catch_table(), ibf_dump_ci_entries(), ibf_dump_code(), ibf_dump_iseq(), ibf_dump_line_info_table(), ibf_dump_local_table(), ibf_dump_object(), ibf_dump_param_keyword(), ibf_dump_param_opt_table(), ibf_dump_write(), ISEQ_FLIP_CNT, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::location, NULL, rb_iseq_constant_body::parent_iseq, and rb_iseq_location_struct::path.
Referenced by ibf_dump_callinfo(), and ibf_dump_iseq().
|
static |
Definition at line 7788 of file compile.c.
References ALLOCA_N, ibf_dump_write(), ibf_dump::iseq_list, ibf_header::iseq_list_offset, ibf_header::iseq_list_size, list, NUM2LONG, RARRAY_LEN, rb_ary_entry(), and size.
Referenced by iseq_ibf_dump().
|
static |
Definition at line 7559 of file compile.c.
References rb_iseq_struct::body, IBF_W, rb_iseq_constant_body::line_info_size, and rb_iseq_constant_body::line_info_table.
Referenced by ibf_dump_iseq_each().
Definition at line 7571 of file compile.c.
References ALLOCA_N, rb_iseq_struct::body, ibf_dump_id(), IBF_W, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, and size.
Referenced by ibf_dump_iseq_each().
|
static |
Definition at line 8397 of file compile.c.
References ibf_dump::iseq_list, ibf_dump::obj_list, rb_gc_mark(), and ibf_dump::str.
|
static |
Definition at line 8421 of file compile.c.
References ibf_dump::id_table, ibf_dump::iseq_table, size, and st_memsize().
Definition at line 7279 of file compile.c.
References ibf_dump::obj_list, RARRAY_AREF, RARRAY_LEN, and rb_ary_push().
Referenced by ibf_dump_ci_entries(), ibf_dump_code(), ibf_dump_id_list_i(), ibf_dump_iseq_each(), ibf_dump_object_array(), ibf_dump_object_complex_rational(), ibf_dump_object_hash_i(), ibf_dump_object_regexp(), ibf_dump_object_string(), ibf_dump_object_struct(), ibf_dump_object_symbol(), and ibf_dump_param_keyword().
Definition at line 8041 of file compile.c.
References ibf_dump_object(), IBF_WV, len, RARRAY_AREF, and RARRAY_LEN.
Definition at line 8140 of file compile.c.
References BDIGIT, BIGNUM_DIGITS, BIGNUM_LEN, BIGNUM_SIGN, IBF_WP, IBF_WV, and len.
Definition at line 7927 of file compile.c.
References ibf_dump_write(), IBF_OBJECT_CLASS_ARRAY, IBF_OBJECT_CLASS_OBJECT, IBF_OBJECT_CLASS_STANDARD_ERROR, rb_bug(), rb_cArray, rb_cObject, rb_eStandardError, rb_obj_info_dump(), and rb_p().
Definition at line 8199 of file compile.c.
References ibf_dump_object(), IBF_WV, and RCOMPLEX.
Definition at line 8164 of file compile.c.
References ibf_dump_object_unsupported(), IBF_OBJECT_DATA_ENCODING, IBF_WP, IBF_WV, len, rb_data_is_encoding(), rb_enc_name, rb_to_encoding(), strlen(), and iseq_link_element::type.
Definition at line 7967 of file compile.c.
References ibf_dump_write(), and RFLOAT_VALUE.
Definition at line 8080 of file compile.c.
References ibf_dump_object_hash_i(), IBF_WV, len, RHASH, RHASH_SIZE, st_data_t, and st_foreach.
Definition at line 8069 of file compile.c.
References ibf_dump_object(), IBF_WV, key, ST_CONTINUE, and val.
Referenced by ibf_dump_object_hash().
|
static |
Definition at line 8375 of file compile.c.
References ibf_dump_pos(), IBF_WV, lbf_dump_object_object(), list, NUM2UINT, ibf_dump::obj_list, ibf_header::object_list_offset, ibf_header::object_list_size, RARRAY_AREF, RARRAY_LEN, rb_ary_push(), rb_ary_tmp_new(), size, and UINT2NUM.
Referenced by iseq_ibf_dump().
Definition at line 8018 of file compile.c.
References ibf_dump_object(), IBF_WV, ibf_object_regexp::option, rb_reg_options(), RREGEXP_SRC, and ibf_object_regexp::srcstr.
Definition at line 7981 of file compile.c.
References enc_name(), ibf_dump_object(), IBF_WP, IBF_WV, len, rb_enc_from_index(), rb_enc_get_index(), rb_enc_name, rb_str_new2, RSTRING_LEN, RSTRING_PTR, and RUBY_ENCINDEX_BUILTIN_MAX.
Definition at line 8108 of file compile.c.
References ibf_object_struct_range::beg, ibf_object_struct_range::class_index, ibf_object_struct_range::end, ibf_object_struct_range::excl, ibf_dump_object(), IBF_WV, ibf_object_struct_range::len, rb_bug(), rb_cRange, rb_obj_is_kind_of(), and rb_range_values().
Definition at line 8223 of file compile.c.
References ibf_dump_object(), IBF_WV, and rb_sym2str.
Definition at line 7913 of file compile.c.
References rb_bug(), and rb_obj_info_dump().
Referenced by ibf_dump_object_data().
|
static |
Definition at line 7225 of file compile.c.
References memcpy, rb_bug(), RSTRING_LEN, RSTRING_PTR, and ibf_dump::str.
Referenced by iseq_ibf_dump().
|
static |
Definition at line 7509 of file compile.c.
References ALLOCA_N, rb_iseq_struct::body, ibf_dump_id(), ibf_dump_object(), IBF_W, rb_iseq_constant_body::keyword, NULL, and rb_iseq_constant_body::param.
Referenced by ibf_dump_iseq_each().
Definition at line 7480 of file compile.c.
References rb_iseq_struct::body, IBF_W, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, and rb_iseq_constant_body::param.
Referenced by ibf_dump_iseq_each().
|
static |
Definition at line 7210 of file compile.c.
References rb_str_strlen(), and ibf_dump::str.
Referenced by ibf_dump_object_list(), ibf_dump_write(), iseq_ibf_dump(), and lbf_dump_object_object().
Definition at line 8437 of file compile.c.
References ibf_table_index(), ibf_dump::id_table, ibf_dump::iseq_list, ibf_dump::iseq_table, ibf_dump::obj_list, Qnil, rb_ary_push(), rb_ary_tmp_new(), RB_OBJ_WRITE, rb_str_new(), st_init_numtable, and ibf_dump::str.
Referenced by iseq_ibf_dump().
|
static |
Definition at line 7216 of file compile.c.
References ibf_dump_pos(), rb_str_cat(), and ibf_dump::str.
Referenced by ibf_dump_catch_table(), ibf_dump_ci_entries(), ibf_dump_id_list(), ibf_dump_iseq_each(), ibf_dump_iseq_list(), ibf_dump_object_class(), ibf_dump_object_float(), and iseq_ibf_dump().
|
static |
Definition at line 8503 of file compile.c.
References ibf_load::buff, ibf_load::header, and ibf_header::iseq_list_offset.
Referenced by ibf_load_iseq_complete().
|
static |
Definition at line 7235 of file compile.c.
References ibf_load::buff, memcpy, and ruby_xmalloc().
Referenced by ibf_load_catch_table(), and ibf_load_ci_entries().
|
static |
Definition at line 7625 of file compile.c.
References ibf_load::buff, rb_iseq_constant_body::catch_table, ibf_load_alloc(), ibf_load_iseq(), IBF_OFFSET, ibf_load::iseq, iseq_catch_table_bytes(), NULL, and size.
Referenced by ibf_load_iseq_each().
|
static |
Definition at line 7678 of file compile.c.
References ibf_load::buff, rb_call_info_with_kwarg::ci, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, ibf_load_alloc(), ibf_load_id(), ibf_load_object(), IBF_OFFSET, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, rb_call_info_with_kwarg::kw_arg, rb_call_info::mid, and ruby_xmalloc().
Referenced by ibf_load_iseq_each().
|
static |
Definition at line 7422 of file compile.c.
References assert, rb_iseq_struct::body, rb_iseq_constant_body::cc_entries, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_size, ibf_load_gentry(), ibf_load_id(), ibf_load_iseq(), ibf_load_object(), IBF_R, rb_iseq_constant_body::is_entries, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, rb_eRuntimeError, and rb_raise().
Referenced by ibf_load_iseq_each().
|
static |
Definition at line 7351 of file compile.c.
References ibf_load_id(), and rb_global_entry().
Referenced by ibf_load_code().
Definition at line 7297 of file compile.c.
References ibf_load::buff, ibf_load::header, ibf_load_object(), id, ibf_load::id_list, ibf_header::id_list_offset, NIL_P, and rb_intern_str.
Referenced by ibf_load_ci_entries(), ibf_load_code(), ibf_load_gentry(), ibf_load_local_table(), and ibf_load_param_keyword().
|
static |
Definition at line 8530 of file compile.c.
References rb_iseq_struct::aux, FL_SET, ibf_load_iseq_complete(), ibf_load::iseq, iseq_add_mark_object(), iseq_imemo_alloc(), ibf_load::iseq_list, ISEQ_NOT_LOADED_YET, rb_iseq_struct::loader, ibf_load::loader_obj, NULL, Qnil, rb_ary_entry(), and rb_ary_store().
Referenced by ibf_load_catch_table(), ibf_load_code(), ibf_load_iseq_each(), ibf_table_index(), and iseq_ibf_load().
void ibf_load_iseq_complete | ( | rb_iseq_t * | iseq | ) |
Definition at line 8509 of file compile.c.
References rb_iseq_struct::aux, FL_UNSET, ibf_iseq_list(), ibf_load_iseq_complete(), ibf_load_iseq_each(), ibf_load::iseq, ISEQ_COMPILE_DATA, ISEQ_NOT_LOADED_YET, rb_iseq_struct::loader, NULL, and RTYPEDDATA_DATA.
Referenced by ibf_load_iseq(), ibf_load_iseq_complete(), and iseqw_check().
|
static |
Definition at line 7746 of file compile.c.
References rb_iseq_location_struct::absolute_path, rb_iseq_location_struct::base_label, rb_iseq_struct::body, ibf_load::buff, rb_iseq_constant_body::catch_table, rb_iseq_constant_body::cc_entries, rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, rb_iseq_location_struct::first_lineno, ibf_load_catch_table(), ibf_load_ci_entries(), ibf_load_code(), ibf_load_iseq(), ibf_load_line_info_table(), ibf_load_local_table(), ibf_load_location_str(), ibf_load_param_keyword(), ibf_load_param_opt_table(), rb_iseq_constant_body::is_entries, rb_iseq_constant_body::is_size, rb_iseq_constant_body::iseq_encoded, iseq_mark_ary_create(), rb_iseq_constant_body::iseq_size, rb_iseq_constant_body::keyword, rb_iseq_location_struct::label, rb_iseq_constant_body::line_info_size, rb_iseq_constant_body::line_info_table, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::location, rb_iseq_constant_body::mark_ary, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, rb_iseq_constant_body::parent_iseq, rb_iseq_location_struct::path, rb_iseq_translate_threaded_code(), RB_OBJ_WRITE, rb_iseq_constant_body::stack_max, rb_iseq_constant_body::type, ZALLOC, and ZALLOC_N.
Referenced by ibf_load_iseq_complete().
|
static |
Definition at line 7565 of file compile.c.
References IBF_R, rb_iseq_constant_body::line_info_size, and rb_iseq_constant_body::line_info_table.
Referenced by ibf_load_iseq_each().
|
static |
Definition at line 7585 of file compile.c.
References ibf_load_id(), IBF_R, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NULL, and size.
Referenced by ibf_load_iseq_each().
Definition at line 7736 of file compile.c.
References ibf_load_object(), Qnil, and rb_fstring().
Referenced by ibf_load_iseq_each().
Definition at line 8344 of file compile.c.
References ibf_load::buff, ibf_load::header, IBF_OBJBODY, IBF_OBJHEADER, ibf_load::iseq, iseq_add_mark_object(), ibf_load::obj_list, ibf_header::object_list_offset, ibf_header::object_list_size, PRIdVALUE, Qnil, rb_ary_entry(), rb_ary_store(), rb_eIndexError, rb_raise(), ibf_object_header::special_const, and ibf_object_header::type.
Referenced by ibf_load_ci_entries(), ibf_load_code(), ibf_load_id(), ibf_load_location_str(), ibf_load_object_array(), ibf_load_object_complex_rational(), ibf_load_object_hash(), ibf_load_object_regexp(), ibf_load_object_string(), ibf_load_object_struct(), ibf_load_object_symbol(), ibf_load_param_keyword(), and ibf_table_index().
|
static |
Definition at line 8052 of file compile.c.
References ibf_object_array::ary, ibf_object_header::frozen, ibf_load_object(), IBF_OBJBODY, ibf_object_header::internal, ibf_object_array::len, rb_ary_new_capa(), rb_ary_push(), rb_obj_freeze(), and rb_obj_hide().
|
static |
Definition at line 8151 of file compile.c.
References ibf_object_bignum::digits, ibf_object_header::frozen, IBF_OBJBODY, INTEGER_PACK_LITTLE_ENDIAN, INTEGER_PACK_NEGATIVE, ibf_object_header::internal, len, rb_integer_unpack(), rb_obj_freeze(), rb_obj_hide(), and ibf_object_bignum::slen.
|
static |
Definition at line 7948 of file compile.c.
References IBF_OBJBODY, IBF_OBJECT_CLASS_ARRAY, IBF_OBJECT_CLASS_OBJECT, IBF_OBJECT_CLASS_STANDARD_ERROR, rb_bug(), rb_cArray, rb_cObject, and rb_eStandardError.
|
static |
Definition at line 8209 of file compile.c.
References ibf_object_complex_rational::a, ibf_object_complex_rational::b, ibf_object_header::frozen, ibf_load_object(), IBF_OBJBODY, ibf_object_header::internal, rb_complex_new(), rb_obj_freeze(), rb_obj_hide(), rb_rational_new(), T_COMPLEX, and ibf_object_header::type.
|
static |
Definition at line 8181 of file compile.c.
References ibf_load_object_unsupported(), IBF_OBJBODY, IBF_OBJECT_DATA_ENCODING, rb_enc_find(), and rb_enc_from_encoding().
|
static |
Definition at line 7974 of file compile.c.
References DBL2NUM, and IBF_OBJBODY.
|
static |
Definition at line 8088 of file compile.c.
References ibf_object_header::frozen, hash(), ibf_load_object(), IBF_OBJBODY, ibf_object_header::internal, key, ibf_object_hash::keyval, ibf_object_hash::len, rb_hash_aset(), rb_hash_new(), rb_hash_rehash(), rb_obj_freeze(), rb_obj_hide(), and val.
|
static |
Definition at line 8028 of file compile.c.
References ibf_object_header::frozen, ibf_load_object(), IBF_OBJBODY, ibf_object_header::internal, NULL, ibf_object_regexp::option, rb_obj_freeze(), rb_obj_hide(), rb_reg_compile(), and ibf_object_regexp::srcstr.
|
static |
Definition at line 7999 of file compile.c.
References ibf_object_string::encindex, ibf_object_header::frozen, ibf_load_object(), IBF_OBJBODY, if(), ibf_object_header::internal, ibf_object_string::len, ibf_object_string::ptr, rb_enc_associate_index(), rb_enc_find_index(), rb_fstring(), rb_obj_hide(), rb_str_new(), RSTRING_PTR, and RUBY_ENCINDEX_BUILTIN_MAX.
|
static |
Definition at line 8128 of file compile.c.
References ibf_object_struct_range::beg, ibf_object_struct_range::end, ibf_object_struct_range::excl, ibf_object_header::frozen, ibf_load_object(), IBF_OBJBODY, ibf_object_header::internal, range, rb_obj_freeze(), rb_obj_hide(), and rb_range_new().
|
static |
Definition at line 8231 of file compile.c.
References ibf_load_object(), IBF_OBJBODY, ID2SYM, rb_intern_str, and ibf_object_symbol::str.
|
static |
Definition at line 7920 of file compile.c.
References Qnil, and rb_bug().
Referenced by ibf_load_object_data().
|
static |
Definition at line 7533 of file compile.c.
References ibf_load_id(), ibf_load_object(), IBF_R, rb_iseq_constant_body::keyword, NULL, and rb_iseq_constant_body::param.
Referenced by ibf_load_iseq_each().
|
static |
Definition at line 7493 of file compile.c.
References ALLOC_N, ibf_load::buff, IBF_OFFSET, MEMCPY, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, and rb_iseq_constant_body::param.
Referenced by ibf_load_iseq_each().
Definition at line 8563 of file compile.c.
References ibf_load::buff, ibf_load::header, ibf_load::id_list, ibf_header::id_list_size, ibf_load::iseq, ibf_load::iseq_list, ISEQ_MAJOR_VERSION, ISEQ_MINOR_VERSION, ibf_load::loader_obj, ibf_header::magic, ibf_header::major_version, ibf_header::minor_version, NULL, ibf_load::obj_list, rb_ary_tmp_new(), rb_check_safe_obj(), rb_eRuntimeError, RB_OBJ_WRITE, rb_raise(), RSTRING_LENINT, RUBY_PLATFORM, ibf_header::size, ibf_load::str, StringValuePtr, and ZALLOC_N.
Referenced by iseq_ibf_load(), and iseq_ibf_load_extra_data().
|
static |
Definition at line 8607 of file compile.c.
References ibf_load::id_list, and ruby_xfree().
|
static |
Definition at line 8596 of file compile.c.
References ibf_load::iseq_list, ibf_load::obj_list, rb_gc_mark(), and ibf_load::str.
|
static |
Definition at line 7261 of file compile.c.
References ibf_load_iseq(), ibf_load_object(), ibf_table_lookup(), st_table::num_entries, st_data_t, and st_insert.
Referenced by ibf_dump_id(), ibf_dump_iseq(), and ibf_dump_setup().
Definition at line 7248 of file compile.c.
References st_data_t, st_lookup, and val.
Referenced by ibf_dump_iseq(), and ibf_table_index().
|
static |
Definition at line 855 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 869 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by compile_named_capture_assign().
|
static |
Definition at line 971 of file compile.c.
References iseq_link_anchor::anchor, dump_disasm_list(), FIRST_ELEMENT(), FIX2INT, ISEQ_ARG_DECLARE, iseq_link_anchor::last, list, iseq_link_element::next, iseq_link_element::prev, iseq_link_element::type, and verify_list().
Referenced by setup_args().
|
static |
Definition at line 6342 of file compile.c.
References iseq_insn_data::insn_id.
Referenced by dump_disasm_list(), and iseq_set_sequence().
Definition at line 6373 of file compile.c.
References FIX2INT, func, rb_global_entry::id, iseq_insn_data::insn_id, iseq_label_data::label_no, rb_call_info::mid, OPERAND_AT, iseq_insn_data::operands, opobj_inspect(), rb_call_info::orig_argc, PRIsVALUE, Qnil, rb_eSyntaxError, rb_id2str, rb_raise(), rb_sprintf(), rb_str_append(), rb_str_cat2(), rb_str_catf(), rb_str_concat(), iseq_link_element::type, and val.
Referenced by dump_disasm_list().
|
static |
Definition at line 6615 of file compile.c.
References ID2SYM, rb_intern, st_init_numtable, and st_insert.
Referenced by iseq_build_from_ary_body().
Definition at line 2370 of file compile.c.
References compile_data_alloc(), COMPILE_OK, FALSE, idEq, iseq_insn_data::insn_id, new_callinfo(), NULL, iseq_insn_data::operand_size, iseq_insn_data::operands, and Qfalse.
Definition at line 6839 of file compile.c.
References FALSE, FIX2INT, PRIsVALUE, rb_eTypeError, rb_hash_aref(), rb_raise(), T_FIXNUM, T_NIL, TRUE, TYPE, and val.
Referenced by iseq_build_kw(), and rb_iseq_build_from_ary().
Definition at line 534 of file compile.c.
References COMPILE_OK, rb_iseq_add_mark_object(), and SPECIAL_CONST_P.
Referenced by ibf_load_iseq(), ibf_load_object(), iseq_build_from_ary_body(), iseq_build_load_iseq(), iseq_compile_each(), iseq_set_arguments_keywords(), iseq_set_exception_table(), iseq_set_sequence(), and new_child_iseq().
Definition at line 545 of file compile.c.
References COMPILE_OK, ISEQ_COMPILE_DATA, rb_ary_push(), and SPECIAL_CONST_P.
Referenced by compile_array_(), and iseq_compile_each().
rb_iseq_t* iseq_alloc | ( | void | ) |
Definition at line 6650 of file compile.c.
References FIX2INT, ID2SYM, rb_call_info_kw_arg::keyword_len, rb_call_info_kw_arg::keywords, len, new_callinfo(), NIL_P, NUM2UINT, RARRAY_AREF, RARRAY_LENINT, rb_call_info_kw_arg_bytes(), rb_hash_aref(), rb_intern, SYM2ID, VM_CALL_ARGS_SIMPLE, and xmalloc.
Referenced by iseq_build_from_ary_body().
|
static |
Definition at line 6686 of file compile.c.
References ADD_ELEM(), ADD_LABEL, argc, argv, rb_iseq_struct::body, cdhash_type, compile_data_alloc(), COMPILE_ERROR, COMPILE_NG, COMPILE_OK, DATA_PTR, FIXNUM_P, insn_make_insn_table(), rb_iseq_constant_body::is_size, iseq_add_mark_object(), iseq_build_callinfo_from_hash(), iseq_build_load_iseq(), iseq_setup(), key, len, new_insn_core(), NUM2INT, NUM2LONG, NUM2UINT, PRIsVALUE, Qfalse, Qnil, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_LENINT, rb_ary_entry(), rb_convert_type(), rb_eSyntaxError, rb_eTypeError, RB_GC_GUARD, rb_global_entry(), rb_hash_aset(), rb_hash_new(), rb_hash_tbl_raw(), rb_iseq_add_mark_object(), rb_raise(), RB_TYPE_P, register_label(), st_data_t, st_lookup, sym, SYM2ID, SYMBOL_P, T_ARRAY, T_SYMBOL, st_table::type, and validate_labels().
Referenced by rb_iseq_build_from_ary().
|
static |
Definition at line 6574 of file compile.c.
References ADD_CATCH_ENTRY, COMPILE_OK, get_exception_sym2type(), NULL, NUM2UINT, Qnil, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_convert_type(), rb_eSyntaxError, RB_GC_GUARD, rb_iseq_load(), rb_iseqw_to_iseq(), rb_raise(), register_label(), T_ARRAY, and iseq_link_element::type.
Referenced by rb_iseq_build_from_ary().
|
static |
Definition at line 6856 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, CHECK_ARRAY, rb_iseq_constant_body::flags, int_param(), key, len, rb_iseq_constant_body::local_table, rb_iseq_constant_body::param, PRIsVALUE, Qundef, RARRAY_AREF, RARRAY_LEN, RARRAY_LENINT, rb_eTypeError, rb_raise(), sym, SYM, SYM2ID, SYMBOL_P, TRUE, val, and ZALLOC.
Referenced by rb_iseq_build_from_ary().
Definition at line 6629 of file compile.c.
References CLASS_OF, iseq_add_mark_object(), Qnil, rb_cISeq, rb_eSyntaxError, rb_iseq_load(), rb_iseqw_to_iseq(), rb_raise(), RB_TYPE_P, and T_ARRAY.
Referenced by iseq_build_from_ary_body().
|
static |
Definition at line 1262 of file compile.c.
References rb_iseq_constant_body::block_start, rb_iseq_struct::body, rb_iseq_constant_body::flags, rb_iseq_constant_body::keyword, rb_iseq_constant_body::lead_num, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::param, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, rb_bug(), rb_iseq_constant_body::rest_start, and rb_iseq_constant_body::size.
Referenced by iseq_set_arguments(), and rb_iseq_build_from_ary().
|
static |
compile each node
self: InstructionSequence node: Ruby compiled node popped: This node will be popped
Definition at line 3970 of file compile.c.
References ADD_ADJUST, ADD_ADJUST_RESTORE, ADD_CALL, ADD_CALL_RECEIVER, ADD_CALL_WITH_BLOCK, ADD_CATCH_ENTRY, add_ensure_iseq(), ADD_GETLOCAL, ADD_INSN, ADD_INSN1, ADD_INSN2, ADD_INSN3, ADD_INSNL, ADD_LABEL, ADD_SEND, ADD_SEND_R, ADD_SEND_WITH_BLOCK, ADD_SEND_WITH_FLAG, ADD_SEQ, ADD_SETLOCAL, ADD_TRACE, argc, ensure_range::begin, rb_iseq_struct::body, build_postexe_iseq(), cdhash_type, CHECK, COMPILE, COMPILE_, compile_array(), compile_array_(), COMPILE_ARRAY_TYPE_ARRAY, COMPILE_ARRAY_TYPE_HASH, compile_branch_condition(), compile_bug(), compile_colon2(), compile_cpath(), compile_dregx(), compile_dstr(), COMPILE_ERROR, compile_massign(), compile_named_capture_assign(), COMPILE_NG, COMPILE_OK, COMPILE_POPPED, COMPILE_RECV, CONST_ID, debug_node_end, debug_node_start, debugi, debugp_param, debugs, DECL_ANCHOR, DEFINED_CONST, defined_expr, DEFINED_NIL, ensure_range::end, ERROR_ARGS, ERROR_ARGS_AT, EXPECT_NODE_NONULL, FALSE, FIX2INT, FIXNUM_INC, RNode::flags, rb_iseq_constant_body::flags, get_dyna_var_idx(), get_ivar_ic_value(), get_local_var_idx(), get_lvar_level(), RNode::id, ID2SYM, id_core_define_method, id_core_define_singleton_method, id_core_hash_merge_ptr, id_core_set_method_alias, id_core_set_variable_alias, id_core_undef_method, id_debug_created_info, idAREF, idASET, idBackquote, idEq, idEqq, idEqTilde, IFUNC_NEW, INIT_ANCHOR, INSN_OF, INT2FIX, IS_INSN, IS_INSN_ID, rb_iseq_constant_body::is_size, iseq_add_mark_object(), iseq_add_mark_object_compile_time(), ISEQ_COMPILE_DATA, ISEQ_TYPE_ONCE_GUARD, rb_iseq_constant_body::keyword, rb_call_info_kw_arg::keywords, rb_iseq_location_struct::label, LABEL_REF, LABEL_RESCUE_BEG, LABEL_RESCUE_END, iseq_link_anchor::last, last, rb_iseq_constant_body::lead_num, level, iseq_label_data::link, list, LIST_SIZE_ZERO(), rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::local_table_size, rb_iseq_constant_body::location, LVAR_ERRINFO, make_name_for_block(), nd_line, nd_type, new_callinfo(), NEW_CHILD_ISEQ, NEW_ISEQ, NEW_LABEL, NEW_NODE, iseq_link_element::next, ensure_range::next, RNode::node, NODE_ALIAS, NODE_AND, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, NODE_ATTRASGN, NODE_BACK_REF, NODE_BEGIN, NODE_BLOCK, NODE_BLOCK_PASS, NODE_BREAK, NODE_CALL, NODE_CASE, NODE_CDECL, NODE_CLASS, NODE_COLON2, NODE_COLON3, NODE_CONST, NODE_CVAR, NODE_CVASGN, NODE_DASGN, NODE_DASGN_CURR, NODE_DEFINED, NODE_DEFN, NODE_DEFS, NODE_DOT2, NODE_DOT3, NODE_DREGX, NODE_DREGX_ONCE, NODE_DSTR, NODE_DSYM, NODE_DVAR, NODE_DXSTR, NODE_ENSURE, NODE_ERRINFO, NODE_EVSTR, NODE_FALSE, NODE_FCALL, NODE_FL_NEWLINE, NODE_FLIP2, NODE_FLIP3, NODE_FOR, NODE_GASGN, NODE_GVAR, NODE_HASH, NODE_IASGN, NODE_IASGN2, NODE_IF, NODE_ITER, NODE_IVAR, NODE_KW_ARG, NODE_LAMBDA, NODE_LASGN, NODE_LIT, NODE_LVAR, NODE_MASGN, NODE_MATCH, NODE_MATCH2, NODE_MATCH3, NODE_MODULE, NODE_NEXT, NODE_NIL, NODE_NTH_REF, NODE_OP_ASGN1, NODE_OP_ASGN2, NODE_OP_ASGN_AND, NODE_OP_ASGN_OR, NODE_OP_CDECL, NODE_OPT_N, NODE_OR, NODE_POSTEXE, NODE_PRELUDE, NODE_QCALL, NODE_REDO, NODE_RESBODY, NODE_RESCUE, NODE_RETRY, NODE_RETURN, NODE_SCLASS, NODE_SCOPE, NODE_SELF, NODE_SPLAT, NODE_STR, NODE_SUPER, NODE_TRUE, NODE_UNDEF, NODE_UNTIL, NODE_VALIAS, NODE_VALUES, NODE_VCALL, NODE_WHEN, NODE_WHILE, NODE_XSTR, NODE_YIELD, NODE_ZARRAY, NODE_ZSUPER, NULL, number_literal_p(), OPERAND_AT, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::param, rb_iseq_constant_body::parent_iseq, rb_iseq_location_struct::path, POP_ELEMENT(), iseq_label_data::position, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, iseq_compile_data_ensure_node_stack::prev, PRIsVALUE, private_recv_p, push_ensure_entry(), Qfalse, Qnil, Qtrue, Qundef, rb_ary_new_from_args(), rb_cArray, rb_cObject, rb_eStandardError, rb_fstring(), rb_hash_new(), rb_hash_tbl_raw(), rb_id2str, rb_id_attrset(), rb_intern, rb_is_attrset_id(), rb_is_const_id(), rb_iseq_defined_string(), rb_iseq_make_compile_option(), rb_iseqw_new(), rb_ivar_set(), rb_obj_freeze(), rb_range_new(), rb_sprintf(), rb_str_concat(), rb_str_dup(), rb_str_new2, iseq_label_data::rescued, rb_iseq_constant_body::rest_start, RTEST, ruby_debug, RUBY_EVENT_LINE, RUBY_EVENT_RETURN, ruby_node_name(), setup_args(), st_data_t, st_init_numtable, st_insert, st_lookup, SYM2ID, SYMBOL_P, TAG_BREAK, TAG_NEXT, TAG_REDO, TAG_RETRY, TAG_RETURN, iseq_link_element::type, st_table::type, rb_iseq_constant_body::type, RNode::u1, RNode::u2, RNode::u3, UNKNOWN_NODE, val, RNode::value, VM_CALL_ARGS_BLOCKARG, VM_CALL_ARGS_SPLAT, VM_CALL_FCALL, VM_CALL_SUPER, VM_CALL_VCALL, VM_CHECKMATCH_ARRAY, VM_CHECKMATCH_TYPE_CASE, VM_CHECKMATCH_TYPE_RESCUE, VM_CHECKMATCH_TYPE_WHEN, VM_DEFINECLASS_FLAG_HAS_SUPERCLASS, VM_DEFINECLASS_FLAG_SCOPED, VM_DEFINECLASS_TYPE_CLASS, VM_DEFINECLASS_TYPE_MODULE, VM_DEFINECLASS_TYPE_SINGLETON_CLASS, VM_ENV_DATA_SIZE, VM_SPECIAL_OBJECT_CBASE, VM_SPECIAL_OBJECT_CONST_BASE, VM_SPECIAL_OBJECT_VMCORE, VM_THROW_LEVEL_SHIFT, VM_THROW_NO_ESCAPE_FLAG, and when_vals().
Definition at line 8450 of file compile.c.
References rb_iseq_struct::body, DATA_PTR, ibf_header::extra_size, ibf_dump_free(), ibf_dump_id_list(), ibf_dump_iseq(), ibf_dump_iseq_list(), ibf_dump_object_list(), ibf_dump_overwrite(), ibf_dump_pos(), ibf_dump_setup(), ibf_dump_write(), ISEQ_COVERAGE, ISEQ_MAJOR_VERSION, ISEQ_MINOR_VERSION, rb_iseq_constant_body::local_iseq, ibf_header::magic, ibf_header::major_version, ibf_header::minor_version, NULL, rb_iseq_constant_body::parent_iseq, rb_eRuntimeError, RB_GC_GUARD, rb_raise(), RSTRING_LENINT, RTEST, RUBY_PLATFORM, ibf_header::size, ibf_dump::str, StringValuePtr, strlen(), and TypedData_Make_Struct.
Referenced by iseqw_to_binary().
Definition at line 8630 of file compile.c.
References ibf_load_iseq(), ibf_load_setup(), ibf_load::iseq, ibf_load::loader_obj, RB_GC_GUARD, and TypedData_Make_Struct.
Referenced by iseqw_s_load_from_binary().
Definition at line 8644 of file compile.c.
References ibf_load::buff, ibf_header::extra_size, ibf_load::header, ibf_load_setup(), ibf_load::loader_obj, RB_GC_GUARD, rb_str_new(), ibf_header::size, and TypedData_Make_Struct.
Referenced by iseqw_s_load_from_binary_extra_data().
|
static |
Definition at line 2566 of file compile.c.
References COMPILE_ERROR, COMPILE_NG, COMPILE_OK, dump_disasm_list(), FIRST_ELEMENT(), id, if(), iseq_insn_data::insn_id, IS_INSN, iseq_insn_data::link, list, iseq_link_element::next, OPERAND_AT, iseq_link_element::prev, and iseq_label_data::sc_state.
Referenced by iseq_setup().
|
static |
Definition at line 2483 of file compile.c.
References argc, compile_data_alloc(), COMPILE_OK, FALSE, FIRST_ELEMENT(), IS_INSN, IS_LABEL, ISEQ_COMPILE_DATA, iseq_peephole_optimize(), iseq_specialized_instruction(), LABEL_RESCUE_BEG, LABEL_RESCUE_END, iseq_insn_data::line_no, list, MEMCPY, new_insn_core(), iseq_link_element::next, iseq_insn_data::operand_size, iseq_insn_data::operands, size, and tailcallable_p().
Referenced by iseq_setup().
|
static |
Definition at line 2068 of file compile.c.
References COMPILE_OK, cond, FALSE, rb_call_info::flag, get_destination_insn(), get_next_insn(), get_prev_insn(), if(), INSERT_ELEM_NEXT(), iseq_insn_data::insn_id, INSN_OF, IS_INSN, IS_INSN_ID, IS_TRACE_LINE, iseq_insn_data::line_no, iseq_insn_data::link, new_insn_core(), iseq_link_element::next, NULL, OPERAND_AT, iseq_insn_data::operand_size, iseq_insn_data::operands, iseq_link_element::prev, Qfalse, REMOVE_ELEM(), remove_unreachable_chunk(), replace_destination(), unref_destination(), and VM_CALL_TAILCALL.
Referenced by iseq_optimize().
|
static |
Definition at line 1370 of file compile.c.
References ADD_LABEL, ALLOC_N, assert, rb_args_info::block_arg, rb_iseq_constant_body::block_start, rb_iseq_struct::body, COMPILE_OK, COMPILE_POPPED, debugs, EXPECT_NODE, FALSE, rb_args_info::first_post_arg, rb_iseq_constant_body::flags, get_dyna_var_idx_at_raw(), if(), iseq_calc_param_size(), iseq_set_arguments_keywords(), rb_iseq_constant_body::keyword, rb_args_info::kw_args, rb_args_info::kw_rest_arg, rb_iseq_constant_body::lead_num, MEMCPY, nd_line, NEW_LABEL, NODE_ARGS, rb_args_info::opt_args, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, rb_args_info::post_args_num, rb_args_info::post_init, rb_iseq_constant_body::post_num, rb_iseq_constant_body::post_start, rb_args_info::pre_args_num, rb_args_info::pre_init, RARRAY_CONST_PTR, rb_ary_clear(), rb_ary_push(), rb_ary_tmp_new(), rb_args_info::rest_arg, rb_iseq_constant_body::rest_start, TRUE, rb_iseq_constant_body::type, and ZALLOC_N.
Referenced by rb_iseq_compile_node().
|
static |
Definition at line 1299 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, COMPILE_POPPED, dv, rb_iseq_constant_body::flags, get_dyna_var_idx_at_raw(), iseq_add_mark_object(), rb_iseq_constant_body::keyword, rb_args_info::kw_args, rb_args_info::kw_rest_arg, rb_iseq_constant_body::local_table, nd_type, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_TRUE, rb_iseq_constant_body::param, Qfalse, Qnil, Qtrue, Qundef, RARRAY_AREF, RARRAY_LEN, rb_ary_push(), rb_ary_tmp_new(), rb_str_tmp_new(), TRUE, and ZALLOC_N.
Referenced by iseq_set_arguments().
|
static |
Definition at line 1187 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, COMPILE_OK, CONST_ID, rb_iseq_constant_body::local_table, and rb_iseq_constant_body::local_table_size.
Referenced by rb_iseq_compile_node().
|
static |
Definition at line 1878 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::catch_table, catch_type(), COMPILE_OK, iseq_catch_table_entry::cont, iseq_catch_table_entry::end, iseq_catch_table_entry::iseq, iseq_add_mark_object(), iseq_catch_table_bytes(), ISEQ_COMPILE_DATA, label_get_position(), label_get_sp(), NULL, RARRAY_CONST_PTR, RARRAY_LEN, RB_OBJ_WRITE, iseq_catch_table_entry::sp, iseq_catch_table_entry::start, iseq_catch_table_entry::type, and xmalloc.
Referenced by iseq_setup().
Definition at line 1486 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, COMPILE_OK, debugs, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, MEMCPY, and size.
Referenced by build_postexe_iseq(), for_self_aref(), for_self_aset(), and rb_iseq_compile_node().
|
static |
Definition at line 1941 of file compile.c.
References rb_iseq_struct::body, COMPILE_OK, rb_iseq_constant_body::flags, if(), label_get_position(), rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, and rb_iseq_constant_body::param.
Referenced by iseq_setup().
|
static |
ruby insn object list -> raw instruction sequence
Definition at line 1580 of file compile.c.
References ALLOC_N, assert, rb_iseq_struct::body, calc_sp_depth(), rb_iseq_constant_body::cc_entries, cdhash_set_label_i(), rb_iseq_constant_body::ci_entries, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, compile_bug(), COMPILE_ERROR, COMPILE_NG, COMPILE_OK, dump_disasm_list(), FIRST_ELEMENT(), FIX2INT, FIX2UINT, rb_call_info::flag, freeze_hide_obj(), cdhash_set_label_struct::hash, if(), insn_data_length(), iseq_insn_data::insn_id, rb_iseq_constant_body::is_entries, rb_iseq_constant_body::is_size, iseq_add_mark_object(), ISEQ_COMPILE_DATA, iseq_link_element::ISEQ_ELEMENT_ADJUST, iseq_link_element::ISEQ_ELEMENT_INSN, iseq_link_element::ISEQ_ELEMENT_LABEL, iseq_link_element::ISEQ_ELEMENT_NONE, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, iseq_adjust_data::label, len, cdhash_set_label_struct::len, rb_iseq_constant_body::line_info_size, rb_iseq_constant_body::line_info_table, iseq_insn_data::line_no, iseq_adjust_data::line_no, iseq_line_info_entry::line_no, list, iseq_link_element::next, iseq_insn_data::operand_size, iseq_insn_data::operands, cdhash_set_label_struct::pos, iseq_label_data::position, iseq_line_info_entry::position, rb_bug(), rb_hash_foreach(), rb_hash_rehash(), REALLOC_N, ruby_xmalloc(), iseq_label_data::set, iseq_label_data::sp, rb_iseq_constant_body::stack_max, SYM2ID, TRUE, iseq_link_element::type, UNLIKELY, VM_CALL_KWARG, xfree(), and ZALLOC_N.
Referenced by iseq_setup().
|
static |
Definition at line 2680 of file compile.c.
References COMPILE_ERROR, COMPILE_NG, COMPILE_OK, FIRST_ELEMENT(), iseq_insn_data::insn_id, iseq_link_element::ISEQ_ELEMENT_INSN, iseq_link_element::ISEQ_ELEMENT_LABEL, iseq_insn_data::line_no, list, new_insn_body(), iseq_link_element::next, REMOVE_ELEM(), and iseq_link_element::type.
Referenced by iseq_setup().
|
static |
Definition at line 1133 of file compile.c.
References compile_debug, COMPILE_NG, COMPILE_OK, debugs, dump_disasm_list(), FIRST_ELEMENT(), ISEQ_COMPILE_DATA, iseq_insns_unification(), iseq_optimize(), iseq_set_exception_table(), iseq_set_optargs_table(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), rb_iseq_disasm(), rb_iseq_translate_threaded_code(), RTEST, and StringValueCStr.
Referenced by iseq_build_from_ary_body(), and rb_iseq_compile_node().
Definition at line 2389 of file compile.c.
References COMPILE_OK, div, eq(), rb_call_info::flag, ge, gt, idAREF, idASET, idDIV, idEmptyP, idEq, idGE, idGT, idLE, idLT, idLTLT, idMINUS, idMOD, idMULT, idNeq, idNot, idPLUS, if(), iseq_insn_data::insn_id, IS_INSN, IS_INSN_ID, le, iseq_insn_data::link, lt, rb_call_info::mid, mod, mult(), iseq_link_element::next, NULL, OPERAND_AT, iseq_insn_data::operand_size, rb_call_info::orig_argc, REMOVE_ELEM(), size, SP_INSN, VM_CALL_ARGS_BLOCKARG, and VM_CALL_ARGS_SIMPLE.
Referenced by iseq_optimize().
|
static |
Definition at line 1866 of file compile.c.
References iseq_label_data::position.
Referenced by iseq_set_exception_table(), and iseq_set_optargs_table().
|
static |
Definition at line 1872 of file compile.c.
References iseq_label_data::sp.
Referenced by iseq_set_exception_table().
|
static |
Definition at line 913 of file compile.c.
References iseq_link_anchor::last.
Referenced by compile_dstr_fragments(), and compile_massign_lhs().
|
static |
Definition at line 8277 of file compile.c.
References dump_object(), FALSE, FL_FREEZE, FL_TEST, ibf_object_header::frozen, ibf_dump_pos(), IBF_WV, ibf_object_header::internal, RB_TYPE_P, RBASIC_CLASS, ibf_object_header::special_const, SPECIAL_CONST_P, T_FLOAT, T_SYMBOL, TRUE, TYPE, and ibf_object_header::type.
Referenced by ibf_dump_object_list().
|
static |
Definition at line 932 of file compile.c.
References iseq_link_anchor::anchor, and iseq_link_element::next.
Referenced by iseq_compile_each(), and setup_args().
Definition at line 3716 of file compile.c.
References rb_iseq_struct::body, rb_iseq_location_struct::label, level, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::location, rb_iseq_constant_body::parent_iseq, PRIsVALUE, rb_sprintf(), and rb_iseq_constant_body::type.
Referenced by build_postexe_iseq(), and iseq_compile_each().
|
static |
Definition at line 7093 of file compile.c.
References accessor_args::arg, caller_location(), func, accessor_args::func, IFUNC_NEW, INT2FIX, accessor_args::line, rb_iseq_new_with_opt(), and rb_sym2str.
Referenced by rb_method_for_self_aref(), and rb_method_for_self_aset().
Definition at line 1033 of file compile.c.
References compile_data_alloc_adjust(), iseq_link_element::ISEQ_ELEMENT_ADJUST, iseq_adjust_data::label, LABEL_UNREMOVABLE, iseq_adjust_data::line_no, iseq_adjust_data::link, iseq_link_element::next, and iseq_link_element::type.
|
static |
Definition at line 1080 of file compile.c.
References rb_iseq_struct::body, rb_call_info_with_kwarg::ci, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, compile_data_alloc(), if(), rb_call_info_kw_arg::keyword_len, NULL, size, VM_CALL_ARGS_BLOCKARG, VM_CALL_ARGS_SIMPLE, VM_CALL_ARGS_SPLAT, and VM_CALL_KWARG.
Referenced by insn_set_specialized_instruction(), iseq_build_callinfo_from_hash(), iseq_compile_each(), and new_insn_send().
|
static |
Definition at line 1118 of file compile.c.
References debugs, INT2FIX, iseq_absolute_path, iseq_add_mark_object(), ISEQ_COMPILE_DATA, iseq_path, and rb_iseq_new_with_opt().
|
static |
Definition at line 1062 of file compile.c.
References argc, argv, compile_data_alloc(), new_insn_core(), and va_init_list.
Referenced by iseq_set_sequence_stackcaching().
|
static |
Definition at line 1045 of file compile.c.
References argc, argv, compile_data_alloc_insn(), iseq_insn_data::insn_id, iseq_link_element::ISEQ_ELEMENT_INSN, iseq_insn_data::line_no, iseq_insn_data::link, iseq_link_element::next, iseq_insn_data::operand_size, iseq_insn_data::operands, iseq_insn_data::sc_state, and iseq_link_element::type.
Referenced by iseq_build_from_ary_body(), iseq_optimize(), iseq_peephole_optimize(), new_insn_body(), and new_insn_send().
|
static |
Definition at line 1108 of file compile.c.
References compile_data_alloc(), FIX2INT, new_callinfo(), new_insn_core(), NULL, and Qfalse.
Referenced by compile_named_capture_assign().
Definition at line 1016 of file compile.c.
References compile_data_alloc_label(), ISEQ_COMPILE_DATA, iseq_link_element::ISEQ_ELEMENT_LABEL, iseq_label_data::label_no, LABEL_RESCUE_NONE, iseq_label_data::link, iseq_link_element::next, iseq_label_data::refcnt, iseq_label_data::rescued, iseq_label_data::sc_state, iseq_label_data::set, iseq_label_data::sp, and iseq_link_element::type.
NOINLINE | ( | static compile_error_func | prepare_compile_errorrb_iseq_t *iseq | ) |
Referenced by compile_bug().
|
static |
Definition at line 3957 of file compile.c.
References nd_type, NODE_LIT, and RB_INTEGER_TYPE_P.
Referenced by iseq_compile_each().
Definition at line 6354 of file compile.c.
References BUILTIN_TYPE, RBasic::klass, rb_ary_dup(), rb_inspect(), rb_str_new_cstr(), RSTRING_PTR, SPECIAL_CONST_P, T_ARRAY, and T_STRING.
Referenced by insn_data_to_s_detail().
|
static |
Definition at line 919 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
Referenced by compile_massign(), and iseq_compile_each().
|
static |
Definition at line 370 of file compile.c.
References append_compile_error(), compile_bug(), and compile_debug.
Referenced by compile_bug().
|
static |
Definition at line 3739 of file compile.c.
References iseq_compile_data_ensure_node_stack::ensure_node, iseq_compile_data_ensure_node_stack::erange, ISEQ_COMPILE_DATA, and iseq_compile_data_ensure_node_stack::prev.
Referenced by iseq_compile_each().
Definition at line 7024 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NULL, rb_iseq_constant_body::parent_iseq, rb_iseq_constant_body::type, and vm_block_iseq().
Referenced by dvar_defined_gen().
VALUE rb_insns_name_array | ( | void | ) |
Definition at line 6518 of file compile.c.
References numberof, rb_ary_new(), rb_ary_push(), rb_fstring(), rb_obj_freeze(), and rb_str_new2.
Referenced by Init_VM().
void rb_iseq_build_from_ary | ( | rb_iseq_t * | iseq, |
VALUE | misc, | ||
VALUE | locals, | ||
VALUE | params, | ||
VALUE | exception, | ||
VALUE | body | ||
) |
Definition at line 6921 of file compile.c.
References ALLOC_N, rb_iseq_struct::body, CHECK_SYMBOL, Data_Wrap_Struct, DECL_ANCHOR, FIX2LONG, FIXNUM_P, rb_iseq_constant_body::flags, ID2SYM, if(), INIT_ANCHOR, int_param(), INT_PARAM, iseq_build_from_ary_body(), iseq_build_from_ary_exception(), iseq_build_kw(), iseq_calc_param_size(), rb_iseq_constant_body::keyword, len, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NULL, rb_iseq_constant_body::opt_num, rb_iseq_constant_body::opt_table, rb_iseq_constant_body::param, PRIsVALUE, Qtrue, RARRAY_AREF, RARRAY_LENINT, rb_eTypeError, rb_hash_aref(), rb_intern, rb_raise(), register_label(), st_free_table, st_init_numtable, SYM, SYM2ID, T_ARRAY, T_NIL, TRUE, TYPE, and ZALLOC.
Referenced by iseq_load().
Definition at line 576 of file compile.c.
References ADD_CATCH_ENTRY, ADD_GETLOCAL, ADD_INSN, ADD_INSN1, ADD_LABEL, ADD_TRACE, rb_iseq_struct::body, CHECK, COMPILE, compile_bug(), COMPILE_ERROR, COMPILE_NG, COMPILE_POPPED, vm_ifunc::data, DECL_ANCHOR, ensure_range::end, ERROR_ARGS, rb_iseq_location_struct::first_lineno, FIX2INT, vm_ifunc::func, INIT_ANCHOR, INT2FIX, ISEQ_COMPILE_DATA, iseq_set_arguments(), iseq_set_exception_local_table(), iseq_set_local_table(), iseq_setup(), LABEL_RESCUE_BEG, LABEL_RESCUE_END, rb_iseq_constant_body::location, LVAR_ERRINFO, nd_line, nd_type, NEW_LABEL, NODE_SCOPE, RB_TYPE_P, iseq_label_data::rescued, RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_END, RUBY_EVENT_RETURN, T_IMEMO, rb_iseq_constant_body::type, and validate_labels().
Referenced by rb_iseq_new_with_opt().
Definition at line 716 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::iseq_encoded, ISEQ_ORIGINAL_ISEQ(), ISEQ_ORIGINAL_ISEQ_ALLOC(), rb_iseq_constant_body::iseq_size, and MEMCPY.
Referenced by ibf_dump_code(), iseq_data_to_ary(), rb_iseq_disasm(), rb_iseqw_line_trace_each(), and rb_vmdebug_debug_print_pre().
int rb_iseq_translate_threaded_code | ( | rb_iseq_t * | iseq | ) |
Definition at line 682 of file compile.c.
References rb_iseq_struct::body, COMPILE_OK, rb_iseq_constant_body::iseq_encoded, rb_iseq_constant_body::iseq_size, len, rb_bug(), and rb_vm_get_insns_address_table().
Referenced by ibf_load_iseq_each(), and iseq_setup().
Definition at line 7049 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::local_iseq, rb_iseq_constant_body::local_table, rb_iseq_constant_body::local_table_size, NULL, and vm_block_iseq().
Referenced by local_id_gen().
const rb_iseq_t* rb_method_for_self_aref | ( | VALUE | name, |
VALUE | arg, | ||
rb_insn_func_t | func | ||
) |
Definition at line 7144 of file compile.c.
References for_self_aref(), and method_for_self().
Referenced by define_aref_method().
const rb_iseq_t* rb_method_for_self_aset | ( | VALUE | name, |
VALUE | arg, | ||
rb_insn_func_t | func | ||
) |
Definition at line 7153 of file compile.c.
References for_self_aset(), and method_for_self().
Referenced by define_aset_method().
Definition at line 6529 of file compile.c.
References LABEL_REF, NEW_LABEL, rb_convert_type(), st_data_t, st_insert, st_lookup, and T_SYMBOL.
Referenced by iseq_build_from_ary_body(), iseq_build_from_ary_exception(), and rb_iseq_build_from_ary().
|
static |
Definition at line 898 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by compile_dstr_fragments(), compile_massign_lhs(), iseq_peephole_optimize(), iseq_set_sequence_stackcaching(), iseq_specialized_instruction(), remove_unreachable_chunk(), replace_destination(), and unref_destination().
|
static |
Definition at line 2019 of file compile.c.
References rb_iseq_struct::body, rb_iseq_constant_body::ci_kw_size, rb_iseq_constant_body::ci_size, INSN_OF, IS_INSN, IS_INSN_ID, IS_LABEL, len, iseq_link_element::next, OPERAND_AT, REMOVE_ELEM(), unref_destination(), and VM_CALL_KWARG.
Referenced by iseq_peephole_optimize().
Definition at line 2007 of file compile.c.
References iseq_label_data::link, OPERAND_AT, iseq_label_data::refcnt, and REMOVE_ELEM().
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 3803 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_SEQ, argc, COMPILE, compile_array(), compile_array_(), COMPILE_ARRAY_TYPE_ARGS, DECL_ANCHOR, FALSE, INIT_ANCHOR, INSERT_LIST(), INT2FIX, LIST_SIZE_ZERO(), nd_line, nd_type, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, NODE_BLOCK_PASS, NODE_SPLAT, Qfalse, Qtrue, UNKNOWN_NODE, VM_CALL_ARGS_BLOCKARG, and VM_CALL_ARGS_SPLAT.
Referenced by iseq_compile_each().
|
inlinestatic |
Definition at line 2977 of file compile.c.
References FALSE, nd_type, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_TRUE, and TRUE.
Referenced by compile_array_().
Definition at line 2992 of file compile.c.
References nd_type, NODE_FALSE, NODE_NIL, NODE_TRUE, Qfalse, Qnil, and Qtrue.
Referenced by compile_array_().
|
inlinestatic |
Definition at line 2466 of file compile.c.
References rb_iseq_struct::body, FALSE, TRUE, and rb_iseq_constant_body::type.
Referenced by iseq_optimize().
|
static |
Definition at line 1999 of file compile.c.
References iseq_label_data::link, OPERAND_AT, iseq_label_data::refcnt, and REMOVE_ELEM().
Referenced by iseq_peephole_optimize(), and remove_unreachable_chunk().
Definition at line 554 of file compile.c.
References COMPILE_ERROR, iseq_label_data::link, iseq_link_element::next, iseq_label_data::position, PRIsVALUE, rb_id2str, and ST_CONTINUE.
Referenced by validate_labels().
Definition at line 569 of file compile.c.
References st_data_t, st_foreach, st_free_table, and validate_label().
Referenced by iseq_build_from_ary_body(), and rb_iseq_compile_node().
|
static |
Definition at line 472 of file compile.c.
References iseq_link_anchor::anchor, compile_debug, iseq_link_anchor::last, list, iseq_link_element::next, iseq_link_element::prev, and rb_bug().
Referenced by ADD_ELEM(), APPEND_ELEM(), APPEND_LIST(), INSERT_LIST(), and POP_ELEMENT().
|
static |
Definition at line 3205 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_INSNL, case_when_optimizable_literal(), COMPILE, debugp_param, INT2FIX, nd_line, nd_type, NODE_STR, Qnil, Qundef, rb_compile_warning(), rb_fstring(), rb_hash_aset(), rb_hash_lookup(), ruby_sourcefile, val, and VM_CHECKMATCH_TYPE_CASE.
Referenced by iseq_compile_each().
|
static |
Definition at line 1536 of file compile.c.
Referenced by iseq_build_from_ary_body(), and iseq_compile_each().
|
static |
|
static |
|
static |
|
static |