Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Enumerations | Functions | Variables
eval.c File Reference
#include "internal.h"
#include "eval_intern.h"
#include "iseq.h"
#include "gc.h"
#include "ruby/vm.h"
#include "vm_core.h"
#include "probes_helper.h"
#include "eval_error.c"
#include "eval_jump.c"

Go to the source code of this file.

Macros

#define id_signo   ruby_static_id_signo
 
#define id_status   ruby_static_id_status
 
#define exception_error   GET_VM()->special_exceptions[ruby_error_reenter]
 
#define CLASS_OR_MODULE_P(obj)
 

Enumerations

enum  { raise_opt_cause, raise_max_opt }
 

Functions

 NORETURN (void rb_raise_jump(VALUE, VALUE))
 
int ruby_setup (void)
 Initializes the Ruby VM and builtin libraries. More...
 
void ruby_init (void)
 Calls ruby_setup() and check error. More...
 
void * ruby_options (int argc, char **argv)
 Processes command line arguments and compiles the Ruby source to execute. More...
 
void ruby_finalize (void)
 Runs the VM finalization processes. More...
 
int ruby_cleanup (volatile int ex)
 Destructs the VM. More...
 
void ruby_stop (int ex)
 Calls ruby_cleanup() and exits the process. More...
 
int ruby_executable_node (void *n, int *status)
 Checks the return value of ruby_options(). More...
 
int ruby_run_node (void *n)
 Runs the given compiled source and exits this process. More...
 
int ruby_exec_node (void *n)
 Runs the given compiled source. More...
 
void rb_frozen_class_p (VALUE klass)
 Asserts that klass is not a frozen class. More...
 
 NORETURN (static void rb_longjmp(rb_thread_t *, int, volatile VALUE, VALUE))
 
void rb_exc_raise (VALUE mesg)
 Raises an exception in the current thread. More...
 
void rb_exc_fatal (VALUE mesg)
 Raises a fatal error in the current thread. More...
 
void rb_interrupt (void)
 Raises an Interrupt exception. More...
 
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...
 
void rb_jump_tag (int tag)
 Continues the exception caught by rb_protect() and rb_eval_string_protect(). More...
 
int rb_block_given_p (void)
 Determines if the current method is given a block. More...
 
int rb_iterator_p (void)
 Determines if the current method is an interator. More...
 
void rb_need_block (void)
 Declares that the current method needs a block. More...
 
VALUE rb_rescue2 (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*r_proc)(ANYARGS), VALUE data2,...)
 An equivalent of rescue clause. More...
 
VALUE rb_rescue (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*r_proc)(ANYARGS), VALUE data2)
 An equivalent of rescue clause. More...
 
VALUE rb_protect (VALUE(*proc)(VALUE), VALUE data, int *pstate)
 Protects a function call from potential global escapes from the function. More...
 
VALUE rb_ensure (VALUE(*b_proc)(ANYARGS), VALUE data1, VALUE(*e_proc)(ANYARGS), VALUE data2)
 An equivalent to ensure clause. More...
 
ID rb_frame_this_func (void)
 The original name of the current method. More...
 
ID rb_frame_callee (void)
 The name of the current method. More...
 
void rb_obj_call_init (VALUE obj, int argc, const VALUE *argv)
 Calls #initialize method of obj with the given arguments. More...
 
void rb_extend_object (VALUE obj, VALUE module)
 Extend the object with the module. More...
 
VALUE rb_errinfo (void)
 The current exception in the current thread. More...
 
void rb_set_errinfo (VALUE err)
 Sets the current exception ($!) to the given value. More...
 
void Init_eval (void)
 

Variables

VALUE rb_eLocalJumpError
 
VALUE rb_eSysStackError
 
ID ruby_static_id_signo
 
ID ruby_static_id_status
 
VALUE rb_eThreadError
 

Macro Definition Documentation

◆ CLASS_OR_MODULE_P

#define CLASS_OR_MODULE_P (   obj)
Value:
(!SPECIAL_CONST_P(obj) && \
(BUILTIN_TYPE(obj) == T_CLASS || BUILTIN_TYPE(obj) == T_MODULE))
#define T_MODULE
Definition: ruby.h:494
#define BUILTIN_TYPE(x)
Definition: ruby.h:518
#define T_CLASS
Definition: ruby.h:492
#define SPECIAL_CONST_P(x)
Definition: ruby.h:1242

Definition at line 37 of file eval.c.

Referenced by rb_class_inherited_p().

◆ exception_error

#define exception_error   GET_VM()->special_exceptions[ruby_error_reenter]

Definition at line 32 of file eval.c.

◆ id_signo

#define id_signo   ruby_static_id_signo

Definition at line 29 of file eval.c.

◆ id_status

#define id_status   ruby_static_id_status

Definition at line 30 of file eval.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
raise_opt_cause 
raise_max_opt 

Definition at line 649 of file eval.c.

Function Documentation

◆ Init_eval()

void Init_eval ( void  )

Definition at line 1889 of file eval.c.

References rb_define_virtual_variable().

◆ NORETURN() [1/2]

NORETURN ( void   rb_raise_jumpVALUE, VALUE)

Referenced by rb_frozen_class_p().

◆ NORETURN() [2/2]

NORETURN ( static void   rb_longjmprb_thread_t *, int, volatile VALUE, VALUE)

◆ ruby_stop()

void ruby_stop ( int  ex)

Calls ruby_cleanup() and exits the process.

Definition at line 256 of file eval.c.

References ruby_cleanup().

Referenced by rb_exit().

Variable Documentation

◆ rb_eLocalJumpError

VALUE rb_eLocalJumpError

Definition at line 24 of file eval.c.

◆ rb_eSysStackError

VALUE rb_eSysStackError

Definition at line 25 of file eval.c.

◆ rb_eThreadError

VALUE rb_eThreadError

Definition at line 857 of file eval.c.

Referenced by rb_mutex_lock(), rb_thread_stop(), and rb_thread_wakeup().

◆ ruby_static_id_signo

ID ruby_static_id_signo

Definition at line 27 of file eval.c.