Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Enumerations | Functions
iseq.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | rb_compile_option_struct
struct | iseq_line_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)
#define | DEFAULT_SPECIAL_VAR_COUNT 2

## Enumerations
enum | defined_type { DEFINED_NIL = 1, DEFINED_IVAR, DEFINED_LVAR, DEFINED_GVAR, DEFINED_CVAR, DEFINED_CONST, DEFINED_METHOD, DEFINED_YIELD, DEFINED_ZSUPER, DEFINED_SELF, DEFINED_TRUE, DEFINED_FALSE, DEFINED_ASGN, DEFINED_EXPR, DEFINED_IVAR2, DEFINED_REF, 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)
unsigned int | rb_iseq_line_no (const rb_iseq_t *iseq, size_t pos)
int | rb_iseq_line_trace_each (VALUE iseqval, int(*func)(int line, rb_event_flag_t *events_ptr, void *d), void *data)
VALUE | rb_iseq_line_trace_all (VALUE iseqval)
VALUE | rb_iseq_line_trace_specify (VALUE iseqval, VALUE pos, VALUE set)
rb_iseq_t * | rb_method_get_iseq (VALUE body)
rb_iseq_t * | rb_proc_get_iseq (VALUE proc, int *is_proc)
VALUE | rb_iseq_defined_string (enum defined_type type)

## Macro Definition Documentation

#define DEFAULT_SPECIAL_VAR_COUNT 2

Definition at line 133 of file iseq.h.

Referenced by iseq_compile_each(), lep_svar_get(), and lep_svar_set().

#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)

Definition at line 72 of file iseq.h.

Referenced by prepare_iseq_build().

## Enumeration Type Documentation

enum defined_type

Enumerator
DEFINED_NIL |
DEFINED_IVAR |
DEFINED_LVAR |
DEFINED_GVAR |
DEFINED_CVAR |
DEFINED_CONST |
DEFINED_METHOD |
DEFINED_YIELD |
DEFINED_ZSUPER |
DEFINED_SELF |
DEFINED_TRUE |
DEFINED_FALSE |
DEFINED_ASGN |
DEFINED_EXPR |
DEFINED_IVAR2 |
DEFINED_REF |
DEFINED_FUNC |

Definition at line 111 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 5758 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 461 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_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().

VALUE rb_iseq_defined_string | ( | enum defined_type | type) |  |

Definition at line 1988 of file iseq.c.

References GET_VM, numberof, OBJ_FREEZE, rb_str_new_cstr(), and ruby_xcalloc().

Referenced by defined_expr(), and iseq_compile_each().

unsigned int rb_iseq_line_no | ( | const rb_iseq_t * | iseq,
|  | size_t | pos
| ) |  |

Definition at line 1098 of file iseq.c.

References find_line_no().

Referenced by calc_lineno().

VALUE rb_iseq_line_trace_all | ( | VALUE | iseqval) |  |

Definition at line 2136 of file iseq.c.

References collect_trace(), rb_ary_new(), rb_iseq_line_trace_each(), and result.

Referenced by Init_ISeq().

int rb_iseq_line_trace_each | ( | VALUE | iseqval,
|  | int(*)(int line, rb_event_flag_t *events_ptr, void *d) | func,
|  | void * | data
| ) |  |

Definition at line 2089 of file iseq.c.

References iseq_catch_table_entry::cont, find_line_no(), func, GetISeqPtr, if(), iseq_catch_table_entry::iseq, rb_iseq_struct::iseq, rb_iseq_struct::iseq_encoded, rb_iseq_struct::iseq_size, RUBY_EVENT_LINE, and RUBY_EVENT_SPECIFIED_LINE.

Referenced by rb_iseq_line_trace_all(), and rb_iseq_line_trace_specify().

VALUE rb_iseq_line_trace_specify | ( | VALUE | iseqval,
|  | VALUE | pos,
|  | VALUE | set
| ) |  |

Definition at line 2183 of file iseq.c.

References line_trace_specify(), NUM2INT, set_specifc_data::pos, set_specifc_data::prev, Qfalse, Qtrue, rb_eTypeError, rb_iseq_line_trace_each(), rb_raise(), and set_specifc_data::set.

Referenced by Init_ISeq().

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

Definition at line 559 of file iseq.c.

References iseq_load(), and rb_cISeq.

Referenced by iseq_build_from_ary_exception(), and iseq_build_load_iseq().

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

Definition at line 1914 of file iseq.c.

References rb_iseq_struct::arg_block, 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_size, rb_iseq_struct::argc, args, CONST_ID, i, ID2SYM, key, rb_iseq_struct::local_table, PARAM, PARAM_ID, PARAM_TYPE, Qnil, rb_ary_new2(), rb_ary_push(), and rb_id2str().

Referenced by rb_method_parameters(), and rb_proc_parameters().

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

Definition at line 559 of file compile.c.

References ALLOC_N, COMPILE_OK, i, 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().

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

Definition at line 1859 of file proc.c.

References method_get_def(), and method_get_iseq().

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

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

Definition at line 713 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 | ) |  |