Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Enumerations | Functions
eval_intern.h File Reference
`#include "ruby/ruby.h"`
`#include "vm_core.h"`
`#include <stdio.h>`
`#include <setjmp.h>`
`#include <sys/types.h>`
`#include <signal.h>`
`#include <errno.h>`
`#include <sys/stat.h>`

Go to the source code of this file.

## Macros
#define | PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
#define | PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
#define | EXIT_SUCCESS 0
#define | EXIT_FAILURE 1
#define | ruby_setjmp(env) RUBY_SETJMP(env)
#define | ruby_longjmp(env, val) RUBY_LONGJMP((env),(val))
#define | SAVE_ROOT_JMPBUF_BEFORE_STMT
#define | SAVE_ROOT_JMPBUF_AFTER_STMT
#define | SAVE_ROOT_JMPBUF(th, stmt)
#define | EC_PUSH_TAG(ec)
#define | EC_POP_TAG()
#define | EC_TMPPOP_TAG() _ec->tag = _tag.prev
#define | EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
#define | VAR_FROM_MEMORY(var) (var)
#define | VAR_INITIALIZED(var) ((void)&(var))
#define | VAR_NOCLOBBERED(var) var
#define | EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
#define | EC_JUMP_TAG(ec, st) rb_ec_tag_jump(ec, st)
#define | INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
#define | CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
#define | CREF_FL_OMOD_SHARED IMEMO_FL_USER2
#define | rb_ec_raised_set(ec, f) ((ec)->raised_flag |= (f))
#define | rb_ec_raised_reset(ec, f) ((ec)->raised_flag &= ~(f))
#define | rb_ec_raised_p(ec, f) (((ec)->raised_flag & (f)) != 0)
#define | rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
#define | CharNext(p) ((p) + 1)

## Enumerations
enum | { RAISED_EXCEPTION = 1, RAISED_STACKOVERFLOW = 2, RAISED_NOMEMORY = 4 }

## Functions
char * | strrchr (const char *, const char)
| NORETURN (static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st))
int | rb_ec_set_raised (rb_execution_context_t *ec)
int | rb_ec_reset_raised (rb_execution_context_t *ec)
int | rb_ec_stack_check (rb_execution_context_t *ec)
VALUE | rb_f_eval (int argc, const VALUE *argv, VALUE self)
VALUE | rb_make_exception (int argc, const VALUE *argv)
| Make an `Exception` object from the list of arguments in a manner similar to `Kernel#raise`. More...
| NORETURN (void rb_method_name_error(VALUE, VALUE))
| NORETURN (void rb_fiber_start(void))
| NORETURN (void rb_print_undef(VALUE, ID, rb_method_visibility_t))
| NORETURN (void rb_vm_localjump_error(const char *, VALUE, int))
| NORETURN (void rb_vm_jump_tag_but_local_jump(int))
VALUE | rb_vm_make_jump_tag_but_local_jump (int state, VALUE val)
rb_cref_t * | rb_vm_cref (void)
rb_cref_t * | rb_vm_cref_replace_with_duplicated_cref (void)
VALUE | rb_vm_call_cfunc (VALUE recv, VALUE(*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename)
void | rb_vm_set_progname (VALUE filename)
void | rb_thread_terminate_all (void)
VALUE | rb_vm_cbase (void)
VALUE | rb_ec_backtrace_object (const rb_execution_context_t *ec)
VALUE | rb_ec_backtrace_str_ary (const rb_execution_context_t *ec, long lev, long n)
VALUE | rb_ec_backtrace_location_ary (const rb_execution_context_t *ec, long lev, long n)

## Macro Definition Documentation

## ◆ CharNext

#define CharNext | ( |  | p | ) | ((p) + 1)

Definition at line 296 of file eval_intern.h.

## ◆ CREF_FL_OMOD_SHARED

#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2

Definition at line 191 of file eval_intern.h.

## ◆ CREF_FL_PUSHED_BY_EVAL

#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1

Definition at line 190 of file eval_intern.h.

## ◆ EC_EXEC_TAG

#define EC_EXEC_TAG | ( |  | ) | (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))

Definition at line 181 of file eval_intern.h.

## ◆ EC_JUMP_TAG

#define EC_JUMP_TAG | ( |  | ec,
|  |  | st
| ) |  | rb_ec_tag_jump(ec, st)

Definition at line 184 of file eval_intern.h.

## ◆ EC_POP_TAG

#define EC_POP_TAG | ( |  | ) |

Value:
_ec->tag = _tag.prev; \
} while (0)

Definition at line 137 of file eval_intern.h.

## ◆ EC_PUSH_TAG

#define EC_PUSH_TAG | ( |  | ec | ) |

Value:
do { \
rb_execution_context_t * const _ec = (ec); \
struct rb_vm_tag _tag; \
_tag.state = TAG_NONE; \
_tag.tag = Qundef; \
_tag.prev = _ec->tag;

Definition at line 130 of file eval_intern.h.

## ◆ EC_REPUSH_TAG

#define EC_REPUSH_TAG | ( |  | ) | (void)(_ec->tag = &_tag)

Definition at line 144 of file eval_intern.h.

## ◆ EC_TMPPOP_TAG

#define EC_TMPPOP_TAG | ( |  | ) | _ec->tag = _tag.prev

Definition at line 141 of file eval_intern.h.

## ◆ EXIT_FAILURE

#define EXIT_FAILURE 1

Definition at line 32 of file eval_intern.h.

## ◆ EXIT_SUCCESS

#define EXIT_SUCCESS 0

Definition at line 29 of file eval_intern.h.

## ◆ INTERNAL_EXCEPTION_P

#define INTERNAL_EXCEPTION_P | ( |  | exc | ) | FIXNUM_P(exc)

Definition at line 186 of file eval_intern.h.

## ◆ PASS_PASSED_BLOCK_HANDLER

#define PASS_PASSED_BLOCK_HANDLER | ( |  | ) | pass_passed_block_handler(GET_EC())

Definition at line 23 of file eval_intern.h.

## ◆ PASS_PASSED_BLOCK_HANDLER_EC

#define PASS_PASSED_BLOCK_HANDLER_EC | ( |  | ec | ) | pass_passed_block_handler(ec)

Definition at line 22 of file eval_intern.h.

## ◆ rb_ec_raised_clear

#define rb_ec_raised_clear | ( |  | ec | ) | ((ec)->raised_flag = 0)

Definition at line 261 of file eval_intern.h.

## ◆ rb_ec_raised_p

#define rb_ec_raised_p | ( |  | ec,
|  |  | f
| ) |  | (((ec)->raised_flag & (f)) != 0)

Definition at line 260 of file eval_intern.h.

## ◆ rb_ec_raised_reset

#define rb_ec_raised_reset | ( |  | ec,
|  |  | f
| ) |  | ((ec)->raised_flag &= ~(f))

Definition at line 259 of file eval_intern.h.

## ◆ rb_ec_raised_set

#define rb_ec_raised_set | ( |  | ec,
|  |  | f
| ) |  | ((ec)->raised_flag |= (f))

Definition at line 258 of file eval_intern.h.

## ◆ ruby_longjmp

#define ruby_longjmp | ( |  | env,
|  |  | val
| ) |  | RUBY_LONGJMP((env),(val))

Definition at line 59 of file eval_intern.h.

## ◆ ruby_setjmp

#define ruby_setjmp | ( |  | env | ) | RUBY_SETJMP(env)

Definition at line 58 of file eval_intern.h.

## ◆ SAVE_ROOT_JMPBUF

#define SAVE_ROOT_JMPBUF | ( |  | th,
|  |  | stmt
| ) |  |

Value:
do \
if (ruby_setjmp((th)->root_jmpbuf) == 0) { \
SAVE_ROOT_JMPBUF_BEFORE_STMT \
stmt; \
SAVE_ROOT_JMPBUF_AFTER_STMT \
} \
else { \
rb_fiber_start(); \
} while (0)

Definition at line 120 of file eval_intern.h.

## ◆ SAVE_ROOT_JMPBUF_AFTER_STMT

#define SAVE_ROOT_JMPBUF_AFTER_STMT

Definition at line 117 of file eval_intern.h.

## ◆ SAVE_ROOT_JMPBUF_BEFORE_STMT

#define SAVE_ROOT_JMPBUF_BEFORE_STMT

Definition at line 116 of file eval_intern.h.

## ◆ VAR_FROM_MEMORY

#define VAR_FROM_MEMORY | ( |  | var | ) | (var)

Definition at line 155 of file eval_intern.h.

## ◆ VAR_INITIALIZED

#define VAR_INITIALIZED | ( |  | var | ) | ((void)&(var))

Definition at line 156 of file eval_intern.h.

## ◆ VAR_NOCLOBBERED

#define VAR_NOCLOBBERED | ( |  | var | ) | var

Definition at line 157 of file eval_intern.h.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
RAISED_EXCEPTION |
RAISED_STACKOVERFLOW |
RAISED_NOMEMORY |

Definition at line 253 of file eval_intern.h.

## Function Documentation

## ◆ NORETURN() [1/5]

NORETURN | ( | static inline void | rb_ec_tag_jumpconst rb_execution_context_t *ec, enum ruby_tag_type st | ) |

## ◆ NORETURN() [2/5]

NORETURN | ( | void | rb_fiber_startvoid | ) |

## ◆ NORETURN() [3/5]

NORETURN | ( | void | rb_method_name_errorVALUE, VALUE | ) |

## ◆ NORETURN() [4/5]

NORETURN | ( | void | rb_print_undefVALUE, ID, rb_method_visibility_t | ) |

## ◆ NORETURN() [5/5]

NORETURN | ( | void | rb_vm_localjump_errorconst char *, VALUE, int | ) |

## ◆ rb_ec_backtrace_location_ary()

VALUE rb_ec_backtrace_location_ary | ( | const rb_execution_context_t * | ec,
|  | long | lev,
|  | long | n
| ) |  |

Definition at line 720 of file vm_backtrace.c.

## ◆ rb_ec_backtrace_object()

VALUE rb_ec_backtrace_object | ( | const rb_execution_context_t * | ec | ) |

Definition at line 557 of file vm_backtrace.c.

## ◆ rb_ec_backtrace_str_ary()

VALUE rb_ec_backtrace_str_ary | ( | const rb_execution_context_t * | ec,
|  | long | lev,
|  | long | n
| ) |  |

Definition at line 714 of file vm_backtrace.c.

## ◆ rb_ec_reset_raised()

int rb_ec_reset_raised | ( | rb_execution_context_t * | ec | ) |

Definition at line 2354 of file thread.c.

## ◆ rb_ec_set_raised()

int rb_ec_set_raised | ( | rb_execution_context_t * | ec | ) |

Definition at line 2344 of file thread.c.

## ◆ rb_ec_stack_check()

int rb_ec_stack_check | ( | rb_execution_context_t * | ec | ) |

Definition at line 4665 of file gc.c.

## ◆ rb_f_eval()

VALUE rb_f_eval | ( | int | argc,
|  | const VALUE * | argv,
|  | VALUE | self
| ) |  |

Definition at line 1668 of file vm_eval.c.

## ◆ rb_thread_terminate_all()

void rb_thread_terminate_all | ( | void |  | ) |

Definition at line 559 of file thread.c.

## ◆ rb_vm_call_cfunc()

VALUE rb_vm_call_cfunc | ( | VALUE | recv,
|  | VALUE(*)(VALUE) | func,
|  | VALUE | arg,
|  | VALUE | block_handler,
|  | VALUE | filename
| ) |  |

Definition at line 2212 of file vm.c.

## ◆ rb_vm_cbase()

VALUE rb_vm_cbase | ( | void |  | ) |

Definition at line 1425 of file vm.c.

## ◆ rb_vm_cref()

rb_cref_t* rb_vm_cref | ( | void |  | ) |

Definition at line 1384 of file vm.c.

## ◆ rb_vm_cref_replace_with_duplicated_cref()

rb_cref_t* rb_vm_cref_replace_with_duplicated_cref | ( | void |  | ) |

Definition at line 1391 of file vm.c.

## ◆ rb_vm_make_jump_tag_but_local_jump()

VALUE rb_vm_make_jump_tag_but_local_jump | ( | int | state,
|  | VALUE | val
| ) |  |

Definition at line 1478 of file vm.c.

Referenced by rb_fiber_start().

## ◆ rb_vm_set_progname()

void rb_vm_set_progname | ( | VALUE | filename | ) |

Definition at line 3289 of file vm.c.

Referenced by ruby_set_script_name().

## ◆ strrchr()

char* strrchr | ( | const char * | ,
|  | const char |
| ) |  |

Referenced by rb_feature_provided(), and ruby_init_loadpath().

Qundef
#define Qundef
Definition: ruby.h:470
ruby_setjmp
#define ruby_setjmp(env)
Definition: eval_intern.h:58
if
if((ID)(DISPID) nameid !=nameid)
Definition: win32ole.c:357
rb_vm_tag::state
enum ruby_tag_type state
Definition: vm_core.h:804
rb_vm_tag
Definition: vm_core.h:799
TAG_NONE
#define TAG_NONE
Definition: vm_core.h:197