Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/ruby.h"
#include "internal.h"
#include <math.h>
#include "vm_core.h"
#include "iseq.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 | ensure_range |
struct | iseq_compile_data_ensure_node_stack |
struct | cdhash_set_label_struct |
Macros | |
#define | USE_INSN_STACK_INCREASE 1 |
#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 | NEW_LABEL(l) new_label_body(iseq, (l)) |
#define | iseq_path(iseq) (((rb_iseq_t*)DATA_PTR(iseq))->location.path) |
#define | iseq_absolute_path(iseq) (((rb_iseq_t*)DATA_PTR(iseq))->location.absolute_path) |
#define | NEW_ISEQVAL(node, name, type, line_no) new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no)) |
#define | NEW_CHILD_ISEQVAL(node, name, type, line_no) new_child_iseq(iseq, (node), rb_fstring(name), iseq->self, (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 | ADD_INSN1(seq, line, insn, op1) |
#define | ADD_INSNL(seq, line, insn, label) ADD_INSN1(seq, line, insn, 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), (VALUE)Qfalse, (VALUE)INT2FIX(0)) |
#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), (VALUE)Qfalse, (VALUE)INT2FIX(VM_CALL_FCALL)) |
#define | ADD_CALL_WITH_BLOCK(seq, line, id, argc, block) ADD_SEND_R((seq), (line), (id), (argc), (block), (VALUE)INT2FIX(VM_CALL_FCALL)) |
#define | ADD_SEND_R(seq, line, id, argc, block, flag) |
#define | ADD_TRACE(seq, line, event) |
#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 | ADD_CATCH_ENTRY(type, ls, le, iseqv, lc) |
#define | COMPILE(anchor, desc, node) |
#define | COMPILE_POPED(anchor, desc, node) |
#define | COMPILE_(anchor, desc, node, poped) |
#define | OPERAND_AT(insn, idx) (((INSN*)(insn))->operands[(idx)]) |
#define | INSN_OF(insn) (((INSN*)(insn))->insn_id) |
#define | COMPILE_ERROR(strs) |
#define | ERROR_ARGS ruby_sourcefile, nd_line(node), |
#define | COMPILE_OK 1 |
#define | COMPILE_NG 0 |
#define | DECL_ANCHOR(name) LINK_ANCHOR *name, name##_body__ = {{0,},} |
#define | INIT_ANCHOR(name) (name##_body__.last = &name##_body__.anchor, name = &name##_body__) |
#define | hide_obj(obj) do {OBJ_FREEZE(obj); RBASIC_CLEAR_CLASS(obj);} while (0) |
#define | ISEQ_ARG |
#define | ISEQ_ARG_DECLARE |
#define | ruby_sourcefile RSTRING_PTR(iseq->location.path) |
#define | PADDING_SIZE_MAX 0 |
#define | SP_INSN(opt) insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt)) |
#define | MEMORY(v) |
#define | defined_expr defined_expr0 |
#define | BUFSIZE 0x100 |
#define | rb_intern(str) rb_intern_const(str) |
#define | CHECK_ARRAY(v) rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
#define | CHECK_STRING(v) rb_convert_type((v), T_STRING, "String", "to_str") |
#define | CHECK_SYMBOL(v) rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
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 |
Enumerations | |
enum | compile_array_type_t { COMPILE_ARRAY_TYPE_ARRAY, COMPILE_ARRAY_TYPE_HASH, COMPILE_ARRAY_TYPE_ARGS } |
Variables | |
static const struct st_hash_type | cdhash_type |
#define ADD_ADJUST | ( | seq, | |
line, | |||
label | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) new_adjust_body(iseq, (label), (line))) |
Definition at line 241 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 244 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_CALL | ( | seq, | |
line, | |||
id, | |||
argc | |||
) | ADD_SEND_R((seq), (line), (id), (argc), (VALUE)Qfalse, (VALUE)INT2FIX(VM_CALL_FCALL)) |
Definition at line 210 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_CALL_RECEIVER | ( | seq, | |
line | |||
) | ADD_INSN((seq), (line), putself) |
Definition at line 207 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)) |
Definition at line 213 of file compile.c.
Referenced by build_postexe_iseq(), and iseq_compile_each().
Definition at line 247 of file compile.c.
Referenced by iseq_build_from_ary_exception(), 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 184 of file compile.c.
Referenced by compile_array_(), compile_colon2(), compile_massign(), compile_massign_lhs(), compile_massign_opt(), defined_expr(), iseq_compile_each(), iseq_set_arguments(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define ADD_INSN1 | ( | seq, | |
line, | |||
insn, | |||
op1 | |||
) |
Definition at line 188 of file compile.c.
Referenced by build_postexe_iseq(), compile_array_(), compile_colon2(), compile_cpath(), compile_dstr(), compile_dstr_fragments(), compile_massign_lhs(), defined_expr(), iseq_compile_each(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define ADD_INSN2 | ( | seq, | |
line, | |||
insn, | |||
op1, | |||
op2 | |||
) |
Definition at line 195 of file compile.c.
Referenced by compile_dregx(), compile_massign(), iseq_compile_each(), and rb_iseq_compile_node().
#define ADD_INSN3 | ( | seq, | |
line, | |||
insn, | |||
op1, | |||
op2, | |||
op3 | |||
) |
Definition at line 199 of file compile.c.
Referenced by defined_expr(), and iseq_compile_each().
#define ADD_INSNL | ( | seq, | |
line, | |||
insn, | |||
label | |||
) | ADD_INSN1(seq, line, insn, label) |
Definition at line 193 of file compile.c.
Referenced by compile_branch_condition(), defined_expr(), iseq_compile_each(), and when_vals().
#define ADD_LABEL | ( | seq, | |
label | |||
) | ADD_ELEM((seq), (LINK_ELEMENT *) (label)) |
Definition at line 235 of file compile.c.
Referenced by add_ensure_iseq(), compile_branch_condition(), 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), (VALUE)Qfalse, (VALUE)INT2FIX(0)) |
Definition at line 204 of file compile.c.
Referenced by compile_array_(), and iseq_compile_each().
Definition at line 216 of file compile.c.
Referenced by iseq_compile_each().
#define ADD_SEQ | ( | seq1, | |
seq2 | |||
) | APPEND_LIST((seq1), (seq2)) |
Definition at line 180 of file compile.c.
Referenced by add_ensure_iseq(), compile_massign(), compile_massign_lhs(), iseq_compile_each(), and setup_args().
#define ADD_TRACE | ( | seq, | |
line, | |||
event | |||
) |
Definition at line 221 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)) |
#define CHECK_ARRAY | ( | v | ) | rb_convert_type((v), T_ARRAY, "Array", "to_ary") |
Definition at line 5890 of file compile.c.
Referenced by rb_iseq_build_from_ary().
#define CHECK_STRING | ( | v | ) | rb_convert_type((v), T_STRING, "String", "to_str") |
#define CHECK_SYMBOL | ( | v | ) | rb_convert_type((v), T_SYMBOL, "Symbol", "to_sym") |
Definition at line 5892 of file compile.c.
Referenced by rb_iseq_build_from_ary().
#define COMPILE | ( | anchor, | |
desc, | |||
node | |||
) |
Definition at line 254 of file compile.c.
Referenced by compile_array_(), compile_branch_condition(), compile_colon2(), compile_cpath(), compile_dstr_fragments(), compile_massign(), compile_massign_opt(), defined_expr(), iseq_compile_each(), iseq_set_arguments(), rb_iseq_compile_node(), setup_args(), and when_vals().
#define COMPILE_ | ( | anchor, | |
desc, | |||
node, | |||
poped | |||
) |
Definition at line 264 of file compile.c.
Referenced by compile_array_(), and iseq_compile_each().
#define compile_debug CPDEBUG |
Definition at line 95 of file compile.c.
Referenced by iseq_setup(), and verify_list().
#define COMPILE_ERROR | ( | strs | ) |
Definition at line 275 of file compile.c.
Referenced by iseq_compile_each(), and validate_label().
#define COMPILE_NG 0 |
Definition at line 291 of file compile.c.
Referenced by iseq_compile_each().
#define COMPILE_OK 1 |
Definition at line 290 of file compile.c.
Referenced by compile_branch_condition(), compile_colon2(), compile_dregx(), compile_dstr(), compile_dstr_fragments(), compile_massign(), compile_massign_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_specialized_instruction(), and rb_iseq_translate_threaded_code().
#define COMPILE_POPED | ( | anchor, | |
desc, | |||
node | |||
) |
Definition at line 259 of file compile.c.
Referenced by add_ensure_iseq(), compile_massign_lhs(), compile_massign_opt(), iseq_compile_each(), iseq_set_arguments(), and rb_iseq_compile_node().
#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 91 of file compile.c.
Referenced by compile_array_().
#define debug_node_end | ( | ) | ((void)0) |
Definition at line 152 of file compile.c.
Referenced by iseq_compile_each().
#define debug_node_start | ( | node | ) | ((void)0) |
Definition at line 151 of file compile.c.
Referenced by iseq_compile_each().
Definition at line 146 of file compile.c.
Referenced by compile_colon2(), and iseq_compile_each().
#define debugp_param | ( | header, | |
value | |||
) | r_value(value) |
Definition at line 150 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 159 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, name##_body__ = {{0,},} |
Definition at line 296 of file compile.c.
Referenced by add_ensure_iseq(), compile_array_(), compile_massign(), compile_massign_lhs(), iseq_compile_each(), rb_iseq_build_from_ary(), rb_iseq_compile_node(), and setup_args().
#define defined_expr defined_expr0 |
Definition at line 2850 of file compile.c.
Referenced by defined_expr(), and iseq_compile_each().
#define ERROR_ARGS ruby_sourcefile, nd_line(node), |
Definition at line 287 of file compile.c.
Referenced by iseq_compile_each(), and rb_iseq_compile_node().
#define FIXNUM_INC | ( | n, | |
i | |||
) | ((n)+(INT2FIX(i)&~FIXNUM_FLAG)) |
Definition at line 22 of file compile.c.
Referenced by iseq_compile_each().
#define hide_obj | ( | obj | ) | do {OBJ_FREEZE(obj); RBASIC_CLEAR_CLASS(obj);} while (0) |
Definition at line 301 of file compile.c.
Referenced by iseq_set_sequence().
Definition at line 298 of file compile.c.
Referenced by add_ensure_iseq(), compile_array_(), compile_massign(), compile_massign_lhs(), iseq_compile_each(), rb_iseq_build_from_ary(), rb_iseq_compile_node(), and setup_args().
#define INSN_OF | ( | insn | ) | (((INSN*)(insn))->insn_id) |
Definition at line 271 of file compile.c.
Referenced by iseq_compile_each().
Definition at line 170 of file compile.c.
Referenced by new_child_iseq().
Definition at line 167 of file compile.c.
Referenced by new_child_iseq().
#define MEMORY | ( | v | ) |
Referenced by compile_massign_opt().
#define NEW_CHILD_ISEQVAL | ( | node, | |
name, | |||
type, | |||
line_no | |||
) | new_child_iseq(iseq, (node), rb_fstring(name), iseq->self, (type), (line_no)) |
Definition at line 176 of file compile.c.
Referenced by build_postexe_iseq(), and iseq_compile_each().
#define NEW_ISEQVAL | ( | node, | |
name, | |||
type, | |||
line_no | |||
) | new_child_iseq(iseq, (node), rb_fstring(name), 0, (type), (line_no)) |
Definition at line 173 of file compile.c.
Referenced by iseq_compile_each().
#define NEW_LABEL | ( | l | ) | new_label_body(iseq, (l)) |
Definition at line 165 of file compile.c.
Referenced by add_ensure_iseq(), compile_branch_condition(), 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 268 of file compile.c.
Referenced by get_destination_insn(), insn_data_to_s_detail(), iseq_compile_each(), iseq_peephole_optimize(), and iseq_specialized_instruction().
#define PADDING_SIZE_MAX 0 |
Definition at line 606 of file compile.c.
Referenced by compile_data_alloc().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by compile_array_(), get_exception_sym2type(), insn_make_insn_table(), iseq_build_from_ary_body(), and iseq_compile_each().
#define ruby_sourcefile RSTRING_PTR(iseq->location.path) |
Definition at line 422 of file compile.c.
Referenced by validate_label().
#define SP_INSN | ( | opt | ) | insn_set_specialized_instruction(iseq, iobj, BIN(opt_##opt)) |
Referenced by iseq_specialized_instruction().
typedef struct iseq_adjust_data ADJUST |
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 |
|
static |
Definition at line 387 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
Referenced by compile_massign_lhs(), and iseq_build_from_ary_body().
|
static |
Definition at line 3115 of file compile.c.
References add_ensure_range(), ADD_LABEL, ADD_SEQ, rb_iseq_struct::compile_data, COMPILE_POPED, DECL_ANCHOR, iseq_compile_data_ensure_node_stack::ensure_node, iseq_compile_data::ensure_node_stack, iseq_compile_data_ensure_node_stack::erange, INIT_ANCHOR, NEW_LABEL, and iseq_compile_data_ensure_node_stack::prev.
Referenced by iseq_compile_each().
|
static |
Definition at line 3097 of file compile.c.
References compile_data_alloc(), ensure_range::end, ne, and ensure_range::next.
Referenced by add_ensure_iseq().
|
static |
Definition at line 399 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
|
static |
Definition at line 822 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 3234 of file compile.c.
References ADD_CALL_WITH_BLOCK, ADD_INSN1, argc, ID2SYM, id_core_set_postexe, INT2FIX, iseq_set_local_table(), make_name_for_block(), nd_line, NEW_CHILD_ISEQVAL, rb_iseq_struct::parent_iseq, Qnil, and VM_SPECIAL_OBJECT_VMCORE.
Referenced by iseq_compile_each().
|
static |
Definition at line 5469 of file compile.c.
References iseq_insn_data::insn_id, and iseq_insn_data::operands.
Referenced by iseq_set_sequence().
Definition at line 2569 of file compile.c.
References FIXABLE, LONG2FIX, nd_type, NODE_LIT, NODE_STR, 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 1392 of file compile.c.
References BUILTIN_TYPE, rb_eql(), rb_str_hash_cmp(), SPECIAL_CONST_P, T_STRING, and val.
|
static |
Definition at line 1408 of file compile.c.
References FIX2LONG, rb_hash(), rb_str_hash(), RB_TYPE_P, SPECIAL_CONST_P, and T_STRING.
Definition at line 1430 of file compile.c.
References cdhash_set_label_struct::hash, INT2FIX, key, cdhash_set_label_struct::len, cdhash_set_label_struct::pos, iseq_label_data::position, rb_hash_aset(), ST_CONTINUE, and val.
Referenced by iseq_set_sequence().
Definition at line 5893 of file compile.c.
References NUM2LONG.
Referenced by rb_iseq_build_from_ary().
|
static |
Definition at line 2563 of file compile.c.
References compile_array_(), iseq_catch_table_entry::iseq, and type.
Referenced by iseq_compile_each(), and setup_args().
|
static |
Definition at line 2415 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_SEND, APPEND_LIST(), COMPILE, COMPILE_, COMPILE_ARRAY_TYPE_ARGS, COMPILE_ARRAY_TYPE_ARRAY, COMPILE_ARRAY_TYPE_HASH, CPDEBUG, DECL_ANCHOR, ID2SYM, id_core_hash_from_ary, id_core_hash_merge_ary, id_core_hash_merge_kwd, id_core_hash_merge_ptr, INIT_ANCHOR, INT2FIX, iseq_catch_table_entry::iseq, iseq_add_mark_object_compile_time(), max(), nd_line, nd_type, NODE_ARRAY, NODE_LIT, NODE_ZARRAY, OBJ_FREEZE, rb_ary_push(), rb_ary_tmp_new(), rb_bug(), rb_intern, ruby_node_name(), type, and VM_SPECIAL_OBJECT_VMCORE.
Referenced by compile_array(), and iseq_compile_each().
|
static |
Definition at line 2364 of file compile.c.
References ADD_INSNL, ADD_LABEL, COMPILE, COMPILE_OK, cond, iseq_catch_table_entry::iseq, nd_line, nd_type, NEW_LABEL, NODE_AND, NODE_FALSE, NODE_LIT, NODE_NIL, NODE_OR, NODE_STR, and NODE_TRUE.
Referenced by iseq_compile_each().
|
static |
Definition at line 2803 of file compile.c.
References ADD_INSN, ADD_INSN1, COMPILE, COMPILE_OK, debugi, ID2SYM, iseq_catch_table_entry::iseq, nd_line, nd_type, NODE_COLON2, NODE_COLON3, NODE_CONST, and rb_cObject.
Referenced by iseq_compile_each().
|
static |
Definition at line 2830 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 636 of file compile.c.
References ALLOC_N, iseq_compile_data_storage::buff, rb_iseq_struct::compile_data, iseq_compile_data_storage::next, PADDING_SIZE_MAX, iseq_compile_data_storage::pos, size, iseq_compile_data_storage::size, and iseq_compile_data::storage_current.
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(), new_callinfo(), new_insn_body(), and new_insn_send().
Definition at line 690 of file compile.c.
References compile_data_alloc().
Referenced by new_adjust_body().
Definition at line 678 of file compile.c.
References compile_data_alloc().
Referenced by new_insn_core().
Definition at line 684 of file compile.c.
References compile_data_alloc().
Referenced by new_label_body().
|
static |
Definition at line 2355 of file compile.c.
References ADD_INSN2, cnt, compile_dstr_fragments(), COMPILE_OK, INT2FIX, iseq_catch_table_entry::iseq, and nd_line.
Referenced by iseq_compile_each().
|
static |
Definition at line 2346 of file compile.c.
References ADD_INSN1, cnt, compile_dstr_fragments(), COMPILE_OK, INT2FIX, iseq_catch_table_entry::iseq, and nd_line.
Referenced by iseq_compile_each().
|
static |
Definition at line 2314 of file compile.c.
References ADD_INSN1, cnt, COMPILE, COMPILE_OK, debugp_param, list, nd_line, nd_type, NIL_P, NODE_STR, rb_fstring(), RB_TYPE_P, and T_STRING.
Referenced by compile_dregx(), and compile_dstr().
|
static |
Definition at line 2745 of file compile.c.
References ADD_INSN, ADD_INSN2, ADD_SEQ, COMPILE, compile_massign_lhs(), compile_massign_opt(), COMPILE_OK, DECL_ANCHOR, INIT_ANCHOR, INT2FIX, iseq_catch_table_entry::iseq, nd_line, nd_type, and NODE_POSTARG.
Referenced by iseq_compile_each().
|
static |
Definition at line 2628 of file compile.c.
References ADD_ELEM(), ADD_INSN, ADD_INSN1, ADD_SEQ, rb_call_info_struct::argc, COMPILE_OK, COMPILE_POPED, DECL_ANCHOR, FIRST_ELEMENT(), INIT_ANCHOR, INT2FIX, nd_line, nd_type, NODE_ATTRASGN, NODE_MASGN, iseq_insn_data::operands, rb_call_info_struct::orig_argc, POP_ELEMENT(), and REMOVE_ELEM().
Referenced by compile_massign(), and compile_massign_opt_lhs().
|
static |
Definition at line 2680 of file compile.c.
References ADD_INSN, COMPILE, compile_massign_opt_lhs(), COMPILE_POPED, iseq_catch_table_entry::iseq, 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 2671 of file compile.c.
References compile_massign_lhs(), and iseq_catch_table_entry::iseq.
Referenced by compile_massign_opt().
|
static |
Definition at line 2852 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_INSN3, ADD_INSNL, 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, FALSE, RNode::id, ID2SYM, INT2FIX, iseq_catch_table_entry::iseq, nd_line, nd_type, NEW_LABEL, 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, Qfalse, Qtrue, rb_cObject, rb_is_const_id(), rb_iseq_defined_string(), TRUE, and type.
|
static |
Definition at line 5566 of file compile.c.
References FIX2LONG, insn_data_length(), insn_data_to_s_detail(), iseq_adjust_data::label, iseq_label_data::label_no, iseq_insn_data::line_no, link(), rb_eSyntaxError, rb_raise(), and StringValueCStr.
Referenced by iseq_set_sequence(), and iseq_setup().
|
static |
Definition at line 751 of file compile.c.
References iseq_link_anchor::anchor, and iseq_link_element::next.
Referenced by compile_massign_lhs(), iseq_insns_unification(), iseq_optimize(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), and iseq_setup().
|
static |
Definition at line 1802 of file compile.c.
References iseq_label_data::link, list, iseq_link_element::next, and OPERAND_AT.
Referenced by iseq_peephole_optimize().
Definition at line 1160 of file compile.c.
References get_dyna_var_idx_at_raw(), level, rb_iseq_struct::local_size, rb_iseq_struct::parent_iseq, and rb_bug().
Referenced by iseq_compile_each().
Definition at line 1135 of file compile.c.
References rb_iseq_struct::local_table, and rb_iseq_struct::local_table_size.
Referenced by get_dyna_var_idx(), get_local_var_idx(), and iseq_set_arguments().
Definition at line 5646 of file compile.c.
References ID2SYM, rb_eSyntaxError, rb_inspect(), rb_intern, rb_raise(), StringValuePtr, sym, and sym_inspect().
Referenced by iseq_build_from_ary_exception().
Definition at line 1148 of file compile.c.
References get_dyna_var_idx_at_raw(), rb_iseq_struct::local_iseq, and rb_bug().
Referenced by iseq_compile_each().
|
static |
Definition at line 1124 of file compile.c.
References rb_iseq_struct::local_iseq, and rb_iseq_struct::parent_iseq.
Referenced by iseq_compile_each().
|
static |
Definition at line 1818 of file compile.c.
References iseq_insn_data::link, list, and iseq_link_element::next.
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 1832 of file compile.c.
References iseq_insn_data::link, list, and iseq_link_element::prev.
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 699 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by iseq_peephole_optimize().
|
static |
Definition at line 843 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 setup_args().
|
static |
Definition at line 5463 of file compile.c.
References iseq_insn_data::insn_id.
Referenced by dump_disasm_list(), and iseq_set_sequence().
Definition at line 5494 of file compile.c.
References FIX2INT, rb_global_entry::id, iseq_insn_data::insn_id, iseq_label_data::label_no, rb_call_info_struct::mid, OPERAND_AT, iseq_insn_data::operands, opobj_inspect(), rb_call_info_struct::orig_argc, Qnil, rb_eSyntaxError, rb_id2name(), rb_raise(), rb_sprintf(), rb_str_cat2(), rb_str_catf(), rb_str_concat(), rb_iseq_struct::self, type, and val.
Referenced by dump_disasm_list().
|
static |
Definition at line 5714 of file compile.c.
References ID2SYM, rb_intern, st_init_numtable(), and st_insert().
Referenced by iseq_build_from_ary_body().
Definition at line 1965 of file compile.c.
References compile_data_alloc(), COMPILE_OK, idEq, iseq_insn_data::insn_id, iseq_catch_table_entry::iseq, new_callinfo(), iseq_insn_data::operand_size, iseq_insn_data::operands, and rb_bug().
Definition at line 414 of file compile.c.
References COMPILE_OK, rb_iseq_add_mark_object(), and SPECIAL_CONST_P.
Referenced by iseq_build_from_ary_body(), iseq_build_load_iseq(), iseq_compile_each(), iseq_set_exception_table(), iseq_set_sequence(), and new_child_iseq().
Definition at line 425 of file compile.c.
References rb_iseq_struct::compile_data, COMPILE_OK, iseq_compile_data::mark_ary, rb_ary_push(), and SPECIAL_CONST_P.
Referenced by compile_array_(), and iseq_build_from_ary_body().
|
static |
Definition at line 5745 of file compile.c.
References ADD_ELEM(), ADD_LABEL, argc, argv, compile_data_alloc(), COMPILE_OK, FIX2INT, FIXNUM_P, ID2SYM, insn_make_insn_table(), rb_iseq_struct::is_size, iseq_add_mark_object(), iseq_add_mark_object_compile_time(), iseq_build_load_iseq(), iseq_setup(), rb_iseq_struct::location, new_callinfo(), new_insn_core(), NIL_P, NUM2INT, NUM2ULONG, rb_iseq_location_struct::path, Qnil, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, RARRAY_LENINT, rb_ary_dup(), rb_ary_entry(), rb_ary_store(), rb_compile_error(), rb_convert_type(), rb_eSyntaxError, rb_eTypeError, RB_GC_GUARD, rb_global_entry(), rb_hash_aref(), rb_inspect(), rb_intern, rb_raise(), RB_TYPE_P, register_label(), RSTRING_PTR, st_data_t, st_free_table(), st_lookup(), sym, SYM2ID, SYMBOL_P, T_ARRAY, T_SYMBOL, and validate_labels().
Referenced by rb_iseq_build_from_ary().
|
static |
Definition at line 5676 of file compile.c.
References ADD_CATCH_ENTRY, COMPILE_OK, get_exception_sym2type(), NUM2INT, Qnil, RARRAY_AREF, RARRAY_CONST_PTR, RARRAY_LEN, rb_convert_type(), rb_eSyntaxError, RB_GC_GUARD, rb_iseq_load(), rb_raise(), register_label(), rb_iseq_struct::self, T_ARRAY, and type.
Referenced by rb_iseq_build_from_ary().
Definition at line 5728 of file compile.c.
References CLASS_OF, iseq_add_mark_object(), Qnil, rb_cISeq, rb_eSyntaxError, rb_iseq_load(), rb_raise(), RB_TYPE_P, rb_iseq_struct::self, and T_ARRAY.
Referenced by iseq_build_from_ary_body().
|
static |
compile each node
self: InstructionSequence node: Ruby compiled node poped: This node will be poped
Definition at line 3253 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_INSN, ADD_INSN1, ADD_INSN2, ADD_INSN3, ADD_INSNL, ADD_LABEL, ADD_SEND, ADD_SEND_R, ADD_SEQ, ADD_TRACE, rb_iseq_struct::arg_keyword, rb_iseq_struct::arg_keyword_table, rb_iseq_struct::arg_keywords, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, argc, rb_iseq_struct::argc, ensure_range::begin, build_postexe_iseq(), cdhash_type, cnt, COMPILE, COMPILE_, compile_array(), compile_array_(), COMPILE_ARRAY_TYPE_ARRAY, COMPILE_ARRAY_TYPE_HASH, compile_branch_condition(), compile_colon2(), compile_cpath(), rb_iseq_struct::compile_data, compile_dregx(), compile_dstr(), COMPILE_ERROR, compile_massign(), COMPILE_NG, COMPILE_OK, COMPILE_POPED, CONST_ID, iseq_compile_data::current_block, debug_node_end, debug_node_start, debugi, debugp_param, debugs, DECL_ANCHOR, DEFAULT_SPECIAL_VAR_COUNT, DEFINED_CONST, defined_expr, DEFINED_NIL, ensure_range::end, iseq_compile_data::end_label, iseq_compile_data::ensure_node_stack, iseq_compile_data_ensure_node_stack::erange, ERROR_ARGS, FIX2INT, FIXNUM_INC, RNode::flags, rb_iseq_struct::flip_cnt, get_dyna_var_idx(), get_local_var_idx(), get_lvar_level(), head, 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, idAREF, idASET, idBackquote, idEqTilde, INIT_ANCHOR, rb_compile_option_struct::inline_const_cache, INSN_OF, INT2FIX, rb_iseq_struct::is_size, iseq_add_mark_object(), key, rb_iseq_location_struct::label, iseq_link_anchor::last, iseq_compile_data::last_line, level, list, LIST_SIZE_ZERO(), rb_iseq_struct::local_iseq, rb_iseq_struct::local_size, rb_iseq_struct::location, LONG2FIX, iseq_compile_data::loopval_popped, make_name_for_block(), nd_line, nd_type, new_callinfo(), NEW_CHILD_ISEQVAL, NEW_IFUNC, NEW_ISEQVAL, NEW_LABEL, NEW_NODE, 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_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, OPERAND_AT, iseq_compile_data::option, rb_iseq_struct::parent_iseq, POP_ELEMENT(), iseq_label_data::position, iseq_compile_data_ensure_node_stack::prev, push_ensure_entry(), Qfalse, Qtrue, Qundef, rb_bug(), rb_cObject, rb_eStandardError, rb_fstring(), rb_hash_new(), rb_hash_tbl_raw(), rb_id2name(), rb_id2str(), rb_intern, rb_is_const_id(), rb_iseq_defined_string(), rb_sprintf(), rb_str_concat(), rb_str_new2, iseq_compile_data::redo_label, RUBY_EVENT_LINE, RUBY_EVENT_RETURN, ruby_node_name(), setup_args(), rb_compile_option_struct::specialized_instruction, st_data_t, st_init_numtable(), st_insert(), st_lookup(), iseq_compile_data::start_label, SYM2ID, SYMBOL_P, rb_compile_option_struct::tailcall_optimization, st_table::type, type, rb_iseq_struct::type, RNode::u1, RNode::u2, RNode::u3, 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_SPECIAL_OBJECT_CBASE, VM_SPECIAL_OBJECT_CONST_BASE, VM_SPECIAL_OBJECT_VMCORE, and when_vals().
|
static |
Definition at line 2104 of file compile.c.
References COMPILE_OK, FIRST_ELEMENT(), id, if(), iseq_insn_data::insn_id, iseq_catch_table_entry::iseq, iseq_insn_data::link, list, iseq_link_element::next, iseq_link_element::prev, and iseq_link_element::type.
Referenced by iseq_setup().
|
static |
Definition at line 2036 of file compile.c.
References COMPILE_OK, FIRST_ELEMENT(), iseq_catch_table_entry::iseq, iseq_peephole_optimize(), iseq_specialized_instruction(), and list.
Referenced by iseq_setup().
|
static |
Definition at line 1846 of file compile.c.
References rb_call_info_struct::blockiseq, COMPILE_OK, rb_call_info_struct::flag, get_destination_insn(), get_next_insn(), get_prev_insn(), if(), INSERT_ELEM_NEXT(), iseq_insn_data::insn_id, iseq_catch_table_entry::iseq, iseq_insn_data::line_no, iseq_insn_data::link, list, new_insn_core(), OPERAND_AT, iseq_insn_data::operand_size, iseq_insn_data::operands, REMOVE_ELEM(), REPLACE_ELEM(), and VM_CALL_TAILCALL.
Referenced by iseq_optimize().
|
static |
Definition at line 1183 of file compile.c.
References ADD_INSN, ADD_LABEL, ALLOC_N, rb_iseq_struct::arg_block, rb_iseq_struct::arg_keyword, rb_iseq_struct::arg_keyword_check, rb_iseq_struct::arg_keyword_required, rb_iseq_struct::arg_keyword_table, rb_iseq_struct::arg_keywords, rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_iseq_struct::arg_size, rb_iseq_struct::argc, rb_args_info::block_arg, COMPILE, COMPILE_OK, COMPILE_POPED, debugs, rb_args_info::first_post_arg, FIX2INT, get_dyna_var_idx_at_raw(), INT2FIX, rb_args_info::kw_args, rb_args_info::kw_rest_arg, list, MEMCPY, nd_line, nd_type, NEW_LABEL, NODE_ARGS, rb_args_info::opt_args, rb_args_info::post_args_num, rb_args_info::post_init, rb_args_info::pre_args_num, rb_args_info::pre_init, RARRAY_AREF, RARRAY_CONST_PTR, rb_ary_clear(), rb_ary_concat(), rb_ary_push(), rb_ary_tmp_new(), rb_bug(), rb_args_info::rest_arg, ruby_node_name(), and rb_iseq_struct::type.
Referenced by rb_iseq_compile_node().
|
static |
Definition at line 1111 of file compile.c.
References ALLOC_N, COMPILE_OK, CONST_ID, rb_iseq_struct::local_size, rb_iseq_struct::local_table, and rb_iseq_struct::local_table_size.
Referenced by rb_iseq_compile_node().
|
static |
Definition at line 1731 of file compile.c.
References ALLOC_N, catch_type(), iseq_catch_table_entry::CATCH_TYPE_BREAK, iseq_catch_table_entry::CATCH_TYPE_NEXT, iseq_catch_table_entry::CATCH_TYPE_RESCUE, COMPILE_OK, iseq_catch_table_entry::cont, iseq_catch_table_entry::end, iseq_catch_table_entry::iseq, iseq_add_mark_object(), label_get_position(), label_get_sp(), RARRAY_CONST_PTR, RARRAY_LEN, RB_OBJ_WRITE, iseq_catch_table_entry::sp, iseq_catch_table_entry::start, and iseq_catch_table_entry::type.
Referenced by iseq_setup().
Definition at line 1360 of file compile.c.
References ALLOC_N, COMPILE_OK, debugs, rb_iseq_struct::local_size, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, MEMCPY, and size.
Referenced by build_postexe_iseq(), and rb_iseq_compile_node().
|
static |
Definition at line 1788 of file compile.c.
References COMPILE_OK, iseq_catch_table_entry::iseq, and label_get_position().
Referenced by iseq_setup().
|
static |
ruby insn object list -> raw instruction sequence
Definition at line 1442 of file compile.c.
References ALLOC_N, rb_call_info_struct::argc, rb_call_info_struct::aux, calc_sp_depth(), rb_iseq_struct::callinfo_entries, rb_iseq_struct::callinfo_size, cdhash_set_label_i(), COMPILE_OK, dump_disasm_list(), FIRST_ELEMENT(), FIX2INT, GetISeqPtr, cdhash_set_label_struct::hash, hide_obj, if(), rb_call_info_struct::index, insn_data_length(), iseq_insn_data::insn_id, rb_iseq_struct::is_entries, rb_iseq_struct::is_size, rb_iseq_struct::iseq, iseq_add_mark_object(), rb_iseq_struct::iseq_size, iseq_adjust_data::label, cdhash_set_label_struct::len, rb_iseq_struct::line_info_size, rb_iseq_struct::line_info_table, iseq_line_info_entry::line_no, iseq_insn_data::line_no, iseq_adjust_data::line_no, list, rb_iseq_struct::location, MEMZERO, iseq_insn_data::operand_size, iseq_insn_data::operands, rb_iseq_location_struct::path, cdhash_set_label_struct::pos, iseq_label_data::position, iseq_line_info_entry::position, rb_bug(), rb_compile_error(), rb_hash_foreach(), RSTRING_PTR, ruby_xrealloc(), iseq_label_data::set, iseq_label_data::sp, rb_iseq_struct::stack_max, SYM2ID, TRUE, type, UNLIKELY, and xfree().
Referenced by iseq_setup().
|
static |
Definition at line 2218 of file compile.c.
References COMPILE_OK, FIRST_ELEMENT(), iseq_insn_data::insn_id, iseq_catch_table_entry::iseq, iseq_insn_data::line_no, list, new_insn_body(), rb_compile_error(), REMOVE_ELEM(), REPLACE_ELEM(), and RSTRING_PTR.
Referenced by iseq_setup().
|
static |
Definition at line 1059 of file compile.c.
References rb_iseq_struct::compile_data, compile_debug, debugs, dump_disasm_list(), FIRST_ELEMENT(), rb_compile_option_struct::instructions_unification, iseq_insns_unification(), iseq_optimize(), iseq_set_exception_table(), iseq_set_optargs_table(), iseq_set_sequence(), iseq_set_sequence_stackcaching(), iseq_compile_data::option, rb_iseq_disasm(), rb_iseq_translate_threaded_code(), rb_iseq_struct::self, rb_compile_option_struct::stack_caching, and StringValueCStr.
Referenced by iseq_build_from_ary_body(), and rb_iseq_compile_node().
Definition at line 1985 of file compile.c.
References rb_call_info_struct::blockiseq, COMPILE_OK, div, eq(), rb_call_info_struct::flag, ge, gt, idAREF, idASET, idDIV, idEmptyP, idEq, idGE, idGT, idLE, idLT, idLTLT, idMINUS, idMOD, idMULT, idNeq, idNot, idPLUS, iseq_insn_data::insn_id, le, lt, rb_call_info_struct::mid, mod, mult(), OPERAND_AT, rb_call_info_struct::orig_argc, size, SP_INSN, and VM_CALL_ARGS_SKIP_SETUP.
Referenced by iseq_optimize().
|
static |
Definition at line 1719 of file compile.c.
References iseq_label_data::position.
Referenced by iseq_set_exception_table(), and iseq_set_optargs_table().
|
static |
Definition at line 1725 of file compile.c.
References iseq_label_data::sp.
Referenced by iseq_set_exception_table().
|
static |
Definition at line 804 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 3063 of file compile.c.
References iseq_catch_table_entry::iseq, rb_iseq_location_struct::label, level, rb_iseq_struct::local_iseq, rb_iseq_struct::location, rb_iseq_struct::parent_iseq, PRIsVALUE, rb_sprintf(), and rb_iseq_struct::type.
Referenced by build_postexe_iseq(), and iseq_compile_each().
Definition at line 961 of file compile.c.
References compile_data_alloc_adjust(), iseq_adjust_data::label, iseq_adjust_data::line_no, iseq_adjust_data::link, iseq_link_element::next, and iseq_link_element::type.
|
static |
Definition at line 1007 of file compile.c.
References argc, rb_call_info_struct::argc, rb_call_info_struct::aux, rb_call_info_struct::blockiseq, rb_call_info_struct::blockptr, rb_call_info_struct::call, rb_iseq_struct::callinfo_size, rb_call_info_struct::class_serial, compile_data_alloc(), rb_call_info_struct::flag, GetISeqPtr, rb_call_info_struct::index, rb_call_info_struct::method_state, rb_call_info_struct::mid, rb_call_info_struct::orig_argc, Qundef, rb_call_info_struct::recv, VM_CALL_ARGS_BLOCKARG, VM_CALL_ARGS_SKIP_SETUP, and VM_CALL_ARGS_SPLAT.
Referenced by insn_set_specialized_instruction(), iseq_build_from_ary_body(), iseq_compile_each(), and new_insn_send().
|
static |
Definition at line 1044 of file compile.c.
References rb_iseq_struct::compile_data, debugs, INT2FIX, iseq_absolute_path, iseq_add_mark_object(), iseq_path, name, iseq_compile_data::option, rb_iseq_new_with_opt(), rb_iseq_struct::self, and type.
Definition at line 989 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 972 of file compile.c.
References argc, argv, compile_data_alloc_insn(), iseq_insn_data::insn_id, 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_peephole_optimize(), new_insn_body(), and new_insn_send().
|
static |
Definition at line 1036 of file compile.c.
References argc, compile_data_alloc(), FIX2INT, new_callinfo(), new_insn_core(), and SYM2ID.
Definition at line 947 of file compile.c.
References rb_iseq_struct::compile_data, compile_data_alloc_label(), iseq_label_data::label_no, iseq_compile_data::label_no, iseq_label_data::link, iseq_link_element::next, iseq_label_data::sc_state, iseq_label_data::sp, and iseq_link_element::type.
Definition at line 5475 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 765 of file compile.c.
References iseq_link_element::next, iseq_link_element::prev, and verify_list().
Referenced by compile_massign_lhs(), and iseq_compile_each().
|
static |
Definition at line 3086 of file compile.c.
References iseq_compile_data_ensure_node_stack::ensure_node, iseq_compile_data_ensure_node_stack::erange, iseq_catch_table_entry::iseq, and iseq_compile_data_ensure_node_stack::prev.
Referenced by iseq_compile_each().
int rb_dvar_defined | ( | ID | id | ) |
Definition at line 5970 of file compile.c.
References rb_thread_struct::base_block, GET_THREAD(), rb_block_struct::iseq, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, rb_iseq_struct::parent_iseq, and rb_iseq_struct::type.
Referenced by dvar_defined_gen().
VALUE rb_insns_name_array | ( | void | ) |
Definition at line 5618 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().
VALUE rb_iseq_build_from_ary | ( | rb_iseq_t * | iseq, |
VALUE | locals, | ||
VALUE | args, | ||
VALUE | exception, | ||
VALUE | body | ||
) |
Definition at line 5896 of file compile.c.
References ALLOC_N, rb_iseq_struct::arg_block, rb_iseq_struct::arg_opt_table, rb_iseq_struct::arg_opts, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_simple, rb_iseq_struct::arg_size, argc, rb_iseq_struct::argc, CHECK_ARRAY, CHECK_INTEGER(), CHECK_SYMBOL, DECL_ANCHOR, FIX2INT, FIX2LONG, FIXNUM_P, INIT_ANCHOR, iseq_build_from_ary_body(), iseq_build_from_ary_exception(), rb_iseq_struct::local_size, rb_iseq_struct::local_table, rb_iseq_struct::local_table_size, NUM2INT, RARRAY_AREF, RARRAY_LEN, RARRAY_LENINT, rb_ary_entry(), register_label(), rb_iseq_struct::self, st_init_numtable(), and SYM2ID.
Referenced by iseq_load().
Definition at line 459 of file compile.c.
References ADD_CATCH_ENTRY, ADD_INSN, ADD_INSN1, ADD_INSN2, ADD_LABEL, ADD_TRACE, COMPILE, rb_iseq_struct::compile_data, COMPILE_POPED, DECL_ANCHOR, ensure_range::end, iseq_compile_data::end_label, ERROR_ARGS, rb_iseq_location_struct::first_lineno, FIX2INT, GetISeqPtr, INIT_ANCHOR, INT2FIX, iseq_set_arguments(), iseq_set_exception_local_table(), iseq_set_local_table(), iseq_setup(), iseq_compile_data::last_line, rb_iseq_struct::location, nd_line, nd_type, NEW_LABEL, NODE_IFUNC, NODE_SCOPE, rb_bug(), rb_compile_error(), RUBY_EVENT_B_CALL, RUBY_EVENT_B_RETURN, RUBY_EVENT_CALL, RUBY_EVENT_CLASS, RUBY_EVENT_END, RUBY_EVENT_RETURN, iseq_compile_data::start_label, rb_iseq_struct::type, and validate_labels().
Referenced by rb_iseq_new_with_bopt_and_opt().
int rb_iseq_translate_threaded_code | ( | rb_iseq_t * | iseq | ) |
Definition at line 561 of file compile.c.
References ALLOC_N, COMPILE_OK, rb_iseq_struct::iseq, rb_iseq_struct::iseq_encoded, rb_iseq_struct::iseq_size, MEMCPY, and rb_vm_get_insns_address_table().
Referenced by iseq_setup(), and rb_iseq_build_for_ruby2cext().
int rb_local_defined | ( | ID | id | ) |
Definition at line 5995 of file compile.c.
References rb_thread_struct::base_block, GET_THREAD(), rb_block_struct::iseq, rb_iseq_struct::local_iseq, rb_iseq_struct::local_table, and rb_iseq_struct::local_table_size.
Referenced by local_id_gen().
int rb_parse_in_eval | ( | void | ) |
Definition at line 6014 of file compile.c.
References GET_THREAD(), and rb_thread_struct::parse_in_eval.
Referenced by parser_compile_string(), and rb_parser_compile_file_path().
int rb_parse_in_main | ( | void | ) |
Definition at line 6020 of file compile.c.
References GET_THREAD(), and rb_thread_struct::parse_in_eval.
Referenced by yyparse().
Definition at line 5629 of file compile.c.
References 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 742 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by compile_massign_lhs(), iseq_peephole_optimize(), and iseq_set_sequence_stackcaching().
|
static |
Definition at line 729 of file compile.c.
References iseq_link_element::next, and iseq_link_element::prev.
Referenced by iseq_peephole_optimize(), and iseq_set_sequence_stackcaching().
|
static |
Definition at line 3150 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_SEQ, argc, COMPILE, compile_array(), COMPILE_ARRAY_TYPE_ARGS, DECL_ANCHOR, INIT_ANCHOR, INSERT_LIST(), INT2FIX, LIST_SIZE_ZERO(), nd_line, nd_type, NODE_ARGSCAT, NODE_ARGSPUSH, NODE_ARRAY, NODE_BLOCK_PASS, NODE_SPLAT, Qfalse, rb_bug(), ruby_node_name(), VM_CALL_ARGS_BLOCKARG, and VM_CALL_ARGS_SPLAT.
Referenced by iseq_compile_each().
Definition at line 434 of file compile.c.
References COMPILE_ERROR, iseq_label_data::link, name, iseq_link_element::next, iseq_label_data::position, rb_id2name(), ruby_sourcefile, and ST_CONTINUE.
Referenced by validate_labels().
Definition at line 450 of file compile.c.
References NIL_P, rb_exc_raise(), st_data_t, st_foreach(), and validate_label().
Referenced by iseq_build_from_ary_body(), and rb_iseq_compile_node().
|
static |
Definition at line 352 of file compile.c.
References iseq_link_anchor::anchor, compile_debug, iseq_link_anchor::last, list, iseq_link_element::next, and rb_bug().
Referenced by ADD_ELEM(), APPEND_ELEM(), APPEND_LIST(), INSERT_LIST(), and POP_ELEMENT().
|
static |
Definition at line 2591 of file compile.c.
References ADD_INSN, ADD_INSN1, ADD_INSNL, case_when_optimizable_literal(), COMPILE, debugp_param, INT2FIX, iseq_catch_table_entry::iseq, nd_line, nd_type, NODE_STR, Qnil, Qundef, rb_compile_warning(), rb_fstring(), rb_hash_aset(), rb_hash_lookup, RSTRING_PTR, val, and VM_CHECKMATCH_TYPE_CASE.
Referenced by iseq_compile_each().
|
static |