iseq.h File Reference

Go to the source code of this file.

## Data Structures

struct | rb_compile_option_struct
struct | iseq_insn_info_entry
struct | iseq_catch_table_entry
struct | iseq_compile_data_storage
struct | iseq_compile_data

## Macros

#define | INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)

## Enumerations

enum | defined_type { DEFINED_IVAR = 1, DEFINED_IVAR2, DEFINED_GVAR, DEFINED_CVAR, DEFINED_CONST, DEFINED_METHOD, DEFINED_YIELD, DEFINED_REF, DEFINED_ZSUPER, DEFINED_FUNC }

## Functions

VALUE | rb_iseq_compile_node (VALUE self, NODE *node)
int | rb_iseq_translate_threaded_code (rb_iseq_t *iseq)
VALUE | rb_iseq_build_from_ary (rb_iseq_t *iseq, VALUE locals, VALUE args, VALUE exception, VALUE body)
VALUE | rb_iseq_load (VALUE data, VALUE parent, VALUE opt)
VALUE | rb_iseq_parameters (const rb_iseq_t *iseq, int is_proc)
struct st_table * | ruby_insn_make_insn_table (void)
rb_iseq_t * | rb_method_get_iseq (VALUE body)
rb_iseq_t * | rb_proc_get_iseq (VALUE proc, int *is_proc)

## Macro Definition Documentation

#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)

Definition at line 68 of file iseq.h.

Referenced by prepare_iseq_build().

## Enumeration Type Documentation

enum defined_type

Enumerator
DEFINED_IVAR |
DEFINED_IVAR2 |
DEFINED_GVAR |
DEFINED_CVAR |
DEFINED_CONST |
DEFINED_METHOD |
DEFINED_YIELD |
DEFINED_REF |
DEFINED_ZSUPER |
DEFINED_FUNC |

Definition at line 108 of file iseq.h.

## Function Documentation

VALUE rb_iseq_build_from_ary | ( | rb_iseq_t * | iseq,
|  | VALUE | locals,
|  | VALUE | args,
|  | VALUE | exception,
|  | VALUE | body
| ) |  |

Definition at line 5451 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, rb_iseq_struct::argc, CHECK_ARRAY, CHECK_INTEGER(), CHECK_SYMBOL, DECL_ANCHOR, FIX2INT, FIX2LONG, FIXNUM_P, i, 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_LEN, RARRAY_LENINT, RARRAY_PTR, rb_ary_entry(), register_label(), rb_iseq_struct::self, st_init_numtable, and SYM2ID.

Referenced by iseq_load().

VALUE rb_iseq_compile_node | ( | VALUE | self,
|  | NODE * | node
| ) |  |

Definition at line 462 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, 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::line_no, nd_line, nd_type, NEW_LABEL, NODE_SCOPE, rb_bug(), rb_compile_error(), 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().

VALUE rb_iseq_load | ( | VALUE | data,
|  | VALUE | parent,
|  | VALUE | opt
| ) |  |

Definition at line 532 of file iseq.c.

References iseq_load(), and rb_cISeq.

Referenced by iseq_build_from_ary_body(), and iseq_build_from_ary_exception().

VALUE rb_iseq_parameters | ( | const rb_iseq_t * | iseq,
|  | int | is_proc
| ) |  |

Definition at line 1376 of file iseq.c.

References rb_iseq_struct::arg_block, rb_iseq_struct::arg_post_len, rb_iseq_struct::arg_post_start, rb_iseq_struct::arg_rest, rb_iseq_struct::arg_size, rb_iseq_struct::argc, args, CONST_ID, i, ID2SYM, PARAM, PARAM_ID, PARAM_TYPE, Qnil, rb_ary_new2(), rb_ary_push(), and rb_id2name().

Referenced by rb_method_parameters(), and rb_proc_parameters().

int rb_iseq_translate_threaded_code | ( | rb_iseq_t * | iseq | ) |

Definition at line 555 of file compile.c.

References ALLOC_N, COMPILE_OK, i, rb_iseq_struct::iseq, rb_iseq_struct::iseq_encoded, rb_iseq_struct::iseq_size, len, MEMCPY, and rb_vm_get_insns_address_table().

Referenced by iseq_setup(), and rb_iseq_build_for_ruby2cext().

rb_iseq_t* rb_method_get_iseq | ( | VALUE | body | ) |

Definition at line 1697 of file proc.c.

References method_get_def(), and method_get_iseq().

Referenced by iseq_s_disasm(), rb_method_parameters(), and rb_proc_get_iseq().

rb_iseq_t* rb_proc_get_iseq | ( | VALUE | proc,
|  | int * | is_proc
| ) |  |

Definition at line 664 of file proc.c.

References rb_proc_t::block, GetProcPtr, rb_proc_t::is_lambda, IS_METHOD_PROC_NODE, rb_block_struct::iseq, rb_method_get_iseq(), and RUBY_VM_NORMAL_ISEQ_P.

Referenced by rb_method_entry_make().

struct st_table* ruby_insn_make_insn_table | ( | void |  | ) |

read