Coverage Report

Created: 2026-03-31 07:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/ruby/eval_intern.h
Line
Count
Source
1
#ifndef RUBY_EVAL_INTERN_H
2
#define RUBY_EVAL_INTERN_H
3
4
#include "ruby/ruby.h"
5
#include "vm_core.h"
6
7
static inline void
8
vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
9
84.8k
{
10
84.8k
    vm_block_handler_verify(block_handler);
11
84.8k
    ec->passed_block_handler = block_handler;
12
84.8k
}
eval.c:vm_passed_block_handler_set
Line
Count
Source
9
69.7k
{
10
69.7k
    vm_block_handler_verify(block_handler);
11
69.7k
    ec->passed_block_handler = block_handler;
12
69.7k
}
Unexecuted instantiation: gc.c:vm_passed_block_handler_set
Unexecuted instantiation: iseq.c:vm_passed_block_handler_set
Unexecuted instantiation: load.c:vm_passed_block_handler_set
Unexecuted instantiation: proc.c:vm_passed_block_handler_set
Unexecuted instantiation: ruby.c:vm_passed_block_handler_set
Unexecuted instantiation: scheduler.c:vm_passed_block_handler_set
Unexecuted instantiation: signal.c:vm_passed_block_handler_set
Unexecuted instantiation: thread.c:vm_passed_block_handler_set
vm.c:vm_passed_block_handler_set
Line
Count
Source
9
15.0k
{
10
15.0k
    vm_block_handler_verify(block_handler);
11
15.0k
    ec->passed_block_handler = block_handler;
12
15.0k
}
Unexecuted instantiation: vm_backtrace.c:vm_passed_block_handler_set
Unexecuted instantiation: vm_trace.c:vm_passed_block_handler_set
Unexecuted instantiation: box.c:vm_passed_block_handler_set
Unexecuted instantiation: cont.c:vm_passed_block_handler_set
Unexecuted instantiation: debug.c:vm_passed_block_handler_set
13
14
static inline void
15
pass_passed_block_handler(rb_execution_context_t *ec)
16
84.7k
{
17
84.7k
    VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
18
84.7k
    vm_passed_block_handler_set(ec, block_handler);
19
84.7k
    VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
20
84.7k
}
eval.c:pass_passed_block_handler
Line
Count
Source
16
69.7k
{
17
69.7k
    VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
18
69.7k
    vm_passed_block_handler_set(ec, block_handler);
19
69.7k
    VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
20
69.7k
}
Unexecuted instantiation: gc.c:pass_passed_block_handler
Unexecuted instantiation: iseq.c:pass_passed_block_handler
Unexecuted instantiation: load.c:pass_passed_block_handler
Unexecuted instantiation: proc.c:pass_passed_block_handler
Unexecuted instantiation: ruby.c:pass_passed_block_handler
Unexecuted instantiation: scheduler.c:pass_passed_block_handler
Unexecuted instantiation: signal.c:pass_passed_block_handler
Unexecuted instantiation: thread.c:pass_passed_block_handler
vm.c:pass_passed_block_handler
Line
Count
Source
16
14.9k
{
17
14.9k
    VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
18
14.9k
    vm_passed_block_handler_set(ec, block_handler);
19
14.9k
    VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
20
14.9k
}
Unexecuted instantiation: vm_backtrace.c:pass_passed_block_handler
Unexecuted instantiation: vm_trace.c:pass_passed_block_handler
Unexecuted instantiation: box.c:pass_passed_block_handler
Unexecuted instantiation: cont.c:pass_passed_block_handler
Unexecuted instantiation: debug.c:pass_passed_block_handler
21
22
14.9k
#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
23
69.7k
#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
24
25
#ifdef HAVE_STDLIB_H
26
#include <stdlib.h>
27
#endif
28
#ifndef EXIT_SUCCESS
29
#define EXIT_SUCCESS 0
30
#endif
31
#ifndef EXIT_FAILURE
32
#define EXIT_FAILURE 1
33
#endif
34
35
#include <stdio.h>
36
#if defined(__wasm__) && !defined(__EMSCRIPTEN__)
37
# include "wasm/setjmp.h"
38
#else
39
# include <setjmp.h>
40
#endif
41
42
#ifdef __APPLE__
43
# ifdef HAVE_CRT_EXTERNS_H
44
#  include <crt_externs.h>
45
# else
46
#  include "missing/crt_externs.h"
47
# endif
48
#endif
49
50
#ifndef HAVE_STRING_H
51
char *strrchr(const char *, const char);
52
#endif
53
54
#ifdef HAVE_UNISTD_H
55
#include <unistd.h>
56
#endif
57
58
#ifdef HAVE_NET_SOCKET_H
59
#include <net/socket.h>
60
#endif
61
62
0
#define ruby_setjmp(env) RUBY_SETJMP(env)
63
19.4k
#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
64
#ifdef __CYGWIN__
65
# ifndef _setjmp
66
int _setjmp(jmp_buf);
67
# endif
68
# ifndef _longjmp
69
NORETURN(void _longjmp(jmp_buf, int));
70
# endif
71
#endif
72
73
#include <sys/types.h>
74
#include <signal.h>
75
#include <errno.h>
76
77
#ifdef HAVE_SYS_SELECT_H
78
#include <sys/select.h>
79
#endif
80
81
/*
82
  Solaris sys/select.h switches select to select_large_fdset to support larger
83
  file descriptors if FD_SETSIZE is larger than 1024 on 32bit environment.
84
  But Ruby doesn't change FD_SETSIZE because fd_set is allocated dynamically.
85
  So following definition is required to use select_large_fdset.
86
*/
87
#ifdef HAVE_SELECT_LARGE_FDSET
88
#define select(n, r, w, e, t) select_large_fdset((n), (r), (w), (e), (t))
89
extern int select_large_fdset(int, fd_set *, fd_set *, fd_set *, struct timeval *);
90
#endif
91
92
#ifdef HAVE_SYS_PARAM_H
93
#include <sys/param.h>
94
#endif
95
96
#include <sys/stat.h>
97
98
138k
#define EC_PUSH_TAG(ec) do { \
99
138k
  rb_execution_context_t * const _ec = (ec); \
100
138k
  struct rb_vm_tag _tag; \
101
138k
  _tag.state = TAG_NONE; \
102
138k
  _tag.tag = Qundef; \
103
138k
  _tag.prev = _ec->tag; \
104
138k
  _tag.lock_rec = rb_ec_vm_lock_rec(_ec); \
105
138k
  rb_vm_tag_jmpbuf_init(&_tag.buf); \
106
107
#define EC_POP_TAG() \
108
138k
  _ec->tag = _tag.prev; \
109
138k
  rb_vm_tag_jmpbuf_deinit(&_tag.buf); \
110
138k
} while (0)
111
112
#define EC_TMPPOP_TAG() \
113
  _ec->tag = _tag.prev
114
115
102k
#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
116
117
#if defined __GNUC__ && __GNUC__ == 4 && (__GNUC_MINOR__ >= 6 && __GNUC_MINOR__ <= 8) || defined __clang__
118
/* This macro prevents GCC 4.6--4.8 from emitting maybe-uninitialized warnings.
119
 * This macro also prevents Clang from dumping core in EC_EXEC_TAG().
120
 * (I confirmed Clang 4.0.1 and 5.0.0.)
121
 */
122
19.0k
# define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var))
123
0
# define VAR_INITIALIZED(var) ((var) = VAR_FROM_MEMORY(var))
124
# define VAR_NOCLOBBERED(var) volatile var
125
#else
126
# define VAR_FROM_MEMORY(var) (var)
127
# define VAR_INITIALIZED(var) ((void)&(var))
128
# define VAR_NOCLOBBERED(var) var
129
#endif
130
131
static inline void
132
rb_ec_vm_lock_rec_check(const rb_execution_context_t *ec, unsigned int recorded_lock_rec)
133
19.4k
{
134
19.4k
    unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
135
19.4k
    if (current_lock_rec != recorded_lock_rec) {
136
0
        rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
137
0
    }
138
19.4k
}
eval.c:rb_ec_vm_lock_rec_check
Line
Count
Source
133
19.0k
{
134
19.0k
    unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
135
19.0k
    if (current_lock_rec != recorded_lock_rec) {
136
0
        rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
137
0
    }
138
19.0k
}
Unexecuted instantiation: gc.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: iseq.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: load.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: proc.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: ruby.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: scheduler.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: signal.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: thread.c:rb_ec_vm_lock_rec_check
vm.c:rb_ec_vm_lock_rec_check
Line
Count
Source
133
4
{
134
4
    unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
135
4
    if (current_lock_rec != recorded_lock_rec) {
136
0
        rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
137
0
    }
138
4
}
Unexecuted instantiation: vm_backtrace.c:rb_ec_vm_lock_rec_check
vm_trace.c:rb_ec_vm_lock_rec_check
Line
Count
Source
133
398
{
134
398
    unsigned int current_lock_rec = rb_ec_vm_lock_rec(ec);
135
398
    if (current_lock_rec != recorded_lock_rec) {
136
0
        rb_ec_vm_lock_rec_release(ec, recorded_lock_rec, current_lock_rec);
137
0
    }
138
398
}
Unexecuted instantiation: box.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: cont.c:rb_ec_vm_lock_rec_check
Unexecuted instantiation: debug.c:rb_ec_vm_lock_rec_check
139
140
/* clear ec->tag->state, and return the value */
141
static inline int
142
rb_ec_tag_state(const rb_execution_context_t *ec)
143
19.4k
{
144
19.4k
    struct rb_vm_tag *tag = ec->tag;
145
19.4k
    enum ruby_tag_type state = tag->state;
146
19.4k
    tag->state = TAG_NONE;
147
19.4k
    rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
148
19.4k
    RBIMPL_ASSUME(state > TAG_NONE);
149
19.4k
    RBIMPL_ASSUME(state <= TAG_FATAL);
150
19.4k
    return state;
151
19.4k
}
eval.c:rb_ec_tag_state
Line
Count
Source
143
19.0k
{
144
19.0k
    struct rb_vm_tag *tag = ec->tag;
145
19.0k
    enum ruby_tag_type state = tag->state;
146
19.0k
    tag->state = TAG_NONE;
147
19.0k
    rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
148
19.0k
    RBIMPL_ASSUME(state > TAG_NONE);
149
19.0k
    RBIMPL_ASSUME(state <= TAG_FATAL);
150
19.0k
    return state;
151
19.0k
}
Unexecuted instantiation: gc.c:rb_ec_tag_state
Unexecuted instantiation: iseq.c:rb_ec_tag_state
Unexecuted instantiation: load.c:rb_ec_tag_state
Unexecuted instantiation: proc.c:rb_ec_tag_state
Unexecuted instantiation: ruby.c:rb_ec_tag_state
Unexecuted instantiation: scheduler.c:rb_ec_tag_state
Unexecuted instantiation: signal.c:rb_ec_tag_state
Unexecuted instantiation: thread.c:rb_ec_tag_state
vm.c:rb_ec_tag_state
Line
Count
Source
143
4
{
144
4
    struct rb_vm_tag *tag = ec->tag;
145
4
    enum ruby_tag_type state = tag->state;
146
4
    tag->state = TAG_NONE;
147
4
    rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
148
4
    RBIMPL_ASSUME(state > TAG_NONE);
149
4
    RBIMPL_ASSUME(state <= TAG_FATAL);
150
4
    return state;
151
4
}
Unexecuted instantiation: vm_backtrace.c:rb_ec_tag_state
vm_trace.c:rb_ec_tag_state
Line
Count
Source
143
398
{
144
398
    struct rb_vm_tag *tag = ec->tag;
145
398
    enum ruby_tag_type state = tag->state;
146
398
    tag->state = TAG_NONE;
147
398
    rb_ec_vm_lock_rec_check(ec, tag->lock_rec);
148
398
    RBIMPL_ASSUME(state > TAG_NONE);
149
398
    RBIMPL_ASSUME(state <= TAG_FATAL);
150
398
    return state;
151
398
}
Unexecuted instantiation: box.c:rb_ec_tag_state
Unexecuted instantiation: cont.c:rb_ec_tag_state
Unexecuted instantiation: debug.c:rb_ec_tag_state
152
153
NORETURN(static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st));
154
static inline void
155
rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
156
19.4k
{
157
19.4k
    RUBY_ASSERT(st > TAG_NONE && st <= TAG_FATAL, ": Invalid tag jump: %d", (int)st);
158
19.4k
    ec->tag->state = st;
159
19.4k
    ruby_longjmp(RB_VM_TAG_JMPBUF_GET(ec->tag->buf), 1);
160
19.4k
}
eval.c:rb_ec_tag_jump
Line
Count
Source
156
19.0k
{
157
19.0k
    RUBY_ASSERT(st > TAG_NONE && st <= TAG_FATAL, ": Invalid tag jump: %d", (int)st);
158
19.0k
    ec->tag->state = st;
159
19.0k
    ruby_longjmp(RB_VM_TAG_JMPBUF_GET(ec->tag->buf), 1);
160
19.0k
}
Unexecuted instantiation: gc.c:rb_ec_tag_jump
Unexecuted instantiation: iseq.c:rb_ec_tag_jump
Unexecuted instantiation: load.c:rb_ec_tag_jump
Unexecuted instantiation: proc.c:rb_ec_tag_jump
Unexecuted instantiation: ruby.c:rb_ec_tag_jump
Unexecuted instantiation: scheduler.c:rb_ec_tag_jump
Unexecuted instantiation: signal.c:rb_ec_tag_jump
Unexecuted instantiation: thread.c:rb_ec_tag_jump
vm.c:rb_ec_tag_jump
Line
Count
Source
156
4
{
157
4
    RUBY_ASSERT(st > TAG_NONE && st <= TAG_FATAL, ": Invalid tag jump: %d", (int)st);
158
4
    ec->tag->state = st;
159
4
    ruby_longjmp(RB_VM_TAG_JMPBUF_GET(ec->tag->buf), 1);
160
4
}
Unexecuted instantiation: vm_backtrace.c:rb_ec_tag_jump
vm_trace.c:rb_ec_tag_jump
Line
Count
Source
156
398
{
157
398
    RUBY_ASSERT(st > TAG_NONE && st <= TAG_FATAL, ": Invalid tag jump: %d", (int)st);
158
398
    ec->tag->state = st;
159
398
    ruby_longjmp(RB_VM_TAG_JMPBUF_GET(ec->tag->buf), 1);
160
398
}
Unexecuted instantiation: box.c:rb_ec_tag_jump
Unexecuted instantiation: cont.c:rb_ec_tag_jump
Unexecuted instantiation: debug.c:rb_ec_tag_jump
161
162
/*
163
  setjmp() in assignment expression rhs is undefined behavior
164
  [ISO/IEC 9899:1999] 7.13.1.1
165
*/
166
#define EC_EXEC_TAG() \
167
122k
    (UNLIKELY(ruby_setjmp(RB_VM_TAG_JMPBUF_GET(_tag.buf))) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
168
169
19.4k
#define EC_JUMP_TAG(ec, st) rb_ec_tag_jump(ec, st)
170
171
0
#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
172
173
/* CREF operators */
174
175
0
#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
176
0
#define CREF_FL_OMOD_SHARED    IMEMO_FL_USER2
177
0
#define CREF_FL_SINGLETON      IMEMO_FL_USER3
178
179
static inline int CREF_SINGLETON(const rb_cref_t *cref);
180
181
static inline VALUE
182
CREF_CLASS(const rb_cref_t *cref)
183
0
{
184
0
    if (CREF_SINGLETON(cref)) {
185
0
        return CLASS_OF(cref->klass_or_self);
186
0
    }
187
0
    else {
188
0
        return cref->klass_or_self;
189
0
    }
190
0
}
Unexecuted instantiation: eval.c:CREF_CLASS
Unexecuted instantiation: gc.c:CREF_CLASS
Unexecuted instantiation: iseq.c:CREF_CLASS
Unexecuted instantiation: load.c:CREF_CLASS
Unexecuted instantiation: proc.c:CREF_CLASS
Unexecuted instantiation: ruby.c:CREF_CLASS
Unexecuted instantiation: scheduler.c:CREF_CLASS
Unexecuted instantiation: signal.c:CREF_CLASS
Unexecuted instantiation: thread.c:CREF_CLASS
Unexecuted instantiation: vm.c:CREF_CLASS
Unexecuted instantiation: vm_backtrace.c:CREF_CLASS
Unexecuted instantiation: vm_trace.c:CREF_CLASS
Unexecuted instantiation: box.c:CREF_CLASS
Unexecuted instantiation: cont.c:CREF_CLASS
Unexecuted instantiation: debug.c:CREF_CLASS
191
192
static inline VALUE
193
CREF_CLASS_FOR_DEFINITION(const rb_cref_t *cref)
194
0
{
195
0
    if (CREF_SINGLETON(cref)) {
196
0
        return rb_singleton_class(cref->klass_or_self);
197
0
    }
198
0
    else {
199
0
        return cref->klass_or_self;
200
0
    }
201
0
}
Unexecuted instantiation: eval.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: gc.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: iseq.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: load.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: proc.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: ruby.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: scheduler.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: signal.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: thread.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: vm.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: vm_backtrace.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: vm_trace.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: box.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: cont.c:CREF_CLASS_FOR_DEFINITION
Unexecuted instantiation: debug.c:CREF_CLASS_FOR_DEFINITION
202
203
static inline rb_cref_t *
204
CREF_NEXT(const rb_cref_t *cref)
205
0
{
206
0
    return cref->next;
207
0
}
Unexecuted instantiation: eval.c:CREF_NEXT
Unexecuted instantiation: gc.c:CREF_NEXT
Unexecuted instantiation: iseq.c:CREF_NEXT
Unexecuted instantiation: load.c:CREF_NEXT
Unexecuted instantiation: proc.c:CREF_NEXT
Unexecuted instantiation: ruby.c:CREF_NEXT
Unexecuted instantiation: scheduler.c:CREF_NEXT
Unexecuted instantiation: signal.c:CREF_NEXT
Unexecuted instantiation: thread.c:CREF_NEXT
Unexecuted instantiation: vm.c:CREF_NEXT
Unexecuted instantiation: vm_backtrace.c:CREF_NEXT
Unexecuted instantiation: vm_trace.c:CREF_NEXT
Unexecuted instantiation: box.c:CREF_NEXT
Unexecuted instantiation: cont.c:CREF_NEXT
Unexecuted instantiation: debug.c:CREF_NEXT
208
209
static inline const rb_scope_visibility_t *
210
CREF_SCOPE_VISI(const rb_cref_t *cref)
211
0
{
212
0
    return &cref->scope_visi;
213
0
}
Unexecuted instantiation: eval.c:CREF_SCOPE_VISI
Unexecuted instantiation: gc.c:CREF_SCOPE_VISI
Unexecuted instantiation: iseq.c:CREF_SCOPE_VISI
Unexecuted instantiation: load.c:CREF_SCOPE_VISI
Unexecuted instantiation: proc.c:CREF_SCOPE_VISI
Unexecuted instantiation: ruby.c:CREF_SCOPE_VISI
Unexecuted instantiation: scheduler.c:CREF_SCOPE_VISI
Unexecuted instantiation: signal.c:CREF_SCOPE_VISI
Unexecuted instantiation: thread.c:CREF_SCOPE_VISI
Unexecuted instantiation: vm.c:CREF_SCOPE_VISI
Unexecuted instantiation: vm_backtrace.c:CREF_SCOPE_VISI
Unexecuted instantiation: vm_trace.c:CREF_SCOPE_VISI
Unexecuted instantiation: box.c:CREF_SCOPE_VISI
Unexecuted instantiation: cont.c:CREF_SCOPE_VISI
Unexecuted instantiation: debug.c:CREF_SCOPE_VISI
214
215
static inline VALUE
216
CREF_REFINEMENTS(const rb_cref_t *cref)
217
0
{
218
0
    return cref->refinements;
219
0
}
Unexecuted instantiation: eval.c:CREF_REFINEMENTS
Unexecuted instantiation: gc.c:CREF_REFINEMENTS
Unexecuted instantiation: iseq.c:CREF_REFINEMENTS
Unexecuted instantiation: load.c:CREF_REFINEMENTS
Unexecuted instantiation: proc.c:CREF_REFINEMENTS
Unexecuted instantiation: ruby.c:CREF_REFINEMENTS
Unexecuted instantiation: scheduler.c:CREF_REFINEMENTS
Unexecuted instantiation: signal.c:CREF_REFINEMENTS
Unexecuted instantiation: thread.c:CREF_REFINEMENTS
Unexecuted instantiation: vm.c:CREF_REFINEMENTS
Unexecuted instantiation: vm_backtrace.c:CREF_REFINEMENTS
Unexecuted instantiation: vm_trace.c:CREF_REFINEMENTS
Unexecuted instantiation: box.c:CREF_REFINEMENTS
Unexecuted instantiation: cont.c:CREF_REFINEMENTS
Unexecuted instantiation: debug.c:CREF_REFINEMENTS
220
221
static inline void
222
CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
223
0
{
224
0
    RB_OBJ_WRITE(cref, &cref->refinements, refs);
225
0
}
Unexecuted instantiation: eval.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: gc.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: iseq.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: load.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: proc.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: ruby.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: scheduler.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: signal.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: thread.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: vm.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: vm_backtrace.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: vm_trace.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: box.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: cont.c:CREF_REFINEMENTS_SET
Unexecuted instantiation: debug.c:CREF_REFINEMENTS_SET
226
227
static inline int
228
CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
229
0
{
230
0
    return cref->flags & CREF_FL_PUSHED_BY_EVAL;
231
0
}
Unexecuted instantiation: eval.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: gc.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: iseq.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: load.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: proc.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: ruby.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: scheduler.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: signal.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: thread.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: vm.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: vm_backtrace.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: vm_trace.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: box.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: cont.c:CREF_PUSHED_BY_EVAL
Unexecuted instantiation: debug.c:CREF_PUSHED_BY_EVAL
232
233
static inline void
234
CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
235
0
{
236
0
    cref->flags |= CREF_FL_PUSHED_BY_EVAL;
237
0
}
Unexecuted instantiation: eval.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: gc.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: iseq.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: load.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: proc.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: ruby.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: scheduler.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: signal.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: thread.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: vm.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: vm_backtrace.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: vm_trace.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: box.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: cont.c:CREF_PUSHED_BY_EVAL_SET
Unexecuted instantiation: debug.c:CREF_PUSHED_BY_EVAL_SET
238
239
static inline int
240
CREF_SINGLETON(const rb_cref_t *cref)
241
0
{
242
0
    return cref->flags & CREF_FL_SINGLETON;
243
0
}
Unexecuted instantiation: eval.c:CREF_SINGLETON
Unexecuted instantiation: gc.c:CREF_SINGLETON
Unexecuted instantiation: iseq.c:CREF_SINGLETON
Unexecuted instantiation: load.c:CREF_SINGLETON
Unexecuted instantiation: proc.c:CREF_SINGLETON
Unexecuted instantiation: ruby.c:CREF_SINGLETON
Unexecuted instantiation: scheduler.c:CREF_SINGLETON
Unexecuted instantiation: signal.c:CREF_SINGLETON
Unexecuted instantiation: thread.c:CREF_SINGLETON
Unexecuted instantiation: vm.c:CREF_SINGLETON
Unexecuted instantiation: vm_backtrace.c:CREF_SINGLETON
Unexecuted instantiation: vm_trace.c:CREF_SINGLETON
Unexecuted instantiation: box.c:CREF_SINGLETON
Unexecuted instantiation: cont.c:CREF_SINGLETON
Unexecuted instantiation: debug.c:CREF_SINGLETON
244
245
static inline void
246
CREF_SINGLETON_SET(rb_cref_t *cref)
247
0
{
248
0
    cref->flags |= CREF_FL_SINGLETON;
249
0
}
Unexecuted instantiation: eval.c:CREF_SINGLETON_SET
Unexecuted instantiation: gc.c:CREF_SINGLETON_SET
Unexecuted instantiation: iseq.c:CREF_SINGLETON_SET
Unexecuted instantiation: load.c:CREF_SINGLETON_SET
Unexecuted instantiation: proc.c:CREF_SINGLETON_SET
Unexecuted instantiation: ruby.c:CREF_SINGLETON_SET
Unexecuted instantiation: scheduler.c:CREF_SINGLETON_SET
Unexecuted instantiation: signal.c:CREF_SINGLETON_SET
Unexecuted instantiation: thread.c:CREF_SINGLETON_SET
Unexecuted instantiation: vm.c:CREF_SINGLETON_SET
Unexecuted instantiation: vm_backtrace.c:CREF_SINGLETON_SET
Unexecuted instantiation: vm_trace.c:CREF_SINGLETON_SET
Unexecuted instantiation: box.c:CREF_SINGLETON_SET
Unexecuted instantiation: cont.c:CREF_SINGLETON_SET
Unexecuted instantiation: debug.c:CREF_SINGLETON_SET
250
251
static inline int
252
CREF_OMOD_SHARED(const rb_cref_t *cref)
253
0
{
254
0
    return cref->flags & CREF_FL_OMOD_SHARED;
255
0
}
Unexecuted instantiation: eval.c:CREF_OMOD_SHARED
Unexecuted instantiation: gc.c:CREF_OMOD_SHARED
Unexecuted instantiation: iseq.c:CREF_OMOD_SHARED
Unexecuted instantiation: load.c:CREF_OMOD_SHARED
Unexecuted instantiation: proc.c:CREF_OMOD_SHARED
Unexecuted instantiation: ruby.c:CREF_OMOD_SHARED
Unexecuted instantiation: scheduler.c:CREF_OMOD_SHARED
Unexecuted instantiation: signal.c:CREF_OMOD_SHARED
Unexecuted instantiation: thread.c:CREF_OMOD_SHARED
Unexecuted instantiation: vm.c:CREF_OMOD_SHARED
Unexecuted instantiation: vm_backtrace.c:CREF_OMOD_SHARED
Unexecuted instantiation: vm_trace.c:CREF_OMOD_SHARED
Unexecuted instantiation: box.c:CREF_OMOD_SHARED
Unexecuted instantiation: cont.c:CREF_OMOD_SHARED
Unexecuted instantiation: debug.c:CREF_OMOD_SHARED
256
257
static inline void
258
CREF_OMOD_SHARED_SET(rb_cref_t *cref)
259
0
{
260
0
    cref->flags |= CREF_FL_OMOD_SHARED;
261
0
}
Unexecuted instantiation: eval.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: gc.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: iseq.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: load.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: proc.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: ruby.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: scheduler.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: signal.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: thread.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: vm.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: vm_backtrace.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: vm_trace.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: box.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: cont.c:CREF_OMOD_SHARED_SET
Unexecuted instantiation: debug.c:CREF_OMOD_SHARED_SET
262
263
static inline void
264
CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
265
0
{
266
0
    cref->flags &= ~CREF_FL_OMOD_SHARED;
267
0
}
Unexecuted instantiation: eval.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: gc.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: iseq.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: load.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: proc.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: ruby.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: scheduler.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: signal.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: thread.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: vm.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: vm_backtrace.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: vm_trace.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: box.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: cont.c:CREF_OMOD_SHARED_UNSET
Unexecuted instantiation: debug.c:CREF_OMOD_SHARED_UNSET
268
269
enum {
270
    RAISED_EXCEPTION = 1,
271
    RAISED_STACKOVERFLOW = 2,
272
    RAISED_NOMEMORY = 4
273
};
274
0
#define rb_ec_raised_set(ec, f)   ((ec)->raised_flag |= (f))
275
0
#define rb_ec_raised_reset(ec, f) ((ec)->raised_flag &= ~(f))
276
189k
#define rb_ec_raised_p(ec, f)    (((ec)->raised_flag & (f)) != 0)
277
19.0k
#define rb_ec_raised_clear(ec)    ((ec)->raised_flag = 0)
278
int rb_ec_set_raised(rb_execution_context_t *ec);
279
int rb_ec_reset_raised(rb_execution_context_t *ec);
280
int rb_ec_stack_check(rb_execution_context_t *ec);
281
282
VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
283
VALUE rb_make_exception(int argc, const VALUE *argv);
284
285
NORETURN(void rb_method_name_error(VALUE, VALUE));
286
287
NORETURN(void rb_fiber_start(rb_fiber_t*));
288
289
NORETURN(void rb_print_undef(VALUE, ID, rb_method_visibility_t));
290
NORETURN(void rb_print_undef_str(VALUE, VALUE));
291
NORETURN(void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t));
292
NORETURN(void rb_vm_localjump_error(const char *,VALUE, int));
293
NORETURN(void rb_vm_jump_tag_but_local_jump(enum ruby_tag_type));
294
295
VALUE rb_vm_make_jump_tag_but_local_jump(enum ruby_tag_type state, VALUE val);
296
rb_cref_t *rb_vm_cref(void);
297
rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
298
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
299
VALUE rb_vm_call_cfunc_in_box(VALUE recv, VALUE (*func)(VALUE, VALUE), VALUE arg1, VALUE arg2, VALUE filename, const rb_box_t *box);
300
void rb_vm_frame_flag_set_box_require(const rb_execution_context_t *ec);
301
const rb_box_t *rb_vm_current_box(const rb_execution_context_t *ec);
302
const rb_box_t *rb_vm_caller_box(const rb_execution_context_t *ec);
303
const rb_box_t *rb_vm_loading_box(const rb_execution_context_t *ec);
304
void rb_vm_set_progname(VALUE filename);
305
VALUE rb_vm_cbase(void);
306
307
/* vm_backtrace.c */
308
19.0k
#define RUBY_BACKTRACE_START 0
309
19.0k
#define RUBY_ALL_BACKTRACE_LINES -1
310
VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
311
VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
312
VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n, bool skip_internal);
313
314
#ifndef CharNext    /* defined as CharNext[AW] on Windows. */
315
# ifdef HAVE_MBLEN
316
0
#  define CharNext(p) rb_char_next(p)
317
static inline char *
318
rb_char_next(const char *p)
319
0
{
320
0
    if (p) {
321
0
        int len = mblen(p, RUBY_MBCHAR_MAXSIZE);
322
0
        p += len > 0 ? len : 1;
323
0
    }
324
0
    return (char *)p;
325
0
}
Unexecuted instantiation: eval.c:rb_char_next
Unexecuted instantiation: gc.c:rb_char_next
Unexecuted instantiation: iseq.c:rb_char_next
Unexecuted instantiation: load.c:rb_char_next
Unexecuted instantiation: proc.c:rb_char_next
Unexecuted instantiation: ruby.c:rb_char_next
Unexecuted instantiation: scheduler.c:rb_char_next
Unexecuted instantiation: signal.c:rb_char_next
Unexecuted instantiation: thread.c:rb_char_next
Unexecuted instantiation: vm.c:rb_char_next
Unexecuted instantiation: vm_backtrace.c:rb_char_next
Unexecuted instantiation: vm_trace.c:rb_char_next
Unexecuted instantiation: box.c:rb_char_next
Unexecuted instantiation: cont.c:rb_char_next
Unexecuted instantiation: debug.c:rb_char_next
326
# else
327
#  define CharNext(p) ((p) + 1)
328
# endif
329
#endif
330
331
#endif /* RUBY_EVAL_INTERN_H */