Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
rb_mjit_min_header-2.7.6.h
Go to the documentation of this file.
1#define MJIT_HEADER 1
2#define _FORTIFY_SOURCE 2
3#define RUBY_EXPORT 1
4#define CANONICALIZATION_FOR_MATHN 1
5#define _XOPEN_SOURCE 1
6#define _GNU_SOURCE 1
7#define RUBY_INTERNAL_H 1
8#define RUBY_H 1
9#define HAVE_RUBY_DEFINES_H 1
10#define HAVE_RUBY_ENCODING_H 1
11#define HAVE_RUBY_INTERN_H 1
12#define HAVE_RUBY_IO_H 1
13#define HAVE_RUBY_MISSING_H 1
14#define HAVE_RUBY_ONIGURUMA_H 1
15#define HAVE_RUBY_RE_H 1
16#define HAVE_RUBY_REGEX_H 1
17#define HAVE_RUBY_RUBY_H 1
18#define HAVE_RUBY_ST_H 1
19#define HAVE_RUBY_THREAD_H 1
20#define HAVE_RUBY_UTIL_H 1
21#define HAVE_RUBY_VERSION_H 1
22#define HAVE_RUBY_VM_H 1
23#define RUBY_RUBY_H 1
24#define INCLUDE_RUBY_CONFIG_H 1
25#define HAVE_STDIO_H 1
26#define HAVE_STDLIB_H 1
27#define HAVE_STRING_H 1
28#define HAVE_INTTYPES_H 1
29#define HAVE_STDINT_H 1
30#define HAVE_STRINGS_H 1
31#define HAVE_SYS_STAT_H 1
32#define HAVE_SYS_TYPES_H 1
33#define HAVE_UNISTD_H 1
34#define HAVE_WCHAR_H 1
35#define STDC_HEADERS 1
36#define _ALL_SOURCE 1
37#define _DARWIN_C_SOURCE 1
38#define _GNU_SOURCE 1
39#define _HPUX_ALT_XOPEN_SOCKET_API 1
40#define _NETBSD_SOURCE 1
41#define _OPENBSD_SOURCE 1
42#define _POSIX_PTHREAD_SEMANTICS 1
43#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
44#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
45#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
46#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
47#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
48#define __STDC_WANT_LIB_EXT2__ 1
49#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
50#define _TANDEM_SOURCE 1
51#define __EXTENSIONS__ 1
52#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
53#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
54#define HAVE_STMT_AND_DECL_IN_EXPR 1
55#define HAVE_CYGWIN_CONV_PATH 1
56#define HAVE_LIBCRYPT 1
57#define HAVE_LIBDL 1
58#define HAVE_DIRENT_H 1
59#define HAVE__BOOL 1
60#define HAVE_STDBOOL_H 1
61#define HAVE_SYS_WAIT_H 1
62#define HAVE_A_OUT_H 1
63#define HAVE_GRP_H 1
64#define HAVE_FCNTL_H 1
65#define HAVE_FLOAT_H 1
66#define HAVE_IEEEFP_H 1
67#define HAVE_LANGINFO_H 1
68#define HAVE_LIMITS_H 1
69#define HAVE_LOCALE_H 1
70#define HAVE_MALLOC_H 1
71#define HAVE_PROCESS_H 1
72#define HAVE_PWD_H 1
73#define HAVE_STDALIGN_H 1
74#define HAVE_SYS_FCNTL_H 1
75#define HAVE_SYS_FILE_H 1
76#define HAVE_SYS_IOCTL_H 1
77#define HAVE_SYS_PARAM_H 1
78#define HAVE_SYS_RESOURCE_H 1
79#define HAVE_SYS_SELECT_H 1
80#define HAVE_SYS_SOCKET_H 1
81#define HAVE_SYS_SYSMACROS_H 1
82#define HAVE_SYS_TIME_H 1
83#define HAVE_SYS_TIMES_H 1
84#define HAVE_SYS_UIO_H 1
85#define HAVE_SYS_UTIME_H 1
86#define HAVE_TIME_H 1
87#define HAVE_UCONTEXT_H 1
88#define HAVE_UTIME_H 1
89#define HAVE_GMP_H 1
90#define HAVE_LIBGMP 1
91#define HAVE_TYPEOF 1
92#define restrict __restrict__
93#define HAVE_LONG_LONG 1
94#define HAVE_OFF_T 1
95#define SIZEOF_INT 4
96#define SIZEOF_SHORT 2
97#define SIZEOF_LONG 8
98#define SIZEOF_LONG_LONG 8
99#define SIZEOF___INT64 0
100#define SIZEOF___INT128 16
101#define SIZEOF_OFF_T 8
102#define SIZEOF_VOIDP 8
103#define SIZEOF_FLOAT 4
104#define SIZEOF_DOUBLE 8
105#define SIZEOF_TIME_T 8
106#define SIZEOF_CLOCK_T 8
107#define PACKED_STRUCT(x) x __attribute__((packed))
108#define USE_UNALIGNED_MEMBER_ACCESS 1
109#define PRI_LL_PREFIX "ll"
110#define HAVE_PID_T 1
111#define rb_pid_t pid_t
112#define SIGNEDNESS_OF_PID_T -1
113#define PIDT2NUM(v) INT2NUM(v)
114#define NUM2PIDT(v) NUM2INT(v)
115#define PRI_PIDT_PREFIX PRI_INT_PREFIX
116#define HAVE_UID_T 1
117#define rb_uid_t uid_t
118#define SIGNEDNESS_OF_UID_T +1
119#define UIDT2NUM(v) UINT2NUM(v)
120#define NUM2UIDT(v) NUM2UINT(v)
121#define PRI_UIDT_PREFIX PRI_INT_PREFIX
122#define HAVE_GID_T 1
123#define rb_gid_t gid_t
124#define SIGNEDNESS_OF_GID_T +1
125#define GIDT2NUM(v) UINT2NUM(v)
126#define NUM2GIDT(v) NUM2UINT(v)
127#define PRI_GIDT_PREFIX PRI_INT_PREFIX
128#define HAVE_TIME_T 1
129#define rb_time_t time_t
130#define SIGNEDNESS_OF_TIME_T -1
131#define TIMET2NUM(v) LONG2NUM(v)
132#define NUM2TIMET(v) NUM2LONG(v)
133#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
134#define HAVE_DEV_T 1
135#define rb_dev_t dev_t
136#define SIGNEDNESS_OF_DEV_T +1
137#define DEVT2NUM(v) UINT2NUM(v)
138#define NUM2DEVT(v) NUM2UINT(v)
139#define PRI_DEVT_PREFIX PRI_INT_PREFIX
140#define HAVE_MODE_T 1
141#define rb_mode_t mode_t
142#define SIGNEDNESS_OF_MODE_T +1
143#define MODET2NUM(v) UINT2NUM(v)
144#define NUM2MODET(v) NUM2UINT(v)
145#define PRI_MODET_PREFIX PRI_INT_PREFIX
146#define HAVE_RLIM_T 1
147#define rb_rlim_t rlim_t
148#define SIGNEDNESS_OF_RLIM_T +1
149#define RLIM2NUM(v) ULONG2NUM(v)
150#define NUM2RLIM(v) NUM2ULONG(v)
151#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
152#define HAVE_OFF_T 1
153#define rb_off_t off_t
154#define SIGNEDNESS_OF_OFF_T -1
155#define OFFT2NUM(v) LONG2NUM(v)
156#define NUM2OFFT(v) NUM2LONG(v)
157#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
158#define HAVE_CLOCKID_T 1
159#define rb_clockid_t clockid_t
160#define SIGNEDNESS_OF_CLOCKID_T +1
161#define CLOCKID2NUM(v) ULONG2NUM(v)
162#define NUM2CLOCKID(v) NUM2ULONG(v)
163#define PRI_CLOCKID_PREFIX PRI_LONG_PREFIX
164#define HAVE_PROTOTYPES 1
165#define TOKEN_PASTE(x,y) x ##y
166#define STRINGIZE(expr) STRINGIZE0(expr)
167#define HAVE_STDARG_PROTOTYPES 1
168#define HAVE_VA_ARGS_MACRO 1
169#define RUBY_ALIGNAS(x) __declspec(aligned(x))
170#define RUBY_ALIGNOF alignof
171#define CONSTFUNC(x) __attribute__ ((__const__)) x
172#define PUREFUNC(x) __attribute__ ((__pure__)) x
173#define NORETURN(x) __attribute__ ((__noreturn__)) x
174#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
175#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
176#define DEPRECATED_TYPE(mesg,x) __attribute__ ((__deprecated__ mesg)) x
177#define NOINLINE(x) __attribute__ ((__noinline__)) x
178#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
179#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
180#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
181#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
182#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
183#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
184#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
185#define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x
186#define WEAK(x) __attribute__ ((__weak__)) x
187#define HAVE_FUNC_WEAK 1
188#define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
189#define FUNC_STDCALL(x) __attribute__ ((__stdcall__)) x
190#define FUNC_CDECL(x) __attribute__ ((__cdecl__)) x
191#define FUNC_FASTCALL(x) __attribute__ ((__fastcall__)) x
192#define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x
193#define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
194#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
195#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
196#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
197#define HAVE_GCC_ATOMIC_BUILTINS 1
198#define HAVE_GCC_SYNC_BUILTINS 1
199#define UNREACHABLE __builtin_unreachable()
200#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
201#define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x
202#define RUBY_FUNCTION_NAME_STRING __func__
203#define ENUM_OVER_INT 1
204#define HAVE_DECL_SYS_NERR 1
205#define HAVE_DECL_GETENV 1
206#define SIZEOF_SIZE_T 8
207#define SIZEOF_PTRDIFF_T 8
208#define PRI_SIZE_PREFIX "z"
209#define PRI_PTRDIFF_PREFIX "t"
210#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
211#define HAVE_STRUCT_STAT_ST_BLOCKS 1
212#define HAVE_STRUCT_STAT_ST_RDEV 1
213#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
214#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
215#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
216#define HAVE_STRUCT_STAT_ST_ATIM 1
217#define HAVE_STRUCT_STAT_ST_MTIM 1
218#define HAVE_STRUCT_STAT_ST_CTIM 1
219#define HAVE_STRUCT_TIMEVAL 1
220#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
221#define HAVE_STRUCT_TIMESPEC 1
222#define HAVE_STRUCT_TIMEZONE 1
223#define HAVE_RB_FD_INIT 1
224#define HAVE_INT8_T 1
225#define SIZEOF_INT8_T 1
226#define HAVE_UINT8_T 1
227#define SIZEOF_UINT8_T 1
228#define HAVE_INT16_T 1
229#define SIZEOF_INT16_T 2
230#define HAVE_UINT16_T 1
231#define SIZEOF_UINT16_T 2
232#define HAVE_INT32_T 1
233#define SIZEOF_INT32_T 4
234#define HAVE_UINT32_T 1
235#define SIZEOF_UINT32_T 4
236#define HAVE_INT64_T 1
237#define SIZEOF_INT64_T 8
238#define HAVE_UINT64_T 1
239#define SIZEOF_UINT64_T 8
240#define HAVE_INT128_T 1
241#define int128_t __int128
242#define SIZEOF_INT128_T SIZEOF___INT128
243#define HAVE_UINT128_T 1
244#define uint128_t unsigned __int128
245#define SIZEOF_UINT128_T SIZEOF___INT128
246#define HAVE_INTPTR_T 1
247#define SIZEOF_INTPTR_T 8
248#define HAVE_UINTPTR_T 1
249#define SIZEOF_UINTPTR_T 8
250#define PRI_PTR_PREFIX "l"
251#define HAVE_SSIZE_T 1
252#define SIZEOF_SSIZE_T 8
253#define PRI_64_PREFIX "l"
254#define GETGROUPS_T gid_t
255#define RETSIGTYPE void
256#define HAVE_ALLOCA_H 1
257#define HAVE_ALLOCA 1
258#define HAVE_ACOSH 1
259#define HAVE_CBRT 1
260#define HAVE_CRYPT 1
261#define HAVE_DUP2 1
262#define HAVE_ERF 1
263#define HAVE_EXPLICIT_BZERO 1
264#define HAVE_FFS 1
265#define HAVE_FLOCK 1
266#define HAVE_HYPOT 1
267#define HAVE_LGAMMA_R 1
268#define HAVE_MEMMOVE 1
269#define HAVE_NAN 1
270#define HAVE_NEXTAFTER 1
271#define HAVE_STRCHR 1
272#define HAVE_STRERROR 1
273#define HAVE_STRLCAT 1
274#define HAVE_STRLCPY 1
275#define HAVE_STRSTR 1
276#define HAVE_TGAMMA 1
277#define HAVE_FINITE 1
278#define HAVE_ISINF 1
279#define HAVE_ISNAN 1
280#define HAVE_SIGNBIT 1
281#define HAVE_FORK 1
282#define HAVE_VFORK 1
283#define HAVE_WORKING_VFORK 1
284#define HAVE_WORKING_FORK 1
285#define HAVE__LONGJMP 1
286#define HAVE_ARC4RANDOM_BUF 1
287#define HAVE_ATAN2L 1
288#define HAVE_ATAN2F 1
289#define HAVE_CHROOT 1
290#define HAVE_CLOCK_GETTIME 1
291#define HAVE_COSH 1
292#define HAVE_CRYPT_R 1
293#define HAVE_DIRFD 1
294#define HAVE_DLOPEN 1
295#define HAVE_DLADDR 1
296#define HAVE_DUP 1
297#define HAVE_DUP3 1
298#define HAVE_EACCESS 1
299#define HAVE_ENDGRENT 1
300#define HAVE_FCHMOD 1
301#define HAVE_FCHOWN 1
302#define HAVE_FCNTL 1
303#define HAVE_FDATASYNC 1
304#define HAVE_FDOPENDIR 1
305#define HAVE_FMOD 1
306#define HAVE_FSTATAT 1
307#define HAVE_FSYNC 1
308#define HAVE_FTRUNCATE 1
309#define HAVE_GETCWD 1
310#define HAVE_GETGRNAM 1
311#define HAVE_GETGRNAM_R 1
312#define HAVE_GETGROUPS 1
313#define HAVE_GETLOGIN 1
314#define HAVE_GETLOGIN_R 1
315#define HAVE_GETPGID 1
316#define HAVE_GETPGRP 1
317#define HAVE_GETPRIORITY 1
318#define HAVE_GETPWNAM 1
319#define HAVE_GETPWNAM_R 1
320#define HAVE_GETPWUID 1
321#define HAVE_GETPWUID_R 1
322#define HAVE_GETRANDOM 1
323#define HAVE_GETRLIMIT 1
324#define HAVE_GETSID 1
325#define HAVE_GETTIMEOFDAY 1
326#define HAVE_GMTIME_R 1
327#define HAVE_GRANTPT 1
328#define HAVE_INITGROUPS 1
329#define HAVE_IOCTL 1
330#define HAVE_ISSETUGID 1
331#define HAVE_KILLPG 1
332#define HAVE_LCHOWN 1
333#define HAVE_LINK 1
334#define HAVE_LLABS 1
335#define HAVE_LOCKF 1
336#define HAVE_LOG2 1
337#define HAVE_LSTAT 1
338#define HAVE_LUTIMES 1
339#define HAVE_MALLOC_USABLE_SIZE 1
340#define HAVE_MBLEN 1
341#define HAVE_MEMALIGN 1
342#define HAVE_WRITEV 1
343#define HAVE_MEMRCHR 1
344#define HAVE_MEMMEM 1
345#define HAVE_MKFIFO 1
346#define HAVE_MKNOD 1
347#define HAVE_MKTIME 1
348#define HAVE_OPENAT 1
349#define HAVE_PIPE2 1
350#define HAVE_POLL 1
351#define HAVE_POSIX_FADVISE 1
352#define HAVE_POSIX_MEMALIGN 1
353#define HAVE_PPOLL 1
354#define HAVE_PREAD 1
355#define HAVE_PWRITE 1
356#define HAVE_QSORT_R 1
357#define HAVE_READLINK 1
358#define HAVE_REALPATH 1
359#define HAVE_ROUND 1
360#define HAVE_SCHED_GETAFFINITY 1
361#define HAVE_SEEKDIR 1
362#define HAVE_SETEGID 1
363#define HAVE_SETENV 1
364#define HAVE_SETEUID 1
365#define HAVE_SETGID 1
366#define HAVE_SETGROUPS 1
367#define HAVE_SETPGID 1
368#define HAVE_SETPGRP 1
369#define HAVE_SETREGID 1
370#define HAVE_SETREUID 1
371#define HAVE_SETRLIMIT 1
372#define HAVE_SETSID 1
373#define HAVE_SETUID 1
374#define HAVE_SHUTDOWN 1
375#define HAVE_SIGACTION 1
376#define HAVE_SIGALTSTACK 1
377#define HAVE_SIGPROCMASK 1
378#define HAVE_SINH 1
379#define HAVE_SPAWNV 1
380#define HAVE_SYMLINK 1
381#define HAVE_SYSCONF 1
382#define HAVE_TANH 1
383#define HAVE_TELLDIR 1
384#define HAVE_TIMEGM 1
385#define HAVE_TIMES 1
386#define HAVE_TRUNCATE 1
387#define HAVE_UNSETENV 1
388#define HAVE_UTIMENSAT 1
389#define HAVE_UTIMES 1
390#define HAVE_WAIT4 1
391#define HAVE_WAITPID 1
392#define HAVE_CRYPT_H 1
393#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
394#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
395#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
396#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
397#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
398#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
399#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
400#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
401#define HAVE_BUILTIN___BUILTIN_CLZ 1
402#define HAVE_BUILTIN___BUILTIN_CLZL 1
403#define HAVE_BUILTIN___BUILTIN_CLZLL 1
404#define HAVE_BUILTIN___BUILTIN_CTZ 1
405#define HAVE_BUILTIN___BUILTIN_CTZLL 1
406#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
407#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
408#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
409#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1
410#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
411#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
412#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
413#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
414#define HAVE_BUILTIN___BUILTIN_TRAP 1
415#define HAVE_GNU_QSORT_R 1
416#define ATAN2_INF_C99 1
417#define HAVE_CLOCK_GETRES 1
418#define HAVE_LIBRT 1
419#define HAVE_LIBRT 1
420#define HAVE_TIMER_CREATE 1
421#define HAVE_TIMER_SETTIME 1
422#define HAVE_STRUCT_TM_TM_ZONE 1
423#define HAVE_TM_ZONE 1
424#define HAVE_STRUCT_TM_TM_GMTOFF 1
425#define HAVE_DAYLIGHT 1
426#define NEGATIVE_TIME_T 1
427#define POSIX_SIGNAL 1
428#define HAVE_SIG_T 1
429#define RSHIFT(x,y) ((x)>>(int)(y))
430#define HAVE__SC_CLK_TCK 1
431#define STACK_GROW_DIRECTION -1
432#define COROUTINE_H "coroutine/ucontext/Context.h"
433#define _REENTRANT 1
434#define _THREAD_SAFE 1
435#define HAVE_LIBPTHREAD 1
436#define HAVE_SCHED_YIELD 1
437#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
438#define HAVE_PTHREAD_ATTR_GETSTACK 1
439#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
440#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
441#define HAVE_PTHREAD_SIGMASK 1
442#define HAVE_PTHREAD_SETNAME_NP 1
443#define HAVE_PTHREAD_GETATTR_NP 1
444#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
445#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
446#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
447#define HAVE_GETCONTEXT 1
448#define HAVE_SETCONTEXT 1
449#define DLEXT_MAXLEN 3
450#define DLEXT ".so"
451#define LIBDIR_BASENAME "lib"
452#define EXECUTABLE_EXTS ".exe",".com",".cmd",".bat"
453#define HAVE__SETJMP 1
454#define RUBY_SETJMP(env) __builtin_setjmp((env))
455#define RUBY_LONGJMP(env,val) __builtin_longjmp((env),val)
456#define USE_MJIT 1
457#define HAVE_PTHREAD_H 1
458#define RUBY_PLATFORM "x86_64-msys"
459#define RUBY_DEFINES_H 1
460#define HAVE_ATTRIBUTE_ERRORFUNC 1
461#define HAVE_ATTRIBUTE_WARNINGFUNC 1
462#define GCC_VERSION_SINCE(major,minor,patchlevel) ((__GNUC__ > (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ > (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
463#define GCC_VERSION_BEFORE(major,minor,patchlevel) ((__GNUC__ < (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ < (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ <= (patchlevel))))))
464#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
465#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
466#define COLDFUNC __attribute__((cold))
467#define PRINTF_ARGS(decl,string_index,first_to_check) decl __attribute__((format(printf, string_index, first_to_check)))
468#define RB_GNUC_EXTENSION __extension__
469#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
470#define _STDIO_H_
471#define _ANSIDECL_H_
472#define __NEWLIB_H__ 1
473#define _NEWLIB_VERSION_H__ 1
474#define _NEWLIB_VERSION "4.1.0"
475#define __NEWLIB__ 4
476#define __NEWLIB_MINOR__ 1
477#define __NEWLIB_PATCHLEVEL__ 0
478#define _WANT_IO_C99_FORMATS 1
479#define _WANT_IO_LONG_LONG 1
480#define _WANT_IO_LONG_DOUBLE 1
481#define _WANT_IO_POS_ARGS 1
482#define _REENT_CHECK_VERIFY 1
483#define _MB_CAPABLE 1
484#define _MB_LEN_MAX 8
485#define _ATEXIT_DYNAMIC_ALLOC 1
486#define _HAVE_LONG_DOUBLE 1
487#define _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL 1
488#define _FVWRITE_IN_STREAMIO 1
489#define _FSEEK_OPTIMIZATION 1
490#define _WIDE_ORIENT 1
491#define _UNBUF_STREAM_OPT 1
492#define __SYS_CONFIG_H__
493#define __IEEE_LITTLE_ENDIAN
494#define _SUPPORTS_ERREXCEPT
495#define __OBSOLETE_MATH_DEFAULT 0
496#define __OBSOLETE_MATH __OBSOLETE_MATH_DEFAULT
497#define _SYS_FEATURES_H
498#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
499#define __GNUC_PREREQ__(ma,mi) __GNUC_PREREQ(ma, mi)
500#undef _ATFILE_SOURCE
501#define _ATFILE_SOURCE 1
502#undef _DEFAULT_SOURCE
503#define _DEFAULT_SOURCE 1
504#undef _ISOC99_SOURCE
505#define _ISOC99_SOURCE 1
506#undef _ISOC11_SOURCE
507#define _ISOC11_SOURCE 1
508#undef _POSIX_SOURCE
509#define _POSIX_SOURCE 1
510#undef _POSIX_C_SOURCE
511#define _POSIX_C_SOURCE 200809L
512#undef _XOPEN_SOURCE
513#define _XOPEN_SOURCE 700
514#undef _XOPEN_SOURCE_EXTENDED
515#define _XOPEN_SOURCE_EXTENDED 1
516#undef _POSIX_SOURCE
517#define _POSIX_SOURCE 1
518#undef _POSIX_C_SOURCE
519#define _POSIX_C_SOURCE 200809L
520#undef _ATFILE_SOURCE
521#define _ATFILE_SOURCE 1
522#define __ATFILE_VISIBLE 1
523#define __BSD_VISIBLE 1
524#define __GNU_VISIBLE 1
525#define __ISO_C_VISIBLE 2011
526#define __LARGEFILE_VISIBLE 1
527#define __MISC_VISIBLE 1
528#define __POSIX_VISIBLE 200809
529#define __SVID_VISIBLE 1
530#define __XSI_VISIBLE 700
531#define __SSP_FORTIFY_LEVEL 2
532#define _POSIX_VERSION 200809L
533#define _POSIX2_VERSION 200809L
534#define _XOPEN_VERSION __XSI_VISIBLE
535#define _POSIX_ADVISORY_INFO 200809L
536#define _POSIX_ASYNCHRONOUS_IO 200809L
537#define _POSIX_BARRIERS 200809L
538#define _POSIX_CHOWN_RESTRICTED 1
539#define _POSIX_CLOCK_SELECTION 200809L
540#define _POSIX_CPUTIME 200809L
541#define _POSIX_FSYNC 200809L
542#define _POSIX_IPV6 200809L
543#define _POSIX_JOB_CONTROL 1
544#define _POSIX_MAPPED_FILES 200809L
545#define _POSIX_MEMLOCK_RANGE 200809L
546#define _POSIX_MEMORY_PROTECTION 200809L
547#define _POSIX_MESSAGE_PASSING 200809L
548#define _POSIX_MONOTONIC_CLOCK 200809L
549#define _POSIX_NO_TRUNC 1
550#define _POSIX_PRIORITY_SCHEDULING 200809L
551#define _POSIX_RAW_SOCKETS 200809L
552#define _POSIX_READER_WRITER_LOCKS 200809L
553#define _POSIX_REALTIME_SIGNALS 200809L
554#define _POSIX_REGEXP 1
555#define _POSIX_SAVED_IDS 1
556#define _POSIX_SEMAPHORES 200809L
557#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
558#define _POSIX_SHELL 1
559#define _POSIX_SPAWN 200809L
560#define _POSIX_SPIN_LOCKS 200809L
561#define _POSIX_SYNCHRONIZED_IO 200809L
562#define _POSIX_THREAD_ATTR_STACKADDR 200809L
563#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
564#define _POSIX_THREAD_CPUTIME 200809L
565#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
566#define _POSIX_THREAD_PROCESS_SHARED 200809L
567#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
568#define _POSIX_THREADS 200809L
569#define _POSIX_TIMEOUTS 200809L
570#define _POSIX_TIMERS 200809L
571#define _POSIX_VDISABLE '\0'
572#define _POSIX2_C_VERSION _POSIX2_VERSION
573#define _POSIX2_C_BIND _POSIX2_VERSION
574#define _POSIX2_C_DEV _POSIX2_VERSION
575#define _POSIX2_CHAR_TERM _POSIX2_VERSION
576#define _POSIX2_SW_DEV _POSIX2_VERSION
577#define _POSIX2_UPE _POSIX2_VERSION
578#define _POSIX_V6_ILP32_OFF32 -1
579#define _POSIX_V6_ILP32_OFFBIG -1
580#define _POSIX_V6_LP64_OFF64 1
581#define _POSIX_V6_LPBIG_OFFBIG 1
582#define _POSIX_V7_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
583#define _POSIX_V7_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
584#define _POSIX_V7_LP64_OFF64 _POSIX_V6_LP64_OFF64
585#define _POSIX_V7_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
586#define _XBS5_ILP32_OFF32 _POSIX_V6_ILP32_OFF32
587#define _XBS5_ILP32_OFFBIG _POSIX_V6_ILP32_OFFBIG
588#define _XBS5_LP64_OFF64 _POSIX_V6_LP64_OFF64
589#define _XBS5_LPBIG_OFFBIG _POSIX_V6_LPBIG_OFFBIG
590#define _XOPEN_CRYPT 1
591#define _XOPEN_ENH_I18N 1
592#define _XOPEN_SHM 1
593#define __STDC_ISO_10646__ 201806L
594#define _POINTER_INT long
595#undef __RAND_MAX
596#define __RAND_MAX 0x7fffffff
597#define _CYGWIN_CONFIG_H
598#define __DYNAMIC_REENT__
599#define __SYMBOL_PREFIX
600#define _SYMSTR(x) __SYMBOL_PREFIX #x
601#define __FILENAME_MAX__ 4096
602#define _READ_WRITE_RETURN_TYPE _ssize_t
603#define _READ_WRITE_BUFSIZE_TYPE size_t
604#define __LARGE64_FILES 1
605#define __USE_INTERNAL_STAT64 1
606#define __LINUX_ERRNO_EXTENSIONS__ 1
607#define _MB_EXTENDED_CHARSETS_ALL 1
608#define __HAVE_LOCALE_INFO__ 1
609#define __HAVE_LOCALE_INFO_EXTENDED__ 1
610#define _WANT_C99_TIME_FORMATS 1
611#define _GLIBC_EXTENSION 1
612#define _STDIO_BSD_SEMANTICS 1
613#define __TM_GMTOFF tm_gmtoff
614#define __TM_ZONE tm_zone
615#define _USE_LONG_TIME_T 1
616#define __EXPORT
617#define __IMPORT __declspec(dllimport)
618#define DEFAULT_LOCALE "C.UTF-8"
619#define _MB_EXTENDED_CHARSETS_ISO 1
620#define _MB_EXTENDED_CHARSETS_WINDOWS 1
621#define _BEGIN_STD_C
622#define _END_STD_C
623#define _NOTHROW
624#define _LONG_DOUBLE long double
625#define _ATTRIBUTE(attrs) __attribute__ (attrs)
626#define _ELIDABLE_INLINE static __inline__
627#define _NOINLINE __attribute__ ((__noinline__))
628#define _NOINLINE_STATIC _NOINLINE static
629#define _FSTDIO
630#define __need_size_t
631#define __need_NULL
632#define _SYS_CDEFS_H_
633#define _MACHINE__DEFAULT_TYPES_H
634#define __EXP(x) __ ##x ##__
635#define __have_longlong64 1
636#define __have_long64 1
637typedef signed char __int8_t;
638typedef unsigned char __uint8_t;
639#define ___int8_t_defined 1
640typedef short int __int16_t;
641typedef short unsigned int __uint16_t;
642#define ___int16_t_defined 1
643typedef int __int32_t;
644typedef unsigned int __uint32_t;
645#define ___int32_t_defined 1
646typedef long int __int64_t;
647typedef long unsigned int __uint64_t;
648#define ___int64_t_defined 1
649typedef signed char __int_least8_t;
650typedef unsigned char __uint_least8_t;
651#define ___int_least8_t_defined 1
652typedef short int __int_least16_t;
653typedef short unsigned int __uint_least16_t;
654#define ___int_least16_t_defined 1
655typedef int __int_least32_t;
656typedef unsigned int __uint_least32_t;
657#define ___int_least32_t_defined 1
658typedef long int __int_least64_t;
659typedef long unsigned int __uint_least64_t;
660#define ___int_least64_t_defined 1
661typedef long int __intmax_t;
662typedef long unsigned int __uintmax_t;
663typedef long int __intptr_t;
664typedef long unsigned int __uintptr_t;
665#undef __EXP
666#define __size_t__
667#define __SIZE_T__
668#define _SIZE_T
669#define _SYS_SIZE_T_H
670#define _T_SIZE_
671#define _T_SIZE
672#define __SIZE_T
673#define _SIZE_T_
674#define _BSD_SIZE_T_
675#define _SIZE_T_DEFINED_
676#define _SIZE_T_DEFINED
677#define _BSD_SIZE_T_DEFINED_
678#define _SIZE_T_DECLARED
679#define ___int_size_t_h
680#define _GCC_SIZE_T
681#define _SIZET_
682#define __size_t
683typedef long unsigned int size_t;
684#undef __need_size_t
685#undef NULL
686#define NULL ((void *)0)
687#undef __need_NULL
688#define __PMT(args) args
689#define __DOTS , ...
690#define __THROW
691#define __ASMNAME(cname) __XSTRING (__USER_LABEL_PREFIX__) cname
692#define __ptr_t void *
693#define __long_double_t long double
694#define __attribute_malloc__
695#define __attribute_pure__
696#define __attribute_format_strfmon__(a,b)
697#define __flexarr [0]
698#define __bounded
699#define __unbounded
700#define __ptrvalue
701#define __has_extension __has_feature
702#define __has_feature(x) 0
703#define __BEGIN_DECLS
704#define __END_DECLS
705#define __GNUCLIKE_ASM 3
706#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
707#define __GNUCLIKE___TYPEOF 1
708#define __GNUCLIKE___OFFSETOF 1
709#define __GNUCLIKE___SECTION 1
710#define __GNUCLIKE_CTOR_SECTION_HANDLING 1
711#define __GNUCLIKE_BUILTIN_CONSTANT_P 1
712#define __GNUCLIKE_BUILTIN_VARARGS 1
713#define __GNUCLIKE_BUILTIN_STDARG 1
714#define __GNUCLIKE_BUILTIN_VAALIST 1
715#define __GNUC_VA_LIST_COMPATIBILITY 1
716#define __compiler_membar() __asm __volatile(" " : : : "memory")
717#define __GNUCLIKE_BUILTIN_NEXT_ARG 1
718#define __GNUCLIKE_MATH_BUILTIN_RELOPS
719#define __GNUCLIKE_BUILTIN_MEMCPY 1
720#define __CC_SUPPORTS_INLINE 1
721#define __CC_SUPPORTS___INLINE 1
722#define __CC_SUPPORTS___INLINE__ 1
723#define __CC_SUPPORTS___FUNC__ 1
724#define __CC_SUPPORTS_WARNING 1
725#define __CC_SUPPORTS_VARADIC_XXX 1
726#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
727#define __P(protos) protos
728#define __CONCAT1(x,y) x ## y
729#define __CONCAT(x,y) __CONCAT1(x,y)
730#define __STRING(x) #x
731#define __XSTRING(x) __STRING(x)
732#define __const const
733#define __signed signed
734#define __volatile volatile
735#define __weak_symbol __attribute__((__weak__))
736#define __dead2 __attribute__((__noreturn__))
737#define __pure2 __attribute__((__const__))
738#define __unused __attribute__((__unused__))
739#define __used __attribute__((__used__))
740#define __packed __attribute__((__packed__))
741#define __aligned(x) __attribute__((__aligned__(x)))
742#define __section(x) __attribute__((__section__(x)))
743#define __alloc_size(x) __attribute__((__alloc_size__(x)))
744#define __alloc_size2(n,x) __attribute__((__alloc_size__(n, x)))
745#define __alloc_align(x) __attribute__((__alloc_align__(x)))
746#define __generic(expr,t,yes,no) _Generic(expr, t: yes, default: no)
747#define __min_size(x) static (x)
748#define __malloc_like __attribute__((__malloc__))
749#define __pure __attribute__((__pure__))
750#define __always_inline __inline__ __attribute__((__always_inline__))
751#define __noinline __attribute__ ((__noinline__))
752#define __nonnull(x) __attribute__((__nonnull__ x))
753#define __nonnull_all __attribute__((__nonnull__))
754#define __fastcall __attribute__((__fastcall__))
755#define __result_use_check __attribute__((__warn_unused_result__))
756#define __returns_twice __attribute__((__returns_twice__))
757#define __unreachable() __builtin_unreachable()
758#define __restrict restrict
759#define __predict_true(exp) __builtin_expect((exp), 1)
760#define __predict_false(exp) __builtin_expect((exp), 0)
761#define __null_sentinel __attribute__((__sentinel__))
762#define __exported __attribute__((__visibility__("default")))
763#define __hidden
764#define __offsetof(type,field) offsetof(type, field)
765#define __rangeof(type,start,end) (__offsetof(type, end) - __offsetof(type, start))
766#define __containerof(x,s,m) ({ const volatile __typeof(((s *)0)->m) *__x = (x); __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));})
767#define __printflike(fmtarg,firstvararg) __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
768#define __scanflike(fmtarg,firstvararg) __attribute__((__format__ (__scanf__, fmtarg, firstvararg)))
769#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg)))
770#define __strfmonlike(fmtarg,firstvararg) __attribute__((__format__ (__strfmon__, fmtarg, firstvararg)))
771#define __strftimelike(fmtarg,firstvararg) __attribute__((__format__ (__strftime__, fmtarg, firstvararg)))
772#define __printf0like(fmtarg,firstvararg)
773#define __strong_reference(sym,aliassym) extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
774#define __weak_reference(sym,alias) __asm__(".stabs \"_" #alias "\",11,0,0,0"); __asm__(".stabs \"_" #sym "\",1,0,0,0")
775#define __warn_references(sym,msg) __asm__(".stabs \"" msg "\",30,0,0,0"); __asm__(".stabs \"_" #sym "\",1,0,0,0")
776#define __FBSDID(s) struct __hack
777#define __RCSID(s) struct __hack
778#define __RCSID_SOURCE(s) struct __hack
779#define __SCCSID(s) struct __hack
780#define __COPYRIGHT(s) struct __hack
781#define __DECONST(type,var) ((type)(__uintptr_t)(const void *)(var))
782#define __DEVOLATILE(type,var) ((type)(__uintptr_t)(volatile void *)(var))
783#define __DEQUALIFY(type,var) ((type)(__uintptr_t)(const volatile void *)(var))
784#define _Nonnull
785#define _Nullable
786#define _Null_unspecified
787#define __NULLABILITY_PRAGMA_PUSH
788#define __NULLABILITY_PRAGMA_POP
789#define __arg_type_tag(arg_kind,arg_idx,type_tag_idx)
790#define __datatype_type_tag(kind,type)
791#define __lock_annotate(x)
792#define __lockable __lock_annotate(lockable)
793#define __locks_exclusive(...) __lock_annotate(exclusive_lock_function(__VA_ARGS__))
794#define __locks_shared(...) __lock_annotate(shared_lock_function(__VA_ARGS__))
795#define __trylocks_exclusive(...) __lock_annotate(exclusive_trylock_function(__VA_ARGS__))
796#define __trylocks_shared(...) __lock_annotate(shared_trylock_function(__VA_ARGS__))
797#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__))
798#define __asserts_exclusive(...) __lock_annotate(assert_exclusive_lock(__VA_ARGS__))
799#define __asserts_shared(...) __lock_annotate(assert_shared_lock(__VA_ARGS__))
800#define __requires_exclusive(...) __lock_annotate(exclusive_locks_required(__VA_ARGS__))
801#define __requires_shared(...) __lock_annotate(shared_locks_required(__VA_ARGS__))
802#define __requires_unlocked(...) __lock_annotate(locks_excluded(__VA_ARGS__))
803#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis)
804#define __nosanitizeaddress
805#define __nosanitizethread
806#define __guarded_by(x) __lock_annotate(guarded_by(x))
807#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x))
808#define _STDDEF_H
809#define _STDDEF_H_
810#define _ANSI_STDDEF_H
811#define _PTRDIFF_T
812#define _T_PTRDIFF_
813#define _T_PTRDIFF
814#define __PTRDIFF_T
815#define _PTRDIFF_T_
816#define _BSD_PTRDIFF_T_
817#define ___int_ptrdiff_t_h
818#define _GCC_PTRDIFF_T
819#define _PTRDIFF_T_DECLARED
820typedef long int ptrdiff_t;
821#undef __need_ptrdiff_t
822#undef __need_size_t
823#define __wchar_t__
824#define __WCHAR_T__
825#define _WCHAR_T
826#define _T_WCHAR_
827#define _T_WCHAR
828#define __WCHAR_T
829#define _WCHAR_T_
830#define _BSD_WCHAR_T_
831#define _WCHAR_T_DEFINED_
832#define _WCHAR_T_DEFINED
833#define _WCHAR_T_H
834#define ___int_wchar_t_h
835#define __INT_WCHAR_T_H
836#define _GCC_WCHAR_T
837#define _WCHAR_T_DECLARED
838#undef _BSD_WCHAR_T_
839typedef short unsigned int wchar_t;
840#undef __need_wchar_t
841#undef NULL
842#define NULL ((void *)0)
843#undef __need_NULL
844#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
845#define _GCC_MAX_ALIGN_T
846typedef struct {
847 long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))));
848 long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))));
850#define __need___va_list
851#undef __need___va_list
852#define __GNUC_VA_LIST
853typedef __builtin_va_list __gnuc_va_list;
855#define _VA_LIST_DEFINED
856#define _SYS_REENT_H_
857#define _SYS__TYPES_H
858#define __need_size_t
859#define __need_wint_t
860#undef __need_ptrdiff_t
861#undef __need_size_t
862#undef __need_wchar_t
863#define _WINT_T
864typedef unsigned int wint_t;
865#undef __need_wint_t
866#undef NULL
867#define NULL ((void *)0)
868#undef __need_NULL
869#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
870#define _MACHINE__TYPES_H
871#define __machine_blkcnt_t_defined
873#define __machine_blksize_t_defined
875#define __machine_dev_t_defined
877#define __machine_fsblkcnt_t_defined
878typedef unsigned long __fsblkcnt_t;
879#define __machine_fsfilcnt_t_defined
880typedef unsigned long __fsfilcnt_t;
881#define __machine_uid_t_defined
883#define __machine_gid_t_defined
885#define __machine_ino_t_defined
887#define __machine_key_t_defined
888typedef long long __key_t;
889#define __machine_sa_family_t_defined
891#define __machine_socklen_t_defined
892typedef int __socklen_t;
893typedef long _off_t;
894typedef int __pid_t;
897__extension__ typedef long long _off64_t;
900typedef long _fpos_t;
902#undef __size_t
903typedef long unsigned int __size_t;
904#define unsigned signed
905typedef long signed int _ssize_t;
906#undef unsigned
908typedef struct
909{
911 union
912 {
914 unsigned char __wchb[4];
915 } __value;
916} _mbstate_t;
917typedef void *_iconv_t;
918#define _CLOCK_T_ unsigned long
919typedef unsigned long __clock_t;
920#define _TIME_T_ long
921typedef long __time_t;
922#define _CLOCKID_T_ unsigned long
923typedef unsigned long __clockid_t;
924#define _TIMER_T_ unsigned long
925typedef unsigned long __timer_t;
926typedef int __nl_item;
927typedef unsigned short __nlink_t;
928typedef long __suseconds_t;
929typedef unsigned long __useconds_t;
930typedef __builtin_va_list __va_list;
931#define _NULL 0
932#define __Long int
933typedef unsigned int __ULong;
934#define _SYS_LOCK_H_
935typedef void *_LOCK_T;
936#define _LOCK_RECURSIVE_T _LOCK_T
937#define _LOCK_T_RECURSIVE_INITIALIZER ((_LOCK_T)18)
938#define _LOCK_T_INITIALIZER ((_LOCK_T)19)
939#define __LOCK_INIT(CLASS,NAME) CLASS _LOCK_T NAME = _LOCK_T_INITIALIZER;
940#define __LOCK_INIT_RECURSIVE(CLASS,NAME) CLASS _LOCK_T NAME = _LOCK_T_RECURSIVE_INITIALIZER;
941#define __lock_init(__lock) __cygwin_lock_init(&__lock)
942#define __lock_init_recursive(__lock) __cygwin_lock_init_recursive(&__lock)
943#define __lock_close(__lock) __cygwin_lock_fini(&__lock)
944#define __lock_close_recursive(__lock) __cygwin_lock_fini(&__lock)
945#define __lock_acquire(__lock) __cygwin_lock_lock(&__lock)
946#define __lock_acquire_recursive(__lock) __cygwin_lock_lock(&__lock)
947#define __lock_try_acquire(lock) __cygwin_lock_trylock(&__lock)
948#define __lock_try_acquire_recursive(lock) __cygwin_lock_trylock(&__lock)
949#define __lock_release(__lock) __cygwin_lock_unlock(&__lock)
950#define __lock_release_recursive(__lock) __cygwin_lock_unlock(&__lock)
958struct _reent;
959struct __locale_t;
961{
962 struct _Bigint *_next;
965};
966struct __tm
967{
977};
978#define _ATEXIT_SIZE 32
980 void * _fnargs[32];
981 void * _dso_handle[32];
984};
985struct _atexit {
986 struct _atexit *_next;
987 int _ind;
988 void (*_fns[32])(void);
990};
991#define _ATEXIT_INIT {_NULL, 0, {_NULL}, {{_NULL}, {_NULL}, 0, 0}}
992#define _REENT_INIT_ATEXIT _NULL, _ATEXIT_INIT,
993struct __sbuf {
994 unsigned char *_base;
995 int _size;
996};
997#define _REENT_SMALL_CHECK_INIT(ptr)
998struct __sFILE {
999 unsigned char *_p;
1000 int _r;
1001 int _w;
1002 short _flags;
1003 short _file;
1004 struct __sbuf _bf;
1006 void * _cookie;
1007 _ssize_t (*_read) (struct _reent *, void *,
1008 char *, size_t);
1009 _ssize_t (*_write) (struct _reent *, void *,
1010 const char *,
1011 size_t);
1012 _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
1013 int (*_close) (struct _reent *, void *);
1014 struct __sbuf _ub;
1015 unsigned char *_up;
1016 int _ur;
1017 unsigned char _ubuf[3];
1018 unsigned char _nbuf[1];
1019 struct __sbuf _lb;
1022 struct _reent *_data;
1026};
1028 unsigned char *_p;
1029 int _r;
1030 int _w;
1031 short _flags;
1032 short _file;
1033 struct __sbuf _bf;
1035 struct _reent *_data;
1036 void * _cookie;
1037 _ssize_t (*_read) (struct _reent *, void *,
1038 char *, size_t);
1039 _ssize_t (*_write) (struct _reent *, void *,
1040 const char *,
1041 size_t);
1042 _fpos_t (*_seek) (struct _reent *, void *, _fpos_t, int);
1043 int (*_close) (struct _reent *, void *);
1044 struct __sbuf _ub;
1045 unsigned char *_up;
1046 int _ur;
1047 unsigned char _ubuf[3];
1048 unsigned char _nbuf[1];
1049 struct __sbuf _lb;
1053 _fpos64_t (*_seek64) (struct _reent *, void *, _fpos64_t, int);
1056};
1057typedef struct __sFILE64 __FILE;
1058struct _glue
1059{
1060 struct _glue *_next;
1063};
1064#define _RAND48_SEED_0 (0x330e)
1065#define _RAND48_SEED_1 (0xabcd)
1066#define _RAND48_SEED_2 (0x1234)
1067#define _RAND48_MULT_0 (0xe66d)
1068#define _RAND48_MULT_1 (0xdeec)
1069#define _RAND48_MULT_2 (0x0005)
1070#define _RAND48_ADD (0x000b)
1071struct _rand48 {
1072 unsigned short _seed[3];
1073 unsigned short _mult[3];
1074 unsigned short _add;
1075};
1076#define _REENT_EMERGENCY_SIZE 25
1077#define _REENT_ASCTIME_SIZE 26
1078#define _REENT_SIGNAL_SIZE 24
1080{
1083 int _inc;
1084 char _emergency[25];
1086 struct __locale_t *_locale;
1088 void (*__cleanup) (struct _reent *);
1091 struct _Bigint *_p5s;
1094 char *_cvtbuf;
1095 union
1096 {
1097 struct
1098 {
1099 unsigned int _unused_rand;
1104 __extension__ unsigned long long _rand_next;
1109 char _l64a_buf[8];
1110 char _signal_buf[24];
1119 struct
1120 {
1121#define _N_LISTS 30
1122 unsigned char * _nextf[30];
1123 unsigned int _nmalloc[30];
1131};
1132#define _REENT_STDIO_STREAM(var,index) &(var)->__sf[index]
1133#define _REENT_INIT(var) { 0, _REENT_STDIO_STREAM(&(var), 0), _REENT_STDIO_STREAM(&(var), 1), _REENT_STDIO_STREAM(&(var), 2), 0, "", 0, _NULL, 0, _NULL, _NULL, 0, _NULL, _NULL, 0, _NULL, { { 0, _NULL, "", {0, 0, 0, 0, 0, 0, 0, 0, 0}, 0, 1, { {_RAND48_SEED_0, _RAND48_SEED_1, _RAND48_SEED_2}, {_RAND48_MULT_0, _RAND48_MULT_1, _RAND48_MULT_2}, _RAND48_ADD }, {0, {0}}, {0, {0}}, {0, {0}}, "", "", 0, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}} } }, _REENT_INIT_ATEXIT _NULL, {_NULL, 0, _NULL} }
1134#define _REENT_INIT_PTR_ZEROED(var) { (var)->_stdin = _REENT_STDIO_STREAM(var, 0); (var)->_stdout = _REENT_STDIO_STREAM(var, 1); (var)->_stderr = _REENT_STDIO_STREAM(var, 2); (var)->_new._reent._rand_next = 1; (var)->_new._reent._r48._seed[0] = _RAND48_SEED_0; (var)->_new._reent._r48._seed[1] = _RAND48_SEED_1; (var)->_new._reent._r48._seed[2] = _RAND48_SEED_2; (var)->_new._reent._r48._mult[0] = _RAND48_MULT_0; (var)->_new._reent._r48._mult[1] = _RAND48_MULT_1; (var)->_new._reent._r48._mult[2] = _RAND48_MULT_2; (var)->_new._reent._r48._add = _RAND48_ADD; }
1135#define _REENT_CHECK_RAND48(ptr)
1136#define _REENT_CHECK_MP(ptr)
1137#define _REENT_CHECK_TM(ptr)
1138#define _REENT_CHECK_ASCTIME_BUF(ptr)
1139#define _REENT_CHECK_EMERGENCY(ptr)
1140#define _REENT_CHECK_MISC(ptr)
1141#define _REENT_CHECK_SIGNAL_BUF(ptr)
1142#define _REENT_SIGNGAM(ptr) ((ptr)->_new._reent._gamma_signgam)
1143#define _REENT_RAND_NEXT(ptr) ((ptr)->_new._reent._rand_next)
1144#define _REENT_RAND48_SEED(ptr) ((ptr)->_new._reent._r48._seed)
1145#define _REENT_RAND48_MULT(ptr) ((ptr)->_new._reent._r48._mult)
1146#define _REENT_RAND48_ADD(ptr) ((ptr)->_new._reent._r48._add)
1147#define _REENT_MP_RESULT(ptr) ((ptr)->_result)
1148#define _REENT_MP_RESULT_K(ptr) ((ptr)->_result_k)
1149#define _REENT_MP_P5S(ptr) ((ptr)->_p5s)
1150#define _REENT_MP_FREELIST(ptr) ((ptr)->_freelist)
1151#define _REENT_ASCTIME_BUF(ptr) ((ptr)->_new._reent._asctime_buf)
1152#define _REENT_TM(ptr) (&(ptr)->_new._reent._localtime_buf)
1153#define _REENT_EMERGENCY(ptr) ((ptr)->_emergency)
1154#define _REENT_STRTOK_LAST(ptr) ((ptr)->_new._reent._strtok_last)
1155#define _REENT_MBLEN_STATE(ptr) ((ptr)->_new._reent._mblen_state)
1156#define _REENT_MBTOWC_STATE(ptr) ((ptr)->_new._reent._mbtowc_state)
1157#define _REENT_WCTOMB_STATE(ptr) ((ptr)->_new._reent._wctomb_state)
1158#define _REENT_MBRLEN_STATE(ptr) ((ptr)->_new._reent._mbrlen_state)
1159#define _REENT_MBRTOWC_STATE(ptr) ((ptr)->_new._reent._mbrtowc_state)
1160#define _REENT_MBSRTOWCS_STATE(ptr) ((ptr)->_new._reent._mbsrtowcs_state)
1161#define _REENT_WCRTOMB_STATE(ptr) ((ptr)->_new._reent._wcrtomb_state)
1162#define _REENT_WCSRTOMBS_STATE(ptr) ((ptr)->_new._reent._wcsrtombs_state)
1163#define _REENT_L64A_BUF(ptr) ((ptr)->_new._reent._l64a_buf)
1164#define _REENT_SIGNAL_BUF(ptr) ((ptr)->_new._reent._signal_buf)
1165#define _REENT_GETDATE_ERR_P(ptr) (&((ptr)->_new._reent._getdate_err))
1166#define _REENT_INIT_PTR(var) { memset((var), 0, sizeof(*(var))); _REENT_INIT_PTR_ZEROED(var); }
1167#define _Kmax (sizeof (size_t) << 3)
1168#define __ATTRIBUTE_IMPURE_PTR__
1169extern struct _reent *_impure_ptr ;
1170extern struct _reent *const _global_impure_ptr ;
1171void _reclaim_reent (struct _reent *);
1172 struct _reent * __getreent (void);
1173#define _REENT (__getreent())
1174#define _GLOBAL_REENT _global_impure_ptr
1175#define _GLOBAL_ATEXIT (_GLOBAL_REENT->_atexit)
1181#define __BIT_TYPES_DEFINED__ 1
1182#define _SYS_TYPES_H
1183#define _SYS__STDINT_H
1185#define _INT8_T_DECLARED
1187#define _UINT8_T_DECLARED
1188#define __int8_t_defined 1
1190#define _INT16_T_DECLARED
1192#define _UINT16_T_DECLARED
1193#define __int16_t_defined 1
1195#define _INT32_T_DECLARED
1197#define _UINT32_T_DECLARED
1198#define __int32_t_defined 1
1200#define _INT64_T_DECLARED
1202#define _UINT64_T_DECLARED
1203#define __int64_t_defined 1
1205#define _INTMAX_T_DECLARED
1207#define _UINTMAX_T_DECLARED
1209#define _INTPTR_T_DECLARED
1211#define _UINTPTR_T_DECLARED
1212#define __MACHINE_ENDIAN_H__
1213#define _BITS_ENDIAN_H_
1214#define __BIG_ENDIAN 4321
1215#define __LITTLE_ENDIAN 1234
1216#define __BYTE_ORDER __LITTLE_ENDIAN
1217#define _LITTLE_ENDIAN __LITTLE_ENDIAN
1218#define _BIG_ENDIAN __BIG_ENDIAN
1219#define _PDP_ENDIAN __PDP_ENDIAN
1220#define _BYTE_ORDER __BYTE_ORDER
1221#define __machine_host_to_from_network_defined
1222static __inline__ __uint32_t __ntohl(__uint32_t);
1223static __inline__ __uint16_t __ntohs(__uint16_t);
1224static __inline__ __uint32_t
1225__ntohl(__uint32_t _x)
1226{
1227 __asm__("bswap %0" : "=r" (_x) : "0" (_x));
1228 return _x;
1229}
1230static __inline__ __uint16_t
1231__ntohs(__uint16_t _x)
1232{
1233 __asm__("xchgb %b0,%h0"
1234 : "=Q" (_x)
1235 : "0" (_x));
1236 return _x;
1237}
1238#define __htonl(_x) __ntohl(_x)
1239#define __htons(_x) __ntohs(_x)
1240#define _QUAD_HIGHWORD 1
1241#define _QUAD_LOWWORD 0
1242#define LITTLE_ENDIAN _LITTLE_ENDIAN
1243#define BIG_ENDIAN _BIG_ENDIAN
1244#define PDP_ENDIAN _PDP_ENDIAN
1245#define BYTE_ORDER _BYTE_ORDER
1246#define __bswap16(_x) __builtin_bswap16(_x)
1247#define __bswap32(_x) __builtin_bswap32(_x)
1248#define __bswap64(_x) __builtin_bswap64(_x)
1249#define _SYS_SELECT_H
1250#define _SYS__SIGSET_H_
1251typedef unsigned long __sigset_t;
1252#define _SYS__TIMEVAL_H_
1254#define _SUSECONDS_T_DECLARED
1255typedef long time_t;
1256#define __time_t_defined
1257#define _TIME_T_DECLARED
1258#define _TIMEVAL_DEFINED
1259struct timeval {
1262};
1263#define _SYS_TIMESPEC_H_
1264#define _SYS__TIMESPEC_H_
1265struct timespec {
1268};
1269#define TIMEVAL_TO_TIMESPEC(tv,ts) do { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; } while (0)
1270#define TIMESPEC_TO_TIMEVAL(tv,ts) do { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; } while (0)
1274};
1275#define _SIGSET_T_DECLARED
1277#define _SYS_TYPES_FD_SET
1278#define FD_SETSIZE 64
1279typedef unsigned long __fd_mask;
1281#define _NFDBITS ((int)sizeof(__fd_mask) * 8)
1282#define NFDBITS _NFDBITS
1283#define _howmany(x,y) (((x) + ((y) - 1)) / (y))
1284typedef struct fd_set {
1285 __fd_mask __fds_bits[(((64) + ((((int)sizeof(__fd_mask) * 8)) - 1)) / (((int)sizeof(__fd_mask) * 8)))];
1287#define fds_bits __fds_bits
1288#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS))
1289#define FD_CLR(n,p) ((p)->__fds_bits[(n)/_NFDBITS] &= ~__fdset_mask(n))
1290#define FD_COPY(f,t) (void)(*(t) = *(f))
1291#define FD_ISSET(n,p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0)
1292#define FD_SET(n,p) ((p)->__fds_bits[(n)/_NFDBITS] |= __fdset_mask(n))
1293#define FD_ZERO(p) do { fd_set *_p; __size_t _n; _p = (p); _n = _howmany(FD_SETSIZE, _NFDBITS); while (_n > 0) _p->__fds_bits[--_n] = 0; } while (0)
1294
1295int select (int __n, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout);
1296int pselect (int __n, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, const struct timespec *__timeout, const sigset_t *__set);
1297
1298#define physadr physadr_t
1299#define quad quad_t
1301#define _IN_ADDR_T_DECLARED
1303#define _IN_PORT_T_DECLARED
1305typedef unsigned char u_char;
1306#define __u_char_defined
1307typedef unsigned short u_short;
1308#define __u_short_defined
1309typedef unsigned int u_int;
1310#define __u_int_defined
1311typedef unsigned long u_long;
1312#define __u_long_defined
1313#define _BSDTYPES_DEFINED
1314typedef unsigned short ushort;
1315typedef unsigned int uint;
1316typedef unsigned long ulong;
1318#define _BLKCNT_T_DECLARED
1320#define _BLKSIZE_T_DECLARED
1321typedef unsigned long clock_t;
1322#define __clock_t_defined
1323#define _CLOCK_T_DECLARED
1324typedef long daddr_t;
1325#define __daddr_t_defined
1326typedef char * caddr_t;
1327#define __caddr_t_defined
1330#define _FSBLKCNT_T_DECLARED
1331typedef __id_t id_t;
1332#define _ID_T_DECLARED
1334#define _INO_T_DECLARED
1336#define _OFF_T_DECLARED
1338#define _DEV_T_DECLARED
1340#define _UID_T_DECLARED
1342#define _GID_T_DECLARED
1344#define _PID_T_DECLARED
1346#define _KEY_T_DECLARED
1348#define _SSIZE_T_DECLARED
1350#define _MODE_T_DECLARED
1352#define _NLINK_T_DECLARED
1354#define __clockid_t_defined
1355#define _CLOCKID_T_DECLARED
1357#define __timer_t_defined
1358#define _TIMER_T_DECLARED
1360#define _USECONDS_T_DECLARED
1362#define _SYS__PTHREADTYPES_H_
1363#define _SYS_CPUSET_H_
1364typedef long unsigned int __cpu_mask;
1365#define __CPU_SETSIZE 1024
1366#define __NCPUBITS (8 * sizeof (__cpu_mask))
1367#define __CPU_GROUPMAX (__CPU_SETSIZE / __NCPUBITS)
1368#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
1369#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
1370typedef struct
1371{
1372 __cpu_mask __bits[(1024 / (8 * sizeof (__cpu_mask)))];
1373} cpu_set_t;
1375#define CPU_ALLOC_SIZE(num) ((num+__NCPUBITS-1) / __NCPUBITS) * sizeof (__cpu_mask)
1376#define CPU_ALLOC(num) __builtin_malloc (CPU_ALLOC_SIZE(num))
1377#define CPU_FREE(set) __builtin_free (set)
1378#define CPU_ZERO_S(siz,set) __builtin_memset (set, 0, siz)
1379#define CPU_SET_S(cpu,siz,set) if (cpu < 8 * siz) (set)->__bits[__CPUELT(cpu)] |= __CPUMASK(cpu);
1380#define CPU_CLR_S(cpu,siz,set) if (cpu < 8 * siz) (set)->__bits[__CPUELT(cpu)] &= ~(__CPUMASK(cpu));
1381#define CPU_ISSET_S(cpu,siz,set) ({int res = 0; if (cpu < 8 * siz) res = !!((set)->__bits[__CPUELT(cpu)] & __CPUMASK(cpu)); res;})
1382#define CPU_COUNT_S(siz,set) ({int tot = 0; for (int i = 0; i < siz / sizeof (__cpu_mask); i++) tot += __builtin_popcountl ((set)->__bits[i]); tot;})
1383#define CPU_AND_S(siz,dst,src1,src2) for (int i = 0; i < siz / sizeof (__cpu_mask); i++) (dst)->__bits[i] = (src1)->__bits[i] & (src2)->__bits[i];
1384#define CPU_OR_S(siz,dst,src1,src2) for (int i = 0; i < siz / sizeof (__cpu_mask); i++) (dst)->__bits[i] = (src1)->__bits[i] | (src2)->__bits[i];
1385#define CPU_XOR_S(siz,dst,src1,src2) for (int i = 0; i < siz / sizeof (__cpu_mask); i++) (dst)->__bits[i] = (src1)->__bits[i] ^ (src2)->__bits[i];
1386#define CPU_EQUAL_S(siz,src1,src2) ({int res = 1; for (int i = 0; res && i < siz / sizeof (__cpu_mask); i++) res &= (src1)->__bits[i] == (src2)->__bits[i]; res;})
1387#define CPU_ZERO(set) CPU_ZERO_S(sizeof (cpu_set_t), set)
1388#define CPU_SET(cpu,set) CPU_SET_S(cpu, sizeof (cpu_set_t), set)
1389#define CPU_CLR(cpu,set) CPU_CLR_S(cpu, sizeof (cpu_set_t), set)
1390#define CPU_ISSET(cpu,set) CPU_ISSET_S(cpu, sizeof (cpu_set_t), set)
1391#define CPU_COUNT(set) CPU_COUNT_S(sizeof (cpu_set_t), set)
1392#define CPU_AND(dst,src1,src2) CPU_AND_S(sizeof (cpu_set_t), dst, src1, src2)
1393#define CPU_OR(dst,src1,src2) CPU_OR_S(sizeof (cpu_set_t), dst, src1, src2)
1394#define CPU_XOR(dst,src1,src2) CPU_XOR_S(sizeof (cpu_set_t), dst, src1, src2)
1395#define CPU_EQUAL(src1,src2) CPU_EQUAL_S(sizeof (cpu_set_t), src1, src2)
1396#define CPU_SETSIZE __CPU_SETSIZE
1397typedef struct __pthread_t {char __dummy;} *pthread_t;
1399typedef struct __pthread_key_t {char __dummy;} *pthread_key_t;
1406typedef struct
1407{
1410}
1415#define _ENDIAN_H_
1416#define __LONG_LONG_PAIR(HI,LO) LO, HI
1417#define _BITS_BYTESWAP_H
1418static __inline unsigned short
1419__bswap_16 (unsigned short __x)
1420{
1421 return (__x >> 8) | (__x << 8);
1422}
1423static __inline unsigned int
1424__bswap_32 (unsigned int __x)
1425{
1426 return (__bswap_16 (__x & 0xffff) << 16) | (__bswap_16 (__x >> 16));
1427}
1428static __inline unsigned long long
1429__bswap_64 (unsigned long long __x)
1430{
1431 return (((unsigned long long) __bswap_32 (__x & 0xffffffffull)) << 32) | (__bswap_32 (__x >> 32));
1432}
1433#define htobe16(x) __bswap_16(x)
1434#define htobe32(x) __bswap_32(x)
1435#define htobe64(x) __bswap_64(x)
1436#define be16toh(x) __bswap_16(x)
1437#define be32toh(x) __bswap_32(x)
1438#define be64toh(x) __bswap_64(x)
1439#define htole16(x) (x)
1440#define htole32(x) (x)
1441#define htole64(x) (x)
1442#define le16toh(x) (x)
1443#define le32toh(x) (x)
1444#define le64toh(x) (x)
1445#define _WORDSIZE_H 1
1446#define __WORDSIZE 64
1447#define __WORDSIZE_COMPAT32 1
1448#define __timespec_t_defined
1449typedef struct timespec timespec_t;
1450#define __timestruc_t_defined
1451typedef struct timespec timestruc_t;
1453struct flock {
1454 short l_type;
1459};
1460#define __BIT_TYPES_DEFINED__ 1
1461#define __vm_offset_t_defined
1462typedef unsigned long vm_offset_t;
1463#define __vm_size_t_defined
1464typedef unsigned long vm_size_t;
1465#define __vm_object_t_defined
1466typedef void *vm_object_t;
1467#define __addr_t_defined
1468typedef char *addr_t;
1469#define _SYS_SYSMACROS_H
1470static __inline__ int gnu_dev_major(dev_t);
1471static __inline__ int gnu_dev_minor(dev_t);
1472static __inline__ dev_t gnu_dev_makedev(int, int);
1473static __inline__ int
1474gnu_dev_major(dev_t dev)
1475{
1476 return (int)(((dev) >> 16) & 0xffff);
1477}
1478static __inline__ int
1479gnu_dev_minor(dev_t dev)
1480{
1481 return (int)((dev) & 0xffff);
1482}
1483static __inline__ dev_t
1484gnu_dev_makedev(int maj, int min)
1485{
1486 return (((maj) << 16) | ((min) & 0xffff));
1487}
1488#define major(dev) gnu_dev_major(dev)
1489#define minor(dev) gnu_dev_minor(dev)
1490#define makedev(maj,min) gnu_dev_makedev(maj, min)
1491#undef __need_inttypes
1492
1493typedef __FILE FILE;
1494#define __FILE_defined
1496#define _SYS_STDIO_H_
1497#define _flockfile(fp) ({ if (!((fp)->_flags & __SSTR)) __cygwin_lock_lock ((_LOCK_T *)&(fp)->_lock); })
1498#define _ftrylockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __cygwin_lock_trylock ((_LOCK_T *)&(fp)->_lock))
1499#define _funlockfile(fp) ({ if (!((fp)->_flags & __SSTR)) __cygwin_lock_unlock ((_LOCK_T *)&(fp)->_lock); })
1500
1501ssize_t getline (char **, size_t *, FILE *);
1502ssize_t getdelim (char **, size_t *, int, FILE *);
1503
1504#define __SLBF 0x0001
1505#define __SNBF 0x0002
1506#define __SRD 0x0004
1507#define __SWR 0x0008
1508#define __SRW 0x0010
1509#define __SEOF 0x0020
1510#define __SERR 0x0040
1511#define __SMBF 0x0080
1512#define __SAPP 0x0100
1513#define __SSTR 0x0200
1514#define __SOPT 0x0400
1515#define __SNPT 0x0800
1516#define __SOFF 0x1000
1517#define __SORD 0x2000
1518#define __SCLE 0x4000
1519#define __SL64 0x8000
1520#define __SNLK 0x0001
1521#define __SWID 0x2000
1522#define _IOFBF 0
1523#define _IOLBF 1
1524#define _IONBF 2
1525#define EOF (-1)
1526#define BUFSIZ 1024
1527#define FOPEN_MAX 20
1528#define FILENAME_MAX __FILENAME_MAX__
1529#define L_tmpnam FILENAME_MAX
1530#define P_tmpdir "/tmp"
1531#define SEEK_SET 0
1532#define SEEK_CUR 1
1533#define SEEK_END 2
1534#define TMP_MAX 26
1535#define stdin (_REENT->_stdin)
1536#define stdout (_REENT->_stdout)
1537#define stderr (_REENT->_stderr)
1538#define _stdin_r(x) ((x)->_stdin)
1539#define _stdout_r(x) ((x)->_stdout)
1540#define _stderr_r(x) ((x)->_stderr)
1541#define __VALIST __gnuc_va_list
1542char * ctermid (char *);
1543char * cuserid (char *);
1544FILE * tmpfile (void);
1545char * tmpnam (char *);
1546char * tempnam (const char *, const char *) __attribute__((__malloc__)) __attribute__((__warn_unused_result__));
1547int fclose (FILE *);
1548int fflush (FILE *);
1551int setvbuf (FILE *__restrict__, char *__restrict__, int, size_t);
1552int fprintf (FILE *__restrict__, const char *__restrict__, ...)
1553 __attribute__ ((__format__ (__printf__, 2, 3)));
1555 __attribute__ ((__format__ (__scanf__, 2, 3)));
1556int printf (const char *__restrict__, ...)
1557 __attribute__ ((__format__ (__printf__, 1, 2)));
1558int scanf (const char *__restrict__, ...)
1559 __attribute__ ((__format__ (__scanf__, 1, 2)));
1561 __attribute__ ((__format__ (__scanf__, 2, 3)));
1563 __attribute__ ((__format__ (__printf__, 2, 0)));
1565 __attribute__ ((__format__ (__printf__, 1, 0)));
1567 __attribute__ ((__format__ (__printf__, 2, 0)));
1568int fgetc (FILE *);
1569char * fgets (char *__restrict__, int, FILE *__restrict__);
1570int fputc (int, FILE *);
1572int getc (FILE *);
1573int getchar (void);
1574char * gets (char *);
1575int putc (int, FILE *);
1576int putchar (int);
1577int puts (const char *);
1578int ungetc (int, FILE *);
1579size_t fread (void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1580size_t fwrite (const void *__restrict__ , size_t _size, size_t _n, FILE *);
1582int fseek (FILE *, long, int);
1584long ftell ( FILE *);
1585void rewind (FILE *);
1587int feof (FILE *);
1588int ferror (FILE *);
1589void perror (const char *);
1590FILE * fopen (const char *__restrict__ _name, const char *__restrict__ _type);
1592 __attribute__ ((__format__ (__printf__, 2, 3)));
1593int remove (const char *);
1594int rename (const char *, const char *);
1595int fseeko (FILE *, off_t, int);
1597int fcloseall (void);
1598int snprintf (char *__restrict__, size_t, const char *__restrict__, ...)
1599 __attribute__ ((__format__ (__printf__, 3, 4)));
1601 __attribute__ ((__format__ (__printf__, 3, 0)));
1603 __attribute__ ((__format__ (__scanf__, 2, 0)));
1605 __attribute__ ((__format__ (__scanf__, 1, 0)));
1607 __attribute__ ((__format__ (__scanf__, 2, 0)));
1608int asprintf (char **__restrict__, const char *__restrict__, ...)
1609 __attribute__ ((__format__ (__printf__, 2, 3)));
1610int vasprintf (char **, const char *, __gnuc_va_list)
1611 __attribute__ ((__format__ (__printf__, 2, 0)));
1612int asiprintf (char **, const char *, ...)
1613 __attribute__ ((__format__ (__printf__, 2, 3)));
1614char * asniprintf (char *, size_t *, const char *, ...)
1615 __attribute__ ((__format__ (__printf__, 3, 4)));
1616char * asnprintf (char *__restrict__, size_t *__restrict__, const char *__restrict__, ...)
1617 __attribute__ ((__format__ (__printf__, 3, 4)));
1618int diprintf (int, const char *, ...)
1619 __attribute__ ((__format__ (__printf__, 2, 3)));
1620int fiprintf (FILE *, const char *, ...)
1621 __attribute__ ((__format__ (__printf__, 2, 3)));
1622int fiscanf (FILE *, const char *, ...)
1623 __attribute__ ((__format__ (__scanf__, 2, 3)));
1624int iprintf (const char *, ...)
1625 __attribute__ ((__format__ (__printf__, 1, 2)));
1626int iscanf (const char *, ...)
1627 __attribute__ ((__format__ (__scanf__, 1, 2)));
1628int siprintf (char *, const char *, ...)
1629 __attribute__ ((__format__ (__printf__, 2, 3)));
1630int siscanf (const char *, const char *, ...)
1631 __attribute__ ((__format__ (__scanf__, 2, 3)));
1632int sniprintf (char *, size_t, const char *, ...)
1633 __attribute__ ((__format__ (__printf__, 3, 4)));
1634int vasiprintf (char **, const char *, __gnuc_va_list)
1635 __attribute__ ((__format__ (__printf__, 2, 0)));
1636char * vasniprintf (char *, size_t *, const char *, __gnuc_va_list)
1637 __attribute__ ((__format__ (__printf__, 3, 0)));
1638char * vasnprintf (char *, size_t *, const char *, __gnuc_va_list)
1639 __attribute__ ((__format__ (__printf__, 3, 0)));
1641 __attribute__ ((__format__ (__printf__, 2, 0)));
1643 __attribute__ ((__format__ (__printf__, 2, 0)));
1645 __attribute__ ((__format__ (__scanf__, 2, 0)));
1647 __attribute__ ((__format__ (__printf__, 1, 0)));
1649 __attribute__ ((__format__ (__scanf__, 1, 0)));
1650int vsiprintf (char *, const char *, __gnuc_va_list)
1651 __attribute__ ((__format__ (__printf__, 2, 0)));
1652int vsiscanf (const char *, const char *, __gnuc_va_list)
1653 __attribute__ ((__format__ (__scanf__, 2, 0)));
1654int vsniprintf (char *, size_t, const char *, __gnuc_va_list)
1655 __attribute__ ((__format__ (__printf__, 3, 0)));
1656FILE * fdopen (int, const char *);
1657int fileno (FILE *);
1658int pclose (FILE *);
1659FILE * popen (const char *, const char *);
1660void setbuffer (FILE *, char *, int);
1662int getw (FILE *);
1663int putw (int, FILE *);
1665int getchar_unlocked (void);
1669int putc_unlocked (int, FILE *);
1671int dprintf (int, const char *__restrict__, ...)
1672 __attribute__ ((__format__ (__printf__, 2, 3)));
1674FILE * open_memstream (char **, size_t *);
1676 __attribute__ ((__format__ (__printf__, 2, 0)));
1677int renameat (int, const char *, int, const char *);
1678int renameat2 (int, const char *, int, const char *, unsigned int);
1679int _asiprintf_r (struct _reent *, char **, const char *, ...)
1680 __attribute__ ((__format__ (__printf__, 3, 4)));
1681char * _asniprintf_r (struct _reent *, char *, size_t *, const char *, ...)
1682 __attribute__ ((__format__ (__printf__, 4, 5)));
1683char * _asnprintf_r (struct _reent *, char *__restrict__, size_t *__restrict__, const char *__restrict__, ...)
1684 __attribute__ ((__format__ (__printf__, 4, 5)));
1685int _asprintf_r (struct _reent *, char **__restrict__, const char *__restrict__, ...)
1686 __attribute__ ((__format__ (__printf__, 3, 4)));
1687int _diprintf_r (struct _reent *, int, const char *, ...)
1688 __attribute__ ((__format__ (__printf__, 3, 4)));
1689int _dprintf_r (struct _reent *, int, const char *__restrict__, ...)
1690 __attribute__ ((__format__ (__printf__, 3, 4)));
1691int _fclose_r (struct _reent *, FILE *);
1692int _fcloseall_r (struct _reent *);
1693FILE * _fdopen_r (struct _reent *, int, const char *);
1694int _fflush_r (struct _reent *, FILE *);
1695int _fgetc_r (struct _reent *, FILE *);
1697char * _fgets_r (struct _reent *, char *__restrict__, int, FILE *__restrict__);
1699int _fgetpos_r (struct _reent *, FILE *, fpos_t *);
1700int _fsetpos_r (struct _reent *, FILE *, const fpos_t *);
1701int _fiprintf_r (struct _reent *, FILE *, const char *, ...)
1702 __attribute__ ((__format__ (__printf__, 3, 4)));
1703int _fiscanf_r (struct _reent *, FILE *, const char *, ...)
1704 __attribute__ ((__format__ (__scanf__, 3, 4)));
1705FILE * _fmemopen_r (struct _reent *, void *__restrict__, size_t, const char *__restrict__);
1709 __attribute__ ((__format__ (__printf__, 3, 4)));
1710int _fpurge_r (struct _reent *, FILE *);
1711int _fputc_r (struct _reent *, int, FILE *);
1712int _fputc_unlocked_r (struct _reent *, int, FILE *);
1715size_t _fread_r (struct _reent *, void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1716size_t _fread_unlocked_r (struct _reent *, void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1718 __attribute__ ((__format__ (__scanf__, 3, 4)));
1719int _fseek_r (struct _reent *, FILE *, long, int);
1720int _fseeko_r (struct _reent *, FILE *, _off_t, int);
1721long _ftell_r (struct _reent *, FILE *);
1723void _rewind_r (struct _reent *, FILE *);
1724size_t _fwrite_r (struct _reent *, const void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1725size_t _fwrite_unlocked_r (struct _reent *, const void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1726int _getc_r (struct _reent *, FILE *);
1727int _getc_unlocked_r (struct _reent *, FILE *);
1728int _getchar_r (struct _reent *);
1730char * _gets_r (struct _reent *, char *);
1731int _iprintf_r (struct _reent *, const char *, ...)
1732 __attribute__ ((__format__ (__printf__, 2, 3)));
1733int _iscanf_r (struct _reent *, const char *, ...)
1734 __attribute__ ((__format__ (__scanf__, 2, 3)));
1735FILE * _open_memstream_r (struct _reent *, char **, size_t *);
1736void _perror_r (struct _reent *, const char *);
1737int _printf_r (struct _reent *, const char *__restrict__, ...)
1738 __attribute__ ((__format__ (__printf__, 2, 3)));
1739int _putc_r (struct _reent *, int, FILE *);
1740int _putc_unlocked_r (struct _reent *, int, FILE *);
1741int _putchar_unlocked_r (struct _reent *, int);
1742int _putchar_r (struct _reent *, int);
1743int _puts_r (struct _reent *, const char *);
1744int _remove_r (struct _reent *, const char *);
1745int _rename_r (struct _reent *,
1746 const char *_old, const char *_new);
1747int _scanf_r (struct _reent *, const char *__restrict__, ...)
1748 __attribute__ ((__format__ (__scanf__, 2, 3)));
1749int _siprintf_r (struct _reent *, char *, const char *, ...)
1750 __attribute__ ((__format__ (__printf__, 3, 4)));
1751int _siscanf_r (struct _reent *, const char *, const char *, ...)
1752 __attribute__ ((__format__ (__scanf__, 3, 4)));
1753int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...)
1754 __attribute__ ((__format__ (__printf__, 4, 5)));
1755int _snprintf_r (struct _reent *, char *__restrict__, size_t, const char *__restrict__, ...)
1756 __attribute__ ((__format__ (__printf__, 4, 5)));
1757int _sprintf_r (struct _reent *, char *__restrict__, const char *__restrict__, ...)
1758 __attribute__ ((__format__ (__printf__, 3, 4)));
1759int _sscanf_r (struct _reent *, const char *__restrict__, const char *__restrict__, ...)
1760 __attribute__ ((__format__ (__scanf__, 3, 4)));
1761char * _tempnam_r (struct _reent *, const char *, const char *);
1763char * _tmpnam_r (struct _reent *, char *);
1764int _ungetc_r (struct _reent *, int, FILE *);
1765int _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list)
1766 __attribute__ ((__format__ (__printf__, 3, 0)));
1767char * _vasniprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list)
1768 __attribute__ ((__format__ (__printf__, 4, 0)));
1769char * _vasnprintf_r (struct _reent*, char *, size_t *, const char *, __gnuc_va_list)
1770 __attribute__ ((__format__ (__printf__, 4, 0)));
1771int _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list)
1772 __attribute__ ((__format__ (__printf__, 3, 0)));
1773int _vdiprintf_r (struct _reent *, int, const char *, __gnuc_va_list)
1774 __attribute__ ((__format__ (__printf__, 3, 0)));
1776 __attribute__ ((__format__ (__printf__, 3, 0)));
1777int _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list)
1778 __attribute__ ((__format__ (__printf__, 3, 0)));
1779int _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list)
1780 __attribute__ ((__format__ (__scanf__, 3, 0)));
1782 __attribute__ ((__format__ (__printf__, 3, 0)));
1784 __attribute__ ((__format__ (__scanf__, 3, 0)));
1786 __attribute__ ((__format__ (__printf__, 2, 0)));
1787int _viscanf_r (struct _reent *, const char *, __gnuc_va_list)
1788 __attribute__ ((__format__ (__scanf__, 2, 0)));
1790 __attribute__ ((__format__ (__printf__, 2, 0)));
1792 __attribute__ ((__format__ (__scanf__, 2, 0)));
1793int _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list)
1794 __attribute__ ((__format__ (__printf__, 3, 0)));
1795int _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list)
1796 __attribute__ ((__format__ (__scanf__, 3, 0)));
1797int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list)
1798 __attribute__ ((__format__ (__printf__, 4, 0)));
1800 __attribute__ ((__format__ (__printf__, 4, 0)));
1802 __attribute__ ((__format__ (__printf__, 3, 0)));
1804 __attribute__ ((__format__ (__scanf__, 3, 0)));
1805int fpurge (FILE *);
1806ssize_t __getdelim (char **, size_t *, int, FILE *);
1807ssize_t __getline (char **, size_t *, FILE *);
1815size_t fread_unlocked (void *__restrict__, size_t _size, size_t _n, FILE *__restrict__);
1816size_t fwrite_unlocked (const void *__restrict__ , size_t _size, size_t _n, FILE *);
1819int __srget_r (struct _reent *, FILE *);
1820int __swbuf_r (struct _reent *, int, FILE *);
1821FILE *funopen (const void *__cookie,
1822 int (*__readfn)(void *__c, char *__buf,
1823 size_t __n),
1824 int (*__writefn)(void *__c, const char *__buf,
1825 size_t __n),
1826 _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
1827 int (*__closefn)(void *__c));
1828FILE *_funopen_r (struct _reent *, const void *__cookie,
1829 int (*__readfn)(void *__c, char *__buf,
1830 size_t __n),
1831 int (*__writefn)(void *__c, const char *__buf,
1832 size_t __n),
1833 _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
1834 int (*__closefn)(void *__c));
1835#define fropen(__cookie,__fn) funopen(__cookie, __fn, (int (*)())0, (fpos_t (*)())0, (int (*)())0)
1836#define fwopen(__cookie,__fn) funopen(__cookie, (int (*)())0, __fn, (fpos_t (*)())0, (int (*)())0)
1837typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n);
1838typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf,
1839 size_t __n);
1840typedef int cookie_seek_function_t(void *__cookie, _off64_t *__off,
1841 int __whence);
1842typedef int cookie_close_function_t(void *__cookie);
1843typedef struct
1844{
1850FILE *fopencookie (void *__cookie,
1851 const char *__mode, cookie_io_functions_t __functions);
1852FILE *_fopencookie_r (struct _reent *, void *__cookie,
1853 const char *__mode, cookie_io_functions_t __functions);
1854#define __sgetc_raw_r(__ptr,__f) (--(__f)->_r < 0 ? __srget_r(__ptr, __f) : (int)(*(__f)->_p++))
1855static __inline__ int __sgetc_r(struct _reent *__ptr, FILE *__p);
1856static __inline__ int __sgetc_r(struct _reent *__ptr, FILE *__p)
1857 {
1858 int __c = (--(__p)->_r < 0 ? __srget_r(__ptr, __p) : (int)(*(__p)->_p++));
1859 if ((__p->_flags & 0x4000) && (__c == '\r'))
1860 {
1861 int __c2 = (--(__p)->_r < 0 ? __srget_r(__ptr, __p) : (int)(*(__p)->_p++));
1862 if (__c2 == '\n')
1863 __c = __c2;
1864 else
1865 ungetc(__c2, __p);
1866 }
1867 return __c;
1868 }
1869static __inline__ int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) {
1870 if ((_p->_flags & 0x4000) && _c == '\n')
1871 __sputc_r (_ptr, '\r', _p);
1872 if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
1873 return (*_p->_p++ = _c);
1874 else
1875 return (__swbuf_r(_ptr, _c, _p));
1876}
1877#define __sfeof(p) ((int)(((p)->_flags & __SEOF) != 0))
1878#define __sferror(p) ((int)(((p)->_flags & __SERR) != 0))
1879#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
1880#define __sfileno(p) ((p)->_file)
1881#define feof(p) __sfeof(p)
1882#define ferror(p) __sferror(p)
1883#define clearerr(p) __sclearerr(p)
1884#define feof_unlocked(p) __sfeof(p)
1885#define ferror_unlocked(p) __sferror(p)
1886#define clearerr_unlocked(p) __sclearerr(p)
1887static __inline int
1888_getchar_unlocked(void)
1889{
1890 struct _reent *_ptr;
1891 _ptr = (__getreent());
1892 return (__sgetc_r(_ptr, ((_ptr)->_stdin)));
1893}
1894static __inline int
1895_putchar_unlocked(int _c)
1896{
1897 struct _reent *_ptr;
1898 _ptr = (__getreent());
1899 return (__sputc_r(_ptr, _c, ((_ptr)->_stdout)));
1900}
1901#define getchar_unlocked() _getchar_unlocked()
1902#define putchar_unlocked(_c) _putchar_unlocked(_c)
1903#define fast_putc(x,p) (--(p)->_w < 0 ? __swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0))
1904#define L_cuserid 9
1905#define L_ctermid 16
1906
1907#define _SSP_STDIO_H_
1908#define _SSP_SSP_H_
1909#define __ssp_real_(fun) __ssp_real_ ## fun
1910#define __ssp_real(fun) __ssp_real_(fun)
1911#define __ssp_inline extern __inline__ __attribute__((__always_inline__, __gnu_inline__))
1912#define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
1913#define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
1914#define __ssp_check(buf,len,bos) if (bos(buf) != (size_t)-1 && len > bos(buf)) __chk_fail()
1915#define __ssp_decl(rtype,fun,args) rtype __ssp_real_(fun) args __asm__(__ASMNAME(#fun)); __ssp_inline rtype fun args
1916#define __ssp_redirect_raw(rtype,fun,args,call,cond,bos) __ssp_decl(rtype, fun, args) { if (cond) __ssp_check(__buf, __len, bos); return __ssp_real_(fun) call; }
1917#define __ssp_redirect(rtype,fun,args,call) __ssp_redirect_raw(rtype, fun, args, call, 1, __ssp_bos)
1918#define __ssp_redirect0(rtype,fun,args,call) __ssp_redirect_raw(rtype, fun, args, call, 1, __ssp_bos0)
1919#define __ssp_overlap(a,b,l) (((a) <= (b) && (b) < (a) + (l)) || ((b) <= (a) && (a) < (b) + (l)))
1920
1921void __stack_chk_fail(void) __attribute__((__noreturn__));
1922void __chk_fail(void) __attribute__((__noreturn__));
1923
1924
1925int __sprintf_chk(char *__restrict__, int, size_t, const char *__restrict__, ...)
1926 __attribute__((__format__ (__printf__, 4, 5)));
1927int __vsprintf_chk(char *__restrict__, int, size_t, const char *__restrict__,
1928 __va_list)
1929 __attribute__((__format__ (__printf__, 4, 0)));
1930int __snprintf_chk(char *__restrict__, size_t, int, size_t,
1931 const char *__restrict__, ...)
1932 __attribute__((__format__ (__printf__, 5, 6)));
1933int __vsnprintf_chk(char *__restrict__, size_t, int, size_t,
1935 __attribute__((__format__ (__printf__, 5, 0)));
1936char *__gets_chk(char *, size_t);
1937
1938#define sprintf(str,...) __builtin___sprintf_chk(str, 0, __ssp_bos(str), __VA_ARGS__)
1939#define vsprintf(str,fmt,ap) __builtin___vsprintf_chk(str, 0, __ssp_bos(str), fmt, ap)
1940#define snprintf(str,len,...) __builtin___snprintf_chk(str, len, 0, __ssp_bos(str), __VA_ARGS__)
1941#define vsnprintf(str,len,fmt,ap) __builtin___vsnprintf_chk(str, len, 0, __ssp_bos(str), fmt, ap)
1942#define gets(str) __gets_chk(str, __ssp_bos(str))
1943char * __ssp_real_fgets (char *__restrict__ __buf, int __len, FILE *__fp) __asm__("" "fgets"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * fgets (char *__restrict__ __buf, int __len, FILE *__fp)
1944{
1945 if (__len > 0)
1946 if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && (size_t)__len > __builtin_object_size(__buf, 2 > 1)) __chk_fail();
1948}
1949char * __ssp_real_fgets_unlocked (char *__restrict__ __buf, int __len, FILE *__fp) __asm__("" "fgets_unlocked"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * fgets_unlocked (char *__restrict__ __buf, int __len, FILE *__fp)
1950{
1951 if (__len > 0)
1952 if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && (size_t)__len > __builtin_object_size(__buf, 2 > 1)) __chk_fail();
1954}
1955size_t __ssp_real_fread (void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp) __asm__("" "fread"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t fread (void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp)
1956{
1957 if (__builtin_object_size(__ptr, 0) != (size_t)-1 && __size * __n > __builtin_object_size(__ptr, 0)) __chk_fail();
1959}
1960size_t __ssp_real_fread_unlocked (void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp) __asm__("" "fread_unlocked"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t fread_unlocked (void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp)
1961{
1962 if (__builtin_object_size(__ptr, 0) != (size_t)-1 && __size * __n > __builtin_object_size(__ptr, 0)) __chk_fail();
1964}
1965#define _SYS_STAT_H
1966#define _TIME_H_
1967#define __need_size_t
1968#define __need_NULL
1969#undef __need_ptrdiff_t
1970#undef __need_size_t
1971#undef __need_wchar_t
1972#undef NULL
1973#define NULL ((void *)0)
1974#undef __need_NULL
1975#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
1976#define _MACHTIME_H_
1977#define _CLOCKS_PER_SEC_ 1000
1978#define CLOCKS_PER_SEC _CLOCKS_PER_SEC_
1979#define CLK_TCK CLOCKS_PER_SEC
1980#define _SYS__LOCALE_H
1981struct __locale_t;
1982typedef struct __locale_t *locale_t;
1983
1984struct tm
1985{
1996 const char *tm_zone;
1997};
1999double difftime (time_t _time2, time_t _time1);
2000time_t mktime (struct tm *_timeptr);
2002char *asctime (const struct tm *_tblock);
2003char *ctime (const time_t *_time);
2004struct tm *gmtime (const time_t *_timer);
2005struct tm *localtime (const time_t *_timer);
2006size_t strftime (char *__restrict__ _s,
2007 size_t _maxsize, const char *__restrict__ _fmt,
2008 const struct tm *__restrict__ _t);
2009extern size_t strftime_l (char *__restrict__ _s, size_t _maxsize,
2010 const char *__restrict__ _fmt,
2011 const struct tm *__restrict__ _t, locale_t _l);
2012char *asctime_r (const struct tm *__restrict__,
2013 char *__restrict__);
2014char *ctime_r (const time_t *, char *);
2015struct tm *gmtime_r (const time_t *__restrict__,
2016 struct tm *__restrict__);
2017struct tm *localtime_r (const time_t *__restrict__,
2018 struct tm *__restrict__);
2019
2020char *strptime (const char *__restrict__,
2021 const char *__restrict__,
2022 struct tm *__restrict__);
2023char *strptime_l (const char *__restrict__, const char *__restrict__,
2024 struct tm *__restrict__, locale_t);
2025void tzset (void);
2026void _tzset_r (struct _reent *);
2027extern __attribute__((dllimport)) long _timezone;
2028extern __attribute__((dllimport)) int _daylight;
2029extern __attribute__((dllimport)) char *_tzname[2];
2030#define tzname _tzname
2031#define _CYGWIN_TIME_H
2032int __attribute__((__cdecl__)) clock_setres (clockid_t, struct timespec *);
2033time_t __attribute__((__cdecl__)) timelocal (struct tm *);
2034time_t __attribute__((__cdecl__)) timegm (struct tm *);
2035#define TIMER_RELTIME 0
2036extern int stime (const time_t *);
2037extern int daylight __asm__ ( "_daylight");
2038extern long timezone __asm__ ( "_timezone");
2039#define _SIGNAL_H_
2040#define _SYS_SIGNAL_H
2041#define _STDINT_H
2042#define _SYS__INTSUP_H
2043#define __STDINT_EXP(x) __ ##x ##__
2044
2045
2046
2047
2048
2049
2050
2051
2052#undef signed
2053#undef unsigned
2054#undef char
2055#undef short
2056#undef int
2057#undef __int20
2058#undef __int20__
2059#undef long
2060#define signed +0
2061#define unsigned +0
2062#define char +0
2063#define short +1
2064#define __int20 +2
2065#define __int20__ +2
2066#define int +2
2067#define long +4
2068#define _INTPTR_EQ_LONG
2069#define __INT8 "hh"
2070#define __INT16 "h"
2071#define __INT32
2072#define __INT64 "l"
2073#define __FAST8 "hh"
2074#define __FAST16 "l"
2075#define __FAST32 "l"
2076#define __FAST64 "l"
2077#define __LEAST8 "hh"
2078#define __LEAST16 "h"
2079#define __LEAST32
2080#define __LEAST64 "l"
2081#undef signed
2082#undef unsigned
2083#undef char
2084#undef short
2085#undef int
2086#undef long
2087
2088
2089
2090
2091
2092#undef __int20
2093
2094#undef __int20__
2095
2096
2099#define __int_least8_t_defined 1
2102#define __int_least16_t_defined 1
2105#define __int_least32_t_defined 1
2108#define __int_least64_t_defined 1
2109 typedef signed char int_fast8_t;
2110 typedef unsigned char uint_fast8_t;
2111#define __int_fast8_t_defined 1
2112 typedef long int int_fast16_t;
2113 typedef long unsigned int uint_fast16_t;
2114#define __int_fast16_t_defined 1
2115 typedef long int int_fast32_t;
2116 typedef long unsigned int uint_fast32_t;
2117#define __int_fast32_t_defined 1
2118 typedef long int int_fast64_t;
2119 typedef long unsigned int uint_fast64_t;
2120#define __int_fast64_t_defined 1
2121#define INTPTR_MIN (-__INTPTR_MAX__ - 1)
2122#define INTPTR_MAX (__INTPTR_MAX__)
2123#define UINTPTR_MAX (__UINTPTR_MAX__)
2124#define INT8_MIN (-__INT8_MAX__ - 1)
2125#define INT8_MAX (__INT8_MAX__)
2126#define UINT8_MAX (__UINT8_MAX__)
2127#define INT_LEAST8_MIN (-__INT_LEAST8_MAX__ - 1)
2128#define INT_LEAST8_MAX (__INT_LEAST8_MAX__)
2129#define UINT_LEAST8_MAX (__UINT_LEAST8_MAX__)
2130#define INT16_MIN (-__INT16_MAX__ - 1)
2131#define INT16_MAX (__INT16_MAX__)
2132#define UINT16_MAX (__UINT16_MAX__)
2133#define INT_LEAST16_MIN (-__INT_LEAST16_MAX__ - 1)
2134#define INT_LEAST16_MAX (__INT_LEAST16_MAX__)
2135#define UINT_LEAST16_MAX (__UINT_LEAST16_MAX__)
2136#define INT32_MIN (-__INT32_MAX__ - 1)
2137#define INT32_MAX (__INT32_MAX__)
2138#define UINT32_MAX (__UINT32_MAX__)
2139#define INT_LEAST32_MIN (-__INT_LEAST32_MAX__ - 1)
2140#define INT_LEAST32_MAX (__INT_LEAST32_MAX__)
2141#define UINT_LEAST32_MAX (__UINT_LEAST32_MAX__)
2142#define INT64_MIN (-__INT64_MAX__ - 1)
2143#define INT64_MAX (__INT64_MAX__)
2144#define UINT64_MAX (__UINT64_MAX__)
2145#define INT_LEAST64_MIN (-__INT_LEAST64_MAX__ - 1)
2146#define INT_LEAST64_MAX (__INT_LEAST64_MAX__)
2147#define UINT_LEAST64_MAX (__UINT_LEAST64_MAX__)
2148#define INT_FAST8_MIN (-__INT_FAST8_MAX__ - 1)
2149#define INT_FAST8_MAX (__INT_FAST8_MAX__)
2150#define UINT_FAST8_MAX (__UINT_FAST8_MAX__)
2151#define INT_FAST16_MIN (-__INT_FAST16_MAX__ - 1)
2152#define INT_FAST16_MAX (__INT_FAST16_MAX__)
2153#define UINT_FAST16_MAX (__UINT_FAST16_MAX__)
2154#define INT_FAST32_MIN (-__INT_FAST32_MAX__ - 1)
2155#define INT_FAST32_MAX (__INT_FAST32_MAX__)
2156#define UINT_FAST32_MAX (__UINT_FAST32_MAX__)
2157#define INT_FAST64_MIN (-__INT_FAST64_MAX__ - 1)
2158#define INT_FAST64_MAX (__INT_FAST64_MAX__)
2159#define UINT_FAST64_MAX (__UINT_FAST64_MAX__)
2160#define INTMAX_MAX (__INTMAX_MAX__)
2161#define INTMAX_MIN (-INTMAX_MAX - 1)
2162#define UINTMAX_MAX (__UINTMAX_MAX__)
2163#define SIZE_MAX (__SIZE_MAX__)
2164#define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1)
2165#define SIG_ATOMIC_MAX (__STDINT_EXP(INT_MAX))
2166#define PTRDIFF_MAX (__PTRDIFF_MAX__)
2167#define PTRDIFF_MIN (-PTRDIFF_MAX - 1)
2168#define WCHAR_MIN (__WCHAR_MIN__)
2169#define WCHAR_MAX (__WCHAR_MAX__)
2170#define WINT_MAX (__WINT_MAX__)
2171#define WINT_MIN (__WINT_MIN__)
2172#define INT8_C(x) __INT8_C(x)
2173#define UINT8_C(x) __UINT8_C(x)
2174#define INT16_C(x) __INT16_C(x)
2175#define UINT16_C(x) __UINT16_C(x)
2176#define INT32_C(x) __INT32_C(x)
2177#define UINT32_C(x) __UINT32_C(x)
2178#define INT64_C(x) __INT64_C(x)
2179#define UINT64_C(x) __UINT64_C(x)
2180#define INTMAX_C(x) __INTMAX_C(x)
2181#define UINTMAX_C(x) __UINTMAX_C(x)
2182#define _GCC_WRAP_STDINT_H
2183#define _CYGWIN_SIGNAL_H
2188};
2191};
2193{
2202 struct _uc_fpxreg st[8];
2203 struct _uc_xmmreg xmm[16];
2205};
2206struct __attribute__ ((__aligned__ (16))) __mcontext
2207{
2208 __uint64_t p1home;
2209 __uint64_t p2home;
2210 __uint64_t p3home;
2211 __uint64_t p4home;
2212 __uint64_t p5home;
2213 __uint64_t p6home;
2214 __uint32_t ctxflags;
2215 __uint32_t mxcsr;
2216 __uint16_t cs;
2217 __uint16_t ds;
2218 __uint16_t es;
2219 __uint16_t fs;
2220 __uint16_t gs;
2221 __uint16_t ss;
2222 __uint32_t eflags;
2223 __uint64_t dr0;
2224 __uint64_t dr1;
2225 __uint64_t dr2;
2226 __uint64_t dr3;
2227 __uint64_t dr6;
2228 __uint64_t dr7;
2229 __uint64_t rax;
2230 __uint64_t rcx;
2231 __uint64_t rdx;
2232 __uint64_t rbx;
2233 __uint64_t rsp;
2234 __uint64_t rbp;
2235 __uint64_t rsi;
2236 __uint64_t rdi;
2237 __uint64_t r8;
2238 __uint64_t r9;
2239 __uint64_t r10;
2240 __uint64_t r11;
2241 __uint64_t r12;
2242 __uint64_t r13;
2243 __uint64_t r14;
2244 __uint64_t r15;
2245 __uint64_t rip;
2246 struct _fpstate fpregs;
2247 __uint64_t vregs[52];
2248 __uint64_t vcx;
2249 __uint64_t dbc;
2250 __uint64_t btr;
2251 __uint64_t bfr;
2252 __uint64_t etr;
2253 __uint64_t efr;
2254 __uint64_t oldmask;
2255 __uint64_t cr2;
2256};
2257#define __COPY_CONTEXT_SIZE 816
2258typedef union sigval
2259{
2263typedef struct sigevent
2264{
2271#pragma pack(push,4)
2273{
2278 __extension__ union
2279 {
2280 struct {
2283 };
2285 char *_si_str;
2286 };
2287};
2288#define __SI_PAD_SIZE 32
2289typedef struct
2290{
2296 __extension__ union
2297 {
2298 __uint32_t __pad[32];
2299 struct _sigcommune _si_commune;
2300 __extension__ struct
2301 {
2302 __extension__ union
2303 {
2306 };
2307 __extension__ struct
2308 {
2310 unsigned int si_overrun;
2311 };
2312 };
2313 __extension__ struct
2314 {
2318 };
2319 void *si_addr;
2320 };
2321} siginfo_t;
2322#pragma pack(pop)
2323enum
2324{
2359#define SI_USER SI_USER
2360#define SI_ASYNCIO SI_ASYNCIO
2361#define SI_MESGQ SI_MESGQ
2362#define SI_TIMER SI_TIMER
2363#define SI_QUEUE SI_QUEUE
2364#define SI_KERNEL SI_KERNEL
2365#define ILL_ILLOPC ILL_ILLOPC
2366#define ILL_ILLOPN ILL_ILLOPN
2367#define ILL_ILLADR ILL_ILLADR
2368#define ILL_ILLTRP ILL_ILLTRP
2369#define ILL_PRVOPC ILL_PRVOPC
2370#define ILL_PRVREG ILL_PRVREG
2371#define ILL_COPROC ILL_COPROC
2372#define ILL_BADSTK ILL_BADSTK
2373#define FPE_INTDIV FPE_INTDIV
2374#define FPE_INTOVF FPE_INTOVF
2375#define FPE_FLTDIV FPE_FLTDIV
2376#define FPE_FLTOVF FPE_FLTOVF
2377#define FPE_FLTUND FPE_FLTUND
2378#define FPE_FLTRES FPE_FLTRES
2379#define FPE_FLTINV FPE_FLTINV
2380#define FPE_FLTSUB FPE_FLTSUB
2381#define SEGV_MAPERR SEGV_MAPERR
2382#define SEGV_ACCERR SEGV_ACCERR
2383#define BUS_ADRALN BUS_ADRALN
2384#define BUS_ADRERR BUS_ADRERR
2385#define BUS_OBJERR BUS_OBJERR
2386#define CLD_EXITED CLD_EXITED
2387#define CLD_KILLED CLD_KILLED
2388#define CLD_DUMPED CLD_DUMPED
2389#define CLD_TRAPPED CLD_TRAPPED
2390#define CLD_STOPPED CLD_STOPPED
2391#define CLD_CONTINUED CLD_CONTINUED
2392enum
2393{
2398#define SIGEV_SIGNAL SIGEV_SIGNAL
2399#define SIGEV_NONE SIGEV_NONE
2400#define SIGEV_THREAD SIGEV_THREAD
2403{
2404 __extension__ union
2405 {
2407 void (*sa_sigaction) ( int, siginfo_t *, void * );
2408 };
2411};
2412#define SA_NOCLDSTOP 1
2413#define SA_SIGINFO 2
2414#define SA_RESTART 0x10000000
2415#define SA_ONSTACK 0x20000000
2416#define SA_NODEFER 0x40000000
2417#define SA_RESETHAND 0x80000000
2418#define SA_ONESHOT SA_RESETHAND
2419#define SA_NOMASK SA_NODEFER
2420#define _SA_INTERNAL_MASK 0xf000
2421#undef MINSIGSTKSZ
2422#define MINSIGSTKSZ 8192
2423#undef SIGSTKSZ
2424#define SIGSTKSZ 32768
2425#define SIGHUP 1
2426#define SIGINT 2
2427#define SIGQUIT 3
2428#define SIGILL 4
2429#define SIGTRAP 5
2430#define SIGABRT 6
2431#define SIGIOT SIGABRT
2432#define SIGEMT 7
2433#define SIGFPE 8
2434#define SIGKILL 9
2435#define SIGBUS 10
2436#define SIGSEGV 11
2437#define SIGSYS 12
2438#define SIGPIPE 13
2439#define SIGALRM 14
2440#define SIGTERM 15
2441#define SIGURG 16
2442#define SIGSTOP 17
2443#define SIGTSTP 18
2444#define SIGCONT 19
2445#define SIGCHLD 20
2446#define SIGCLD 20
2447#define SIGTTIN 21
2448#define SIGTTOU 22
2449#define SIGIO 23
2450#define SIGPOLL SIGIO
2451#define SIGXCPU 24
2452#define SIGXFSZ 25
2453#define SIGVTALRM 26
2454#define SIGPROF 27
2455#define SIGWINCH 28
2456#define SIGLOST 29
2457#define SIGPWR SIGLOST
2458#define SIGUSR1 30
2459#define SIGUSR2 31
2460#define _NSIG 65
2461#define NSIG _NSIG
2462#define SIGRTMIN 32
2463#define SIGRTMAX (_NSIG - 1)
2464#define SIG_HOLD ((_sig_func_ptr)2)
2465void psiginfo (const siginfo_t *, const char *);
2466int sigwait (const sigset_t *, int *);
2468int sighold (int);
2469int sigignore (int);
2470int sigrelse (int);
2472int sigqueue(pid_t, int, const union sigval);
2473int siginterrupt (int, int);
2474extern const char __attribute__((dllimport)) *sys_sigabbrev[];
2475extern const char __attribute__((dllimport)) *sys_siglist[];
2476#define SS_ONSTACK 0x1
2477#define SS_DISABLE 0x2
2478typedef struct sigaltstack {
2479 void *ss_sp;
2481 size_t ss_size;
2483#define SIG_SETMASK 0
2484#define SIG_BLOCK 1
2485#define SIG_UNBLOCK 2
2486int sigprocmask (int, const sigset_t *, sigset_t *);
2487int pthread_sigmask (int, const sigset_t *, sigset_t *);
2488int kill (pid_t, int);
2489int killpg (pid_t, int);
2490int sigaction (int, const struct sigaction *, struct sigaction *);
2491int sigaddset (sigset_t *, const int);
2492int sigdelset (sigset_t *, const int);
2493int sigismember (const sigset_t *, int);
2497int sigsuspend (const sigset_t *);
2498int sigwait (const sigset_t *, int *);
2499int sigpause (int) __asm__ ("" "__xpg_sigpause");
2502int sigwaitinfo (const sigset_t *, siginfo_t *);
2503int sigtimedwait (const sigset_t *, siginfo_t *, const struct timespec *);
2504int sigqueue (pid_t, int, const union sigval);
2505#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1)
2506int sig2str(int, char *);
2507int str2sig(const char *__restrict__, int *__restrict__);
2508#define _SYS_UCONTEXT_H_
2509typedef struct __mcontext mcontext_t;
2510typedef __attribute__ ((__aligned__ (16))) struct __ucontext {
2511 mcontext_t uc_mcontext;
2512 struct __ucontext *uc_link;
2513 sigset_t uc_sigmask;
2514 stack_t uc_stack;
2515 unsigned long int uc_flags;
2517
2518typedef int sig_atomic_t;
2521#define SIG_DFL ((_sig_func_ptr)0)
2522#define SIG_IGN ((_sig_func_ptr)1)
2523#define SIG_ERR ((_sig_func_ptr)-1)
2524struct _reent;
2526int _raise_r (struct _reent *, int);
2528int raise (int);
2529void psignal (int, const char *);
2530
2531int clock_settime (clockid_t clock_id, const struct timespec *tp);
2532int clock_gettime (clockid_t clock_id, struct timespec *tp);
2533int clock_getres (clockid_t clock_id, struct timespec *res);
2535 struct sigevent *__restrict__ evp,
2536 timer_t *__restrict__ timerid);
2537int timer_delete (timer_t timerid);
2538int timer_settime (timer_t timerid, int flags,
2539 const struct itimerspec *__restrict__ value,
2540 struct itimerspec *__restrict__ ovalue);
2541int timer_gettime (timer_t timerid, struct itimerspec *value);
2543int nanosleep (const struct timespec *rqtp, struct timespec *rmtp);
2544int clock_nanosleep (clockid_t clock_id, int flags,
2545 const struct timespec *rqtp, struct timespec *rmtp);
2546#define CLOCK_ENABLED 1
2547#define CLOCK_DISABLED 0
2548#define CLOCK_ALLOWED 1
2549#define CLOCK_DISALLOWED 0
2550#define TIMER_ABSTIME 4
2551#define CLOCK_REALTIME_COARSE ((clockid_t) 0)
2552#define CLOCK_REALTIME ((clockid_t) 1)
2553#define CLOCK_PROCESS_CPUTIME_ID ((clockid_t) 2)
2554#define CLOCK_THREAD_CPUTIME_ID ((clockid_t) 3)
2555#define CLOCK_MONOTONIC ((clockid_t) 4)
2556#define CLOCK_MONOTONIC_RAW ((clockid_t) 5)
2557#define CLOCK_MONOTONIC_COARSE ((clockid_t) 6)
2558#define CLOCK_BOOTTIME ((clockid_t) 7)
2559#define CLOCK_REALTIME_ALARM ((clockid_t) 8)
2560#define CLOCK_BOOTTIME_ALARM ((clockid_t) 9)
2562int clock_setenable_attr (clockid_t clock_id, int attr);
2563int clock_getenable_attr (clockid_t clock_id, int *attr);
2564#define _CYGWIN_STAT_H
2565struct stat
2566{
2581};
2582#define st_atime st_atim.tv_sec
2583#define st_mtime st_mtim.tv_sec
2584#define st_ctime st_ctim.tv_sec
2585#define st_birthtime st_birthtim.tv_sec
2586#define S_TYPEISMQ(buf) ((void)(buf)->st_mode,0)
2587#define S_TYPEISSEM(buf) ((void)(buf)->st_mode,0)
2588#define S_TYPEISSHM(buf) ((void)(buf)->st_mode,0)
2589#define _IFMT 0170000
2590#define _IFDIR 0040000
2591#define _IFCHR 0020000
2592#define _IFBLK 0060000
2593#define _IFREG 0100000
2594#define _IFLNK 0120000
2595#define _IFSOCK 0140000
2596#define _IFIFO 0010000
2597#define S_BLKSIZE 1024
2598#define S_ISUID 0004000
2599#define S_ISGID 0002000
2600#define S_ISVTX 0001000
2601#define S_IREAD 0000400
2602#define S_IWRITE 0000200
2603#define S_IEXEC 0000100
2604#define S_ENFMT 0002000
2605#define S_IFMT _IFMT
2606#define S_IFDIR _IFDIR
2607#define S_IFCHR _IFCHR
2608#define S_IFBLK _IFBLK
2609#define S_IFREG _IFREG
2610#define S_IFLNK _IFLNK
2611#define S_IFSOCK _IFSOCK
2612#define S_IFIFO _IFIFO
2613#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
2614#define S_IRUSR 0000400
2615#define S_IWUSR 0000200
2616#define S_IXUSR 0000100
2617#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
2618#define S_IRGRP 0000040
2619#define S_IWGRP 0000020
2620#define S_IXGRP 0000010
2621#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
2622#define S_IROTH 0000004
2623#define S_IWOTH 0000002
2624#define S_IXOTH 0000001
2625#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
2626#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
2627#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
2628#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
2629#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
2630#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
2631#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
2632#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
2633#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
2634#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
2635#define UTIME_NOW -2L
2636#define UTIME_OMIT -1L
2637int chmod (const char *__path, mode_t __mode );
2638int fchmod (int __fd, mode_t __mode);
2639int fstat (int __fd, struct stat *__sbuf );
2640int mkdir (const char *_path, mode_t __mode );
2641int mkfifo (const char *__path, mode_t __mode );
2642int stat (const char *__restrict__ __path, struct stat *__restrict__ __sbuf );
2644int lstat (const char *__restrict__ __path, struct stat *__restrict__ __buf );
2645int mknod (const char *__path, mode_t __mode, dev_t __dev );
2646int fchmodat (int, const char *, mode_t, int);
2647int fstatat (int, const char *__restrict__ , struct stat *__restrict__, int);
2648int mkdirat (int, const char *, mode_t);
2649int mkfifoat (int, const char *, mode_t);
2650int mknodat (int, const char *, mode_t, dev_t);
2651int utimensat (int, const char *, const struct timespec [2], int);
2652int futimens (int, const struct timespec [2]);
2653#define _STDLIB_H_
2654#define __need_size_t
2655#define __need_wchar_t
2656#define __need_NULL
2657#undef __need_ptrdiff_t
2658#undef __need_size_t
2659#undef __need_wchar_t
2660#undef NULL
2661#define NULL ((void *)0)
2662#undef __need_NULL
2663#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
2664#define _MACHSTDLIB_H_
2665char *mkdtemp (char *);
2666#define _NEWLIB_ALLOCA_H
2667#undef alloca
2668#define alloca(size) __builtin_alloca(size)
2669#define _CYGWIN_STDLIB_H
2670#define _CYGWIN_WAIT_H
2671#define WAIT_ANY (pid_t)-1
2672#define WAIT_MYPGRP (pid_t)0
2673#define WNOHANG 1
2674#define WUNTRACED 2
2675#define WCONTINUED 8
2676#define __W_CONTINUED 0xffff
2677#define WIFEXITED(_w) (((_w) & 0xff) == 0)
2678#define WIFSIGNALED(_w) (((_w) & 0x7f) > 0 && (((_w) & 0x7f) < 0x7f))
2679#define WIFSTOPPED(_w) (((_w) & 0xff) == 0x7f)
2680#define WIFCONTINUED(_w) (((_w) & 0xffff) == __W_CONTINUED)
2681#define WEXITSTATUS(_w) (((_w) >> 8) & 0xff)
2682#define WTERMSIG(_w) ((_w) & 0x7f)
2683#define WSTOPSIG WEXITSTATUS
2684#define WCOREDUMP(_w) (WIFSIGNALED(_w) && ((_w) & 0x80))
2685const char *getprogname (void);
2686void setprogname (const char *);
2687char *canonicalize_file_name (const char *);
2688int unsetenv (const char *);
2689int clearenv (void);
2690char *ptsname (int);
2691int grantpt (int);
2692int unlockpt (int);
2693int ptsname_r(int, char *, size_t);
2694int getpt (void);
2696extern void *memalign (size_t, size_t);
2697extern void *valloc (size_t);
2698#undef _malloc_r
2699#define _malloc_r(r,s) malloc (s)
2700#undef _free_r
2701#define _free_r(r,p) free (p)
2702#undef _realloc_r
2703#define _realloc_r(r,p,s) realloc (p, s)
2704#undef _calloc_r
2705#define _calloc_r(r,s1,s2) calloc (s1, s2);
2706#undef _memalign_r
2707#define _memalign_r(r,s1,s2) memalign (s1, s2);
2708#undef _mallinfo_r
2709#define _mallinfo_r(r) mallinfo ()
2710#undef _malloc_stats_r
2711#define _malloc_stats_r(r) malloc_stats ()
2712#undef _mallopt_r
2713#define _mallopt_r(i1,i2) mallopt (i1, i2)
2714#undef _malloc_usable_size_r
2715#define _malloc_usable_size_r(r,p) malloc_usable_size (p)
2716#undef _valloc_r
2717#define _valloc_r(r,s) valloc (s)
2718#undef _pvalloc_r
2719#define _pvalloc_r(r,s) pvalloc (s)
2720#undef _malloc_trim_r
2721#define _malloc_trim_r(r,s) malloc_trim (s)
2722#undef _mstats_r
2723#define _mstats_r(r,p) mstats (p)
2724int getloadavg(double loadavg[], int nelem);
2725
2726typedef struct
2727{
2728 int quot;
2729 int rem;
2730} div_t;
2731typedef struct
2732{
2733 long quot;
2734 long rem;
2735} ldiv_t;
2736typedef struct
2737{
2738 long long int quot;
2739 long long int rem;
2740} lldiv_t;
2741#define __compar_fn_t_defined
2742typedef int (*__compar_fn_t) (const void *, const void *);
2743#define EXIT_FAILURE 1
2744#define EXIT_SUCCESS 0
2745#define RAND_MAX __RAND_MAX
2747#define MB_CUR_MAX __locale_mb_cur_max()
2748void abort (void) __attribute__ ((__noreturn__));
2749int abs (int);
2752void arc4random_buf (void *, size_t);
2753int atexit (void (*__func)(void));
2754double atof (const char *__nptr);
2755float atoff (const char *__nptr);
2756int atoi (const char *__nptr);
2757int _atoi_r (struct _reent *, const char *__nptr);
2758long atol (const char *__nptr);
2759long _atol_r (struct _reent *, const char *__nptr);
2760void * bsearch (const void *__key,
2761 const void *__base,
2762 size_t __nmemb,
2763 size_t __size,
2764 __compar_fn_t _compar);
2765void *calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__))
2766 __attribute__((__alloc_size__(1, 2))) ;
2767div_t div (int __numer, int __denom);
2768void exit (int __status) __attribute__ ((__noreturn__));
2769void free (void *) ;
2770char * getenv (const char *__string);
2771char * _getenv_r (struct _reent *, const char *__string);
2772char * secure_getenv (const char *__string);
2773char * _findenv (const char *, int *);
2774char * _findenv_r (struct _reent *, const char *, int *);
2775extern char *suboptarg;
2776int getsubopt (char **, char * const *, char **);
2777long labs (long);
2778ldiv_t ldiv (long __numer, long __denom);
2779void *malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1))) ;
2780int mblen (const char *, size_t);
2781int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
2782int mbtowc (wchar_t *__restrict__, const char *__restrict__, size_t);
2783int _mbtowc_r (struct _reent *, wchar_t *__restrict__, const char *__restrict__, size_t, _mbstate_t *);
2784int wctomb (char *, wchar_t);
2785int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
2786size_t mbstowcs (wchar_t *__restrict__, const char *__restrict__, size_t);
2787size_t _mbstowcs_r (struct _reent *, wchar_t *__restrict__, const char *__restrict__, size_t, _mbstate_t *);
2788size_t wcstombs (char *__restrict__, const wchar_t *__restrict__, size_t);
2789size_t _wcstombs_r (struct _reent *, char *__restrict__, const wchar_t *__restrict__, size_t, _mbstate_t *);
2790char * mkdtemp (char *);
2791int mkostemp (char *, int);
2792int mkostemps (char *, int, int);
2793int mkstemp (char *);
2794int mkstemps (char *, int);
2795char * mktemp (char *) __attribute__ ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")));
2796char * _mkdtemp_r (struct _reent *, char *);
2797int _mkostemp_r (struct _reent *, char *, int);
2798int _mkostemps_r (struct _reent *, char *, int, int);
2799int _mkstemp_r (struct _reent *, char *);
2800int _mkstemps_r (struct _reent *, char *, int);
2801char * _mktemp_r (struct _reent *, char *) __attribute__ ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead")));
2802void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar);
2803int rand (void);
2804void *realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2))) ;
2805void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2, 3)));
2806void *reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2)));
2807char * realpath (const char *__restrict__ path, char *__restrict__ resolved_path);
2808int rpmatch (const char *response);
2809void setkey (const char *__key);
2810void srand (unsigned __seed);
2811double strtod (const char *__restrict__ __n, char **__restrict__ __end_PTR);
2812double _strtod_r (struct _reent *,const char *__restrict__ __n, char **__restrict__ __end_PTR);
2813float strtof (const char *__restrict__ __n, char **__restrict__ __end_PTR);
2814#define strtodf strtof
2815long strtol (const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2816long _strtol_r (struct _reent *,const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2817unsigned long strtoul (const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2818unsigned long _strtoul_r (struct _reent *,const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2819double strtod_l (const char *__restrict__, char **__restrict__, locale_t);
2820float strtof_l (const char *__restrict__, char **__restrict__, locale_t);
2821extern long double strtold_l (const char *__restrict__, char **__restrict__,
2822 locale_t);
2823long strtol_l (const char *__restrict__, char **__restrict__, int, locale_t);
2824unsigned long strtoul_l (const char *__restrict__, char **__restrict__, int,
2825 locale_t __loc);
2826long long strtoll_l (const char *__restrict__, char **__restrict__, int, locale_t);
2827unsigned long long strtoull_l (const char *__restrict__, char **__restrict__, int,
2828 locale_t __loc);
2829int system (const char *__string);
2830long a64l (const char *__input);
2831char * l64a (long __input);
2832char * _l64a_r (struct _reent *,long __input);
2833int on_exit (void (*__func)(int, void *),void *__arg);
2834void _Exit (int __status) __attribute__ ((__noreturn__));
2835int putenv (char *__string);
2836int _putenv_r (struct _reent *, char *__string);
2837void * _reallocf_r (struct _reent *, void *, size_t);
2838int setenv (const char *__string, const char *__value, int __overwrite);
2839int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite);
2840char * __itoa (int, char *, int);
2841char * __utoa (unsigned, char *, int);
2842char * itoa (int, char *, int);
2843char * utoa (unsigned, char *, int);
2844int rand_r (unsigned *__seed);
2845double drand48 (void);
2846double _drand48_r (struct _reent *);
2847double erand48 (unsigned short [3]);
2848double _erand48_r (struct _reent *, unsigned short [3]);
2849long jrand48 (unsigned short [3]);
2850long _jrand48_r (struct _reent *, unsigned short [3]);
2851void lcong48 (unsigned short [7]);
2852void _lcong48_r (struct _reent *, unsigned short [7]);
2853long lrand48 (void);
2854long _lrand48_r (struct _reent *);
2855long mrand48 (void);
2856long _mrand48_r (struct _reent *);
2857long nrand48 (unsigned short [3]);
2858long _nrand48_r (struct _reent *, unsigned short [3]);
2859unsigned short *
2860 seed48 (unsigned short [3]);
2861unsigned short *
2862 _seed48_r (struct _reent *, unsigned short [3]);
2863void srand48 (long);
2864void _srand48_r (struct _reent *, long);
2865char * initstate (unsigned, char *, size_t);
2866long random (void);
2867char * setstate (char *);
2868void srandom (unsigned);
2869long long atoll (const char *__nptr);
2870long long _atoll_r (struct _reent *, const char *__nptr);
2871long long llabs (long long);
2872lldiv_t lldiv (long long __numer, long long __denom);
2873long long strtoll (const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2874long long _strtoll_r (struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2875unsigned long long strtoull (const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2876unsigned long long _strtoull_r (struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base);
2877int posix_memalign (void **, size_t, size_t) __attribute__((__nonnull__ (1)))
2878 __attribute__((__warn_unused_result__));
2879char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);
2880int _system_r (struct _reent *, const char *);
2881void __eprintf (const char *, const char *, unsigned int, const char *);
2882void qsort_r (void *__base, size_t __nmemb, size_t __size, int (*_compar)(const void *, const void *, void *), void *__thunk);
2883extern long double _strtold_r (struct _reent *, const char *__restrict__, char **__restrict__);
2884extern long double strtold (const char *__restrict__, char **__restrict__);
2885void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1)))
2886 __attribute__((__alloc_size__(2))) __attribute__((__warn_unused_result__));
2887int at_quick_exit(void (*)(void));
2888_Noreturn void
2890
2891#define _SSP_STDLIB_H_
2892
2893size_t __ssp_real_mbstowcs (wchar_t *__buf, const char *__src, size_t __n) __asm__("" "mbstowcs"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t mbstowcs (wchar_t *__buf, const char *__src, size_t __n)
2894{
2895 if (__buf != ((void *)0))
2896 if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __n * sizeof(wchar_t) > __builtin_object_size(__buf, 2 > 1)) __chk_fail();
2898}
2899size_t __ssp_real_wcstombs (char *__buf, const wchar_t *__src, size_t __len) __asm__("" "wcstombs"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t wcstombs (char *__buf, const wchar_t *__src, size_t __len) { if (__buf != ((void *)0)) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_wcstombs (__buf, __src, __len); };
2900int __ssp_real_wctomb (char *__buf, wchar_t __wc) __asm__("" "wctomb"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int wctomb (char *__buf, wchar_t __wc)
2901{
2902 if (__buf != ((void *)0))
2903 if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __locale_mb_cur_max() > __builtin_object_size(__buf, 2 > 1)) __chk_fail();
2905}
2906
2907#define _STRING_H_
2908#define __need_size_t
2909#define __need_NULL
2910#undef __need_ptrdiff_t
2911#undef __need_size_t
2912#undef __need_wchar_t
2913#undef NULL
2914#define NULL ((void *)0)
2915#undef __need_NULL
2916#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
2917#define _STRINGS_H_
2918
2919int bcmp(const void *, const void *, size_t) __attribute__((__pure__));
2920void bcopy(const void *, void *, size_t);
2921void bzero(void *, size_t);
2922void explicit_bzero(void *, size_t);
2923int ffs(int) __attribute__((__const__));
2924int ffsl(long) __attribute__((__const__));
2925int ffsll(long long) __attribute__((__const__));
2926int fls(int) __attribute__((__const__));
2927int flsl(long) __attribute__((__const__));
2928int flsll(long long) __attribute__((__const__));
2929char *index(const char *, int) __attribute__((__pure__));
2930char *rindex(const char *, int) __attribute__((__pure__));
2931int strcasecmp(const char *, const char *) __attribute__((__pure__));
2932int strncasecmp(const char *, const char *, size_t) __attribute__((__pure__));
2933int strcasecmp_l (const char *, const char *, locale_t);
2934int strncasecmp_l (const char *, const char *, size_t, locale_t);
2935
2936#define _SSP_STRINGS_H_
2937#define bcopy(src,dst,len) ((__ssp_bos0(dst) != (size_t)-1) ? __builtin___memmove_chk(dst, src, len, __ssp_bos0(dst)) : __memmove_ichk(dst, src, len))
2938#define bzero(dst,len) ((__ssp_bos0(dst) != (size_t)-1) ? __builtin___memset_chk(dst, 0, len, __ssp_bos0(dst)) : __memset_ichk(dst, 0, len))
2939void __ssp_real_explicit_bzero (void *__buf, size_t __len) __asm__("" "explicit_bzero"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void explicit_bzero (void *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 0) != (size_t)-1 && __len > __builtin_object_size(__buf, 0)) __chk_fail(); return __ssp_real_explicit_bzero (__buf, __len); };
2940
2941void * memchr (const void *, int, size_t);
2942int memcmp (const void *, const void *, size_t);
2943void * memcpy (void *__restrict__, const void *__restrict__, size_t);
2944void * memmove (void *, const void *, size_t);
2945void * memset (void *, int, size_t);
2946char *strcat (char *__restrict__, const char *__restrict__);
2947char *strchr (const char *, int);
2948int strcmp (const char *, const char *);
2949int strcoll (const char *, const char *);
2950char *strcpy (char *__restrict__, const char *__restrict__);
2951size_t strcspn (const char *, const char *);
2952char *strerror (int);
2953size_t strlen (const char *);
2954char *strncat (char *__restrict__, const char *__restrict__, size_t);
2955int strncmp (const char *, const char *, size_t);
2956char *strncpy (char *__restrict__, const char *__restrict__, size_t);
2957char *strpbrk (const char *, const char *);
2958char *strrchr (const char *, int);
2959size_t strspn (const char *, const char *);
2960char *strstr (const char *, const char *);
2961char *strtok (char *__restrict__, const char *__restrict__);
2962size_t strxfrm (char *__restrict__, const char *__restrict__, size_t);
2963int strcoll_l (const char *, const char *, locale_t);
2965size_t strxfrm_l (char *__restrict__, const char *__restrict__, size_t, locale_t);
2966char *strtok_r (char *__restrict__, const char *__restrict__, char **__restrict__);
2967int timingsafe_bcmp (const void *, const void *, size_t);
2968int timingsafe_memcmp (const void *, const void *, size_t);
2969void * memccpy (void *__restrict__, const void *__restrict__, int, size_t);
2970void * mempcpy (void *, const void *, size_t);
2971void * memmem (const void *, size_t, const void *, size_t);
2972void * memrchr (const void *, int, size_t);
2973void * rawmemchr (const void *, int);
2974char *stpcpy (char *__restrict__, const char *__restrict__);
2975char *stpncpy (char *__restrict__, const char *__restrict__, size_t);
2976char *strcasestr (const char *, const char *);
2977char *strchrnul (const char *, int);
2978char *strdup (const char *) __attribute__((__malloc__)) __attribute__((__warn_unused_result__));
2979char *_strdup_r (struct _reent *, const char *);
2980char *strndup (const char *, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__));
2981char *_strndup_r (struct _reent *, const char *, size_t);
2982char *strerror_r (int, char *, size_t);
2983char * _strerror_r (struct _reent *, int, int, int *);
2984size_t strlcat (char *, const char *, size_t);
2985size_t strlcpy (char *, const char *, size_t);
2986size_t strnlen (const char *, size_t);
2987char *strsep (char **, const char *);
2988char *strnstr(const char *, const char *, size_t) __attribute__((__pure__));
2989char *strlwr (char *);
2990char *strupr (char *);
2991char *strsignal (int __signo);
2992int strtosigno (const char *__name);
2993int strverscmp (const char *, const char *);
2994#define strdupa(__s) (__extension__ ({const char *__sin = (__s); size_t __len = strlen (__sin) + 1; char * __sout = (char *) __builtin_alloca (__len); (char *) memcpy (__sout, __sin, __len);}))
2995#define strndupa(__s,__n) (__extension__ ({const char *__sin = (__s); size_t __len = strnlen (__sin, (__n)) + 1; char *__sout = (char *) __builtin_alloca (__len); __sout[__len-1] = '\0'; (char *) memcpy (__sout, __sin, __len-1);}))
2996#define basename basename
2997char *__attribute__((__nonnull__ (1))) basename (const char *) __asm__("" "__gnu_basename");
2998
2999#define _SSP_STRING_H_
3000
3001void *__memcpy_chk(void *, const void *, size_t, size_t);
3002void *__memmove_chk(void *, void *, size_t, size_t);
3003void *__mempcpy_chk(void *, const void *, size_t, size_t);
3004void *__memset_chk(void *, int, size_t, size_t);
3005char *__stpcpy_chk(char *, const char *, size_t);
3006char *__strcat_chk(char *, const char *, size_t);
3007char *__strcpy_chk(char *, const char *, size_t);
3008char *__strncat_chk(char *, const char *, size_t, size_t);
3009char *__strncpy_chk(char *, const char *, size_t, size_t);
3010
3011#define __ssp_bos_check3(fun,dst,src,len) ((__ssp_bos0(dst) != (size_t)-1) ? __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)) : __ ## fun ## _ichk(dst, src, len))
3012#define __ssp_bos_check2(fun,dst,src) ((__ssp_bos0(dst) != (size_t)-1) ? __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)) : __ ## fun ## _ichk(dst, src))
3013#define __ssp_bos_icheck3_restrict(fun,type1,type2) __ssp_inline type1 __ ## fun ## _ichk(type1 __restrict, type2 __restrict, size_t); __ssp_inline type1 __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src, size_t len) { return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); }
3014#define __ssp_bos_icheck3(fun,type1,type2) __ssp_inline type1 __ ## fun ## _ichk(type1, type2, size_t); __ssp_inline type1 __ ## fun ## _ichk(type1 dst, type2 src, size_t len) { return __builtin___ ## fun ## _chk(dst, src, len, __ssp_bos0(dst)); }
3015#define __ssp_bos_icheck2_restrict(fun,type1,type2) __ssp_inline type1 __ ## fun ## _ichk(type1, type2); __ssp_inline type1 __ ## fun ## _ichk(type1 __restrict dst, type2 __restrict src) { return __builtin___ ## fun ## _chk(dst, src, __ssp_bos0(dst)); }
3016
3017extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memcpy_ichk(void * __restrict__, const void * __restrict__, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memcpy_ichk(void * __restrict__ dst, const void * __restrict__ src, size_t len) { return __builtin___memcpy_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3018extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memmove_ichk(void *, const void *, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memmove_ichk(void * dst, const void * src, size_t len) { return __builtin___memmove_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3019extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __mempcpy_ichk(void * __restrict__, const void * __restrict__, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __mempcpy_ichk(void * __restrict__ dst, const void * __restrict__ src, size_t len) { return __builtin___mempcpy_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3020extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memset_ichk(void *, int, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) void * __memset_ichk(void * dst, int src, size_t len) { return __builtin___memset_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3021extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __stpcpy_ichk(char *, const char *); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __stpcpy_ichk(char * __restrict__ dst, const char * __restrict__ src) { return __builtin___stpcpy_chk(dst, src, __builtin_object_size(dst, 0)); }
3022extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __stpncpy_ichk(char * __restrict__, const char * __restrict__, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __stpncpy_ichk(char * __restrict__ dst, const char * __restrict__ src, size_t len) { return __builtin___stpncpy_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3023extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strcpy_ichk(char *, const char *); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strcpy_ichk(char * __restrict__ dst, const char * __restrict__ src) { return __builtin___strcpy_chk(dst, src, __builtin_object_size(dst, 0)); }
3024extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strcat_ichk(char *, const char *); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strcat_ichk(char * __restrict__ dst, const char * __restrict__ src) { return __builtin___strcat_chk(dst, src, __builtin_object_size(dst, 0)); }
3025extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strncpy_ichk(char * __restrict__, const char * __restrict__, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strncpy_ichk(char * __restrict__ dst, const char * __restrict__ src, size_t len) { return __builtin___strncpy_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3026extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strncat_ichk(char * __restrict__, const char * __restrict__, size_t); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * __strncat_ichk(char * __restrict__ dst, const char * __restrict__ src, size_t len) { return __builtin___strncat_chk(dst, src, len, __builtin_object_size(dst, 0)); }
3027
3028#define memcpy(dst,src,len) __ssp_bos_check3(memcpy, dst, src, len)
3029#define memmove(dst,src,len) __ssp_bos_check3(memmove, dst, src, len)
3030#define mempcpy(dst,src,len) __ssp_bos_check3(mempcpy, dst, src, len)
3031#define memset(dst,val,len) __ssp_bos_check3(memset, dst, val, len)
3032#define stpcpy(dst,src) __ssp_bos_check2(stpcpy, dst, src)
3033#define stpncpy(dst,src,len) __ssp_bos_check3(stpncpy, dst, src, len)
3034#define strcpy(dst,src) __ssp_bos_check2(strcpy, dst, src)
3035#define strcat(dst,src) __ssp_bos_check2(strcat, dst, src)
3036#define strncpy(dst,src,len) __ssp_bos_check3(strncpy, dst, src, len)
3037#define strncat(dst,src,len) __ssp_bos_check3(strncat, dst, src, len)
3038#define _INTTYPES_H
3039#define __need_wchar_t
3040#undef __need_ptrdiff_t
3041#undef __need_size_t
3042#undef __need_wchar_t
3043#undef NULL
3044#define NULL ((void *)0)
3045#undef __need_NULL
3046#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
3047#define __STRINGIFY(a) #a
3048#define __PRI8(x) __INT8 __STRINGIFY(x)
3049#define __PRI8LEAST(x) __LEAST8 __STRINGIFY(x)
3050#define __PRI8FAST(x) __FAST8 __STRINGIFY(x)
3051#define __SCN8(x) __INT8 __STRINGIFY(x)
3052#define __SCN8LEAST(x) __LEAST8 __STRINGIFY(x)
3053#define __SCN8FAST(x) __FAST8 __STRINGIFY(x)
3054#define PRId8 __PRI8(d)
3055#define PRIi8 __PRI8(i)
3056#define PRIo8 __PRI8(o)
3057#define PRIu8 __PRI8(u)
3058#define PRIx8 __PRI8(x)
3059#define PRIX8 __PRI8(X)
3060#define SCNd8 __SCN8(d)
3061#define SCNi8 __SCN8(i)
3062#define SCNo8 __SCN8(o)
3063#define SCNu8 __SCN8(u)
3064#define SCNx8 __SCN8(x)
3065#define PRIdLEAST8 __PRI8LEAST(d)
3066#define PRIiLEAST8 __PRI8LEAST(i)
3067#define PRIoLEAST8 __PRI8LEAST(o)
3068#define PRIuLEAST8 __PRI8LEAST(u)
3069#define PRIxLEAST8 __PRI8LEAST(x)
3070#define PRIXLEAST8 __PRI8LEAST(X)
3071#define SCNdLEAST8 __SCN8LEAST(d)
3072#define SCNiLEAST8 __SCN8LEAST(i)
3073#define SCNoLEAST8 __SCN8LEAST(o)
3074#define SCNuLEAST8 __SCN8LEAST(u)
3075#define SCNxLEAST8 __SCN8LEAST(x)
3076#define PRIdFAST8 __PRI8FAST(d)
3077#define PRIiFAST8 __PRI8FAST(i)
3078#define PRIoFAST8 __PRI8FAST(o)
3079#define PRIuFAST8 __PRI8FAST(u)
3080#define PRIxFAST8 __PRI8FAST(x)
3081#define PRIXFAST8 __PRI8FAST(X)
3082#define SCNdFAST8 __SCN8FAST(d)
3083#define SCNiFAST8 __SCN8FAST(i)
3084#define SCNoFAST8 __SCN8FAST(o)
3085#define SCNuFAST8 __SCN8FAST(u)
3086#define SCNxFAST8 __SCN8FAST(x)
3087#define __PRI16(x) __INT16 __STRINGIFY(x)
3088#define __PRI16LEAST(x) __LEAST16 __STRINGIFY(x)
3089#define __PRI16FAST(x) __FAST16 __STRINGIFY(x)
3090#define __SCN16(x) __INT16 __STRINGIFY(x)
3091#define __SCN16LEAST(x) __LEAST16 __STRINGIFY(x)
3092#define __SCN16FAST(x) __FAST16 __STRINGIFY(x)
3093#define PRId16 __PRI16(d)
3094#define PRIi16 __PRI16(i)
3095#define PRIo16 __PRI16(o)
3096#define PRIu16 __PRI16(u)
3097#define PRIx16 __PRI16(x)
3098#define PRIX16 __PRI16(X)
3099#define SCNd16 __SCN16(d)
3100#define SCNi16 __SCN16(i)
3101#define SCNo16 __SCN16(o)
3102#define SCNu16 __SCN16(u)
3103#define SCNx16 __SCN16(x)
3104#define PRIdLEAST16 __PRI16LEAST(d)
3105#define PRIiLEAST16 __PRI16LEAST(i)
3106#define PRIoLEAST16 __PRI16LEAST(o)
3107#define PRIuLEAST16 __PRI16LEAST(u)
3108#define PRIxLEAST16 __PRI16LEAST(x)
3109#define PRIXLEAST16 __PRI16LEAST(X)
3110#define SCNdLEAST16 __SCN16LEAST(d)
3111#define SCNiLEAST16 __SCN16LEAST(i)
3112#define SCNoLEAST16 __SCN16LEAST(o)
3113#define SCNuLEAST16 __SCN16LEAST(u)
3114#define SCNxLEAST16 __SCN16LEAST(x)
3115#define PRIdFAST16 __PRI16FAST(d)
3116#define PRIiFAST16 __PRI16FAST(i)
3117#define PRIoFAST16 __PRI16FAST(o)
3118#define PRIuFAST16 __PRI16FAST(u)
3119#define PRIxFAST16 __PRI16FAST(x)
3120#define PRIXFAST16 __PRI16FAST(X)
3121#define SCNdFAST16 __SCN16FAST(d)
3122#define SCNiFAST16 __SCN16FAST(i)
3123#define SCNoFAST16 __SCN16FAST(o)
3124#define SCNuFAST16 __SCN16FAST(u)
3125#define SCNxFAST16 __SCN16FAST(x)
3126#define __PRI32(x) __INT32 __STRINGIFY(x)
3127#define __SCN32(x) __INT32 __STRINGIFY(x)
3128#define __PRI32LEAST(x) __LEAST32 __STRINGIFY(x)
3129#define __SCN32LEAST(x) __LEAST32 __STRINGIFY(x)
3130#define __PRI32FAST(x) __FAST32 __STRINGIFY(x)
3131#define __SCN32FAST(x) __FAST32 __STRINGIFY(x)
3132#define PRId32 __PRI32(d)
3133#define PRIi32 __PRI32(i)
3134#define PRIo32 __PRI32(o)
3135#define PRIu32 __PRI32(u)
3136#define PRIx32 __PRI32(x)
3137#define PRIX32 __PRI32(X)
3138#define SCNd32 __SCN32(d)
3139#define SCNi32 __SCN32(i)
3140#define SCNo32 __SCN32(o)
3141#define SCNu32 __SCN32(u)
3142#define SCNx32 __SCN32(x)
3143#define PRIdLEAST32 __PRI32LEAST(d)
3144#define PRIiLEAST32 __PRI32LEAST(i)
3145#define PRIoLEAST32 __PRI32LEAST(o)
3146#define PRIuLEAST32 __PRI32LEAST(u)
3147#define PRIxLEAST32 __PRI32LEAST(x)
3148#define PRIXLEAST32 __PRI32LEAST(X)
3149#define SCNdLEAST32 __SCN32LEAST(d)
3150#define SCNiLEAST32 __SCN32LEAST(i)
3151#define SCNoLEAST32 __SCN32LEAST(o)
3152#define SCNuLEAST32 __SCN32LEAST(u)
3153#define SCNxLEAST32 __SCN32LEAST(x)
3154#define PRIdFAST32 __PRI32FAST(d)
3155#define PRIiFAST32 __PRI32FAST(i)
3156#define PRIoFAST32 __PRI32FAST(o)
3157#define PRIuFAST32 __PRI32FAST(u)
3158#define PRIxFAST32 __PRI32FAST(x)
3159#define PRIXFAST32 __PRI32FAST(X)
3160#define SCNdFAST32 __SCN32FAST(d)
3161#define SCNiFAST32 __SCN32FAST(i)
3162#define SCNoFAST32 __SCN32FAST(o)
3163#define SCNuFAST32 __SCN32FAST(u)
3164#define SCNxFAST32 __SCN32FAST(x)
3165#define __PRI64(x) __INT64 __STRINGIFY(x)
3166#define __SCN64(x) __INT64 __STRINGIFY(x)
3167#define __PRI64LEAST(x) __LEAST64 __STRINGIFY(x)
3168#define __SCN64LEAST(x) __LEAST64 __STRINGIFY(x)
3169#define __PRI64FAST(x) __FAST64 __STRINGIFY(x)
3170#define __SCN64FAST(x) __FAST64 __STRINGIFY(x)
3171#define PRId64 __PRI64(d)
3172#define PRIi64 __PRI64(i)
3173#define PRIo64 __PRI64(o)
3174#define PRIu64 __PRI64(u)
3175#define PRIx64 __PRI64(x)
3176#define PRIX64 __PRI64(X)
3177#define SCNd64 __SCN64(d)
3178#define SCNi64 __SCN64(i)
3179#define SCNo64 __SCN64(o)
3180#define SCNu64 __SCN64(u)
3181#define SCNx64 __SCN64(x)
3182#define PRIdLEAST64 __PRI64LEAST(d)
3183#define PRIiLEAST64 __PRI64LEAST(i)
3184#define PRIoLEAST64 __PRI64LEAST(o)
3185#define PRIuLEAST64 __PRI64LEAST(u)
3186#define PRIxLEAST64 __PRI64LEAST(x)
3187#define PRIXLEAST64 __PRI64LEAST(X)
3188#define SCNdLEAST64 __SCN64LEAST(d)
3189#define SCNiLEAST64 __SCN64LEAST(i)
3190#define SCNoLEAST64 __SCN64LEAST(o)
3191#define SCNuLEAST64 __SCN64LEAST(u)
3192#define SCNxLEAST64 __SCN64LEAST(x)
3193#define PRIdFAST64 __PRI64FAST(d)
3194#define PRIiFAST64 __PRI64FAST(i)
3195#define PRIoFAST64 __PRI64FAST(o)
3196#define PRIuFAST64 __PRI64FAST(u)
3197#define PRIxFAST64 __PRI64FAST(x)
3198#define PRIXFAST64 __PRI64FAST(X)
3199#define SCNdFAST64 __SCN64FAST(d)
3200#define SCNiFAST64 __SCN64FAST(i)
3201#define SCNoFAST64 __SCN64FAST(o)
3202#define SCNuFAST64 __SCN64FAST(u)
3203#define SCNxFAST64 __SCN64FAST(x)
3204#define __PRIMAX(x) __STRINGIFY(l ##x)
3205#define __SCNMAX(x) __STRINGIFY(l ##x)
3206#define PRIdMAX __PRIMAX(d)
3207#define PRIiMAX __PRIMAX(i)
3208#define PRIoMAX __PRIMAX(o)
3209#define PRIuMAX __PRIMAX(u)
3210#define PRIxMAX __PRIMAX(x)
3211#define PRIXMAX __PRIMAX(X)
3212#define SCNdMAX __SCNMAX(d)
3213#define SCNiMAX __SCNMAX(i)
3214#define SCNoMAX __SCNMAX(o)
3215#define SCNuMAX __SCNMAX(u)
3216#define SCNxMAX __SCNMAX(x)
3217#define __PRIPTR(x) __STRINGIFY(l ##x)
3218#define __SCNPTR(x) __STRINGIFY(l ##x)
3219#define PRIdPTR __PRIPTR(d)
3220#define PRIiPTR __PRIPTR(i)
3221#define PRIoPTR __PRIPTR(o)
3222#define PRIuPTR __PRIPTR(u)
3223#define PRIxPTR __PRIPTR(x)
3224#define PRIXPTR __PRIPTR(X)
3225#define SCNdPTR __SCNPTR(d)
3226#define SCNiPTR __SCNPTR(i)
3227#define SCNoPTR __SCNPTR(o)
3228#define SCNuPTR __SCNPTR(u)
3229#define SCNxPTR __SCNPTR(x)
3230typedef struct {
3233} imaxdiv_t;
3234struct _reent;
3236extern imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denomer);
3237extern intmax_t strtoimax(const char *__restrict__, char **__restrict__, int);
3238extern intmax_t _strtoimax_r(struct _reent *, const char *__restrict__, char **__restrict__, int);
3239extern uintmax_t strtoumax(const char *__restrict__, char **__restrict__, int);
3240extern uintmax_t _strtoumax_r(struct _reent *, const char *__restrict__, char **__restrict__, int);
3241extern intmax_t wcstoimax(const wchar_t *__restrict__, wchar_t **__restrict__, int);
3242extern intmax_t _wcstoimax_r(struct _reent *, const wchar_t *__restrict__, wchar_t **__restrict__, int);
3243extern uintmax_t wcstoumax(const wchar_t *__restrict__, wchar_t **__restrict__, int);
3244extern uintmax_t _wcstoumax_r(struct _reent *, const wchar_t *__restrict__, wchar_t **__restrict__, int);
3245extern intmax_t strtoimax_l(const char *__restrict__, char **_restrict, int, locale_t);
3246extern uintmax_t strtoumax_l(const char *__restrict__, char **_restrict, int, locale_t);
3247extern intmax_t wcstoimax_l(const wchar_t *__restrict__, wchar_t **_restrict, int, locale_t);
3248extern uintmax_t wcstoumax_l(const wchar_t *__restrict__, wchar_t **_restrict, int, locale_t);
3249#define _STDALIGN_H
3250#define alignas _Alignas
3251#define alignof _Alignof
3252#define __alignas_is_defined 1
3253#define __alignof_is_defined 1
3254#define _UNISTD_H_
3255#define _SYS_UNISTD_H
3256#define __need_size_t
3257#define __need_ptrdiff_t
3258#undef __need_ptrdiff_t
3259#undef __need_size_t
3260#undef __need_wchar_t
3261#undef NULL
3262#define NULL ((void *)0)
3263#undef __need_NULL
3264#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
3265extern char **environ;
3266void _exit (int __status) __attribute__ ((__noreturn__));
3267int access (const char *__path, int __amode);
3268unsigned alarm (unsigned __secs);
3269int chdir (const char *__path);
3270int chmod (const char *__path, mode_t __mode);
3271int chown (const char *__path, uid_t __owner, gid_t __group);
3272int chroot (const char *__path);
3273int close (int __fildes);
3274size_t confstr (int __name, char *__buf, size_t __len);
3275char * crypt (const char *__key, const char *__salt);
3276int daemon (int nochdir, int noclose);
3277int dup (int __fildes);
3278int dup2 (int __fildes, int __fildes2);
3279int dup3 (int __fildes, int __fildes2, int flags);
3280int eaccess (const char *__path, int __mode);
3281void encrypt (char *__block, int __edflag);
3282void endusershell (void);
3283int euidaccess (const char *__path, int __mode);
3284int execl (const char *__path, const char *, ...);
3285int execle (const char *__path, const char *, ...);
3286int execlp (const char *__file, const char *, ...);
3287int execlpe (const char *__file, const char *, ...);
3288int execv (const char *__path, char * const __argv[]);
3289int execve (const char *__path, char * const __argv[], char * const __envp[]);
3290int execvp (const char *__file, char * const __argv[]);
3291int execvpe (const char *__file, char * const __argv[], char * const __envp[]);
3292int faccessat (int __dirfd, const char *__path, int __mode, int __flags);
3293int fchdir (int __fildes);
3294int fchmod (int __fildes, mode_t __mode);
3295int fchown (int __fildes, uid_t __owner, gid_t __group);
3296int fchownat (int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags);
3297int fexecve (int __fd, char * const __argv[], char * const __envp[]);
3299long fpathconf (int __fd, int __name);
3300int fsync (int __fd);
3301int fdatasync (int __fd);
3303char * getcwd (char *__buf, size_t __size);
3304int getdomainname (char *__name, size_t __len);
3305int getentropy (void *, size_t);
3306gid_t getegid (void);
3307uid_t geteuid (void);
3308gid_t getgid (void);
3309int getgroups (int __gidsetsize, gid_t __grouplist[]);
3310long gethostid (void);
3311char * getlogin (void);
3312int getlogin_r (char *name, size_t namesize) ;
3313char * getpass (const char *__prompt);
3314int getpagesize (void);
3315int getpeereid (int, uid_t *, gid_t *);
3321uid_t getuid (void);
3322char * getusershell (void);
3323char * getwd (char *__buf);
3324int iruserok (unsigned long raddr, int superuser, const char *ruser, const char *luser);
3325int isatty (int __fildes);
3326int issetugid (void);
3327int lchown (const char *__path, uid_t __owner, gid_t __group);
3328int link (const char *__path1, const char *__path2);
3329int linkat (int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags);
3330int nice (int __nice_value);
3331off_t lseek (int __fildes, off_t __offset, int __whence);
3332#define F_ULOCK 0
3333#define F_LOCK 1
3334#define F_TLOCK 2
3335#define F_TEST 3
3336int lockf (int __fd, int __cmd, off_t __len);
3337long pathconf (const char *__path, int __name);
3338int pause (void);
3339int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
3340int pipe (int __fildes[2]);
3341int pipe2 (int __fildes[2], int flags);
3342ssize_t pread (int __fd, void *__buf, size_t __nbytes, off_t __offset);
3343ssize_t pwrite (int __fd, const void *__buf, size_t __nbytes, off_t __offset);
3344_ssize_t read (int __fd, void *__buf, size_t __nbyte);
3345int rresvport (int *__alport);
3346int revoke (char *__path);
3347int rmdir (const char *__path);
3348int ruserok (const char *rhost, int superuser, const char *ruser, const char *luser);
3349void * sbrk (ptrdiff_t __incr);
3350int setegid (gid_t __gid);
3351int seteuid (uid_t __uid);
3352int setgid (gid_t __gid);
3353int setgroups (int ngroups, const gid_t *grouplist);
3354int sethostname (const char *, size_t);
3355int setpgid (pid_t __pid, pid_t __pgid);
3356int setpgrp (void);
3357int setregid (gid_t __rgid, gid_t __egid);
3358int setreuid (uid_t __ruid, uid_t __euid);
3360int setuid (uid_t __uid);
3361void setusershell (void);
3362unsigned sleep (unsigned int __seconds);
3363void swab (const void *__restrict__, void *__restrict__, ssize_t);
3364long sysconf (int __name);
3365pid_t tcgetpgrp (int __fildes);
3366int tcsetpgrp (int __fildes, pid_t __pgrp_id);
3367char * ttyname (int __fildes);
3368int ttyname_r (int, char *, size_t);
3369int unlink (const char *__path);
3370int usleep (useconds_t __useconds);
3371int vhangup (void);
3372_ssize_t write (int __fd, const void *__buf, size_t __nbyte);
3373#define __UNISTD_GETOPT__
3374#define __GETOPT_H__
3375extern int __attribute__((dllimport)) opterr;
3376extern int __attribute__((dllimport)) optind;
3377extern int __attribute__((dllimport)) optopt;
3378extern int __attribute__((dllimport)) optreset;
3379extern char __attribute__((dllimport)) *optarg;
3380int getopt (int, char * const *, const char *);
3381#undef __UNISTD_GETOPT__
3383int ftruncate (int __fd, off_t __length);
3384int truncate (const char *, off_t __length);
3385int getdtablesize (void);
3386useconds_t ualarm (useconds_t __useconds, useconds_t __interval);
3387 int gethostname (char *__name, size_t __len);
3389void sync (void);
3391 char *__restrict__ __buf, size_t __buflen);
3392int symlink (const char *__name1, const char *__name2);
3393ssize_t readlinkat (int __dirfd1, const char *__restrict__ __path,
3394 char *__restrict__ __buf, size_t __buflen);
3395int symlinkat (const char *, int, const char *);
3396int unlinkat (int, const char *, int);
3397#define F_OK 0
3398#define R_OK 4
3399#define W_OK 2
3400#define X_OK 1
3401#define SEEK_SET 0
3402#define SEEK_CUR 1
3403#define SEEK_END 2
3404#define STDIN_FILENO 0
3405#define STDOUT_FILENO 1
3406#define STDERR_FILENO 2
3407#define _SC_ARG_MAX 0
3408#define _SC_CHILD_MAX 1
3409#define _SC_CLK_TCK 2
3410#define _SC_NGROUPS_MAX 3
3411#define _SC_OPEN_MAX 4
3412#define _SC_JOB_CONTROL 5
3413#define _SC_SAVED_IDS 6
3414#define _SC_VERSION 7
3415#define _SC_PAGESIZE 8
3416#define _SC_PAGE_SIZE _SC_PAGESIZE
3417#define _SC_NPROCESSORS_CONF 9
3418#define _SC_NPROCESSORS_ONLN 10
3419#define _SC_PHYS_PAGES 11
3420#define _SC_AVPHYS_PAGES 12
3421#define _SC_MQ_OPEN_MAX 13
3422#define _SC_MQ_PRIO_MAX 14
3423#define _SC_RTSIG_MAX 15
3424#define _SC_SEM_NSEMS_MAX 16
3425#define _SC_SEM_VALUE_MAX 17
3426#define _SC_SIGQUEUE_MAX 18
3427#define _SC_TIMER_MAX 19
3428#define _SC_TZNAME_MAX 20
3429#define _SC_ASYNCHRONOUS_IO 21
3430#define _SC_FSYNC 22
3431#define _SC_MAPPED_FILES 23
3432#define _SC_MEMLOCK 24
3433#define _SC_MEMLOCK_RANGE 25
3434#define _SC_MEMORY_PROTECTION 26
3435#define _SC_MESSAGE_PASSING 27
3436#define _SC_PRIORITIZED_IO 28
3437#define _SC_REALTIME_SIGNALS 29
3438#define _SC_SEMAPHORES 30
3439#define _SC_SHARED_MEMORY_OBJECTS 31
3440#define _SC_SYNCHRONIZED_IO 32
3441#define _SC_TIMERS 33
3442#define _SC_AIO_LISTIO_MAX 34
3443#define _SC_AIO_MAX 35
3444#define _SC_AIO_PRIO_DELTA_MAX 36
3445#define _SC_DELAYTIMER_MAX 37
3446#define _SC_THREAD_KEYS_MAX 38
3447#define _SC_THREAD_STACK_MIN 39
3448#define _SC_THREAD_THREADS_MAX 40
3449#define _SC_TTY_NAME_MAX 41
3450#define _SC_THREADS 42
3451#define _SC_THREAD_ATTR_STACKADDR 43
3452#define _SC_THREAD_ATTR_STACKSIZE 44
3453#define _SC_THREAD_PRIORITY_SCHEDULING 45
3454#define _SC_THREAD_PRIO_INHERIT 46
3455#define _SC_THREAD_PRIO_PROTECT 47
3456#define _SC_THREAD_PRIO_CEILING _SC_THREAD_PRIO_PROTECT
3457#define _SC_THREAD_PROCESS_SHARED 48
3458#define _SC_THREAD_SAFE_FUNCTIONS 49
3459#define _SC_GETGR_R_SIZE_MAX 50
3460#define _SC_GETPW_R_SIZE_MAX 51
3461#define _SC_LOGIN_NAME_MAX 52
3462#define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
3463#define _SC_ADVISORY_INFO 54
3464#define _SC_ATEXIT_MAX 55
3465#define _SC_BARRIERS 56
3466#define _SC_BC_BASE_MAX 57
3467#define _SC_BC_DIM_MAX 58
3468#define _SC_BC_SCALE_MAX 59
3469#define _SC_BC_STRING_MAX 60
3470#define _SC_CLOCK_SELECTION 61
3471#define _SC_COLL_WEIGHTS_MAX 62
3472#define _SC_CPUTIME 63
3473#define _SC_EXPR_NEST_MAX 64
3474#define _SC_HOST_NAME_MAX 65
3475#define _SC_IOV_MAX 66
3476#define _SC_IPV6 67
3477#define _SC_LINE_MAX 68
3478#define _SC_MONOTONIC_CLOCK 69
3479#define _SC_RAW_SOCKETS 70
3480#define _SC_READER_WRITER_LOCKS 71
3481#define _SC_REGEXP 72
3482#define _SC_RE_DUP_MAX 73
3483#define _SC_SHELL 74
3484#define _SC_SPAWN 75
3485#define _SC_SPIN_LOCKS 76
3486#define _SC_SPORADIC_SERVER 77
3487#define _SC_SS_REPL_MAX 78
3488#define _SC_SYMLOOP_MAX 79
3489#define _SC_THREAD_CPUTIME 80
3490#define _SC_THREAD_SPORADIC_SERVER 81
3491#define _SC_TIMEOUTS 82
3492#define _SC_TRACE 83
3493#define _SC_TRACE_EVENT_FILTER 84
3494#define _SC_TRACE_EVENT_NAME_MAX 85
3495#define _SC_TRACE_INHERIT 86
3496#define _SC_TRACE_LOG 87
3497#define _SC_TRACE_NAME_MAX 88
3498#define _SC_TRACE_SYS_MAX 89
3499#define _SC_TRACE_USER_EVENT_MAX 90
3500#define _SC_TYPED_MEMORY_OBJECTS 91
3501#define _SC_V7_ILP32_OFF32 92
3502#define _SC_V6_ILP32_OFF32 _SC_V7_ILP32_OFF32
3503#define _SC_XBS5_ILP32_OFF32 _SC_V7_ILP32_OFF32
3504#define _SC_V7_ILP32_OFFBIG 93
3505#define _SC_V6_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
3506#define _SC_XBS5_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
3507#define _SC_V7_LP64_OFF64 94
3508#define _SC_V6_LP64_OFF64 _SC_V7_LP64_OFF64
3509#define _SC_XBS5_LP64_OFF64 _SC_V7_LP64_OFF64
3510#define _SC_V7_LPBIG_OFFBIG 95
3511#define _SC_V6_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
3512#define _SC_XBS5_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
3513#define _SC_XOPEN_CRYPT 96
3514#define _SC_XOPEN_ENH_I18N 97
3515#define _SC_XOPEN_LEGACY 98
3516#define _SC_XOPEN_REALTIME 99
3517#define _SC_STREAM_MAX 100
3518#define _SC_PRIORITY_SCHEDULING 101
3519#define _SC_XOPEN_REALTIME_THREADS 102
3520#define _SC_XOPEN_SHM 103
3521#define _SC_XOPEN_STREAMS 104
3522#define _SC_XOPEN_UNIX 105
3523#define _SC_XOPEN_VERSION 106
3524#define _SC_2_CHAR_TERM 107
3525#define _SC_2_C_BIND 108
3526#define _SC_2_C_DEV 109
3527#define _SC_2_FORT_DEV 110
3528#define _SC_2_FORT_RUN 111
3529#define _SC_2_LOCALEDEF 112
3530#define _SC_2_PBS 113
3531#define _SC_2_PBS_ACCOUNTING 114
3532#define _SC_2_PBS_CHECKPOINT 115
3533#define _SC_2_PBS_LOCATE 116
3534#define _SC_2_PBS_MESSAGE 117
3535#define _SC_2_PBS_TRACK 118
3536#define _SC_2_SW_DEV 119
3537#define _SC_2_UPE 120
3538#define _SC_2_VERSION 121
3539#define _SC_THREAD_ROBUST_PRIO_INHERIT 122
3540#define _SC_THREAD_ROBUST_PRIO_PROTECT 123
3541#define _SC_XOPEN_UUCP 124
3542#define _SC_LEVEL1_ICACHE_SIZE 125
3543#define _SC_LEVEL1_ICACHE_ASSOC 126
3544#define _SC_LEVEL1_ICACHE_LINESIZE 127
3545#define _SC_LEVEL1_DCACHE_SIZE 128
3546#define _SC_LEVEL1_DCACHE_ASSOC 129
3547#define _SC_LEVEL1_DCACHE_LINESIZE 130
3548#define _SC_LEVEL2_CACHE_SIZE 131
3549#define _SC_LEVEL2_CACHE_ASSOC 132
3550#define _SC_LEVEL2_CACHE_LINESIZE 133
3551#define _SC_LEVEL3_CACHE_SIZE 134
3552#define _SC_LEVEL3_CACHE_ASSOC 135
3553#define _SC_LEVEL3_CACHE_LINESIZE 136
3554#define _SC_LEVEL4_CACHE_SIZE 137
3555#define _SC_LEVEL4_CACHE_ASSOC 138
3556#define _SC_LEVEL4_CACHE_LINESIZE 139
3557#define _SC_POSIX_26_VERSION 140
3558#define _PC_LINK_MAX 0
3559#define _PC_MAX_CANON 1
3560#define _PC_MAX_INPUT 2
3561#define _PC_NAME_MAX 3
3562#define _PC_PATH_MAX 4
3563#define _PC_PIPE_BUF 5
3564#define _PC_CHOWN_RESTRICTED 6
3565#define _PC_NO_TRUNC 7
3566#define _PC_VDISABLE 8
3567#define _PC_ASYNC_IO 9
3568#define _PC_PRIO_IO 10
3569#define _PC_SYNC_IO 11
3570#define _PC_FILESIZEBITS 12
3571#define _PC_2_SYMLINKS 13
3572#define _PC_SYMLINK_MAX 14
3573#define _PC_ALLOC_SIZE_MIN 15
3574#define _PC_REC_INCR_XFER_SIZE 16
3575#define _PC_REC_MAX_XFER_SIZE 17
3576#define _PC_REC_MIN_XFER_SIZE 18
3577#define _PC_REC_XFER_ALIGN 19
3578#define _PC_TIMESTAMP_RESOLUTION 20
3579#define _PC_POSIX_PERMISSIONS 90
3580#define _PC_POSIX_SECURITY 91
3581#define _PC_CASE_INSENSITIVE 92
3582#define _CS_PATH 0
3583#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS 1
3584#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
3585#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
3586#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS 2
3587#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
3588#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
3589#define _CS_POSIX_V7_ILP32_OFF32_LIBS 3
3590#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
3591#define _CS_XBS5_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
3592#define _CS_XBS5_ILP32_OFF32_LINTFLAGS 4
3593#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS 5
3594#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
3595#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
3596#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS 6
3597#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
3598#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
3599#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS 7
3600#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
3601#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
3602#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS 8
3603#define _CS_POSIX_V7_LP64_OFF64_CFLAGS 9
3604#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
3605#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
3606#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS 10
3607#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
3608#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
3609#define _CS_POSIX_V7_LP64_OFF64_LIBS 11
3610#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
3611#define _CS_XBS5_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
3612#define _CS_XBS5_LP64_OFF64_LINTFLAGS 12
3613#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS 13
3614#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
3615#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
3616#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS 14
3617#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
3618#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
3619#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS 15
3620#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
3621#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
3622#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16
3623#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17
3624#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
3625#define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
3626#define _CS_POSIX_V7_THREADS_CFLAGS 18
3627#define _CS_POSIX_V7_THREADS_LDFLAGS 19
3628#define _CS_V7_ENV 20
3629#define _CS_V6_ENV _CS_V7_ENV
3630#define _CS_LFS_CFLAGS 21
3631#define _CS_LFS_LDFLAGS 22
3632#define _CS_LFS_LIBS 23
3633#define _CS_LFS_LINTFLAGS 24
3634#define _SSP_UNISTD_H_
3635
3636size_t __ssp_real_confstr (int __name, char *__buf, size_t __len) __asm__("" "confstr"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) size_t confstr (int __name, char *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_confstr (__name, __buf, __len); };
3637char * __ssp_real_getcwd (char *__buf, size_t __len) __asm__("" "getcwd"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) char * getcwd (char *__buf, size_t __len) { if (__buf != 0) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_getcwd (__buf, __len); };
3638int __ssp_real_getdomainname (char *__buf, size_t __len) __asm__("" "getdomainname"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int getdomainname (char *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_getdomainname (__buf, __len); };
3639int __ssp_real_getgroups (int __n, gid_t __buf[]) __asm__("" "getgroups"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int getgroups (int __n, gid_t __buf[])
3640{
3641 if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __n * sizeof(gid_t) > __builtin_object_size(__buf, 2 > 1)) __chk_fail();
3643}
3644int __ssp_real_gethostname (char *__buf, size_t __len) __asm__("" "gethostname"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int gethostname (char *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_gethostname (__buf, __len); };
3645int __ssp_real_getlogin_r (char *__buf, size_t __len) __asm__("" "getlogin_r"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int getlogin_r (char *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_getlogin_r (__buf, __len); };
3646ssize_t __ssp_real_pread (int __fd, void *__buf, size_t __len, off_t __off) __asm__("" "pread"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) ssize_t pread (int __fd, void *__buf, size_t __len, off_t __off) { if (1) if (__builtin_object_size(__buf, 0) != (size_t)-1 && __len > __builtin_object_size(__buf, 0)) __chk_fail(); return __ssp_real_pread (__fd, __buf, __len, __off); };
3647_ssize_t __ssp_real_read (int __fd, void *__buf, size_t __len) __asm__("" "read"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) _ssize_t read (int __fd, void *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 0) != (size_t)-1 && __len > __builtin_object_size(__buf, 0)) __chk_fail(); return __ssp_real_read (__fd, __buf, __len); };
3648ssize_t __ssp_real_readlink (const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) __asm__("" "readlink"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) ssize_t readlink (const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_readlink (__path, __buf, __len); };
3649ssize_t __ssp_real_readlinkat (int __dirfd1, const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) __asm__("" "readlinkat"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) ssize_t readlinkat (int __dirfd1, const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_readlinkat (__dirfd1, __path, __buf, __len); };
3650int __ssp_real_ttyname_r (int __fd, char *__buf, size_t __len) __asm__("" "ttyname_r"); extern __inline__ __attribute__((__always_inline__, __gnu_inline__)) int ttyname_r (int __fd, char *__buf, size_t __len) { if (1) if (__builtin_object_size(__buf, 2 > 1) != (size_t)-1 && __len > __builtin_object_size(__buf, 2 > 1)) __chk_fail(); return __ssp_real_ttyname_r (__fd, __buf, __len); };
3651
3652#define RUBY_MISSING_H 1
3653#define _MATH_H_
3654
3655#define _M_LN2 0.693147180559945309417
3656#define HUGE_VAL (__builtin_huge_val())
3657#define HUGE_VALF (__builtin_huge_valf())
3658#define HUGE_VALL (__builtin_huge_vall())
3659#define INFINITY (__builtin_inff())
3660#define NAN (__builtin_nanf(""))
3661extern double atan (double);
3662extern double cos (double);
3663extern double sin (double);
3664extern double tan (double);
3665extern double tanh (double);
3666extern double frexp (double, int *);
3667extern double modf (double, double *);
3668extern double ceil (double);
3669extern double fabs (double);
3670extern double floor (double);
3671extern double acos (double);
3672extern double asin (double);
3673extern double atan2 (double, double);
3674extern double cosh (double);
3675extern double sinh (double);
3676extern double exp (double);
3677extern double ldexp (double, int);
3678extern double log (double);
3679extern double log10 (double);
3680extern double pow (double, double);
3681extern double sqrt (double);
3682extern double fmod (double, double);
3683extern int finite (double);
3684extern int finitef (float);
3685extern int finitel (long double);
3686extern int isinff (float);
3687extern int isnanf (float);
3688extern int isinfl (long double);
3689extern int isnanl (long double);
3690extern int isinf (double);
3691extern int isnan (double);
3692#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
3693#define __TMP_FLT_EVAL_METHOD
3694 typedef float float_t;
3695 typedef double double_t;
3696#undef FLT_EVAL_METHOD
3697#define FP_NAN 0
3698#define FP_INFINITE 1
3699#define FP_ZERO 2
3700#define FP_SUBNORMAL 3
3701#define FP_NORMAL 4
3702#define FP_ILOGB0 (-__INT_MAX__)
3703#define FP_ILOGBNAN __INT_MAX__
3704#define MATH_ERRNO 1
3705#define MATH_ERREXCEPT 2
3706#define _MATH_ERRHANDLING_ERRNO MATH_ERRNO
3707#define _MATH_ERRHANDLING_ERREXCEPT MATH_ERREXCEPT
3708#define math_errhandling (_MATH_ERRHANDLING_ERRNO | _MATH_ERRHANDLING_ERREXCEPT)
3709extern int __isinff (float);
3710extern int __isinfd (double);
3711extern int __isnanf (float);
3712extern int __isnand (double);
3713extern int __fpclassifyf (float);
3714extern int __fpclassifyd (double);
3715extern int __signbitf (float);
3716extern int __signbitd (double);
3717#define fpclassify(__x) (__builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x))
3718#define isfinite(__x) (__builtin_isfinite (__x))
3719#define isinf(__x) (__builtin_isinf_sign (__x))
3720#define isnan(__x) (__builtin_isnan (__x))
3721#define isnormal(__x) (__builtin_isnormal (__x))
3722#define signbit(__x) ((sizeof(__x) == sizeof(float)) ? __builtin_signbitf(__x) : (sizeof(__x) == sizeof(double)) ? __builtin_signbit (__x) : __builtin_signbitl(__x))
3723#define isgreater(__x,__y) (__builtin_isgreater (__x, __y))
3724#define isgreaterequal(__x,__y) (__builtin_isgreaterequal (__x, __y))
3725#define isless(__x,__y) (__builtin_isless (__x, __y))
3726#define islessequal(__x,__y) (__builtin_islessequal (__x, __y))
3727#define islessgreater(__x,__y) (__builtin_islessgreater (__x, __y))
3728#define isunordered(__x,__y) (__builtin_isunordered (__x, __y))
3729extern double infinity (void);
3730extern double nan (const char *);
3731extern double copysign (double, double);
3732extern double logb (double);
3733extern int ilogb (double);
3734extern double asinh (double);
3735extern double cbrt (double);
3736extern double nextafter (double, double);
3737extern double rint (double);
3738extern double scalbn (double, int);
3739extern double exp2 (double);
3740extern double scalbln (double, long int);
3741extern double tgamma (double);
3742extern double nearbyint (double);
3743extern long int lrint (double);
3744extern long long int llrint (double);
3745extern double round (double);
3746extern long int lround (double);
3747extern long long int llround (double);
3748extern double trunc (double);
3749extern double remquo (double, double, int *);
3750extern double fdim (double, double);
3751extern double fmax (double, double);
3752extern double fmin (double, double);
3753extern double fma (double, double, double);
3754extern double log1p (double);
3755extern double expm1 (double);
3756extern double acosh (double);
3757extern double atanh (double);
3758extern double remainder (double, double);
3759extern double gamma (double);
3760extern double lgamma (double);
3761extern double erf (double);
3762extern double erfc (double);
3763extern double log2 (double);
3764#define log2(x) (log (x) / _M_LN2)
3765extern double hypot (double, double);
3766extern float atanf (float);
3767extern float cosf (float);
3768extern float sinf (float);
3769extern float tanf (float);
3770extern float tanhf (float);
3771extern float frexpf (float, int *);
3772extern float modff (float, float *);
3773extern float ceilf (float);
3774extern float fabsf (float);
3775extern float floorf (float);
3776extern float acosf (float);
3777extern float asinf (float);
3778extern float atan2f (float, float);
3779extern float coshf (float);
3780extern float sinhf (float);
3781extern float expf (float);
3782extern float ldexpf (float, int);
3783extern float logf (float);
3784extern float log10f (float);
3785extern float powf (float, float);
3786extern float sqrtf (float);
3787extern float fmodf (float, float);
3788extern float exp2f (float);
3789extern float scalblnf (float, long int);
3790extern float tgammaf (float);
3791extern float nearbyintf (float);
3792extern long int lrintf (float);
3793extern long long int llrintf (float);
3794extern float roundf (float);
3795extern long int lroundf (float);
3796extern long long int llroundf (float);
3797extern float truncf (float);
3798extern float remquof (float, float, int *);
3799extern float fdimf (float, float);
3800extern float fmaxf (float, float);
3801extern float fminf (float, float);
3802extern float fmaf (float, float, float);
3803extern float infinityf (void);
3804extern float nanf (const char *);
3805extern float copysignf (float, float);
3806extern float logbf (float);
3807extern int ilogbf (float);
3808extern float asinhf (float);
3809extern float cbrtf (float);
3810extern float nextafterf (float, float);
3811extern float rintf (float);
3812extern float scalbnf (float, int);
3813extern float log1pf (float);
3814extern float expm1f (float);
3815extern float acoshf (float);
3816extern float atanhf (float);
3817extern float remainderf (float, float);
3818extern float gammaf (float);
3819extern float lgammaf (float);
3820extern float erff (float);
3821extern float erfcf (float);
3822extern float log2f (float);
3823extern float hypotf (float, float);
3824extern long double atanl (long double);
3825extern long double cosl (long double);
3826extern long double sinl (long double);
3827extern long double tanl (long double);
3828extern long double tanhl (long double);
3829extern long double frexpl (long double, int *);
3830extern long double modfl (long double, long double *);
3831extern long double ceill (long double);
3832extern long double fabsl (long double);
3833extern long double floorl (long double);
3834extern long double log1pl (long double);
3835extern long double expm1l (long double);
3836extern long double acosl (long double);
3837extern long double asinl (long double);
3838extern long double atan2l (long double, long double);
3839extern long double coshl (long double);
3840extern long double sinhl (long double);
3841extern long double expl (long double);
3842extern long double ldexpl (long double, int);
3843extern long double logl (long double);
3844extern long double log10l (long double);
3845extern long double powl (long double, long double);
3846extern long double sqrtl (long double);
3847extern long double fmodl (long double, long double);
3848extern long double hypotl (long double, long double);
3849extern long double copysignl (long double, long double);
3850extern long double nanl (const char *);
3851extern int ilogbl (long double);
3852extern long double asinhl (long double);
3853extern long double cbrtl (long double);
3854extern long double nextafterl (long double, long double);
3855extern float nexttowardf (float, long double);
3856extern double nexttoward (double, long double);
3857extern long double nexttowardl (long double, long double);
3858extern long double logbl (long double);
3859extern long double log2l (long double);
3860extern long double rintl (long double);
3861extern long double scalbnl (long double, int);
3862extern long double exp2l (long double);
3863extern long double scalblnl (long double, long);
3864extern long double tgammal (long double);
3865extern long double nearbyintl (long double);
3866extern long int lrintl (long double);
3867extern long long int llrintl (long double);
3868extern long double roundl (long double);
3869extern long lroundl (long double);
3870extern long long int llroundl (long double);
3871extern long double truncl (long double);
3872extern long double remquol (long double, long double, int *);
3873extern long double fdiml (long double, long double);
3874extern long double fmaxl (long double, long double);
3875extern long double fminl (long double, long double);
3876extern long double fmal (long double, long double, long double);
3877extern long double acoshl (long double);
3878extern long double atanhl (long double);
3879extern long double remainderl (long double, long double);
3880extern long double lgammal (long double);
3881extern long double erfl (long double);
3882extern long double erfcl (long double);
3883extern double drem (double, double);
3884extern float dremf (float, float);
3885extern float dreml (long double, long double);
3886extern double gamma_r (double, int *);
3887extern double lgamma_r (double, int *);
3888extern float gammaf_r (float, int *);
3889extern float lgammaf_r (float, int *);
3890extern double y0 (double);
3891extern double y1 (double);
3892extern double yn (int, double);
3893extern double j0 (double);
3894extern double j1 (double);
3895extern double jn (int, double);
3896extern float y0f (float);
3897extern float y1f (float);
3898extern float ynf (int, float);
3899extern float j0f (float);
3900extern float j1f (float);
3901extern float jnf (int, float);
3902extern void sincos (double, double *, double *);
3903extern void sincosf (float, float *, float *);
3904extern void sincosl (long double, long double *, long double *);
3905extern double exp10 (double);
3906extern double pow10 (double);
3907extern float exp10f (float);
3908extern float pow10f (float);
3909extern float exp10l (float);
3910extern float pow10l (float);
3911#define signgam (*__signgam())
3912extern int *__signgam (void);
3913#define __signgam_r(ptr) _REENT_SIGNGAM(ptr)
3914#define MAXFLOAT 3.40282347e+38F
3915#define M_E 2.7182818284590452354
3916#define M_LOG2E 1.4426950408889634074
3917#define M_LOG10E 0.43429448190325182765
3918#define M_LN2 _M_LN2
3919#define M_LN10 2.30258509299404568402
3920#define M_PI 3.14159265358979323846
3921#define M_PI_2 1.57079632679489661923
3922#define M_PI_4 0.78539816339744830962
3923#define M_1_PI 0.31830988618379067154
3924#define M_2_PI 0.63661977236758134308
3925#define M_2_SQRTPI 1.12837916709551257390
3926#define M_SQRT2 1.41421356237309504880
3927#define M_SQRT1_2 0.70710678118654752440
3928#define M_TWOPI (M_PI * 2.0)
3929#define M_3PI_4 2.3561944901923448370E0
3930#define M_SQRTPI 1.77245385090551602792981
3931#define M_LN2LO 1.9082149292705877000E-10
3932#define M_LN2HI 6.9314718036912381649E-1
3933#define M_SQRT3 1.73205080756887719000
3934#define M_IVLN10 0.43429448190325182765
3935#define M_LOG2_E _M_LN2
3936#define M_INVLN2 1.4426950408889633870E0
3937
3938#undef RUBY_EXTERN
3939#define RUBY_EXTERN extern
3940
3941#pragma GCC visibility push(default)
3942
3943extern void setproctitle(const char *fmt, ...);
3944
3945#pragma GCC visibility pop
3946
3947#define RUBY
3948#undef _
3949#define _(args) args
3950#undef __
3951#define __(args) args
3952#define ANYARGS
3953
3954#pragma GCC visibility push(default)
3955
3956#define xmalloc ruby_xmalloc
3957#define xmalloc2 ruby_xmalloc2
3958#define xcalloc ruby_xcalloc
3959#define xrealloc ruby_xrealloc
3960#define xrealloc2 ruby_xrealloc2
3961#define xfree ruby_xfree
3962#define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((alloc_size params))
3963#define RUBY_ATTR_MALLOC __attribute__((__malloc__))
3964#define RUBY_ATTR_RETURNS_NONNULL __attribute__((__returns_nonnull__))
3965void *ruby_xmalloc(size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1)));
3966void *ruby_xmalloc2(size_t,size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1,2)));
3967void *ruby_xcalloc(size_t,size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1,2)));
3968void *ruby_xrealloc(void*,size_t) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (2)));
3969void *ruby_xrealloc2(void*,size_t,size_t) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (2,3)));
3970void ruby_xfree(void*);
3971#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
3972#define STRINGIZE(expr) STRINGIZE0(expr)
3973#define STRINGIZE0(expr) #expr
3974#define HAVE_TRUE_LONG_LONG 1
3975#define LONG_LONG long long
3976#undef _WIN32
3977#undef RUBY_EXTERN
3978#define FALSE 0
3979#define TRUE 1
3980#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
3981#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
3982#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
3983#define RUBY_EXTERN extern
3984#define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); RUBY_EXTERN
3985#define RUBY_MBCHAR_MAXSIZE INT_MAX
3986#define FLUSH_REGISTER_WINDOWS ((void)0)
3987#define PATH_SEP ":"
3988#define PATH_SEP_CHAR PATH_SEP[0]
3989#define PATH_ENV "PATH"
3990#define CASEFOLD_FILESYSTEM 0
3991#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
3992#define UNALIGNED_WORD_ACCESS 1
3993#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
3994#define NORETURN_STYLE_NEW 1
3995
3996#pragma GCC visibility pop
3997
3998#define RUBY_ASSERT_H
3999__attribute__ ((__noreturn__)) void rb_assert_failure(const char *, int, const char *, const char *);
4000#define RUBY_ASSERT_FAIL(expr) rb_assert_failure(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, expr)
4001#define RUBY_ASSERT_MESG(expr,mesg) ((expr) ? (void)0 : RUBY_ASSERT_FAIL(mesg))
4002#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((RUBY_DEBUG+0) ? RUBY_ASSERT_MESG((expr), mesg) : __builtin_choose_expr( __builtin_constant_p(cond), __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), RUBY_ASSERT_MESG(!(cond) || (expr), mesg)))
4003#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN((!RUBY_NDEBUG+0), expr, #expr)
4004#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
4005#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG_WHEN(TRUE, expr, #expr)
4006#define RUBY_DEBUG 0
4007#define RUBY_NDEBUG 0
4008#define ASSUME(x) (RB_LIKELY(!!(x)) ? (void)0 : UNREACHABLE)
4009#define UNREACHABLE_RETURN(val) UNREACHABLE
4010#define RUBY_MACRO_SELECT(base,n) TOKEN_PASTE(base, n)
4011#define _STDARG_H
4012#define _ANSI_STDARG_H_
4013#undef __need___va_list
4014#define va_start(v,l) __builtin_va_start(v,l)
4015#define va_end(v) __builtin_va_end(v)
4016#define va_arg(v,l) __builtin_va_arg(v,l)
4017#define va_copy(d,s) __builtin_va_copy(d,s)
4018#define __va_copy(d,s) __builtin_va_copy(d,s)
4019#define _VA_LIST_
4020#define _VA_LIST
4021#define _VA_LIST_T_H
4022#define __va_list__
4023
4024#pragma GCC visibility push(default)
4025
4026typedef unsigned long VALUE;
4027typedef unsigned long ID;
4028#define SIGNED_VALUE long
4029#define SIZEOF_VALUE SIZEOF_LONG
4030#define PRI_VALUE_PREFIX "l"
4031typedef char ruby_check_sizeof_int[4 == sizeof(int) ? 1 : -1];
4032typedef char ruby_check_sizeof_long[8 == sizeof(long) ? 1 : -1];
4033typedef char ruby_check_sizeof_long_long[8 == sizeof(long long) ? 1 : -1];
4034typedef char ruby_check_sizeof_voidp[8 == sizeof(void*) ? 1 : -1];
4035#define PRI_INT_PREFIX ""
4036#define PRI_LONG_PREFIX "l"
4037#define PRI_SHORT_PREFIX "h"
4038#define RUBY_PRI_VALUE_MARK "\v"
4039#define PRIdVALUE PRI_VALUE_PREFIX"d"
4040#define PRIoVALUE PRI_VALUE_PREFIX"o"
4041#define PRIuVALUE PRI_VALUE_PREFIX"u"
4042#define PRIxVALUE PRI_VALUE_PREFIX"x"
4043#define PRIXVALUE PRI_VALUE_PREFIX"X"
4044#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
4045#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
4046#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
4047#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
4048#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
4049#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
4050#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
4051#define PRIdSIZE PRI_SIZE_PREFIX"d"
4052#define PRIiSIZE PRI_SIZE_PREFIX"i"
4053#define PRIoSIZE PRI_SIZE_PREFIX"o"
4054#define PRIuSIZE PRI_SIZE_PREFIX"u"
4055#define PRIxSIZE PRI_SIZE_PREFIX"x"
4056#define PRIXSIZE PRI_SIZE_PREFIX"X"
4057#define _GCC_LIMITS_H_
4058#define _GCC_NEXT_LIMITS_H
4059#define _FEATURES_H
4060#define _CYGWIN_LIMITS_H__
4061#define __AIO_LISTIO_MAX 32
4062#define __AIO_MAX 8
4063#define __AIO_PRIO_DELTA_MAX 0
4064#define __ARG_MAX 32000
4065#define __ATEXIT_MAX 32
4066#define __CHILD_MAX 256
4067#define __DELAYTIMER_MAX __INT_MAX__
4068#define __HOST_NAME_MAX 255
4069#define __IOV_MAX 1024
4070#define __LOGIN_NAME_MAX 256
4071#define __MQ_OPEN_MAX 256
4072#define __MQ_PRIO_MAX INT_MAX
4073#define __OPEN_MAX 3200
4074#define __PAGESIZE 65536
4075#define __PTHREAD_DESTRUCTOR_ITERATIONS 4
4076#define __PTHREAD_KEYS_MAX 1024
4077#define __PTHREAD_STACK_MIN 65536
4078#define __RTSIG_MAX 33
4079#define __SEM_VALUE_MAX 1147483648
4080#define __SIGQUEUE_MAX 32
4081#define __STREAM_MAX 20
4082#define __SYMLOOP_MAX 10
4083#define __TIMER_MAX 32
4084#define __TTY_NAME_MAX 32
4085#define __FILESIZEBITS 64
4086#define __LINK_MAX 1024
4087#define __MAX_CANON 255
4088#define __MAX_INPUT 255
4089#define __NAME_MAX 255
4090#define __PATH_MAX 4096
4091#define __PIPE_BUF 4096
4092#define _LIMITS_H___
4093#define _MACH_MACHLIMITS_H_
4094#undef CHAR_BIT
4095#define CHAR_BIT __CHAR_BIT__
4096#undef LONG_BIT
4097#define LONG_BIT (__SIZEOF_LONG__ * __CHAR_BIT__)
4098#undef WORD_BIT
4099#define WORD_BIT (__SIZEOF_INT__ * __CHAR_BIT__)
4100#define MB_LEN_MAX 8
4101#undef SCHAR_MIN
4102#define SCHAR_MIN (-128)
4103#undef SCHAR_MAX
4104#define SCHAR_MAX 127
4105#undef UCHAR_MAX
4106#define UCHAR_MAX 255
4107#undef CHAR_MIN
4108#define CHAR_MIN (-128)
4109#undef CHAR_MAX
4110#define CHAR_MAX 127
4111#undef SHRT_MIN
4112#define SHRT_MIN (-32768)
4113#undef SHRT_MAX
4114#define SHRT_MAX 32767
4115#undef USHRT_MAX
4116#define USHRT_MAX 65535
4117#undef INT_MIN
4118#define INT_MIN (-INT_MAX-1)
4119#undef INT_MAX
4120#define INT_MAX __INT_MAX__
4121#undef UINT_MAX
4122#define UINT_MAX (INT_MAX * 2U + 1)
4123#undef LONG_MIN
4124#define LONG_MIN (-LONG_MAX-1L)
4125#undef LONG_MAX
4126#define LONG_MAX __LONG_MAX__
4127#undef ULONG_MAX
4128#define ULONG_MAX (LONG_MAX * 2UL + 1)
4129#undef LONG_LONG_MIN
4130#define LONG_LONG_MIN (-LONG_LONG_MAX-1)
4131#undef LONG_LONG_MAX
4132#define LONG_LONG_MAX __LONG_LONG_MAX__
4133#undef ULONG_LONG_MAX
4134#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
4135#undef LLONG_MIN
4136#define LLONG_MIN (-LLONG_MAX-1)
4137#undef LLONG_MAX
4138#define LLONG_MAX __LONG_LONG_MAX__
4139#undef ULLONG_MAX
4140#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
4141#undef SSIZE_MAX
4142#define SSIZE_MAX (__LONG_MAX__)
4143#define AIO_LISTIO_MAX __AIO_LISTIO_MAX
4144#define AIO_MAX __AIO_MAX
4145#define AIO_PRIO_DELTA_MAX __AIO_PRIO_DELTA_MAX
4146#undef ARG_MAX
4147#define ARG_MAX __ARG_MAX
4148#undef ATEXIT_MAX
4149#define ATEXIT_MAX __ATEXIT_MAX
4150#undef CHILD_MAX
4151#define CHILD_MAX __CHILD_MAX
4152#undef DELAYTIMER_MAX
4153#define DELAYTIMER_MAX __DELAYTIMER_MAX
4154#undef HOST_NAME_MAX
4155#define HOST_NAME_MAX __HOST_NAME_MAX
4156#undef IOV_MAX
4157#define IOV_MAX __IOV_MAX
4158#undef LOGIN_NAME_MAX
4159#define LOGIN_NAME_MAX __LOGIN_NAME_MAX
4160#undef MQ_OPEN_MAX
4161#define MQ_OPEN_MAX __MQ_OPEN_MAX
4162#undef MQ_PRIO_MAX
4163#define MQ_PRIO_MAX __MQ_PRIO_MAX
4164#undef OPEN_MAX
4165#define OPEN_MAX __OPEN_MAX
4166#undef PAGESIZE
4167#define PAGESIZE __PAGESIZE
4168#undef PAGE_SIZE
4169#define PAGE_SIZE PAGESIZE
4170#undef PTHREAD_DESTRUCTOR_ITERATIONS
4171#define PTHREAD_DESTRUCTOR_ITERATIONS __PTHREAD_DESTRUCTOR_ITERATIONS
4172#undef PTHREAD_KEYS_MAX
4173#define PTHREAD_KEYS_MAX __PTHREAD_KEYS_MAX
4174#undef PTHREAD_STACK_MIN
4175#define PTHREAD_STACK_MIN __PTHREAD_STACK_MIN
4176#undef PTHREAD_THREADS_MAX
4177#undef RTSIG_MAX
4178#define RTSIG_MAX __RTSIG_MAX
4179#undef SEM_NSEMS_MAX
4180#undef SEM_VALUE_MAX
4181#define SEM_VALUE_MAX __SEM_VALUE_MAX
4182#undef SIGQUEUE_MAX
4183#define SIGQUEUE_MAX __SIGQUEUE_MAX
4184#undef SS_REPL_MAX
4185#undef STREAM_MAX
4186#define STREAM_MAX __STREAM_MAX
4187#undef SYMLOOP_MAX
4188#define SYMLOOP_MAX __SYMLOOP_MAX
4189#undef TIMER_MAX
4190#define TIMER_MAX __TIMER_MAX
4191#undef TRACE_EVENT_NAME_MAX
4192#undef TRACE_NAME_MAX
4193#undef TRACE_SYS_MAX
4194#undef TRACE_USER_EVENT_MAX
4195#undef TTY_NAME_MAX
4196#define TTY_NAME_MAX __TTY_NAME_MAX
4197#undef TZNAME_MAX
4198#undef FILESIZEBITS
4199#define FILESIZEBITS __FILESIZEBITS
4200#undef LINK_MAX
4201#define LINK_MAX __LINK_MAX
4202#undef MAX_CANON
4203#define MAX_CANON __MAX_CANON
4204#undef MAX_INPUT
4205#define MAX_INPUT __MAX_INPUT
4206#undef NAME_MAX
4207#define NAME_MAX __NAME_MAX
4208#undef PATH_MAX
4209#define PATH_MAX __PATH_MAX
4210#undef PIPE_BUF
4211#define PIPE_BUF __PIPE_BUF
4212#undef POSIX_ALLOC_SIZE_MIN
4213#undef POSIX_REC_INCR_XFER_SIZE
4214#undef POSIX_REC_MAX_XFER_SIZE
4215#undef POSIX_REC_MIN_XFER_SIZE
4216#undef POSIX_REC_XFER_ALIGN
4217#undef SYMLINK_MAX
4218#define SYMLINK_MAX (PATH_MAX - 1)
4219#undef BC_BASE_MAX
4220#define BC_BASE_MAX 99
4221#undef BC_DIM_MAX
4222#define BC_DIM_MAX 2048
4223#undef BC_SCALE_MAX
4224#define BC_SCALE_MAX 99
4225#undef BC_STRING_MAX
4226#define BC_STRING_MAX 1000
4227#undef CHARCLASS_NAME_MAX
4228#undef COLL_WEIGHTS_MAX
4229#undef EXPR_NEST_MAX
4230#define EXPR_NEST_MAX 32
4231#undef LINE_MAX
4232#define LINE_MAX 2048
4233#undef NGROUPS_MAX
4234#define NGROUPS_MAX 1024
4235#undef RE_DUP_MAX
4236#define RE_DUP_MAX 255
4237#define _POSIX_CLOCKRES_MIN 20000000
4238#define _POSIX_AIO_LISTIO_MAX 2
4239#define _POSIX_AIO_MAX 1
4240#define _POSIX_ARG_MAX 4096
4241#define _POSIX_CHILD_MAX 25
4242#define _POSIX_DELAYTIMER_MAX 32
4243#define _POSIX_HOST_NAME_MAX 255
4244#define _POSIX_LINK_MAX 8
4245#define _POSIX_LOGIN_NAME_MAX 9
4246#define _POSIX_MAX_CANON 255
4247#define _POSIX_MAX_INPUT 255
4248#define _POSIX_MQ_OPEN_MAX 8
4249#define _POSIX_MQ_PRIO_MAX 32
4250#define _POSIX_NAME_MAX 14
4251#define _POSIX_NGROUPS_MAX 8
4252#define _POSIX_OPEN_MAX 20
4253#define _POSIX_PATH_MAX 256
4254#define _POSIX_PIPE_BUF 512
4255#define _POSIX_RE_DUP_MAX 255
4256#define _POSIX_RTSIG_MAX 8
4257#define _POSIX_SEM_NSEMS_MAX 256
4258#define _POSIX_SEM_VALUE_MAX 32767
4259#define _POSIX_SIGQUEUE_MAX 32
4260#define _POSIX_SSIZE_MAX 32767
4261#define _POSIX_STREAM_MAX 8
4262#define _POSIX_SS_REPL_MAX 4
4263#define _POSIX_SYMLINK_MAX 255
4264#define _POSIX_SYMLOOP_MAX 8
4265#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
4266#define _POSIX_THREAD_KEYS_MAX 128
4267#define _POSIX_THREAD_THREADS_MAX 64
4268#define _POSIX_TIMER_MAX 32
4269#define _POSIX_TRACE_EVENT_NAME_MAX 30
4270#define _POSIX_TRACE_NAME_MAX 8
4271#define _POSIX_TRACE_SYS_MAX 8
4272#define _POSIX_TRACE_USER_EVENT_MAX 32
4273#define _POSIX_TTY_NAME_MAX 9
4274#define _POSIX_TZNAME_MAX 6
4275#define _POSIX2_BC_BASE_MAX 99
4276#define _POSIX2_BC_DIM_MAX 2048
4277#define _POSIX2_BC_SCALE_MAX 99
4278#define _POSIX2_BC_STRING_MAX 1000
4279#define _POSIX2_COLL_WEIGHTS_MAX 2
4280#define _POSIX2_EXPR_NEST_MAX 32
4281#define _POSIX2_LINE_MAX 2048
4282#define _POSIX2_RE_DUP_MAX 255
4283#define _XOPEN_IOV_MAX 16
4284#define _XOPEN_NAME_MAX 255
4285#define _XOPEN_PATH_MAX 1024
4286#define NL_ARGMAX 9
4287#define NL_LANGMAX 14
4288#define NL_MSGMAX 32767
4289#define NL_SETMAX 255
4290#define NL_TEXTMAX _POSIX2_LINE_MAX
4291#undef NZERO
4292#define NZERO 20
4293#undef _GCC_NEXT_LIMITS_H
4294#define RUBY_FIXNUM_MAX (LONG_MAX>>1)
4295#define RUBY_FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
4296#define FIXNUM_MAX RUBY_FIXNUM_MAX
4297#define FIXNUM_MIN RUBY_FIXNUM_MIN
4298#define RB_INT2FIX(i) (((VALUE)(i))<<1 | RUBY_FIXNUM_FLAG)
4299#define INT2FIX(i) RB_INT2FIX(i)
4300#define RB_LONG2FIX(i) RB_INT2FIX(i)
4301#define LONG2FIX(i) RB_INT2FIX(i)
4302#define rb_fix_new(v) RB_INT2FIX(v)
4304#define rb_int_new(v) rb_int2inum(v)
4306#define rb_uint_new(v) rb_uint2inum(v)
4308#define LL2NUM(v) rb_ll2inum(v)
4309VALUE rb_ull2inum(unsigned long long);
4310#define ULL2NUM(v) rb_ull2inum(v)
4311#define SIZET2NUM(v) ULONG2NUM(v)
4312#define SSIZET2NUM(v) LONG2NUM(v)
4313__attribute__ ((__noreturn__)) void rb_out_of_int(long num);
4314static inline int
4315rb_long2int_inline(long n)
4316{
4317 int i = (int)n;
4318 if ((long)i != n)
4319 rb_out_of_int(n);
4320 return i;
4321}
4322#define rb_long2int(n) rb_long2int_inline(n)
4323#define RB_FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
4324static inline long
4325rb_fix2long(VALUE x)
4326{
4327 return ((long)(((long)(x))>>(int)(1)));
4328}
4329#define RB_FIX2ULONG(x) ((unsigned long)RB_FIX2LONG(x))
4330static inline unsigned long
4331rb_fix2ulong(VALUE x)
4332{
4333 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
4334}
4335#define RB_FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&RUBY_FIXNUM_FLAG)
4336#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
4337#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
4338#define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
4339#define FIX2LONG(x) RB_FIX2LONG(x)
4340#define FIX2ULONG(x) RB_FIX2ULONG(x)
4341#define FIXNUM_P(f) RB_FIXNUM_P(f)
4342#define POSFIXABLE(f) RB_POSFIXABLE(f)
4343#define NEGFIXABLE(f) RB_NEGFIXABLE(f)
4344#define FIXABLE(f) RB_FIXABLE(f)
4345#define RB_IMMEDIATE_P(x) ((VALUE)(x) & RUBY_IMMEDIATE_MASK)
4346#define IMMEDIATE_P(x) RB_IMMEDIATE_P(x)
4349#define RB_STATIC_SYM_P(x) (((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)
4350#define RB_DYNAMIC_SYM_P(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) == (RUBY_T_SYMBOL))
4351#define RB_SYMBOL_P(x) (RB_STATIC_SYM_P(x)||RB_DYNAMIC_SYM_P(x))
4352#define RB_ID2SYM(x) (rb_id2sym(x))
4353#define RB_SYM2ID(x) (rb_sym2id(x))
4354#define STATIC_SYM_P(x) RB_STATIC_SYM_P(x)
4355#define DYNAMIC_SYM_P(x) RB_DYNAMIC_SYM_P(x)
4356#define SYMBOL_P(x) RB_SYMBOL_P(x)
4357#define ID2SYM(x) RB_ID2SYM(x)
4358#define SYM2ID(x) RB_SYM2ID(x)
4359#define USE_FLONUM 1
4360#define RB_FLONUM_P(x) ((((int)(SIGNED_VALUE)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)
4361#define FLONUM_P(x) RB_FLONUM_P(x)
4362#define USE_SYMBOL_AS_METHOD_NAME 1
4375#define RUBY_Qfalse ((VALUE)RUBY_Qfalse)
4376#define RUBY_Qtrue ((VALUE)RUBY_Qtrue)
4377#define RUBY_Qnil ((VALUE)RUBY_Qnil)
4378#define RUBY_Qundef ((VALUE)RUBY_Qundef)
4379#define Qfalse RUBY_Qfalse
4380#define Qtrue RUBY_Qtrue
4381#define Qnil RUBY_Qnil
4382#define Qundef RUBY_Qundef
4383#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
4384#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
4385#define FLONUM_MASK RUBY_FLONUM_MASK
4386#define FLONUM_FLAG RUBY_FLONUM_FLAG
4387#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
4388#define RB_TEST(v) !(((VALUE)(v) & (VALUE)~RUBY_Qnil) == 0)
4389#define RB_NIL_P(v) !((VALUE)(v) != RUBY_Qnil)
4390#define RTEST(v) RB_TEST(v)
4391#define NIL_P(v) RB_NIL_P(v)
4392#define CLASS_OF(v) rb_class_of((VALUE)(v))
4421 RUBY_T_MASK = 0x1f
4423#define T_NONE RUBY_T_NONE
4424#define T_NIL RUBY_T_NIL
4425#define T_OBJECT RUBY_T_OBJECT
4426#define T_CLASS RUBY_T_CLASS
4427#define T_ICLASS RUBY_T_ICLASS
4428#define T_MODULE RUBY_T_MODULE
4429#define T_FLOAT RUBY_T_FLOAT
4430#define T_STRING RUBY_T_STRING
4431#define T_REGEXP RUBY_T_REGEXP
4432#define T_ARRAY RUBY_T_ARRAY
4433#define T_HASH RUBY_T_HASH
4434#define T_STRUCT RUBY_T_STRUCT
4435#define T_BIGNUM RUBY_T_BIGNUM
4436#define T_FILE RUBY_T_FILE
4437#define T_FIXNUM RUBY_T_FIXNUM
4438#define T_TRUE RUBY_T_TRUE
4439#define T_FALSE RUBY_T_FALSE
4440#define T_DATA RUBY_T_DATA
4441#define T_MATCH RUBY_T_MATCH
4442#define T_SYMBOL RUBY_T_SYMBOL
4443#define T_RATIONAL RUBY_T_RATIONAL
4444#define T_COMPLEX RUBY_T_COMPLEX
4445#define T_IMEMO RUBY_T_IMEMO
4446#define T_UNDEF RUBY_T_UNDEF
4447#define T_NODE RUBY_T_NODE
4448#define T_ZOMBIE RUBY_T_ZOMBIE
4449#define T_MOVED RUBY_T_MOVED
4450#define T_MASK RUBY_T_MASK
4451#define RB_BUILTIN_TYPE(x) (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK)
4452#define BUILTIN_TYPE(x) RB_BUILTIN_TYPE(x)
4453static inline int rb_type(VALUE obj);
4454#define TYPE(x) rb_type((VALUE)(x))
4455#define RB_FLOAT_TYPE_P(obj) ( RB_FLONUM_P(obj) || (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT))
4456#define RB_TYPE_P(obj,type) ( ((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : ((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : ((type) == RUBY_T_FALSE) ? ((obj) == RUBY_Qfalse) : ((type) == RUBY_T_NIL) ? ((obj) == RUBY_Qnil) : ((type) == RUBY_T_UNDEF) ? ((obj) == RUBY_Qundef) : ((type) == RUBY_T_SYMBOL) ? RB_SYMBOL_P(obj) : ((type) == RUBY_T_FLOAT) ? RB_FLOAT_TYPE_P(obj) : (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == (type)))
4457#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
4458#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
4459void rb_check_type(VALUE,int);
4460#define Check_Type(v,t) rb_check_type((VALUE)(v),(t))
4462VALUE rb_string_value(volatile VALUE*);
4463char *rb_string_value_ptr(volatile VALUE*);
4464char *rb_string_value_cstr(volatile VALUE*);
4465#define StringValue(v) rb_string_value(&(v))
4466#define StringValuePtr(v) rb_string_value_ptr(&(v))
4467#define StringValueCStr(v) rb_string_value_cstr(&(v))
4469#define SafeStringValue(v) StringValue(v)
4470void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")));
4471#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
4473#define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v);} while (0)
4476#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
4478#define FilePathStringValue(v) ((v) = rb_get_path(v))
4479#define RUBY_SAFE_LEVEL_MAX 1
4480void rb_secure(int);
4481int rb_safe_level(void);
4482void rb_set_safe_level(int);
4483int ruby_safe_level_2_error(void) __attribute__((error("$SAFE=2 to 4 are obsolete")));
4484int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 are obsolete")));
4485#define ruby_safe_level_2_warning() ruby_safe_level_2_error()
4486#define RUBY_SAFE_LEVEL_INVALID_P(level) __extension__( __builtin_choose_expr( __builtin_constant_p(level), ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)), 0))
4487#define RUBY_SAFE_LEVEL_CHECK(level,type) __extension__(__builtin_choose_expr(RUBY_SAFE_LEVEL_INVALID_P(level), ruby_safe_level_2_ ##type(), (level)))
4488#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level, warning))
4489#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
4490void rb_set_safe_level_force(int);
4492__attribute__ ((__noreturn__)) void rb_insecure_operation(void);
4493VALUE rb_errinfo(void);
4494void rb_set_errinfo(VALUE);
4495long rb_num2long(VALUE);
4496unsigned long rb_num2ulong(VALUE);
4497static inline long
4498rb_num2long_inline(VALUE x)
4499{
4500 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
4501 return ((long)(((long)(x))>>(int)(1)));
4502 else
4503 return rb_num2long(x);
4504}
4505#define RB_NUM2LONG(x) rb_num2long_inline(x)
4506#define NUM2LONG(x) RB_NUM2LONG(x)
4507static inline unsigned long
4508rb_num2ulong_inline(VALUE x)
4509{
4510 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
4511 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
4512 else
4513 return rb_num2ulong(x);
4514}
4515#define RB_NUM2ULONG(x) rb_num2ulong_inline(x)
4516#define NUM2ULONG(x) RB_NUM2ULONG(x)
4517long rb_num2int(VALUE);
4518long rb_fix2int(VALUE);
4519#define RB_FIX2INT(x) ((int)rb_fix2int((VALUE)(x)))
4520static inline int
4521rb_num2int_inline(VALUE x)
4522{
4523 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
4524 return (int)rb_fix2int(x);
4525 else
4526 return (int)rb_num2int(x);
4527}
4528#define RB_NUM2INT(x) rb_num2int_inline(x)
4529unsigned long rb_num2uint(VALUE);
4530#define RB_NUM2UINT(x) ((unsigned int)rb_num2uint(x))
4531unsigned long rb_fix2uint(VALUE);
4532#define RB_FIX2UINT(x) ((unsigned int)rb_fix2uint(x))
4533#define NUM2INT(x) RB_NUM2INT(x)
4534#define NUM2UINT(x) RB_NUM2UINT(x)
4535#define FIX2INT(x) RB_FIX2INT(x)
4536#define FIX2UINT(x) RB_FIX2UINT(x)
4537short rb_num2short(VALUE);
4538unsigned short rb_num2ushort(VALUE);
4539short rb_fix2short(VALUE);
4540unsigned short rb_fix2ushort(VALUE);
4541#define RB_FIX2SHORT(x) (rb_fix2short((VALUE)(x)))
4542#define FIX2SHORT(x) RB_FIX2SHORT(x)
4543static inline short
4544rb_num2short_inline(VALUE x)
4545{
4546 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
4547 return rb_fix2short(x);
4548 else
4549 return rb_num2short(x);
4550}
4551#define RB_NUM2SHORT(x) rb_num2short_inline(x)
4552#define RB_NUM2USHORT(x) rb_num2ushort(x)
4553#define NUM2SHORT(x) RB_NUM2SHORT(x)
4554#define NUM2USHORT(x) RB_NUM2USHORT(x)
4555long long rb_num2ll(VALUE);
4556unsigned long long rb_num2ull(VALUE);
4557static inline long long
4558rb_num2ll_inline(VALUE x)
4559{
4560 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
4561 return ((long)(((long)(x))>>(int)(1)));
4562 else
4563 return rb_num2ll(x);
4564}
4565#define RB_NUM2LL(x) rb_num2ll_inline(x)
4566#define RB_NUM2ULL(x) rb_num2ull(x)
4567#define NUM2LL(x) RB_NUM2LL(x)
4568#define NUM2ULL(x) RB_NUM2ULL(x)
4569#define NUM2SIZET(x) NUM2ULONG(x)
4570#define NUM2SSIZET(x) NUM2LONG(x)
4571double rb_num2dbl(VALUE);
4572#define NUM2DBL(x) rb_num2dbl((VALUE)(x))
4575VALUE rb_newobj(void);
4578#define RB_NEWOBJ(obj,type) type *(obj) = (type*)rb_newobj()
4579#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)rb_newobj_of(klass, flags)
4580#define NEWOBJ(obj,type) RB_NEWOBJ(obj,type)
4581#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
4582#define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t)
4583#define CLONESETUP(clone,obj) rb_clone_setup(clone,obj)
4584#define DUPSETUP(dup,obj) rb_dup_setup(dup,obj)
4585#define USE_RGENGC 1
4586#define USE_RINCGC 1
4587#define RGENGC_WB_PROTECTED_ARRAY 1
4588#define RGENGC_WB_PROTECTED_HASH 1
4589#define RGENGC_WB_PROTECTED_STRUCT 1
4590#define RGENGC_WB_PROTECTED_STRING 1
4591#define RGENGC_WB_PROTECTED_OBJECT 1
4592#define RGENGC_WB_PROTECTED_REGEXP 1
4593#define RGENGC_WB_PROTECTED_CLASS 1
4594#define RGENGC_WB_PROTECTED_FLOAT 1
4595#define RGENGC_WB_PROTECTED_COMPLEX 1
4596#define RGENGC_WB_PROTECTED_RATIONAL 1
4597#define RGENGC_WB_PROTECTED_BIGNUM 1
4598#define RGENGC_WB_PROTECTED_NODE_CREF 1
4599__extension__
4600enum ruby_fl_type {
4601 RUBY_FL_WB_PROTECTED = (1<<5),
4602 RUBY_FL_PROMOTED0 = (1<<5),
4603 RUBY_FL_PROMOTED1 = (1<<6),
4605 RUBY_FL_FINALIZE = (1<<7),
4606 RUBY_FL_TAINT = (1<<8),
4608 RUBY_FL_SEEN_OBJ_ID = (1<<9),
4609 RUBY_FL_EXIVAR = (1<<10),
4610 RUBY_FL_FREEZE = (1<<11),
4611 RUBY_FL_USHIFT = 12,
4612#define RUBY_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n))
4613 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
4614 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
4615 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
4616 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
4617 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
4618 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
4619 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
4620 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
4621 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
4622 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
4623 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
4624 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
4625 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
4626 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
4627 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
4628 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
4629 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
4630 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
4631 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
4632 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
4633 RUBY_ELTS_SHARED = RUBY_FL_USER2,
4635 RUBY_FL_SINGLETON = RUBY_FL_USER0
4636};
4637struct __attribute__((aligned(8))) RBasic {
4638 VALUE flags;
4639 const VALUE klass;
4640};
4643#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) __extension__( __builtin_choose_expr( RGENGC_WB_PROTECTED_ ##type, OBJ_WB_UNPROTECT((VALUE)(obj)), ((VALUE)(obj))))
4644#define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
4645#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
4646enum ruby_rvalue_flags {
4648};
4649#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
4650#define ROBJECT_EMBED ROBJECT_EMBED
4651enum ruby_robject_flags {
4653 ROBJECT_EMBED = RUBY_FL_USER1,
4655};
4656struct RObject {
4657 struct RBasic basic;
4658 union {
4659 struct {
4661 VALUE *ivptr;
4662 void *iv_index_tbl;
4663 } heap;
4665 } as;
4666};
4667#define ROBJECT_NUMIV(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ROBJECT(o)->as.heap.numiv)
4668#define ROBJECT_IVPTR(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT(o)->as.ary : ROBJECT(o)->as.heap.ivptr)
4669#define ROBJECT_IV_INDEX_TBL(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : ROBJECT(o)->as.heap.iv_index_tbl)
4670#define RCLASS_SUPER(c) rb_class_get_superclass(c)
4671#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
4672#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
4673#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
4674#define RMODULE_SUPER(m) RCLASS_SUPER(m)
4675#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
4676#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
4677#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
4678enum ruby_rmodule_flags {
4679 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
4680 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
4681 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4,
4683};
4684__attribute__ ((__pure__)) double rb_float_value(VALUE);
4685VALUE rb_float_new(double);
4687#define RFLOAT_VALUE(v) rb_float_value(v)
4688#define DBL2NUM(dbl) rb_float_new(dbl)
4689#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
4690#define ELTS_SHARED RUBY_ELTS_SHARED
4691#define RSTRING_NOEMBED RSTRING_NOEMBED
4692#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
4693#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
4694#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
4695#define RSTRING_FSTR RSTRING_FSTR
4696enum ruby_rstring_flags {
4697 RSTRING_NOEMBED = RUBY_FL_USER1,
4698 RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
4699 RUBY_FL_USER5|RUBY_FL_USER6),
4701 RSTRING_EMBED_LEN_MAX = (int)((sizeof(VALUE)*RVALUE_EMBED_LEN_MAX)/sizeof(char)-1),
4702 RSTRING_FSTR = RUBY_FL_USER17,
4704};
4705struct RString {
4706 struct RBasic basic;
4707 union {
4708 struct {
4709 long len;
4710 char *ptr;
4711 union {
4712 long capa;
4713 VALUE shared;
4714 } aux;
4715 } heap;
4716 char ary[RSTRING_EMBED_LEN_MAX + 1];
4717 } as;
4718};
4719#define RSTRING_EMBED_LEN(str) (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT))
4720#define RSTRING_LEN(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING_EMBED_LEN(str) : RSTRING(str)->as.heap.len)
4721#define RSTRING_PTR(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING(str)->as.ary : RSTRING(str)->as.heap.ptr)
4722#define RSTRING_END(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? (RSTRING(str)->as.ary + RSTRING_EMBED_LEN(str)) : (RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len))
4723#define RSTRING_LENINT(str) rb_long2int(RSTRING_LEN(str))
4724#define RSTRING_GETMEM(str,ptrvar,lenvar) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? ((ptrvar) = RSTRING(str)->as.ary, (lenvar) = RSTRING_EMBED_LEN(str)) : ((ptrvar) = RSTRING(str)->as.heap.ptr, (lenvar) = RSTRING(str)->as.heap.len))
4725#define USE_TRANSIENT_HEAP 1
4726enum ruby_rarray_flags {
4728 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
4729 RARRAY_EMBED_LEN_MASK = (RUBY_FL_USER4|RUBY_FL_USER3),
4731 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13,
4732#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
4734};
4735#define RARRAY_EMBED_FLAG (VALUE)RARRAY_EMBED_FLAG
4736#define RARRAY_EMBED_LEN_MASK (VALUE)RARRAY_EMBED_LEN_MASK
4737#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
4738#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
4739struct RArray {
4740 struct RBasic basic;
4741 union {
4742 struct {
4743 long len;
4744 union {
4745 long capa;
4746 const
4748 } aux;
4749 const VALUE *ptr;
4750 } heap;
4752 } as;
4753};
4754#define RARRAY_EMBED_LEN(a) (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))
4755#define RARRAY_LEN(a) rb_array_len(a)
4756#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
4757#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
4758#define RARRAY_CONST_PTR_TRANSIENT(a) rb_array_const_ptr_transient(a)
4759#define RARRAY_TRANSIENT_P(ary) FL_TEST_RAW((ary), RARRAY_TRANSIENT_FLAG)
4760#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
4761#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
4762#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); expr; RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
4763#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
4764#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
4765#define RARRAY_PTR_USE(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START(_ary); expr; RARRAY_PTR_USE_END(_ary); } while (0)
4766#define RARRAY_AREF(a,i) (RARRAY_CONST_PTR_TRANSIENT(a)[i])
4767#define RARRAY_ASET(a,i,v) do { const VALUE _ary = (a); const VALUE _v = (v); VALUE *ptr = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); RB_OBJ_WRITE(_ary, &ptr[i], _v); RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
4768#define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(ARRAY, a)))
4769struct RRegexp {
4770 struct RBasic basic;
4771 struct re_pattern_buffer *ptr;
4772 const VALUE src;
4773 unsigned long usecnt;
4774};
4775#define RREGEXP_PTR(r) (RREGEXP(r)->ptr)
4776#define RREGEXP_SRC(r) (RREGEXP(r)->src)
4777#define RREGEXP_SRC_PTR(r) RSTRING_PTR(RREGEXP(r)->src)
4778#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
4779#define RREGEXP_SRC_END(r) RSTRING_END(RREGEXP(r)->src)
4780size_t rb_hash_size_num(VALUE hash);
4781#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
4782#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
4783#define RHASH_IFNONE(h) rb_hash_ifnone(h)
4784#define RHASH_SIZE(h) rb_hash_size_num(h)
4785#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
4786#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
4787struct RFile {
4788 struct RBasic basic;
4789 struct rb_io_t *fptr;
4790};
4791struct RData {
4792 struct RBasic basic;
4793 void (*dmark)(void*);
4794 void (*dfree)(void*);
4795 void *data;
4796};
4797typedef struct rb_data_type_struct rb_data_type_t;
4798struct rb_data_type_struct {
4799 const char *wrap_struct_name;
4800 struct {
4801 void (*dmark)(void*);
4802 void (*dfree)(void*);
4803 size_t (*dsize)(const void *);
4804 void (*dcompact)(void*);
4805 void *reserved[1];
4806 } function;
4807 const rb_data_type_t *parent;
4808 void *data;
4809 VALUE flags;
4810};
4811#define HAVE_TYPE_RB_DATA_TYPE_T 1
4812#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
4813#define HAVE_RB_DATA_TYPE_T_PARENT 1
4814struct RTypedData {
4815 struct RBasic basic;
4816 const rb_data_type_t *type;
4818 void *data;
4819};
4820#define DATA_PTR(dta) (RDATA(dta)->data)
4821#define RTYPEDDATA_P(v) (RTYPEDDATA(v)->typed_flag == 1)
4822#define RTYPEDDATA_TYPE(v) (RTYPEDDATA(v)->type)
4823#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
4824typedef void (*RUBY_DATA_FUNC)(void*);
4825#define RUBY_UNTYPED_DATA_WARNING 1
4830int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
4833#define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t))
4834#define RUBY_DEFAULT_FREE ((RUBY_DATA_FUNC)-1)
4835#define RUBY_NEVER_FREE ((RUBY_DATA_FUNC)0)
4836#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
4837#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
4838#define RUBY_TYPED_FREE_IMMEDIATELY 1
4839#define RUBY_TYPED_WB_PROTECTED RUBY_FL_WB_PROTECTED
4840#define RUBY_TYPED_PROMOTED1 RUBY_FL_PROMOTED1
4841#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
4842#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark), (RUBY_DATA_FUNC)(free)); (void)((sval) = (type *)DATA_PTR(result));
4843#define Data_Make_Struct(klass,type,mark,free,sval) ({ Data_Make_Struct0(data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj; })
4844#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
4845#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (void)((sval) = (type *)DATA_PTR(result));
4846#define TypedData_Make_Struct(klass,type,data_type,sval) ({ TypedData_Make_Struct0(data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj; })
4847#define Data_Get_Struct(obj,type,sval) ((sval) = (type*)rb_data_object_get(obj))
4848#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = (type*)rb_check_typeddata((obj), (data_type)))
4849#define RSTRUCT_LEN(st) NUM2LONG(rb_struct_size(st))
4850#define RSTRUCT_PTR(st) rb_struct_ptr(st)
4851#define RSTRUCT_SET(st,idx,v) rb_struct_aset(st, INT2NUM(idx), (v))
4852#define RSTRUCT_GET(st,idx) rb_struct_aref(st, INT2NUM(idx))
4853int rb_big_sign(VALUE);
4854#define RBIGNUM_SIGN(b) (rb_big_sign(b))
4855#define RBIGNUM_POSITIVE_P(b) (RBIGNUM_SIGN(b)!=0)
4856#define RBIGNUM_NEGATIVE_P(b) (RBIGNUM_SIGN(b)==0)
4857#define R_CAST(st) (struct st*)
4858#define RMOVED(obj) (R_CAST(RMoved)(obj))
4859#define RBASIC(obj) (R_CAST(RBasic)(obj))
4860#define ROBJECT(obj) (R_CAST(RObject)(obj))
4861#define RCLASS(obj) (R_CAST(RClass)(obj))
4862#define RMODULE(obj) RCLASS(obj)
4863#define RSTRING(obj) (R_CAST(RString)(obj))
4864#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
4865#define RARRAY(obj) (R_CAST(RArray)(obj))
4866#define RDATA(obj) (R_CAST(RData)(obj))
4867#define RTYPEDDATA(obj) (R_CAST(RTypedData)(obj))
4868#define RFILE(obj) (R_CAST(RFile)(obj))
4869#define FL_SINGLETON ((VALUE)RUBY_FL_SINGLETON)
4870#define FL_WB_PROTECTED ((VALUE)RUBY_FL_WB_PROTECTED)
4871#define FL_PROMOTED0 ((VALUE)RUBY_FL_PROMOTED0)
4872#define FL_PROMOTED1 ((VALUE)RUBY_FL_PROMOTED1)
4873#define FL_FINALIZE ((VALUE)RUBY_FL_FINALIZE)
4874#define FL_TAINT ((VALUE)RUBY_FL_TAINT)
4875#define FL_UNTRUSTED ((VALUE)RUBY_FL_UNTRUSTED)
4876#define FL_SEEN_OBJ_ID ((VALUE)RUBY_FL_SEEN_OBJ_ID)
4877#define FL_EXIVAR ((VALUE)RUBY_FL_EXIVAR)
4878#define FL_FREEZE ((VALUE)RUBY_FL_FREEZE)
4879#define FL_USHIFT ((VALUE)RUBY_FL_USHIFT)
4880#define FL_USER0 ((VALUE)RUBY_FL_USER0)
4881#define FL_USER1 ((VALUE)RUBY_FL_USER1)
4882#define FL_USER2 ((VALUE)RUBY_FL_USER2)
4883#define FL_USER3 ((VALUE)RUBY_FL_USER3)
4884#define FL_USER4 ((VALUE)RUBY_FL_USER4)
4885#define FL_USER5 ((VALUE)RUBY_FL_USER5)
4886#define FL_USER6 ((VALUE)RUBY_FL_USER6)
4887#define FL_USER7 ((VALUE)RUBY_FL_USER7)
4888#define FL_USER8 ((VALUE)RUBY_FL_USER8)
4889#define FL_USER9 ((VALUE)RUBY_FL_USER9)
4890#define FL_USER10 ((VALUE)RUBY_FL_USER10)
4891#define FL_USER11 ((VALUE)RUBY_FL_USER11)
4892#define FL_USER12 ((VALUE)RUBY_FL_USER12)
4893#define FL_USER13 ((VALUE)RUBY_FL_USER13)
4894#define FL_USER14 ((VALUE)RUBY_FL_USER14)
4895#define FL_USER15 ((VALUE)RUBY_FL_USER15)
4896#define FL_USER16 ((VALUE)RUBY_FL_USER16)
4897#define FL_USER17 ((VALUE)RUBY_FL_USER17)
4898#define FL_USER18 ((VALUE)RUBY_FL_USER18)
4899#define FL_USER19 ((VALUE)(unsigned int)RUBY_FL_USER19)
4900#define RB_SPECIAL_CONST_P(x) (RB_IMMEDIATE_P(x) || !RB_TEST(x))
4901#define SPECIAL_CONST_P(x) RB_SPECIAL_CONST_P(x)
4902#define RB_FL_ABLE(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) != RUBY_T_NODE)
4903#define RB_FL_TEST_RAW(x,f) (RBASIC(x)->flags&(f))
4904#define RB_FL_TEST(x,f) (RB_FL_ABLE(x)?RB_FL_TEST_RAW((x),(f)):0)
4905#define RB_FL_ANY_RAW(x,f) RB_FL_TEST_RAW((x),(f))
4906#define RB_FL_ANY(x,f) RB_FL_TEST((x),(f))
4907#define RB_FL_ALL_RAW(x,f) (RB_FL_TEST_RAW((x),(f)) == (f))
4908#define RB_FL_ALL(x,f) (RB_FL_TEST((x),(f)) == (f))
4909#define RB_FL_SET_RAW(x,f) (void)(RBASIC(x)->flags |= (f))
4910#define RB_FL_SET(x,f) (RB_FL_ABLE(x) ? RB_FL_SET_RAW(x, f) : (void)0)
4911#define RB_FL_UNSET_RAW(x,f) (void)(RBASIC(x)->flags &= ~(VALUE)(f))
4912#define RB_FL_UNSET(x,f) (RB_FL_ABLE(x) ? RB_FL_UNSET_RAW(x, f) : (void)0)
4913#define RB_FL_REVERSE_RAW(x,f) (void)(RBASIC(x)->flags ^= (f))
4914#define RB_FL_REVERSE(x,f) (RB_FL_ABLE(x) ? RB_FL_REVERSE_RAW(x, f) : (void)0)
4915#define RB_OBJ_TAINTABLE(x) (RB_FL_ABLE(x) && RB_BUILTIN_TYPE(x) != RUBY_T_BIGNUM && RB_BUILTIN_TYPE(x) != RUBY_T_FLOAT)
4916#define RB_OBJ_TAINTED_RAW(x) RB_FL_TEST_RAW(x, RUBY_FL_TAINT)
4917#define RB_OBJ_TAINTED(x) (!!RB_FL_TEST((x), RUBY_FL_TAINT))
4918#define RB_OBJ_TAINT_RAW(x) RB_FL_SET_RAW(x, RUBY_FL_TAINT)
4919#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : (void)0)
4920#define RB_OBJ_UNTRUSTED(x) RB_OBJ_TAINTED(x)
4921#define RB_OBJ_UNTRUST(x) RB_OBJ_TAINT(x)
4922#define RB_OBJ_INFECT_RAW(x,s) RB_FL_SET_RAW(x, RB_OBJ_TAINTED_RAW(s))
4923#define RB_OBJ_INFECT(x,s) ( (RB_OBJ_TAINTABLE(x) && RB_FL_ABLE(s)) ? RB_OBJ_INFECT_RAW(x, s) : (void)0)
4924#define RB_OBJ_FROZEN_RAW(x) (RBASIC(x)->flags&RUBY_FL_FREEZE)
4925#define RB_OBJ_FROZEN(x) (!RB_FL_ABLE(x) || RB_OBJ_FROZEN_RAW(x))
4926#define RB_OBJ_FREEZE_RAW(x) (void)(RBASIC(x)->flags |= RUBY_FL_FREEZE)
4927#define RB_OBJ_FREEZE(x) rb_obj_freeze_inline((VALUE)x)
4928#define FL_ABLE(x) RB_FL_ABLE(x)
4929#define FL_TEST_RAW(x,f) RB_FL_TEST_RAW(x,f)
4930#define FL_TEST(x,f) RB_FL_TEST(x,f)
4931#define FL_ANY_RAW(x,f) RB_FL_ANY_RAW(x,f)
4932#define FL_ANY(x,f) RB_FL_ANY(x,f)
4933#define FL_ALL_RAW(x,f) RB_FL_ALL_RAW(x,f)
4934#define FL_ALL(x,f) RB_FL_ALL(x,f)
4935#define FL_SET_RAW(x,f) RB_FL_SET_RAW(x,f)
4936#define FL_SET(x,f) RB_FL_SET(x,f)
4937#define FL_UNSET_RAW(x,f) RB_FL_UNSET_RAW(x,f)
4938#define FL_UNSET(x,f) RB_FL_UNSET(x,f)
4939#define FL_REVERSE_RAW(x,f) RB_FL_REVERSE_RAW(x,f)
4940#define FL_REVERSE(x,f) RB_FL_REVERSE(x,f)
4941#define OBJ_TAINTABLE(x) RB_OBJ_TAINTABLE(x)
4942#define OBJ_TAINTED_RAW(x) RB_OBJ_TAINTED_RAW(x)
4943#define OBJ_TAINTED(x) RB_OBJ_TAINTED(x)
4944#define OBJ_TAINT_RAW(x) RB_OBJ_TAINT_RAW(x)
4945#define OBJ_TAINT(x) RB_OBJ_TAINT(x)
4946#define OBJ_UNTRUSTED(x) RB_OBJ_UNTRUSTED(x)
4947#define OBJ_UNTRUST(x) RB_OBJ_UNTRUST(x)
4948#define OBJ_INFECT_RAW(x,s) RB_OBJ_INFECT_RAW(x,s)
4949#define OBJ_INFECT(x,s) RB_OBJ_INFECT(x,s)
4950#define OBJ_FROZEN_RAW(x) RB_OBJ_FROZEN_RAW(x)
4951#define OBJ_FROZEN(x) RB_OBJ_FROZEN(x)
4952#define OBJ_FREEZE_RAW(x) RB_OBJ_FREEZE_RAW(x)
4953#define OBJ_FREEZE(x) RB_OBJ_FREEZE(x)
4955static inline void
4956rb_obj_freeze_inline(VALUE x)
4957{
4958 if ((!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) != RUBY_T_NODE)) {
4959 (void)(((struct RBasic*)(x))->flags |= RUBY_FL_FREEZE);
4960 if ((((struct RBasic*)(x))->klass) && !(((struct RBasic*)(x))->flags & RUBY_FL_SINGLETON)) {
4962 }
4963 }
4964}
4965#define RUBY_UNTYPED_DATA_FUNC(func) func __attribute__((warning("untyped Data is unsafe; use TypedData instead")))
4966static inline VALUE rb_data_object_wrap_warning(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
4967static inline void *rb_data_object_get_warning(VALUE) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
4968static inline VALUE
4970{
4971 return rb_data_object_wrap(klass, ptr, mark, free);
4972}
4973#define rb_data_object_wrap_warning(klass,ptr,mark,free) __extension__( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), rb_data_object_wrap_warning(klass, ptr, mark, free)))
4974static inline void *
4976{
4978 return ((struct RData *)obj)->data;
4979}
4980static inline void *
4981rb_data_object_get_warning(VALUE obj)
4982{
4983 return rb_data_object_get(obj);
4984}
4985static inline VALUE
4986rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
4987{
4988 VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark_func), (RUBY_DATA_FUNC)(free_func)); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
4989 return result;
4990}
4991static inline VALUE
4992rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
4993{
4994 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
4995 return result;
4996}
4997__attribute__ ((__deprecated__("by ""rb_data_object_wrap"))) static inline VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
4998static inline VALUE
5000{
5001 return rb_data_object_wrap(klass, data, dmark, dfree);
5002}
5003__attribute__ ((__deprecated__("by ""rb_data_typed_object_wrap"))) static inline VALUE rb_data_typed_object_alloc(VALUE,void*,const rb_data_type_t*);
5004static inline VALUE
5006{
5007 return rb_data_typed_object_wrap(klass, datap, type);
5008}
5009#define rb_data_object_wrap_0 rb_data_object_wrap
5010#define rb_data_object_wrap_1 rb_data_object_wrap_warning
5011#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
5012#define rb_data_object_get_0 rb_data_object_get
5013#define rb_data_object_get_1 rb_data_object_get_warning
5014#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
5015#define rb_data_object_make_0 rb_data_object_make
5016#define rb_data_object_make_1 rb_data_object_make_warning
5017#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
5018#define RB_OBJ_PROMOTED_RAW(x) RB_FL_ALL_RAW(x, RUBY_FL_PROMOTED)
5019#define RB_OBJ_PROMOTED(x) (RB_SPECIAL_CONST_P(x) ? 0 : RB_OBJ_PROMOTED_RAW(x))
5020#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
5021void rb_gc_writebarrier(VALUE a, VALUE b);
5023#define OBJ_PROMOTED_RAW(x) RB_OBJ_PROMOTED_RAW(x)
5024#define OBJ_PROMOTED(x) RB_OBJ_PROMOTED(x)
5025#define OBJ_WB_UNPROTECT(x) RB_OBJ_WB_UNPROTECT(x)
5026#define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
5027#define RB_OBJ_WRITTEN(a,oldv,b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
5028#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
5029static inline VALUE
5030rb_obj_wb_unprotect(VALUE x, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
5031{
5033 return x;
5034}
5035static inline VALUE
5036rb_obj_written(VALUE a, VALUE oldv __attribute__ ((unused)), VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
5037{
5038 if (!(((VALUE)(b) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(b) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
5039 rb_gc_writebarrier(a, b);
5040 }
5041 return a;
5042}
5043static inline VALUE
5044rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
5045{
5046 *slot = b;
5047 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
5048 return a;
5049}
5050#define RUBY_INTEGER_UNIFICATION 1
5051#define RB_INTEGER_TYPE_P(obj) rb_integer_type_p(obj)
5052static inline int
5053rb_integer_type_p(VALUE obj)
5054{
5055 return ((((int)(long)(obj))&RUBY_FIXNUM_FLAG) ||
5056 (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) &&
5057 (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_BIGNUM));
5058}
5059#define RB_INT2NUM(v) RB_INT2FIX((int)(v))
5060#define RB_UINT2NUM(v) RB_LONG2FIX((unsigned int)(v))
5061#define INT2NUM(x) RB_INT2NUM(x)
5062#define UINT2NUM(x) RB_UINT2NUM(x)
5063static inline VALUE
5064rb_long2num_inline(long v)
5065{
5066 if ((((v) < (0x7fffffffffffffffL>>1)+1) && ((v) >= (((long)(-0x7fffffffffffffffL -1L))>>(int)(1)))))
5067 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
5068 else
5069 return rb_int2big(v);
5070}
5071#define RB_LONG2NUM(x) rb_long2num_inline(x)
5072static inline VALUE
5073rb_ulong2num_inline(unsigned long v)
5074{
5075 if (((v) < (0x7fffffffffffffffL>>1)+1))
5076 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
5077 else
5078 return rb_uint2big(v);
5079}
5080#define RB_ULONG2NUM(x) rb_ulong2num_inline(x)
5081static inline char
5082rb_num2char_inline(VALUE x)
5083{
5084 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(x))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((x) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((x) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((x) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((x) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && ((!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(x))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(x))->as.heap.len)>=1))
5085 return (!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? ((struct RString*)(x))->as.ary : ((struct RString*)(x))->as.heap.ptr)[0];
5086 else
5087 return (char)(rb_num2int_inline(x) & 0xff);
5088}
5089#define RB_NUM2CHR(x) rb_num2char_inline(x)
5090#define RB_CHR2FIX(x) RB_INT2FIX((long)((x)&0xff))
5091#define LONG2NUM(x) RB_LONG2NUM(x)
5092#define ULONG2NUM(x) RB_ULONG2NUM(x)
5093#define USHORT2NUM(x) RB_INT2FIX(x)
5094#define NUM2CHR(x) RB_NUM2CHR(x)
5095#define CHR2FIX(x) RB_CHR2FIX(x)
5096#define RB_ST2FIX(h) RB_LONG2FIX((long)(h))
5097#define ST2FIX(h) RB_ST2FIX(h)
5098#define RB_ALLOC_N(type,n) ((type*)ruby_xmalloc2((size_t)(n),sizeof(type)))
5099#define RB_ALLOC(type) ((type*)ruby_xmalloc(sizeof(type)))
5100#define RB_ZALLOC_N(type,n) ((type*)ruby_xcalloc((size_t)(n),sizeof(type)))
5101#define RB_ZALLOC(type) (RB_ZALLOC_N(type,1))
5102#define RB_REALLOC_N(var,type,n) ((var)=(type*)ruby_xrealloc2((char*)(var),(size_t)(n),sizeof(type)))
5103#define ALLOC_N(type,n) RB_ALLOC_N(type,n)
5104#define ALLOC(type) RB_ALLOC(type)
5105#define ZALLOC_N(type,n) RB_ZALLOC_N(type,n)
5106#define ZALLOC(type) RB_ZALLOC(type)
5107#define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
5108#define ALLOCA_N(type,n) (type*)__builtin_alloca_with_align((sizeof(type)*(n)), RUBY_ALIGNOF(type) * CHAR_BIT)
5109void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) __attribute__ ((alloc_size (2)));
5110void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count) __attribute__ ((alloc_size (2,3)));
5111void rb_free_tmp_buffer(volatile VALUE *store);
5112__attribute__ ((__noreturn__)) void ruby_malloc_size_overflow(size_t, size_t);
5113#define DSIZE_T uint128_t
5114static inline int
5115rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
5116{
5117 __extension__
5118 unsigned __int128 c2 = (unsigned __int128)a * (unsigned __int128)b;
5119 if (c2 > max) return 1;
5120 *c = (size_t)c2;
5121 return 0;
5122}
5123static inline void *
5124rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
5125{
5126 size_t cnt = (size_t)count;
5127 if (elsize == sizeof(VALUE)) {
5128 if ((__builtin_expect(!!(cnt > 0x7fffffffffffffffL / sizeof(VALUE)), 0))) {
5130 }
5131 }
5132 else {
5133 size_t size, max = 0x7fffffffffffffffL - sizeof(VALUE) + 1;
5134 if ((__builtin_expect(!!(rb_mul_size_overflow(cnt, elsize, max, &size)), 0))) {
5136 }
5137 cnt = (size + sizeof(VALUE) - 1) / sizeof(VALUE);
5138 }
5139 return rb_alloc_tmp_buffer_with_count(store, cnt * sizeof(VALUE), cnt);
5140}
5141#define RUBY_ALLOCV_LIMIT 1024
5142#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
5143#define RB_ALLOCV_N(type,v,n) ((type*)(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((size_t)(n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (long)(n), sizeof(type))))
5144#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
5145#define ALLOCV(v,n) RB_ALLOCV(v, n)
5146#define ALLOCV_N(type,v,n) RB_ALLOCV_N(type, v, n)
5147#define ALLOCV_END(v) RB_ALLOCV_END(v)
5148#define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(size_t)(n))
5149#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(size_t)(n))
5150#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(size_t)(n))
5151#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(size_t)(n))
5152void rb_obj_infect(VALUE victim, VALUE carrier);
5153typedef int ruby_glob_func(const char*,VALUE, void*);
5154void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
5155int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
5156int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
5157VALUE rb_define_class(const char*,VALUE);
5158VALUE rb_define_module(const char*);
5159VALUE rb_define_class_under(VALUE, const char*, VALUE);
5160VALUE rb_define_module_under(VALUE, const char*);
5164typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
5165typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
5166typedef void rb_gvar_marker_t(VALUE *var);
5177void rb_define_variable(const char*,VALUE*);
5180void rb_define_readonly_variable(const char*,const VALUE*);
5181void rb_define_const(VALUE,const char*,VALUE);
5182void rb_define_global_const(const char*,VALUE);
5183void rb_define_method(VALUE,const char*,VALUE(*)(),int);
5184void rb_define_module_function(VALUE,const char*,VALUE(*)(),int);
5185void rb_define_global_function(const char*,VALUE(*)(),int);
5186void rb_undef_method(VALUE,const char*);
5187void rb_define_alias(VALUE,const char*,const char*);
5188void rb_define_attr(VALUE,const char*,int,int);
5193ID rb_intern(const char*);
5194ID rb_intern2(const char*, long);
5196const char *rb_id2name(ID);
5197ID rb_check_id(volatile VALUE *);
5202VALUE rb_check_symbol(volatile VALUE *namep);
5203#define RUBY_CONST_ID_CACHE_NB(result,str) static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); result rb_intern_id_cache;
5204#define RUBY_CONST_ID_CACHE(result,str) { RUBY_CONST_ID_CACHE_NB(result, str) }
5205#define RUBY_CONST_ID(var,str) do RUBY_CONST_ID_CACHE((var) =, (str)) while (0)
5206#define CONST_ID_CACHE(result,str) RUBY_CONST_ID_CACHE(result, str)
5207#define CONST_ID(var,str) RUBY_CONST_ID(var, str)
5208#define rb_intern(str) (__builtin_constant_p(str) ? __extension__ ({RUBY_CONST_ID_CACHE_NB((ID), (str))}) : rb_intern(str))
5209#define rb_intern_const(str) (__builtin_constant_p(str) ? __extension__ (rb_intern2((str), (long)strlen(str))) : (rb_intern)(str))
5210#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
5211#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
5212__attribute__ ((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int);
5213#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
5214const char *rb_class2name(VALUE);
5215const char *rb_obj_classname(VALUE);
5216void rb_p(VALUE);
5217VALUE rb_eval_string(const char*);
5218VALUE rb_eval_string_protect(const char*, int*);
5219VALUE rb_eval_string_wrap(const char*, int*);
5220VALUE rb_funcall(VALUE, ID, int, ...);
5221VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
5222VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int);
5223VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
5224VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int);
5225#define rb_funcall2 rb_funcallv
5226#define rb_funcall3 rb_funcallv_public
5228VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int);
5230VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int);
5231int rb_scan_args(int, const VALUE*, const char*, ...);
5232#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
5233#define RB_SCAN_ARGS_KEYWORDS 1
5234#define RB_SCAN_ARGS_EMPTY_KEYWORDS 2
5235#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
5236int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
5237VALUE rb_call_super(int, const VALUE*);
5238VALUE rb_call_super_kw(int, const VALUE*, int);
5240int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
5242#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
5243VALUE rb_gv_set(const char*, VALUE);
5244VALUE rb_gv_get(const char*);
5245VALUE rb_iv_get(VALUE, const char*);
5246VALUE rb_iv_set(VALUE, const char*, VALUE);
5250#define ruby_verbose (*rb_ruby_verbose_ptr())
5251#define ruby_debug (*rb_ruby_debug_ptr())
5253#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
5254#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
5255__attribute__ ((__noreturn__)) void rb_raise(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
5256__attribute__ ((__noreturn__)) void rb_fatal(const char*, ...) __attribute__((format(printf, 1, 2)));
5257__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_bug(const char*, ...) __attribute__((format(printf, 1, 2)));
5258__attribute__ ((__noreturn__)) void rb_bug_errno(const char*, int);
5259__attribute__ ((__noreturn__)) void rb_sys_fail(const char*);
5260__attribute__ ((__noreturn__)) void rb_sys_fail_str(VALUE);
5261__attribute__ ((__noreturn__)) void rb_mod_sys_fail(VALUE, const char*);
5262__attribute__ ((__noreturn__)) void rb_mod_sys_fail_str(VALUE, VALUE);
5263__attribute__ ((__noreturn__)) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*);
5264__attribute__ ((__noreturn__)) void rb_iter_break(void);
5265__attribute__ ((__noreturn__)) void rb_iter_break_value(VALUE);
5266__attribute__ ((__noreturn__)) void rb_exit(int);
5267__attribute__ ((__noreturn__)) void rb_notimplement(void);
5268VALUE rb_syserr_new(int, const char *);
5270__attribute__ ((__noreturn__)) void rb_syserr_fail(int, const char*);
5271__attribute__ ((__noreturn__)) void rb_syserr_fail_str(int, VALUE);
5272__attribute__ ((__noreturn__)) void rb_mod_syserr_fail(VALUE, int, const char*);
5273__attribute__ ((__noreturn__)) void rb_mod_syserr_fail_str(VALUE, int, VALUE);
5274__attribute__ ((__noreturn__)) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*);
5275void rb_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
5276void rb_compile_warning(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
5277void rb_sys_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
5278__attribute__((cold)) void rb_warn(const char*, ...) __attribute__((format(printf, 1, 2)));
5279void rb_compile_warn(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
5280#define RB_BLOCK_CALL_FUNC_STRICT 1
5281#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
5282#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
5283typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5287VALUE rb_yield_values(int n, ...);
5288VALUE rb_yield_values2(int n, const VALUE *argv);
5289VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
5292VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
5293#define RB_NO_KEYWORDS 0
5294#define RB_PASS_KEYWORDS 1
5295#define RB_PASS_EMPTY_KEYWORDS 2
5296#define RB_PASS_CALLED_KEYWORDS 3
5297int rb_keyword_given_p(void);
5298int rb_block_given_p(void);
5299void rb_need_block(void);
5309__attribute__ ((__noreturn__)) void rb_throw(const char*,VALUE);
5310__attribute__ ((__noreturn__)) void rb_throw_obj(VALUE,VALUE);
5311VALUE rb_require(const char*);
5312extern VALUE rb_mKernel;
5313extern VALUE rb_mComparable;
5314extern VALUE rb_mEnumerable;
5315extern VALUE rb_mErrno;
5316extern VALUE rb_mFileTest;
5317extern VALUE rb_mGC;
5318extern VALUE rb_mMath;
5319extern VALUE rb_mProcess;
5320extern VALUE rb_mWaitReadable;
5321extern VALUE rb_mWaitWritable;
5322extern VALUE rb_cBasicObject;
5323extern VALUE rb_cObject;
5324extern VALUE rb_cArray;
5325extern VALUE rb_cBinding;
5326extern VALUE rb_cClass;
5327extern VALUE rb_cCont;
5328extern VALUE rb_cData;
5329extern VALUE rb_cDir;
5330extern VALUE rb_cEncoding;
5331extern VALUE rb_cEnumerator;
5332extern VALUE rb_cFalseClass;
5333extern VALUE rb_cFile;
5334extern VALUE rb_cComplex;
5335extern VALUE rb_cFloat;
5336extern VALUE rb_cHash;
5337extern VALUE rb_cIO;
5338extern VALUE rb_cInteger;
5339extern VALUE rb_cMatch;
5340extern VALUE rb_cMethod;
5341extern VALUE rb_cModule;
5343extern VALUE rb_cNilClass;
5344extern VALUE rb_cNumeric;
5345extern VALUE rb_cProc;
5346extern VALUE rb_cRandom;
5347extern VALUE rb_cRange;
5348extern VALUE rb_cRational;
5349extern VALUE rb_cRegexp;
5350extern VALUE rb_cStat;
5351extern VALUE rb_cString;
5352extern VALUE rb_cStruct;
5353extern VALUE rb_cSymbol;
5354extern VALUE rb_cThread;
5355extern VALUE rb_cTime;
5356extern VALUE rb_cTrueClass;
5358extern VALUE rb_eException;
5360extern VALUE rb_eSystemExit;
5361extern VALUE rb_eInterrupt;
5362extern VALUE rb_eSignal;
5363extern VALUE rb_eFatal;
5364extern VALUE rb_eArgError;
5365extern VALUE rb_eEOFError;
5366extern VALUE rb_eIndexError;
5368extern VALUE rb_eKeyError;
5369extern VALUE rb_eRangeError;
5370extern VALUE rb_eIOError;
5371extern VALUE rb_eRuntimeError;
5372extern VALUE rb_eFrozenError;
5375extern VALUE rb_eThreadError;
5376extern VALUE rb_eTypeError;
5377extern VALUE rb_eZeroDivError;
5378extern VALUE rb_eNotImpError;
5379extern VALUE rb_eNoMemError;
5384extern VALUE rb_eRegexpError;
5388extern VALUE rb_eScriptError;
5389extern VALUE rb_eNameError;
5390extern VALUE rb_eSyntaxError;
5391extern VALUE rb_eLoadError;
5394static inline VALUE
5395rb_class_of(VALUE obj)
5396{
5397 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
5398 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return rb_cInteger;
5399 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return rb_cFloat;
5400 if (obj == ((VALUE)RUBY_Qtrue)) return rb_cTrueClass;
5401 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return rb_cSymbol;
5402 }
5403 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
5404 if (obj == ((VALUE)RUBY_Qnil)) return rb_cNilClass;
5405 if (obj == ((VALUE)RUBY_Qfalse)) return rb_cFalseClass;
5406 }
5407 return ((struct RBasic*)(obj))->klass;
5408}
5409static inline int
5410rb_type(VALUE obj)
5411{
5412 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
5413 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return RUBY_T_FIXNUM;
5414 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return RUBY_T_FLOAT;
5415 if (obj == ((VALUE)RUBY_Qtrue)) return RUBY_T_TRUE;
5416 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return RUBY_T_SYMBOL;
5417 if (obj == ((VALUE)RUBY_Qundef)) return RUBY_T_UNDEF;
5418 }
5419 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
5420 if (obj == ((VALUE)RUBY_Qnil)) return RUBY_T_NIL;
5421 if (obj == ((VALUE)RUBY_Qfalse)) return RUBY_T_FALSE;
5422 }
5423 return (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK);
5424}
5425#define rb_type_p(obj,type) __extension__ (__builtin_constant_p(type) ? RB_TYPE_P((obj), (type)) : rb_type(obj) == (type))
5426#define rb_special_const_p(obj) __extension__ ({ VALUE special_const_obj = (obj); (int)(RB_SPECIAL_CONST_P(special_const_obj) ? RUBY_Qtrue : RUBY_Qfalse); })
5427#define RUBY_INTERN_H 1
5428#define RUBY_ST_H 1
5429
5430#pragma GCC visibility push(default)
5431
5432typedef unsigned long st_data_t;
5433#define ST_DATA_T_DEFINED
5434typedef struct st_table st_table;
5436#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
5439typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
5440#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
5444};
5445#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
5446#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
5448struct st_table_entry;
5449struct st_table {
5451 unsigned int rebuilds_num;
5452 const struct st_hash_type *type;
5457};
5458#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
5461#define st_init_table rb_st_init_table
5463#define st_init_table_with_size rb_st_init_table_with_size
5465#define st_init_numtable rb_st_init_numtable
5467#define st_init_numtable_with_size rb_st_init_numtable_with_size
5469#define st_init_strtable rb_st_init_strtable
5471#define st_init_strtable_with_size rb_st_init_strtable_with_size
5473#define st_init_strcasetable rb_st_init_strcasetable
5475#define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
5477#define st_delete rb_st_delete
5479#define st_delete_safe rb_st_delete_safe
5481#define st_shift rb_st_shift
5483#define st_insert rb_st_insert
5485#define st_insert2 rb_st_insert2
5487#define st_lookup rb_st_lookup
5489#define st_get_key rb_st_get_key
5490typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
5492#define st_update rb_st_update
5496#define st_foreach_with_replace rb_st_foreach_with_replace
5498#define st_foreach rb_st_foreach
5500#define st_foreach_check rb_st_foreach_check
5502#define st_keys rb_st_keys
5504#define st_keys_check rb_st_keys_check
5506#define st_values rb_st_values
5508#define st_values_check rb_st_values_check
5510#define st_add_direct rb_st_add_direct
5512#define st_free_table rb_st_free_table
5514#define st_cleanup_safe rb_st_cleanup_safe
5516#define st_clear rb_st_clear
5518#define st_copy rb_st_copy
5519__attribute__ ((__const__)) int rb_st_numcmp(st_data_t, st_data_t);
5520#define st_numcmp rb_st_numcmp
5521__attribute__ ((__const__)) st_index_t rb_st_numhash(st_data_t);
5522#define st_numhash rb_st_numhash
5523__attribute__ ((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
5524#define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
5525__attribute__ ((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
5526#define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
5527#define st_strcasecmp rb_st_locale_insensitive_strcasecmp
5528#define st_strncasecmp rb_st_locale_insensitive_strncasecmp
5529__attribute__ ((__pure__)) size_t rb_st_memsize(const st_table *);
5530#define st_memsize rb_st_memsize
5531__attribute__ ((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h);
5532#define st_hash rb_st_hash
5533__attribute__ ((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i);
5534#define st_hash_uint32 rb_st_hash_uint32
5535__attribute__ ((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i);
5536#define st_hash_uint rb_st_hash_uint
5537__attribute__ ((__const__)) st_index_t rb_st_hash_end(st_index_t h);
5538#define st_hash_end rb_st_hash_end
5540#define st_hash_start(h) ((st_index_t)(h))
5541void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
5542
5543#pragma GCC visibility pop
5544
5545#define MJIT_STATIC static
5546
5547#pragma GCC visibility push(default)
5548
5549#define UNLIMITED_ARGUMENTS (-1)
5550void rb_mem_clear(VALUE*, long);
5553VALUE rb_ary_new(void);
5554VALUE rb_ary_new_capa(long capa);
5555VALUE rb_ary_new_from_args(long n, ...);
5556VALUE rb_ary_new_from_values(long n, const VALUE *elts);
5557VALUE rb_ary_tmp_new(long);
5558void rb_ary_free(VALUE);
5559void rb_ary_modify(VALUE);
5562VALUE rb_ary_aref(int, const VALUE*, VALUE);
5563VALUE rb_ary_subseq(VALUE, long, long);
5564void rb_ary_store(VALUE, long, VALUE);
5569VALUE rb_ary_cat(VALUE, const VALUE *, long);
5574VALUE rb_ary_entry(VALUE, long);
5590VALUE rb_ary_replace(VALUE copy, VALUE orig);
5591VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
5592VALUE rb_ary_resize(VALUE ary, long len);
5593#define rb_ary_new2 rb_ary_new_capa
5594#define rb_ary_new3 rb_ary_new_from_args
5595#define rb_ary_new4 rb_ary_new_from_values
5596VALUE rb_big_new(size_t, int);
5597int rb_bigzero_p(VALUE x);
5599void rb_big_2comp(VALUE);
5601void rb_big_resize(VALUE big, size_t len);
5602VALUE rb_cstr_to_inum(const char*, int, int);
5603VALUE rb_str_to_inum(VALUE, int, int);
5604VALUE rb_cstr2inum(const char*, int);
5605VALUE rb_str2inum(VALUE, int);
5606VALUE rb_big2str(VALUE, int);
5607long rb_big2long(VALUE);
5608#define rb_big2int(x) rb_big2long(x)
5609unsigned long rb_big2ulong(VALUE);
5610#define rb_big2uint(x) rb_big2ulong(x)
5611long long rb_big2ll(VALUE);
5612unsigned long long rb_big2ull(VALUE);
5613void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
5614VALUE rb_big_unpack(unsigned long *buf, long num_longs);
5615int rb_uv_to_utf8(char[6],unsigned long);
5616VALUE rb_dbl2big(double);
5617double rb_big2dbl(VALUE);
5634#define INTEGER_PACK_MSWORD_FIRST 0x01
5635#define INTEGER_PACK_LSWORD_FIRST 0x02
5636#define INTEGER_PACK_MSBYTE_FIRST 0x10
5637#define INTEGER_PACK_LSBYTE_FIRST 0x20
5638#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
5639#define INTEGER_PACK_2COMP 0x80
5640#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
5641#define INTEGER_PACK_FORCE_BIGNUM 0x100
5642#define INTEGER_PACK_NEGATIVE 0x200
5643#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
5644#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
5645int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
5646VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
5647size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
5648size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
5651#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
5652#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
5654#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
5655#define rb_rational_new2(x,y) rb_rational_new((x), (y))
5657#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
5658#define rb_Rational2(x,y) rb_Rational((x), (y))
5664#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
5665#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
5667#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
5668#define rb_complex_new2(x,y) rb_complex_new((x), (y))
5670__attribute__ ((__deprecated__("by ""rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg);
5682VALUE rb_dbl_complex_new(double real, double imag);
5683#define rb_complex_add rb_complex_plus
5684#define rb_complex_sub rb_complex_minus
5685#define rb_complex_nagate rb_complex_uminus
5687#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
5688#define rb_Complex2(x,y) rb_Complex((x), (y))
5696VALUE rb_module_new(void);
5708void rb_undef(VALUE, ID);
5709void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int);
5710void rb_define_private_method(VALUE, const char*, VALUE (*)(), int);
5711void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int);
5713int rb_cmpint(VALUE, VALUE, VALUE);
5714__attribute__ ((__noreturn__)) void rb_cmperr(VALUE, VALUE);
5716VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
5717VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
5718VALUE rb_fiber_yield(int argc, const VALUE *argv);
5719VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
5722VALUE rb_enum_values_pack(int, const VALUE*);
5723VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
5727#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
5728#define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat))
5729#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
5730#define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0)
5731#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
5732#define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
5733typedef struct {
5740VALUE rb_exc_new(VALUE, const char*, long);
5741VALUE rb_exc_new_cstr(VALUE, const char*);
5743#define rb_exc_new2 rb_exc_new_cstr
5744#define rb_exc_new3 rb_exc_new_str
5745__attribute__ ((__noreturn__)) void rb_loaderror(const char*, ...) __attribute__((format(printf, 1, 2)));
5746__attribute__ ((__noreturn__)) void rb_loaderror_with_path(VALUE path, const char*, ...) __attribute__((format(printf, 2, 3)));
5747__attribute__ ((__noreturn__)) void rb_name_error(ID, const char*, ...) __attribute__((format(printf, 2, 3)));
5748__attribute__ ((__noreturn__)) void rb_name_error_str(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
5749__attribute__ ((__noreturn__)) void rb_frozen_error_raise(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
5750__attribute__ ((__noreturn__)) void rb_invalid_str(const char*, const char*);
5751__attribute__ ((__noreturn__)) void rb_error_frozen(const char*);
5752__attribute__ ((__noreturn__)) void rb_error_frozen_object(VALUE);
5756#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
5757#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
5758void rb_check_copyable(VALUE obj, VALUE orig);
5759#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
5760#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
5761int rb_sourceline(void);
5762const char *rb_sourcefile(void);
5763VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
5764VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
5765__attribute__ ((__noreturn__)) static void rb_error_arity(int, int, int);
5766static inline int
5767rb_check_arity(int argc, int min, int max)
5768{
5769 if ((argc < min) || (max != (-1) && argc > max))
5770 rb_error_arity(argc, min, max);
5771 return argc;
5772}
5773#define rb_check_arity rb_check_arity
5774typedef struct {
5777} rb_fdset_t;
5783int rb_fd_isset(int, const rb_fdset_t *);
5784void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
5786struct timeval;
5788#define rb_fd_ptr(f) ((f)->fdset)
5789#define rb_fd_max(f) ((f)->maxfd)
5790__attribute__ ((__noreturn__)) void rb_exc_raise(VALUE);
5791__attribute__ ((__noreturn__)) void rb_exc_fatal(VALUE);
5792__attribute__ ((__noreturn__)) VALUE rb_f_exit(int, const VALUE*);
5793__attribute__ ((__noreturn__)) VALUE rb_f_abort(int, const VALUE*);
5794void rb_remove_method(VALUE, const char*);
5796#define HAVE_RB_DEFINE_ALLOC_FUNC 1
5801void rb_clear_constant_cache(void);
5803void rb_alias(VALUE, ID, ID);
5804void rb_attr(VALUE,ID,int,int,int);
5805int rb_method_boundp(VALUE, ID, int);
5809int rb_obj_respond_to(VALUE, ID, int);
5810int rb_respond_to(VALUE, ID);
5812__attribute__ ((__noreturn__)) void rb_interrupt(void);
5814void rb_backtrace(void);
5818VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
5819VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
5820void rb_load(VALUE, int);
5821void rb_load_protect(VALUE, int, int*);
5822__attribute__ ((__noreturn__)) void rb_jump_tag(int);
5823int rb_provided(const char*);
5824int rb_feature_provided(const char *, const char **);
5825void rb_provide(const char*);
5829void rb_obj_call_init(VALUE, int, const VALUE*);
5830void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
5832VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);
5833VALUE rb_block_proc(void);
5841int rb_proc_arity(VALUE);
5843VALUE rb_binding_new(void);
5846VALUE rb_method_call(int, const VALUE*, VALUE);
5847VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
5852VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
5853void rb_set_end_proc(void (*)(VALUE), VALUE);
5854void rb_thread_schedule(void);
5855void rb_thread_wait_fd(int);
5856int rb_thread_fd_writable(int);
5857void rb_thread_fd_close(int);
5858int rb_thread_alone(void);
5859void rb_thread_sleep(int);
5860void rb_thread_sleep_forever(void);
5861void rb_thread_sleep_deadly(void);
5862VALUE rb_thread_stop(void);
5867VALUE rb_thread_create(VALUE (*)(void *), void*);
5868int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
5869void rb_thread_wait_for(struct timeval);
5871VALUE rb_thread_main(void);
5874void rb_thread_atfork(void);
5880VALUE rb_dir_getwd(void);
5881VALUE rb_file_s_expand_path(int, const VALUE *);
5883VALUE rb_file_s_absolute_path(int, const VALUE *);
5886int rb_find_file_ext_safe(VALUE*, const char* const*, int);
5888int rb_find_file_ext(VALUE*, const char* const*);
5892int rb_is_absolute_path(const char *);
5893__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_memerror(void);
5894__attribute__ ((__pure__)) int rb_during_gc(void);
5895void rb_gc_mark_locations(const VALUE*, const VALUE*);
5896void rb_mark_tbl(struct st_table*);
5897void rb_mark_tbl_no_pin(struct st_table*);
5898void rb_mark_set(struct st_table*);
5899void rb_mark_hash(struct st_table*);
5902void rb_gc_mark(VALUE);
5906void rb_gc(void);
5908VALUE rb_gc_enable(void);
5909VALUE rb_gc_disable(void);
5910VALUE rb_gc_start(void);
5913size_t rb_gc_count(void);
5914size_t rb_gc_stat(VALUE);
5918#define st_foreach_safe rb_st_foreach_safe
5922VALUE rb_hash_new(void);
5933VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
5934void rb_hash_bulk_insert(long, const VALUE *, VALUE);
5935typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
5937struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
5938int rb_path_check(const char*);
5939int rb_env_path_tainted(void);
5940VALUE rb_env_clear(void);
5943#define rb_defout rb_stdout
5944extern VALUE rb_fs;
5945extern VALUE rb_output_fs;
5946extern VALUE rb_rs;
5947extern VALUE rb_default_rs;
5948extern VALUE rb_output_rs;
5960VALUE rb_io_printf(int, const VALUE*, VALUE);
5961VALUE rb_io_print(int, const VALUE*, VALUE);
5962VALUE rb_io_puts(int, const VALUE*, VALUE);
5963VALUE rb_io_fdopen(int, int, const char*);
5965VALUE rb_file_open(const char*, const char*);
5966VALUE rb_file_open_str(VALUE, const char*);
5967VALUE rb_gets(void);
5968void rb_write_error(const char*);
5969void rb_write_error2(const char*, long);
5970void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
5971int rb_pipe(int *pipes);
5973int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
5974int rb_cloexec_dup(int oldfd);
5975int rb_cloexec_dup2(int oldfd, int newfd);
5976int rb_cloexec_pipe(int fildes[2]);
5977int rb_cloexec_fcntl_dupfd(int fd, int minfd);
5978#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
5979void rb_update_max_fd(int fd);
5980void rb_fd_fix_cloexec(int fd);
5983void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
5984__attribute__ ((__noreturn__)) void rb_num_zerodiv(void);
5985#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
5991VALUE rb_fix2str(VALUE, int);
5992__attribute__ ((__const__)) VALUE rb_dbl_cmp(double, double);
5993int rb_eql(VALUE, VALUE);
6017VALUE rb_convert_type(VALUE,int,const char*,const char*);
6018VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
6019VALUE rb_check_to_integer(VALUE, const char *);
6029double rb_cstr_to_dbl(const char*, int);
6030double rb_str_to_dbl(VALUE, int);
6032__attribute__ ((__const__)) int rb_is_const_id(ID);
6033__attribute__ ((__const__)) int rb_is_global_id(ID);
6034__attribute__ ((__const__)) int rb_is_instance_id(ID);
6035__attribute__ ((__const__)) int rb_is_attrset_id(ID);
6036__attribute__ ((__const__)) int rb_is_class_id(ID);
6037__attribute__ ((__const__)) int rb_is_local_id(ID);
6038__attribute__ ((__const__)) int rb_is_junk_id(ID);
6039int rb_symname_p(const char*);
6041VALUE rb_backref_get(void);
6042void rb_backref_set(VALUE);
6045void rb_last_status_set(int status, pid_t pid);
6047int rb_proc_exec(const char*);
6048__attribute__ ((__noreturn__)) VALUE rb_f_exec(int, const VALUE*);
6049pid_t rb_waitpid(pid_t pid, int *status, int flags);
6051pid_t rb_spawn(int, const VALUE*);
6052pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
6056VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
6057int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
6058unsigned int rb_genrand_int32(void);
6059double rb_genrand_real(void);
6060void rb_reset_random_seed(void);
6061VALUE rb_random_bytes(VALUE rnd, long n);
6063unsigned int rb_random_int32(VALUE rnd);
6064double rb_random_real(VALUE rnd);
6065unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
6066unsigned long rb_genrand_ulong_limited(unsigned long i);
6067#define rb_memcmp memcmp
6068int rb_memcicmp(const void*,const void*,long);
6069void rb_match_busy(VALUE);
6072int rb_reg_backref_number(VALUE match, VALUE backref);
6077#define HAVE_RB_REG_NEW_STR 1
6079VALUE rb_reg_new(const char *, long, int);
6080VALUE rb_reg_alloc(void);
6081VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
6085#define rb_argv rb_get_argv()
6086extern VALUE rb_argv0;
6087VALUE rb_get_argv(void);
6088void *rb_load_file(const char*);
6089void *rb_load_file_str(VALUE);
6090VALUE rb_f_kill(int, const VALUE*);
6091#define posix_signal ruby_posix_signal
6092void (*ruby_posix_signal(int, void (*)(int)))(int);
6093const char *ruby_signal_name(int);
6094void ruby_default_signal(int);
6095VALUE rb_f_sprintf(int, const VALUE*);
6096VALUE rb_sprintf(const char*, ...) __attribute__((format(printf, 1, 2)));
6098VALUE rb_str_catf(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
6101VALUE rb_str_new(const char*, long);
6107VALUE rb_tainted_str_new(const char*, long);
6108VALUE rb_external_str_new(const char*, long);
6110VALUE rb_locale_str_new(const char*, long);
6112VALUE rb_filesystem_str_new(const char*, long);
6114VALUE rb_str_buf_new(long);
6117VALUE rb_str_tmp_new(long);
6118VALUE rb_usascii_str_new(const char*, long);
6120VALUE rb_utf8_str_new(const char*, long);
6122VALUE rb_str_new_static(const char *, long);
6124VALUE rb_utf8_str_new_static(const char *, long);
6125void rb_str_free(VALUE);
6139#define rb_str_dup_frozen rb_str_new_frozen
6142long rb_str_sublen(VALUE, long);
6143VALUE rb_str_substr(VALUE, long, long);
6144VALUE rb_str_subseq(VALUE, long, long);
6145char *rb_str_subpos(VALUE, long, long*);
6146void rb_str_modify(VALUE);
6147void rb_str_modify_expand(VALUE, long);
6149void rb_str_set_len(VALUE, long);
6151VALUE rb_str_cat(VALUE, const char*, long);
6152VALUE rb_str_cat_cstr(VALUE, const char*);
6156st_index_t rb_memhash(const void *ptr, long len);
6161#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
6162#define rb_hash_uint(h,i) st_hash_uint((h), (i))
6163#define rb_hash_end(h) st_hash_end(h)
6167int rb_str_cmp(VALUE, VALUE);
6168VALUE rb_str_equal(VALUE str1, VALUE str2);
6170void rb_str_update(VALUE, long, long, VALUE);
6174VALUE rb_str_split(VALUE, const char*);
6178long rb_str_strlen(VALUE);
6180long rb_str_offset(VALUE, long);
6181__attribute__ ((__pure__)) size_t rb_str_capacity(VALUE);
6185#define rb_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_str_new_static((str), (len)) : rb_str_new((str), (len)) )
6186#define rb_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_new_static((str), (long)strlen(str)) : rb_str_new_cstr(str) )
6187#define rb_usascii_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_usascii_str_new_static((str), (len)) : rb_usascii_str_new((str), (len)) )
6188#define rb_utf8_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_utf8_str_new_static((str), (len)) : rb_utf8_str_new((str), (len)) )
6189#define rb_tainted_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_tainted_str_new((str), (long)strlen(str)) : rb_tainted_str_new_cstr(str) )
6190#define rb_usascii_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_usascii_str_new_static((str), (long)strlen(str)) : rb_usascii_str_new_cstr(str) )
6191#define rb_utf8_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_utf8_str_new_static((str), (long)strlen(str)) : rb_utf8_str_new_cstr(str) )
6192#define rb_external_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_external_str_new((str), (long)strlen(str)) : rb_external_str_new_cstr(str) )
6193#define rb_locale_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_locale_str_new((str), (long)strlen(str)) : rb_locale_str_new_cstr(str) )
6194#define rb_str_buf_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), (str), (long)strlen(str)) : rb_str_buf_new_cstr(str) )
6195#define rb_str_cat_cstr(str,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_str_cat((str), (ptr), (long)strlen(ptr)) : rb_str_cat_cstr((str), (ptr)) )
6196#define rb_exc_new_cstr(klass,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_exc_new((klass), (ptr), (long)strlen(ptr)) : rb_exc_new_cstr((klass), (ptr)) )
6197#define rb_str_new2 rb_str_new_cstr
6198#define rb_str_new3 rb_str_new_shared
6199#define rb_str_new4 rb_str_new_frozen
6200#define rb_str_new5 rb_str_new_with_class
6201#define rb_tainted_str_new2 rb_tainted_str_new_cstr
6202#define rb_str_buf_new2 rb_str_buf_new_cstr
6203#define rb_usascii_str_new2 rb_usascii_str_new_cstr
6204#define rb_str_buf_cat rb_str_cat
6205#define rb_str_buf_cat2 rb_str_cat_cstr
6206#define rb_str_cat2 rb_str_cat_cstr
6207#define rb_strlen_lit(str) (sizeof(str "") - 1)
6208#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
6209#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
6210#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
6211#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
6212#define rb_str_new_literal(str) rb_str_new_lit(str)
6213#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
6214#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
6215#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
6217VALUE rb_struct_define(const char*, ...);
6218VALUE rb_struct_define_under(VALUE, const char*, ...);
6229VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
6230typedef void rb_unblock_function_t(void *);
6232void rb_thread_check_ints(void);
6233int rb_thread_interrupted(VALUE thval);
6234#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
6235#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
6236VALUE rb_mutex_new(void);
6241VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
6243struct timespec;
6244void rb_timespec_now(struct timespec *);
6245VALUE rb_time_new(time_t, long);
6247VALUE rb_time_timespec_new(const struct timespec *, int);
6249struct timeval rb_time_interval(VALUE num);
6257void rb_set_class_path(VALUE, VALUE, const char*);
6260VALUE rb_path2class(const char*);
6264VALUE rb_f_trace_var(int, const VALUE*);
6265VALUE rb_f_untrace_var(int, const VALUE*);
6267void rb_alias_variable(ID, ID);
6278void *rb_mod_const_at(VALUE, void*);
6279void *rb_mod_const_of(VALUE, void*);
6280VALUE rb_const_list(void*);
6281VALUE rb_mod_constants(int, const VALUE *, VALUE);
6289void rb_const_set(VALUE, ID, VALUE);
6292void rb_cvar_set(VALUE, ID, VALUE);
6294void rb_cv_set(VALUE, const char*, VALUE);
6295VALUE rb_cv_get(VALUE, const char*);
6296void rb_define_class_variable(VALUE, const char*, VALUE);
6299ID rb_frame_callee(void);
6300int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
6304VALUE rb_make_exception(int, const VALUE*);
6305
6306#pragma GCC visibility pop
6307
6308#define rb_f_notimplement_p(f) __builtin_types_compatible_p(__typeof__(f),__typeof__(rb_f_notimplement))
6309static inline void
6310rb_clone_setup(VALUE clone, VALUE obj)
6311{
6313 ((struct RBasic*)(obj))->flags & ~(((VALUE)RUBY_FL_PROMOTED0)|((VALUE)RUBY_FL_PROMOTED1)|((VALUE)RUBY_FL_FINALIZE)));
6314 rb_singleton_class_attached((((struct RBasic*)(clone))->klass), clone);
6315 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(clone, obj);
6316}
6317static inline void
6318rb_dup_setup(VALUE dup, VALUE obj)
6319{
6320 rb_obj_setup(dup, rb_obj_class(obj), (((struct RBasic*)(obj))->flags&(RUBY_FL_DUPPED)));
6321 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(dup, obj);
6322}
6323static inline long
6324rb_array_len(VALUE a)
6325{
6326 return (((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ?
6327 (long)((((struct RBasic*)(a))->flags >> RARRAY_EMBED_LEN_SHIFT) & ((VALUE)RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : ((struct RArray*)(a))->as.heap.len;
6328}
6329#define FIX_CONST_VALUE_PTR(x) (x)
6330static inline const VALUE *
6331rb_array_const_ptr_transient(VALUE a)
6332{
6333 return ((((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ? ((struct RArray*)(a))->as.ary : ((struct RArray*)(a))->as.heap.ptr);
6334}
6335static inline const VALUE *
6336rb_array_const_ptr(VALUE a)
6337{
6338 void rb_ary_detransient(VALUE a);
6339 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
6341 }
6342 return rb_array_const_ptr_transient(a);
6343}
6344static inline VALUE *
6345rb_array_ptr_use_start(VALUE a, int allow_transient)
6346{
6348 if (!allow_transient) {
6349 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
6350 void rb_ary_detransient(VALUE a);
6352 }
6353 }
6354 (void)allow_transient;
6355 return rb_ary_ptr_use_start(a);
6356}
6357static inline void
6358rb_array_ptr_use_end(VALUE a, int allow_transient)
6359{
6360 void rb_ary_ptr_use_end(VALUE a);
6362 (void)allow_transient;
6363}
6364#define RUBY_VM 1
6365#define HAVE_NATIVETHREAD
6366int ruby_native_thread_p(void);
6367#define RUBY_EVENT_NONE 0x0000
6368#define RUBY_EVENT_LINE 0x0001
6369#define RUBY_EVENT_CLASS 0x0002
6370#define RUBY_EVENT_END 0x0004
6371#define RUBY_EVENT_CALL 0x0008
6372#define RUBY_EVENT_RETURN 0x0010
6373#define RUBY_EVENT_C_CALL 0x0020
6374#define RUBY_EVENT_C_RETURN 0x0040
6375#define RUBY_EVENT_RAISE 0x0080
6376#define RUBY_EVENT_ALL 0x00ff
6377#define RUBY_EVENT_B_CALL 0x0100
6378#define RUBY_EVENT_B_RETURN 0x0200
6379#define RUBY_EVENT_THREAD_BEGIN 0x0400
6380#define RUBY_EVENT_THREAD_END 0x0800
6381#define RUBY_EVENT_FIBER_SWITCH 0x1000
6382#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
6383#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
6384#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
6385#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
6386#define RUBY_EVENT_SWITCH 0x040000
6387#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
6388#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
6389#define RUBY_INTERNAL_EVENT_GC_START 0x400000
6390#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
6391#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
6392#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
6393#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
6394#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
6395#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
6397typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
6398#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
6401static inline int rb_isascii(int c){ return '\0' <= c && c <= '\x7f'; }
6402static inline int rb_isupper(int c){ return 'A' <= c && c <= 'Z'; }
6403static inline int rb_islower(int c){ return 'a' <= c && c <= 'z'; }
6404static inline int rb_isalpha(int c){ return rb_isupper(c) || rb_islower(c); }
6405static inline int rb_isdigit(int c){ return '0' <= c && c <= '9'; }
6406static inline int rb_isalnum(int c){ return rb_isalpha(c) || rb_isdigit(c); }
6407static inline int rb_isxdigit(int c){ return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); }
6408static inline int rb_isblank(int c){ return c == ' ' || c == '\t'; }
6409static inline int rb_isspace(int c){ return c == ' ' || ('\t' <= c && c <= '\r'); }
6410static inline int rb_iscntrl(int c){ return ('\0' <= c && c < ' ') || c == '\x7f'; }
6411static inline int rb_isprint(int c){ return ' ' <= c && c <= '\x7e'; }
6412static inline int rb_ispunct(int c){ return !rb_isalnum(c); }
6413static inline int rb_isgraph(int c){ return '!' <= c && c <= '\x7e'; }
6414static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; }
6415static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; }
6416#define ISASCII(c) rb_isascii(c)
6417#define ISPRINT(c) rb_isprint(c)
6418#define ISGRAPH(c) rb_isgraph(c)
6419#define ISSPACE(c) rb_isspace(c)
6420#define ISUPPER(c) rb_isupper(c)
6421#define ISLOWER(c) rb_islower(c)
6422#define ISALNUM(c) rb_isalnum(c)
6423#define ISALPHA(c) rb_isalpha(c)
6424#define ISDIGIT(c) rb_isdigit(c)
6425#define ISXDIGIT(c) rb_isxdigit(c)
6426#define ISBLANK(c) rb_isblank(c)
6427#define ISCNTRL(c) rb_iscntrl(c)
6428#define ISPUNCT(c) rb_ispunct(c)
6429#define TOUPPER(c) rb_toupper(c)
6430#define TOLOWER(c) rb_tolower(c)
6431int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
6432int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
6433#define STRCASECMP(s1,s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
6434#define STRNCASECMP(s1,s2,n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
6435unsigned long ruby_strtoul(const char *str, char **endptr, int base);
6436#define STRTOUL(str,endptr,base) (ruby_strtoul((str), (endptr), (base)))
6437#define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();}
6438int ruby_snprintf(char *str, size_t n, char const *fmt, ...) __attribute__((format(printf, 3, 4)));
6439int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
6440int rb_empty_keyword_given_p(void);
6441#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr(__builtin_constant_p(fmt), rb_scan_args0(argc,argvp,fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), rb_scan_args(argc,argvp,fmt, ##__VA_ARGS__))
6442__attribute__ ((__error__ ("bad scan arg format"))) void rb_scan_args_bad_format(const char*);
6443__attribute__ ((__error__ ("variable argument length doesn't match"))) void rb_scan_args_length_mismatch(const char*,int);
6444#define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
6445#define rb_scan_args_count_end(fmt,ofs,vari) (fmt[ofs] ? -1 : (vari))
6446#define rb_scan_args_count_block(fmt,ofs,vari) (fmt[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, ofs+1, vari+1))
6447#define rb_scan_args_count_hash(fmt,ofs,vari) (fmt[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, ofs+1, vari+1))
6448#define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, ofs+1, vari+(fmt[ofs]-'0')))
6449#define rb_scan_args_count_var(fmt,ofs,vari) (fmt[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, ofs+1, vari+1))
6450#define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, ofs+1, vari+fmt[ofs]-'0'))
6451#define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, ofs+1, vari+fmt[ofs]-'0'))
6452#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
6453#define rb_scan_args_verify(fmt,varc) (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? rb_scan_args_bad_format(fmt) : sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? rb_scan_args_length_mismatch(fmt, varc) : (void)0)
6454__attribute__ ((__always_inline__)) static int rb_scan_args_lead_p(const char *fmt);
6455static inline int
6456rb_scan_args_lead_p(const char *fmt)
6457{
6458 return ((unsigned char)((fmt[0])-'0')<10);
6459}
6460__attribute__ ((__always_inline__)) static int rb_scan_args_n_lead(const char *fmt);
6461static inline int
6462rb_scan_args_n_lead(const char *fmt)
6463{
6464 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
6465}
6466__attribute__ ((__always_inline__)) static int rb_scan_args_opt_p(const char *fmt);
6467static inline int
6468rb_scan_args_opt_p(const char *fmt)
6469{
6470 return (rb_scan_args_lead_p(fmt) && ((unsigned char)((fmt[1])-'0')<10));
6471}
6472__attribute__ ((__always_inline__)) static int rb_scan_args_n_opt(const char *fmt);
6473static inline int
6474rb_scan_args_n_opt(const char *fmt)
6475{
6476 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
6477}
6478__attribute__ ((__always_inline__)) static int rb_scan_args_var_idx(const char *fmt);
6479static inline int
6480rb_scan_args_var_idx(const char *fmt)
6481{
6482 return (!rb_scan_args_lead_p(fmt) ? 0 : !((unsigned char)((fmt[1])-'0')<10) ? 1 : 2);
6483}
6484__attribute__ ((__always_inline__)) static int rb_scan_args_f_var(const char *fmt);
6485static inline int
6486rb_scan_args_f_var(const char *fmt)
6487{
6488 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
6489}
6490__attribute__ ((__always_inline__)) static int rb_scan_args_trail_idx(const char *fmt);
6491static inline int
6492rb_scan_args_trail_idx(const char *fmt)
6493{
6494 const int idx = rb_scan_args_var_idx(fmt);
6495 return idx+(fmt[idx]=='*');
6496}
6497__attribute__ ((__always_inline__)) static int rb_scan_args_n_trail(const char *fmt);
6498static inline int
6499rb_scan_args_n_trail(const char *fmt)
6500{
6501 const int idx = rb_scan_args_trail_idx(fmt);
6502 return (((unsigned char)((fmt[idx])-'0')<10) ? fmt[idx]-'0' : 0);
6503}
6504__attribute__ ((__always_inline__)) static int rb_scan_args_hash_idx(const char *fmt);
6505static inline int
6506rb_scan_args_hash_idx(const char *fmt)
6507{
6508 const int idx = rb_scan_args_trail_idx(fmt);
6509 return idx+((unsigned char)((fmt[idx])-'0')<10);
6510}
6511__attribute__ ((__always_inline__)) static int rb_scan_args_f_hash(const char *fmt);
6512static inline int
6513rb_scan_args_f_hash(const char *fmt)
6514{
6515 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
6516}
6517__attribute__ ((__always_inline__)) static int rb_scan_args_block_idx(const char *fmt);
6518static inline int
6519rb_scan_args_block_idx(const char *fmt)
6520{
6521 const int idx = rb_scan_args_hash_idx(fmt);
6522 return idx+(fmt[idx]==':');
6523}
6524__attribute__ ((__always_inline__)) static int rb_scan_args_f_block(const char *fmt);
6525static inline int
6526rb_scan_args_f_block(const char *fmt)
6527{
6528 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
6529}
6530#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
6531__attribute__ ((__always_inline__)) static int rb_scan_args_set(int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, int f_var, int f_hash, int f_block, VALUE *vars[], char *fmt, int varc);
6532inline int
6534 int n_lead, int n_opt, int n_trail,
6535 int f_var, int f_hash, int f_block,
6536 VALUE *vars[], char *fmt __attribute__ ((unused)), int varc __attribute__ ((unused)))
6537{
6538 int i, argi = 0, vari = 0, last_idx = -1;
6539 VALUE *var, hash = ((VALUE)RUBY_Qnil), last_hash = 0;
6540 const int n_mand = n_lead + n_trail;
6541 int keyword_given = rb_keyword_given_p();
6542 int empty_keyword_given = 0;
6543 VALUE tmp_buffer = 0;
6544 if (!keyword_given) {
6545 empty_keyword_given = rb_empty_keyword_given_p();
6546 }
6547 if (argc > 0 && !(f_hash && empty_keyword_given)) {
6548 VALUE last = argv[argc - 1];
6549 if (f_hash && n_mand < argc) {
6550 if (keyword_given) {
6551 if (!( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(last))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((last) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((last) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((last) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((last) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(last)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(last))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == (RUBY_T_HASH)))) {
6552 rb_warn("Keyword flag set when calling rb_scan_args, but last entry is not a hash");
6553 }
6554 else {
6555 hash = last;
6556 }
6557 }
6558 else if (!((VALUE)(last) != ((VALUE)RUBY_Qnil))) {
6559 if (!f_var && n_mand + n_opt < argc) {
6560 rb_warn("The last argument is nil, treating as empty keywords");
6561 argc--;
6562 }
6563 }
6564 else {
6565 hash = rb_check_hash_type(last);
6566 }
6567 if (!!((VALUE)(hash) != ((VALUE)RUBY_Qnil))) {
6568 VALUE opts = rb_extract_keywords(&hash);
6569 if (!(last_hash = hash)) {
6570 if (!keyword_given) {
6571 rb_warn("Using the last argument as keyword parameters is deprecated");
6572 }
6573 argc--;
6574 }
6575 else {
6576 rb_warn("The last argument is split into positional and keyword parameters");
6577 last_idx = argc - 1;
6578 }
6579 hash = opts ? opts : ((VALUE)RUBY_Qnil);
6580 }
6581 }
6582 else if (f_hash && keyword_given && n_mand == argc) {
6583 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
6584 }
6585 }
6586 if (f_hash && n_mand > 0 && n_mand == argc+1 && empty_keyword_given) {
6587 VALUE *ptr = (VALUE *)rb_alloc_tmp_buffer2(&tmp_buffer, argc+1, sizeof(VALUE));
6588 ((__builtin_object_size(ptr, 0) != (size_t)-1) ? __builtin___memcpy_chk(ptr, argv, sizeof(VALUE)*argc, __builtin_object_size(ptr, 0)) : __memcpy_ichk(ptr, argv, sizeof(VALUE)*argc));
6589 ptr[argc] = rb_hash_new();
6590 argc++;
6591 *(&argv) = ptr;
6592 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
6593 }
6594 if (argc < n_mand) {
6595 goto argc_error;
6596 }
6597 for (i = n_lead; i-- > 0; ) {
6598 var = vars[vari++];
6599 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
6600 argi++;
6601 }
6602 for (i = n_opt; i-- > 0; ) {
6603 var = vars[vari++];
6604 if (argi < argc - n_trail) {
6605 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
6606 argi++;
6607 }
6608 else {
6609 if (var) *var = ((VALUE)RUBY_Qnil);
6610 }
6611 }
6612 if (f_var) {
6613 int n_var = argc - argi - n_trail;
6614 var = vars[vari++];
6615 if (0 < n_var) {
6616 if (var) {
6617 int f_last = (last_idx + 1 == argc - n_trail);
6618 *var = rb_ary_new_from_values(n_var-f_last, &argv[argi]);
6619 if (f_last) rb_ary_push(*var, last_hash);
6620 }
6621 argi += n_var;
6622 }
6623 else {
6624 if (var) *var = rb_ary_new();
6625 }
6626 }
6627 for (i = n_trail; i-- > 0; ) {
6628 var = vars[vari++];
6629 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
6630 argi++;
6631 }
6632 if (f_hash) {
6633 var = vars[vari++];
6634 if (var) *var = hash;
6635 }
6636 if (f_block) {
6637 var = vars[vari++];
6638 if (rb_block_given_p()) {
6639 *var = rb_block_proc();
6640 }
6641 else {
6642 *var = ((VALUE)RUBY_Qnil);
6643 }
6644 }
6645 if (argi < argc) {
6646 argc_error:
6647 if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
6648 rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
6649 }
6650 if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
6651 return argc;
6652}
6653#define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); })
6654#define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); })
6655#define RUBY_SUBST_H 1
6656#undef snprintf
6657#undef vsnprintf
6658#define snprintf ruby_snprintf
6659#define vsnprintf ruby_vsnprintf
6660void ruby_sysinit(int *argc, char ***argv);
6661void ruby_init(void);
6662void* ruby_options(int argc, char** argv);
6663int ruby_executable_node(void *n, int *status);
6664int ruby_run_node(void *n);
6665void ruby_show_version(void);
6666void ruby_show_copyright(void);
6667#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
6668void ruby_init_stack(volatile VALUE*);
6669int ruby_setup(void);
6670int ruby_cleanup(volatile int);
6671void ruby_finalize(void);
6672__attribute__ ((__noreturn__)) void ruby_stop(int);
6674int ruby_stack_check(void);
6675size_t ruby_stack_length(VALUE**);
6676int ruby_exec_node(void *n);
6677void ruby_script(const char* name);
6679void ruby_prog_init(void);
6680void ruby_set_argv(int, char**);
6681void *ruby_process_options(int, char**);
6682void ruby_init_loadpath(void);
6683void ruby_incpush(const char*);
6684void ruby_sig_finalize(void);
6685
6686#pragma GCC visibility pop
6687
6688#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
6689#define _STDBOOL_H
6690#define bool _Bool
6691#define true 1
6692#define false 0
6693#define __bool_true_false_are_defined 1
6694#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
6695#define LIKELY(x) RB_LIKELY(x)
6696#define UNLIKELY(x) RB_UNLIKELY(x)
6697#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE("address", NOINLINE(x))
6698#undef NO_SANITIZE
6699#define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP
6700#define VALGRIND_MAKE_MEM_DEFINED(p,n) 0
6701#define VALGRIND_MAKE_MEM_UNDEFINED(p,n) 0
6702#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
6703#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
6704#define STATIC_ASSERT(name,expr) _Static_assert(expr, #name ": " #expr)
6705#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
6706#define SIGNED_INTEGER_MAX(sint_type) (sint_type) ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
6707#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
6708#define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
6709#define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
6710#define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
6711#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
6712#define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
6713#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
6714#define MUL_OVERFLOW_FIXNUM_P(a,b) ({ struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; __builtin_mul_overflow_p((a), (b), c.fixnum); })
6715#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
6716#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
6717#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
6718#define swap16(x) __builtin_bswap16(x)
6719#define swap32(x) __builtin_bswap32(x)
6720#define swap64(x) __builtin_bswap64(x)
6721static inline unsigned int
6722nlz_int(unsigned int x)
6723{
6724 if (x == 0) return 4 * 8;
6725 return (unsigned int)__builtin_clz(x);
6726}
6727static inline unsigned int
6728nlz_long(unsigned long x)
6729{
6730 if (x == 0) return 8 * 8;
6731 return (unsigned int)__builtin_clzl(x);
6732}
6733static inline unsigned int
6734nlz_long_long(unsigned long long x)
6735{
6736 if (x == 0) return 8 * 8;
6737 return (unsigned int)__builtin_clzll(x);
6738}
6739static inline unsigned int
6740nlz_int128(unsigned __int128 x)
6741{
6742 unsigned __int128 y;
6743 unsigned int n = 128;
6744 y = x >> 64; if (y) {n -= 64; x = y;}
6745 y = x >> 32; if (y) {n -= 32; x = y;}
6746 y = x >> 16; if (y) {n -= 16; x = y;}
6747 y = x >> 8; if (y) {n -= 8; x = y;}
6748 y = x >> 4; if (y) {n -= 4; x = y;}
6749 y = x >> 2; if (y) {n -= 2; x = y;}
6750 y = x >> 1; if (y) {return n - 2;}
6751 return (unsigned int)(n - x);
6752}
6753static inline unsigned int
6754nlz_intptr(uintptr_t x)
6755{
6756 return nlz_long(x);
6757}
6758static inline unsigned int
6759rb_popcount32(uint32_t x)
6760{
6761 return (unsigned int)__builtin_popcount(x);
6762}
6763static inline int
6764rb_popcount64(uint64_t x)
6765{
6766 return __builtin_popcountll(x);
6767}
6768static inline int
6769rb_popcount_intptr(uintptr_t x)
6770{
6771 return rb_popcount64(x);
6772}
6773static inline int
6774ntz_int32(uint32_t x)
6775{
6776 return __builtin_ctz(x);
6777}
6778static inline int
6779ntz_int64(uint64_t x)
6780{
6781 return __builtin_ctzll(x);
6782}
6783static inline int
6784ntz_intptr(uintptr_t x)
6785{
6786 return ntz_int64(x);
6787}
6788#define DLONG int128_t
6789#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
6791static inline long
6792rb_overflowed_fix_to_int(long x)
6793{
6794 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
6795}
6796static inline VALUE
6797rb_fix_plus_fix(VALUE x, VALUE y)
6798{
6799 long lz;
6800 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
6801 return rb_int2big(rb_overflowed_fix_to_int(lz));
6802 }
6803 else {
6804 return (VALUE)lz;
6805 }
6806}
6807static inline VALUE
6808rb_fix_minus_fix(VALUE x, VALUE y)
6809{
6810 long lz;
6811 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
6812 return rb_int2big(rb_overflowed_fix_to_int(lz));
6813 }
6814 else {
6815 return (VALUE)lz;
6816 }
6817}
6818static inline VALUE
6819rb_fix_mul_fix(VALUE x, VALUE y)
6820{
6821 long lx = ((long)(((long)(x))>>(int)(1)));
6822 long ly = ((long)(((long)(y))>>(int)(1)));
6823 return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL>>1)+1) && (((__int128)lx * (__int128)ly) >= (((long)(-0x7fffffffffffffffL -1L))>>(int)(1)))) ? (((VALUE)((__int128)lx * (__int128)ly))<<1 | RUBY_FIXNUM_FLAG) : rb_int128t2big((__int128)lx * (__int128)ly));
6824}
6825static inline void
6826rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
6827{
6828 long x = ((long)(((long)(a))>>(int)(1)));
6829 long y = ((long)(((long)(b))>>(int)(1)));
6830 long div, mod;
6831 if (x == (((long)(-0x7fffffffffffffffL -1L))>>(int)(1)) && y == -1) {
6832 if (divp) *divp = rb_long2num_inline(-(((long)(-0x7fffffffffffffffL -1L))>>(int)(1)));
6833 if (modp) *modp = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
6834 return;
6835 }
6836 div = x / y;
6837 mod = x % y;
6838 if (y > 0 ? mod < 0 : mod > 0) {
6839 mod += y;
6840 div -= 1;
6841 }
6842 if (divp) *divp = (((VALUE)(div))<<1 | RUBY_FIXNUM_FLAG);
6843 if (modp) *modp = (((VALUE)(mod))<<1 | RUBY_FIXNUM_FLAG);
6844}
6845static inline VALUE
6846rb_fix_div_fix(VALUE x, VALUE y)
6847{
6848 VALUE div;
6849 rb_fix_divmod_fix(x, y, &div, ((void *)0));
6850 return div;
6851}
6852static inline VALUE
6853rb_fix_mod_fix(VALUE x, VALUE y)
6854{
6855 VALUE mod;
6856 rb_fix_divmod_fix(x, y, ((void *)0), &mod);
6857 return mod;
6858}
6859#define bit_length(x) (unsigned int) (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
6860#define BDIGIT unsigned int
6861#define SIZEOF_BDIGIT SIZEOF_INT
6862#define BDIGIT_DBL unsigned LONG_LONG
6863#define BDIGIT_DBL_SIGNED LONG_LONG
6864#define PRI_BDIGIT_PREFIX ""
6865#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
6866#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
6867#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
6868#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
6869#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
6870#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
6871#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
6872#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
6873#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
6874#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
6875#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
6876#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
6877#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
6878#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
6879#define BIGNUM_EMBED_LEN_NUMBITS 3
6880#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
6881struct RBignum {
6882 struct RBasic basic;
6883 union {
6884 struct {
6885 size_t len;
6886 unsigned int *digits;
6888 unsigned int ary[(8*RVALUE_EMBED_LEN_MAX/4)];
6890};
6891#define BIGNUM_SIGN_BIT ((VALUE)FL_USER1)
6892#define BIGNUM_SIGN(b) ((RBASIC(b)->flags & BIGNUM_SIGN_BIT) != 0)
6893#define BIGNUM_SET_SIGN(b,sign) ((sign) ? (RBASIC(b)->flags |= BIGNUM_SIGN_BIT) : (RBASIC(b)->flags &= ~BIGNUM_SIGN_BIT))
6894#define BIGNUM_POSITIVE_P(b) BIGNUM_SIGN(b)
6895#define BIGNUM_NEGATIVE_P(b) (!BIGNUM_SIGN(b))
6896#define BIGNUM_NEGATE(b) (RBASIC(b)->flags ^= BIGNUM_SIGN_BIT)
6897#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
6898#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
6899#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
6900#define BIGNUM_LEN(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? (size_t)((RBASIC(b)->flags >> BIGNUM_EMBED_LEN_SHIFT) & (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT)) : RBIGNUM(b)->as.heap.len)
6901#define BIGNUM_DIGITS(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? RBIGNUM(b)->as.ary : RBIGNUM(b)->as.heap.digits)
6902#define BIGNUM_LENINT(b) rb_long2int(BIGNUM_LEN(b))
6903#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
6905 struct RBasic basic;
6908};
6909#define RRATIONAL(obj) (R_CAST(RRational)(obj))
6910#define RRATIONAL_SET_NUM(rat,n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
6911#define RRATIONAL_SET_DEN(rat,d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
6912struct RFloat {
6913 struct RBasic basic;
6915};
6916#define RFLOAT(obj) (R_CAST(RFloat)(obj))
6917struct RComplex {
6918 struct RBasic basic;
6921};
6922#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
6923#define RCOMPLEX_SET_REAL(cmp,r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
6924#define RCOMPLEX_SET_IMAG(cmp,i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
6926 RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1),
6927 RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2),
6928 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
6929#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
6930 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
6932 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
6934#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
6935 RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12),
6940#define RHASH_AR_TABLE_SIZE_RAW(h) ((unsigned int)((RBASIC(h)->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT))
6942#define RHASH_AR_TABLE_P(hash) (!FL_TEST_RAW((hash), RHASH_ST_TABLE_FLAG))
6943#define RHASH_AR_TABLE(hash) (RHASH(hash)->as.ar)
6944#define RHASH_ST_TABLE(hash) (RHASH(hash)->as.st)
6945#define RHASH(obj) (R_CAST(RHash)(obj))
6946#define RHASH_ST_SIZE(h) (RHASH_ST_TABLE(h)->num_entries)
6947#define RHASH_ST_TABLE_P(h) (!RHASH_AR_TABLE_P(h))
6948#define RHASH_ST_CLEAR(h) (FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG), RHASH(h)->as.ar = NULL)
6949#define RHASH_AR_TABLE_SIZE_MASK (VALUE)RHASH_AR_TABLE_SIZE_MASK
6950#define RHASH_AR_TABLE_SIZE_SHIFT RHASH_AR_TABLE_SIZE_SHIFT
6951#define RHASH_AR_TABLE_BOUND_MASK (VALUE)RHASH_AR_TABLE_BOUND_MASK
6952#define RHASH_AR_TABLE_BOUND_SHIFT RHASH_AR_TABLE_BOUND_SHIFT
6953#define RHASH_TRANSIENT_P(hash) FL_TEST_RAW((hash), RHASH_TRANSIENT_FLAG)
6954#define RHASH_SET_TRANSIENT_FLAG(h) FL_SET_RAW(h, RHASH_TRANSIENT_FLAG)
6955#define RHASH_UNSET_TRANSIENT_FLAG(h) FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG)
6956typedef unsigned char ar_hint_t;
6957struct RHash {
6958 struct RBasic basic;
6959 union {
6964 union {
6968};
6969#undef RHASH_IFNONE
6970#undef RHASH_SIZE
6971#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
6972#define RHASH_SIZE(h) (RHASH_AR_TABLE_P(h) ? RHASH_AR_TABLE_SIZE_RAW(h) : RHASH_ST_SIZE(h))
6973struct RMoved {
6977};
6978extern void ruby_init_setproctitle(int argc, char *argv[]);
6979#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
6980#define RSTRUCT_EMBED_LEN_MASK RSTRUCT_EMBED_LEN_MASK
6981#define RSTRUCT_EMBED_LEN_SHIFT RSTRUCT_EMBED_LEN_SHIFT
6982enum {
6984 RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
6986 RSTRUCT_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER3),
6989#define RSTRUCT_TRANSIENT_P(st) FL_TEST_RAW((obj), RSTRUCT_TRANSIENT_FLAG)
6990#define RSTRUCT_TRANSIENT_SET(st) FL_SET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
6991#define RSTRUCT_TRANSIENT_UNSET(st) FL_UNSET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
6992struct RStruct {
6993 struct RBasic basic;
6994 union {
6995 struct {
6996 long len;
6997 const VALUE *ptr;
7001};
7002#undef RSTRUCT_LEN
7003#undef RSTRUCT_PTR
7004#undef RSTRUCT_SET
7005#undef RSTRUCT_GET
7006#define RSTRUCT_EMBED_LEN(st) (long)((RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT))
7007#define RSTRUCT_LEN(st) rb_struct_len(st)
7008#define RSTRUCT_LENINT(st) rb_long2int(RSTRUCT_LEN(st))
7009#define RSTRUCT_CONST_PTR(st) rb_struct_const_ptr(st)
7010#define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(STRUCT, st)))
7011#define RSTRUCT_SET(st,idx,v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
7012#define RSTRUCT_GET(st,idx) (RSTRUCT_CONST_PTR(st)[idx])
7013#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
7014static inline long
7015rb_struct_len(VALUE st)
7016{
7017 return (((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ?
7018 (long)((((struct RBasic*)(st))->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT)) : ((struct RStruct*)(st))->as.heap.len;
7019}
7020static inline const VALUE *
7021rb_struct_const_ptr(VALUE st)
7022{
7023 return ((((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ? ((struct RStruct*)(st))->as.ary : ((struct RStruct*)(st))->as.heap.ptr);
7024}
7025static inline const VALUE *
7026rb_struct_const_heap_ptr(VALUE st)
7027{
7028 return ((struct RStruct*)(st))->as.heap.ptr;
7029}
7031 char conflict[sizeof(VALUE) * 3];
7032};
7033struct rb_subclass_entry;
7038};
7039typedef unsigned long long rb_serial_t;
7040#define SERIALT2NUM ULL2NUM
7041#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
7042#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
7056};
7058#undef RClass
7059struct RClass {
7060 struct RBasic basic;
7064};
7068#define RCLASS_EXT(c) (RCLASS(c)->ptr)
7069#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
7070#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
7071#define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
7072#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
7073#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
7074#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
7075#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
7076#define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
7077#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
7078#define RCLASS_CLONED FL_USER6
7079#define RICLASS_IS_ORIGIN FL_USER5
7080#define RCLASS_REFINED_BY_ANY FL_USER7
7081static inline void
7082RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
7083{
7084 rb_obj_write((VALUE)(klass), (VALUE *)(&((((struct RClass*)(klass))->ptr)->origin_)), (VALUE)(origin), "../ruby-2.7.6/internal.h", 1091);
7085 if (klass != origin) ((!(((VALUE)(origin) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(origin) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(origin))->flags & RUBY_T_MASK) != RUBY_T_NODE) ? (void)(((struct RBasic*)(origin))->flags |= (((VALUE)RUBY_FL_USER5))) : (void)0);
7086}
7087static inline void
7088RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
7089{
7090 rb_obj_write((VALUE)(iclass), (VALUE *)(&((((struct RClass*)(iclass))->ptr)->includer)), (VALUE)(klass), "../ruby-2.7.6/internal.h", 1098);
7091}
7092#undef RCLASS_SUPER
7093static inline VALUE
7095{
7096 return ((struct RClass*)(klass))->super;
7097}
7098static inline VALUE
7099RCLASS_SET_SUPER(VALUE klass, VALUE super)
7100{
7101 if (super) {
7104 }
7105 rb_obj_write((VALUE)(klass), (VALUE *)(&((struct RClass*)(klass))->super), (VALUE)(super), "../ruby-2.7.6/internal.h", 1115);
7106 return super;
7107}
7108#define IMEMO_DEBUG 0
7109struct RIMemo {
7115};
7129#define IMEMO_MASK 0x0f
7130static inline enum imemo_type
7132{
7133 return (((struct RBasic*)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
7134}
7135static inline int
7136imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
7137{
7138 if ((__builtin_expect(!!(!(((VALUE)(imemo) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(imemo) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))), 1))) {
7139 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
7140 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
7141 return expected_type == (((struct RBasic*)(imemo))->flags & mask);
7142 }
7143 else {
7144 return 0;
7145 }
7146}
7147VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
7148#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
7149#define IMEMO_FL_USER0 FL_USER4
7150#define IMEMO_FL_USER1 FL_USER5
7151#define IMEMO_FL_USER2 FL_USER6
7152#define IMEMO_FL_USER3 FL_USER7
7153#define IMEMO_FL_USER4 FL_USER8
7154struct vm_svar {
7160};
7161#define THROW_DATA_CONSUMED IMEMO_FL_USER0
7168};
7169#define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
7171 int min, max;
7172};
7173struct vm_ifunc {
7177 const void *data;
7179};
7180#define IFUNC_NEW(a,b,c) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
7182static inline struct vm_ifunc *
7183rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
7184{
7185 return rb_vm_ifunc_new(func, data, 0, (-1));
7186}
7192 size_t cnt;
7194#define rb_imemo_tmpbuf_auto_free_pointer() rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0)
7196#define RB_IMEMO_TMPBUF_PTR(v) ((void *)(((const struct rb_imemo_tmpbuf_struct *)(v))->ptr))
7197static inline void *
7198rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
7199{
7200 return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
7201}
7202static inline VALUE
7203rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
7204{
7205 const void *src;
7206 VALUE imemo;
7207 rb_imemo_tmpbuf_t *tmpbuf;
7208 void *dst;
7209 size_t len;
7210 rb_string_value(&(str));
7211 imemo = rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
7212 tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
7213 len = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str))->as.heap.len);
7214 src = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str))->as.ary : ((struct RString*)(str))->as.heap.ptr);
7215 dst = ruby_xmalloc(len);
7216 ((__builtin_object_size(dst, 0) != (size_t)-1) ? __builtin___memcpy_chk(dst, src, len, __builtin_object_size(dst, 0)) : __memcpy_ichk(dst, src, len));
7217 tmpbuf->ptr = dst;
7218 return imemo;
7219}
7221struct MEMO {
7224 const VALUE v1;
7225 const VALUE v2;
7226 union {
7227 long cnt;
7228 long state;
7232};
7233#define MEMO_V1_SET(m,v) RB_OBJ_WRITE((m), &(m)->v1, (v))
7234#define MEMO_V2_SET(m,v) RB_OBJ_WRITE((m), &(m)->v2, (v))
7235#define MEMO_CAST(m) ((struct MEMO *)m)
7236#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
7237#define roomof(x,y) (((x) + (y) - 1) / (y))
7238#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
7239#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
7240#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
7241#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
7242#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
7243#define rb_cFixnum rb_cInteger
7244#define rb_cBignum rb_cInteger
7245enum {
7252 unsigned int opt_methods;
7253 unsigned int opt_inited;
7254};
7255#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
7256#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
7257#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
7258#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
7262};
7267#define ARRAY_DEBUG (0+RUBY_DEBUG)
7268#define RARRAY_PTR_IN_USE_FLAG FL_USER14
7269#define ARY_PTR_USING_P(ary) FL_TEST_RAW((ary), RARRAY_PTR_IN_USE_FLAG)
7270#define RARY_TRANSIENT_SET(ary) FL_SET_RAW((ary), RARRAY_TRANSIENT_FLAG);
7271#define RARY_TRANSIENT_UNSET(ary) FL_UNSET_RAW((ary), RARRAY_TRANSIENT_FLAG);
7272VALUE rb_ary_last(int, const VALUE *, VALUE);
7273void rb_ary_set_len(VALUE, long);
7275VALUE rb_ary_tmp_new_fill(long capa);
7278size_t rb_ary_memsize(VALUE);
7283#define rb_ary_new_from_args(n,...) __extension__ ({ const VALUE args_to_new_ary[] = {__VA_ARGS__}; if (__builtin_constant_p(n)) { STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); } rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); })
7284static inline VALUE
7285rb_ary_entry_internal(VALUE ary, long offset)
7286{
7287 long len = rb_array_len(ary);
7288 const VALUE *ptr = rb_array_const_ptr_transient(ary);
7289 if (len == 0) return ((VALUE)RUBY_Qnil);
7290 if (offset < 0) {
7291 offset += len;
7292 if (offset < 0) return ((VALUE)RUBY_Qnil);
7293 }
7294 else if (len <= offset) {
7295 return ((VALUE)RUBY_Qnil);
7296 }
7297 return ptr[offset];
7298}
7300void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
7301void ruby_debug_breakpoint(void);
7302#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, __func__)
7303#define rp_m(msg,obj) do { fprintf(stderr, "%s", (msg)); rb_obj_info_dump((VALUE)obj); } while (0)
7304#define bp() ruby_debug_breakpoint()
7305extern const char ruby_digitmap[];
7306double rb_big_fdiv_double(VALUE x, VALUE y);
7311size_t rb_big_size(VALUE);
7314VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
7325VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
7341void Init_class_hierarchy(void);
7345struct rb_block;
7346struct rb_iseq_struct;
7347int rb_dvar_defined(ID, const struct rb_iseq_struct *);
7349const char * rb_insns_name(int i);
7351int rb_vm_insn_addr2insn(const void *);
7352VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
7353struct rb_thread_struct;
7354struct rb_fiber_struct;
7357void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
7358void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
7359void ruby_debug_printf(const char*, ...) __attribute__((format(printf, 1, 2)));
7361void Init_enc(void);
7362void Init_ext(void);
7363ID rb_id_encoding(void);
7364int rb_encdb_replicate(const char *alias, const char *orig);
7365int rb_encdb_alias(const char *alias, const char *orig);
7366int rb_encdb_dummy(const char *name);
7367void rb_encdb_declare(const char *name);
7368void rb_enc_set_base(const char *name, const char *orig);
7369int rb_enc_set_dummy(int index);
7370void rb_encdb_set_unicode(int index);
7371__attribute__ ((__pure__)) int rb_data_is_encoding(VALUE obj);
7372extern VALUE rb_cArithSeq;
7373VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
7374VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
7375extern VALUE rb_eEAGAIN;
7376extern VALUE rb_eEWOULDBLOCK;
7377extern VALUE rb_eEINPROGRESS;
7378void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
7379__attribute__ ((__noreturn__)) void rb_async_bug_errno(const char *,int);
7380const char *rb_builtin_type_name(int t);
7382void rb_warn_deprecated(const char *fmt, const char *suggest, ...) __attribute__((format(printf, 1, 3)));
7383typedef enum {
7391#define rb_raise_cstr(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
7392#define rb_raise_static(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_static(mesg, rb_strlen_lit(mesg))))
7393VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
7394#define rb_name_err_raise_str(mesg,recv,name) rb_exc_raise(rb_name_err_new(mesg, recv, name))
7395#define rb_name_err_raise(mesg,recv,name) rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name))
7396VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
7398#define rb_key_err_raise(mesg,recv,name) rb_exc_raise(rb_key_err_new(mesg, recv, name))
7399VALUE rb_warning_string(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
7400__attribute__ ((__noreturn__)) void rb_vraise(VALUE, const char *, va_list);
7404#define id_signo ruby_static_id_signo
7405#define id_status ruby_static_id_status
7406__attribute__ ((__noreturn__)) VALUE rb_f_raise(int argc, VALUE *argv);
7408void rb_call_end_proc(VALUE data);
7409void rb_mark_end_proc(void);
7410extern const char ruby_null_device[];
7411VALUE rb_home_dir_of(VALUE user, VALUE result);
7413VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
7414void rb_file_const(const char*, VALUE);
7415int rb_file_load_ok(const char *);
7420void Init_File(void);
7421int ruby_is_fd_loadable(int fd);
7422#pragma GCC visibility push(default)
7423__attribute__ ((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path);
7424__attribute__ ((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
7425#pragma GCC visibility pop
7426#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
7427#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
7429extern int ruby_disable_gc;
7430struct rb_objspace;
7431void Init_heap(void);
7432void *ruby_mimmalloc(size_t size) __attribute__((__malloc__));
7433void ruby_mimfree(void *ptr);
7438void ruby_gc_set_params(void);
7440#define ruby_sized_xrealloc(ptr,new_size,old_size) ruby_xrealloc(ptr, new_size)
7441#define ruby_sized_xrealloc2(ptr,new_count,element_size,old_count) ruby_xrealloc2(ptr, new_count, element_size)
7442#define ruby_sized_xfree(ptr,size) ruby_xfree(ptr)
7443#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
7444#undef NEWOBJF_OF
7445#undef RB_NEWOBJ_OF
7446#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)(((flags) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of(klass, (flags) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of(klass, flags))
7447#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
7448__attribute__((__alloc_align__(1)))
7449void *rb_aligned_malloc(size_t, size_t) __attribute__((__malloc__)) __attribute__ ((alloc_size (2)));
7450size_t rb_size_mul_or_raise(size_t, size_t, VALUE);
7451size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE);
7452void *rb_xmalloc_mul_add(size_t, size_t, size_t) __attribute__((__malloc__));
7453void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
7454void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__));
7455void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__));
7456struct st_table *rb_hash_tbl_raw(VALUE hash);
7457#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
7462long rb_dbl_long_hash(double d);
7472VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
7474int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
7475
7476#pragma GCC visibility push(default)
7477
7479
7480#pragma GCC visibility pop
7481
7484void rb_call_inits(void);
7485void ruby_set_inplace_mode(const char *);
7488int rb_stderr_tty_p(void);
7490#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
7492int rb_require_internal(VALUE fname);
7493__attribute__ ((__noreturn__)) void rb_load_fail(VALUE, const char*);
7494extern const char ruby_exec_prefix[];
7495extern const char ruby_initial_load_paths[];
7502VALUE rb_math_log(int argc, const VALUE *argv);
7505extern _Bool mjit_enabled;
7506VALUE mjit_pause(_Bool wait_p);
7508void mjit_finish(_Bool close_handle_p);
7509void Init_newline(void);
7510#define FIXNUM_POSITIVE_P(num) ((SIGNED_VALUE)(num) > (SIGNED_VALUE)INT2FIX(0))
7511#define FIXNUM_NEGATIVE_P(num) ((SIGNED_VALUE)(num) < 0)
7512#define FIXNUM_ZERO_P(num) ((num) == INT2FIX(0))
7513#define INT_NEGATIVE_P(x) (FIXNUM_P(x) ? FIXNUM_NEGATIVE_P(x) : BIGNUM_NEGATIVE_P(x))
7514#define FLOAT_ZERO_P(x) (RFLOAT_VALUE(x) == 0.0)
7515#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
7522#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
7523#define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down)
7524#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args)
7525int rb_num_to_uint(VALUE val, unsigned int *ret);
7526VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
7527double ruby_float_step_size(double beg, double end, double unit, int excl);
7528int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
7529double ruby_float_mod(double x, double y);
7543VALUE rb_int2str(VALUE num, int base);
7545VALUE rb_fix_aref(VALUE fix, VALUE idx);
7547int rb_float_cmp(VALUE x, VALUE y);
7551double rb_int_fdiv_double(VALUE x, VALUE y);
7562int rb_int_positive_p(VALUE num);
7563int rb_int_negative_p(VALUE num);
7565VALUE rb_float_ceil(VALUE num, int ndigits);
7566VALUE rb_float_floor(VALUE x, int ndigits);
7567static inline VALUE
7568rb_num_compare_with_zero(VALUE num, ID mid)
7569{
7570 VALUE zero = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
7571 VALUE r = rb_check_funcall(num, mid, 1, &zero);
7572 if (r == ((VALUE)RUBY_Qundef)) {
7573 rb_cmperr(num, zero);
7574 }
7575 return r;
7576}
7577static inline int
7578rb_num_positive_int_p(VALUE num)
7579{
7580 const ID mid = '>';
7581 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
7583 return ((long)(num) > (long)(((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG));
7584 }
7585 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
7587 return ((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0);
7588 }
7589 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
7590}
7591static inline int
7592rb_num_negative_int_p(VALUE num)
7593{
7594 const ID mid = '<';
7595 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
7597 return ((long)(num) < 0);
7598 }
7599 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
7601 return (!((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0));
7602 }
7603 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
7604}
7609#define RUBY_BIT_ROTL(v,n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
7610#define RUBY_BIT_ROTR(v,n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
7611static inline double
7612rb_float_flonum_value(VALUE v)
7613{
7614 if (v != (VALUE)0x8000000000000002) {
7615 union {
7616 double d;
7617 VALUE v;
7618 } t;
7619 VALUE b63 = (v >> 63);
7620 t.v = ((((2 - b63) | (v & ~(VALUE)0x03)) >> (3)) | (((2 - b63) | (v & ~(VALUE)0x03)) << ((sizeof((2 - b63) | (v & ~(VALUE)0x03)) * 8) - 3)));
7621 return t.d;
7622 }
7623 return 0.0;
7624}
7625static inline double
7626rb_float_noflonum_value(VALUE v)
7627{
7628 return ((struct RFloat *)v)->float_value;
7629}
7630static inline double
7631rb_float_value_inline(VALUE v)
7632{
7633 if (((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) {
7634 return rb_float_flonum_value(v);
7635 }
7636 return rb_float_noflonum_value(v);
7637}
7638static inline VALUE
7639rb_float_new_inline(double d)
7640{
7641 union {
7642 double d;
7643 VALUE v;
7644 } t;
7645 int bits;
7646 t.d = d;
7647 bits = (int)((VALUE)(t.v >> 60) & 0x7);
7648 if (t.v != 0x3000000000000000 &&
7649 !((bits-3) & ~0x01)) {
7650 return ((((t.v) << (3)) | ((t.v) >> ((sizeof(t.v) * 8) - 3))) & ~(VALUE)0x01) | 0x02;
7651 }
7652 else if (t.v == (VALUE)0) {
7653 return 0x8000000000000002;
7654 }
7655 return rb_float_new_in_heap(d);
7656}
7657#define rb_float_value(v) rb_float_value_inline(v)
7658#define rb_float_new(d) rb_float_new_inline(d)
7659void rb_obj_copy_ivar(VALUE dest, VALUE obj);
7660__attribute__ ((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
7661__attribute__ ((__const__)) VALUE rb_obj_not(VALUE obj);
7663__attribute__ ((__noreturn__)) void rb_undefined_alloc(VALUE klass);
7664double rb_num_to_dbl(VALUE val);
7665VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
7668VALUE rb_convert_type_with_id(VALUE,int,const char*,ID);
7670int rb_bool_expected(VALUE, const char *);
7674};
7675#define RBASIC_CLEAR_CLASS(obj) memset(&(((struct RBasicRaw *)((VALUE)(obj)))->klass), 0, sizeof(VALUE))
7676#define RBASIC_SET_CLASS_RAW(obj,cls) memcpy(&((struct RBasicRaw *)((VALUE)(obj)))->klass, &(cls), sizeof(VALUE))
7677#define RBASIC_SET_CLASS(obj,cls) do { VALUE _obj_ = (obj); RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); } while (0)
7678#define USE_SYMBOL_GC 1
7680
7681#pragma GCC visibility push(default)
7682
7683VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
7684
7685#pragma GCC visibility pop
7686
7687void *rb_parser_load_file(VALUE parser, VALUE name);
7692__attribute__ ((__pure__)) int rb_is_const_sym(VALUE sym);
7693__attribute__ ((__pure__)) int rb_is_attrset_sym(VALUE sym);
7698int rb_block_arity(void);
7699int rb_block_min_max_arity(int *max);
7702VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
7703#define RB_MAX_GROUPS (65536)
7704struct waitpid_state;
7706 union {
7707 struct {
7710 struct {
7721 unsigned use_shell : 1;
7722 unsigned pgroup_given : 1;
7723 unsigned umask_given : 1;
7727 unsigned close_others_do : 1;
7728 unsigned chdir_given : 1;
7729 unsigned new_pgroup_given : 1;
7730 unsigned new_pgroup_flag : 1;
7731 unsigned uid_given : 1;
7732 unsigned gid_given : 1;
7733 unsigned exception : 1;
7734 unsigned exception_given : 1;
7749};
7750#define ARGVSTR2ARGV(argv_str) ((char **)RB_IMEMO_TMPBUF_PTR(argv_str) + 1)
7751static inline size_t
7752ARGVSTR2ARGC(VALUE argv_str)
7753{
7754 size_t i = 0;
7755 char *const *p = ((char **)((void *)(((const struct rb_imemo_tmpbuf_struct *)(argv_str))->ptr)) + 1);
7756 while (p[i++])
7757 ;
7758 return i - 1;
7759}
7763pid_t rb_fork_ruby(int *status);
7764void rb_last_status_clear(void);
7765#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
7766#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
7767#define RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2])
7770VALUE rb_rational_plus(VALUE self, VALUE other);
7771VALUE rb_rational_minus(VALUE self, VALUE other);
7772VALUE rb_rational_mul(VALUE self, VALUE other);
7773VALUE rb_rational_div(VALUE self, VALUE other);
7774VALUE rb_lcm(VALUE x, VALUE y);
7776VALUE rb_cstr_to_rat(const char *, int);
7778VALUE rb_rational_cmp(VALUE self, VALUE other);
7779VALUE rb_rational_pow(VALUE self, VALUE other);
7780VALUE rb_rational_floor(VALUE self, int ndigits);
7784VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
7786long rb_reg_search0(VALUE, VALUE, long, int, int);
7787VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
7789void rb_backref_set_string(VALUE string, long pos, long len);
7791int rb_match_count(VALUE match);
7792int rb_match_nth_defined(int nth, VALUE match);
7793VALUE rb_reg_new_ary(VALUE ary, int options);
7794extern int ruby_enable_coredump;
7795int rb_get_next_signal(void);
7797VALUE rb_fstring_new(const char *ptr, long len);
7798#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
7799#define rb_fstring_literal(str) rb_fstring_lit(str)
7800VALUE rb_fstring_cstr(const char *str);
7801#define rb_fstring_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_fstring_new((str), (long)strlen(str)) : rb_fstring_cstr(str) )
7802int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
7806#define QUOTE(str) rb_str_quote_unprintable(str)
7807#define QUOTE_ID(id) rb_id_quote_unprintable(id)
7808char *rb_str_fill_terminator(VALUE str, const int termlen);
7809void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
7812#define STR_NOEMBED FL_USER1
7813#define STR_SHARED FL_USER2
7814#define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
7815#define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
7816#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
7817#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
7818size_t rb_str_memsize(VALUE);
7819VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
7821char *rb_str_to_cstr(VALUE str);
7822VALUE rb_str_eql(VALUE str1, VALUE str2);
7824const char *ruby_escaped_char(int c);
7826static inline VALUE
7827rb_str_eql_internal(const VALUE str1, const VALUE str2)
7828{
7829 const long len = (!(((struct RBasic*)(str1))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str1))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str1))->as.heap.len);
7830 const char *ptr1, *ptr2;
7831 if (len != (!(((struct RBasic*)(str2))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str2))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str2))->as.heap.len)) return ((VALUE)RUBY_Qfalse);
7832 if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse);
7833 if ((ptr1 = (!(((struct RBasic*)(str1))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str1))->as.ary : ((struct RString*)(str1))->as.heap.ptr)) == (ptr2 = (!(((struct RBasic*)(str2))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str2))->as.ary : ((struct RString*)(str2))->as.heap.ptr)))
7834 return ((VALUE)RUBY_Qtrue);
7835 if (memcmp(ptr1, ptr2, len) == 0)
7836 return ((VALUE)RUBY_Qtrue);
7837 return ((VALUE)RUBY_Qfalse);
7838}
7839VALUE rb_sym_intern_ascii(const char *ptr, long len);
7841#define rb_sym_intern_ascii_cstr(ptr) __extension__ ( { (__builtin_constant_p(ptr)) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr); })
7847#define COVERAGE_INDEX_LINES 0
7848#define COVERAGE_INDEX_BRANCHES 1
7849#define COVERAGE_TARGET_LINES 1
7850#define COVERAGE_TARGET_BRANCHES 2
7851#define COVERAGE_TARGET_METHODS 4
7852#define COVERAGE_TARGET_ONESHOT_LINES 8
7857int rb_get_coverage_mode(void);
7863int rb_thread_to_be_killed(VALUE thread);
7864void rb_mutex_allow_trap(VALUE self, int val);
7865VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
7868char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
7869char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
7870#define ROBJECT_TRANSIENT_FLAG FL_USER13
7871#define ROBJ_TRANSIENT_P(obj) FL_TEST_RAW((obj), ROBJECT_TRANSIENT_FLAG)
7872#define ROBJ_TRANSIENT_SET(obj) FL_SET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
7873#define ROBJ_TRANSIENT_UNSET(obj) FL_UNSET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
7874void rb_gc_mark_global_tbl(void);
7878VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
7879void rb_autoload_str(VALUE mod, ID id, VALUE file);
7881void rb_deprecate_constant(VALUE mod, const char *name);
7885_Bool rb_gvar_is_traced(const struct rb_global_entry *);
7889void rb_vm_mark(void *ptr);
7890void Init_BareVM(void);
7891void Init_vm_objects(void);
7892__attribute__ ((__pure__)) VALUE rb_vm_top_self(void);
7894const void **rb_vm_get_insns_address_table(void);
7895VALUE rb_source_location(int *pline);
7896const char *rb_source_location_cstr(int *pline);
7897static void rb_vm_pop_cfunc_frame(void);
7898int rb_vm_add_root_module(ID id, VALUE module);
7901VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
7902static VALUE ruby_vm_special_exception_copy(VALUE);
7903__attribute__ ((__pure__)) st_table *rb_vm_fstring_table(void);
7904void rb_print_backtrace(void);
7905void Init_vm_eval(void);
7906VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *);
7909typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
7910VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
7913 rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
7914const char *rb_type_str(enum ruby_value_type type);
7918VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
7919 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
7920 VALUE data2);
7923void Init_vm_stack_canary(void);
7924void Init_eval_method(void);
7933 MISSING_NONE = 0x40
7939struct rb_calling_info;
7940struct rb_call_data;
7941#define CACHELINE 64
7945 (64
7946 - sizeof(rb_serial_t)
7947 - sizeof(struct rb_callable_method_entry_struct *)
7948 - sizeof(uintptr_t)
7949 - sizeof(enum method_missing_reason)
7950 - sizeof(VALUE (*)(
7952 struct rb_control_frame_struct *,
7953 struct rb_calling_info *,
7954 const struct rb_call_data *)))
7955 / sizeof(rb_serial_t)
7956 ];
7961 struct rb_calling_info *calling,
7962 struct rb_call_data *cd);
7963 union {
7964 unsigned int index;
7967};
7968_Static_assert(sizeof(struct rb_call_cache) <= 64, "cachelined" ": " "sizeof(struct rb_call_cache) <= CACHELINE");
7971 unsigned int flag;
7973};
7977};
7978__attribute__ ((__visibility__("default"))) extern
7979__attribute__ ((__nonnull__(1))) VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*);
7980__attribute__ ((__visibility__("default"))) extern
7981__attribute__ ((__nonnull__(1))) _Bool rb_method_basic_definition_p_with_cc(struct rb_call_data *, VALUE, ID);
7982#define rb_funcallv(recv,mid,argc,argv) __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); })
7983#define rb_method_basic_definition_p(klass,mid) __extension__({ static struct rb_call_data rb_mbdp; (klass == Qfalse) ? true : rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); })
7984void Init_vm_backtrace(void);
7985VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
7992void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
7993VALUE rb_getlogin(void);
7995VALUE rb_getpwdiruid(void);
7996
7997#pragma GCC visibility push(default)
7998
8003void rb_ary_ptr_use_end(VALUE ary);
8010VALUE rb_big2str_poweroftwo(VALUE x, int base);
8011VALUE rb_big2str_generic(VALUE x, int base);
8012VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
8013VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
8014VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
8018VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
8026VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
8027VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
8028 rb_enumerator_size_func *size_fn,
8029 VALUE beg, VALUE end, VALUE step, int excl);
8030int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
8031__attribute__ ((__noreturn__)) void rb_unexpected_type(VALUE,int);
8032#undef Check_Type
8033#define Check_Type(v,t) (!RB_TYPE_P((VALUE)(v), (t)) || ((t) == RUBY_T_DATA && RTYPEDDATA_P(v)) ? rb_unexpected_type((VALUE)(v), (t)) : (void)0)
8034static inline int
8035rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
8036{
8037 return ( ((RUBY_T_DATA) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_DATA) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_DATA) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_DATA) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_DATA) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_DATA) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_DATA) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_DATA))) && (((struct RTypedData*)(obj))->typed_flag == 1) && ((((struct RTypedData*)(obj))->type) == data_type);
8038}
8039#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
8042void rb_maygvl_fd_fix_cloexec(int fd);
8043int rb_gc_for_fd(int err);
8044void rb_write_error_str(VALUE mesg);
8045VALUE rb_int_positive_pow(long x, unsigned long y);
8046int rb_opts_exception_p(VALUE opts, int default_value);
8047int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
8048pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
8049VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
8050struct rb_execarg *rb_execarg_get(VALUE execarg_obj);
8051int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
8052void rb_execarg_parent_start(VALUE execarg_obj);
8053void rb_execarg_parent_end(VALUE execarg_obj);
8054int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
8055VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
8056void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
8057VALUE rb_gcd(VALUE x, VALUE y);
8058VALUE rb_gcd_normal(VALUE self, VALUE other);
8060int rb_grantpt(int fd);
8063VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
8065int ruby_thread_has_gvl_p(void);
8067extern const signed char ruby_digit36_to_number_table[];
8068extern const char ruby_hexdigits[];
8069extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
8073int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
8074void rb_iv_tbl_copy(VALUE dst, VALUE src);
8077size_t rb_obj_memsize_of(VALUE);
8079#define RB_OBJ_GC_FLAGS_MAX 6
8080size_t rb_obj_gc_flags(VALUE, ID[], size_t);
8081void rb_gc_mark_values(long n, const VALUE *values);
8082void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
8083VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
8084int ruby_fill_random_bytes(void *, size_t, int);
8085
8086#pragma GCC visibility pop
8087
8088#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name ##_CREATE, arg)
8089#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_ ##name(arg, dtrace_file, dtrace_line); } } while (0)
8090#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
8091#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
8092#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : RB_BUILTIN_TYPE(arg_obj); })
8093#define FLEX_ARY_LEN
8094#define BITFIELD(type,name,size) type name : size
8095#define COMPILER_WARNING_PUSH _Pragma("GCC diagnostic push")
8096#define COMPILER_WARNING_POP _Pragma("GCC diagnostic pop")
8097#define COMPILER_WARNING_SPECIFIER(kind,msg) GCC diagnostic kind #msg
8098#define COMPILER_WARNING_ERROR(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(error, flag))
8099#define COMPILER_WARNING_IGNORED(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(ignored, flag))
8100#define COMPILER_WARNING_PRAGMA(str) COMPILER_WARNING_PRAGMA_(str)
8101#define COMPILER_WARNING_PRAGMA_(str) _Pragma(#str)
8102#define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); typeof(expr) unaligned_member_access_result = (expr); COMPILER_WARNING_POP; unaligned_member_access_result; })
8103#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
8104#undef RB_OBJ_WRITE
8105#define RB_OBJ_WRITE(a,slot,b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
8106#define RUBY_VM_H 1
8107
8108#pragma GCC visibility push(default)
8109
8112void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
8113
8114#pragma GCC visibility pop
8115
8116#define vm_exec rb_vm_exec
8117#define RUBY_GC_H 1
8118#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
8119#define RUBY_MARK_FREE_DEBUG 0
8120#define RUBY_MARK_ENTER(msg)
8121#define RUBY_MARK_LEAVE(msg)
8122#define RUBY_FREE_ENTER(msg)
8123#define RUBY_FREE_LEAVE(msg)
8124#define RUBY_GC_INFO if(0)printf
8125#define RUBY_MARK_NO_PIN_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0)
8126#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
8127#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
8128#define STACK_UPPER(x,a,b) (b)
8129#define STACK_GROW_DIR_DETECTION
8130#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
8131#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
8132const char *rb_obj_info(VALUE obj);
8133const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
8135struct rb_thread_struct;
8136
8137#pragma GCC visibility push(default)
8138
8140void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
8141void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
8147 int (*callback)(void *start, void *end, size_t stride, void *data),
8148 void *data);
8150 int (*callback)(void *, void *, size_t, void *),
8151 void *data);
8152
8153#pragma GCC visibility pop
8154
8155#define RUBY_VM_CORE_H
8156#define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
8157#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
8158#define VMDEBUG 0
8159#undef assert
8160#define assert RUBY_ASSERT
8161#define VM_ASSERT(expr) ((void)0)
8162#define VM_UNREACHABLE(func) UNREACHABLE
8163#define RUBY_VM_THREAD_MODEL 2
8164#define VM_INSN_INFO_TABLE_IMPL 2
8165#define RUBY_NODE_H 1
8271 NODE_LAST
8281static inline rb_code_location_t
8282code_loc_gen(rb_code_location_t *loc1, rb_code_location_t *loc2)
8283{
8285 loc.beg_pos = loc1->beg_pos;
8286 loc.end_pos = loc2->end_pos;
8287 return loc;
8288}
8289typedef struct RNode {
8291 union {
8292 struct RNode *node;
8297 union {
8298 struct RNode *node;
8299 ID id;
8300 long argc;
8301 VALUE value;
8303 union {
8304 struct RNode *node;
8305 ID id;
8306 long state;
8310 VALUE value;
8315#define RNODE(obj) (R_CAST(RNode)(obj))
8316#define NODE_FL_NEWLINE (((VALUE)1)<<7)
8317#define NODE_TYPESHIFT 8
8318#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
8319#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
8320#define nd_set_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
8321#define NODE_LSHIFT (NODE_TYPESHIFT+7)
8322#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
8323#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
8324#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
8325#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
8326#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
8327#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
8328#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
8329#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
8330#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
8331#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
8332#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
8333#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
8334#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
8335#define nd_last_loc(n) ((n)->nd_loc.end_pos)
8336#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
8337#define nd_node_id(n) ((n)->node_id)
8338#define nd_set_node_id(n,id) ((n)->node_id = (id))
8339#define nd_head u1.node
8340#define nd_alen u2.argc
8341#define nd_next u3.node
8342#define nd_cond u1.node
8343#define nd_body u2.node
8344#define nd_else u3.node
8345#define nd_resq u2.node
8346#define nd_ensr u3.node
8347#define nd_1st u1.node
8348#define nd_2nd u2.node
8349#define nd_stts u1.node
8350#define nd_entry u3.entry
8351#define nd_vid u1.id
8352#define nd_cflag u2.id
8353#define nd_cval u3.value
8354#define nd_oid u1.id
8355#define nd_tbl u1.tbl
8356#define nd_var u1.node
8357#define nd_iter u3.node
8358#define nd_value u2.node
8359#define nd_aid u3.id
8360#define nd_lit u1.value
8361#define nd_rest u1.id
8362#define nd_opt u1.node
8363#define nd_pid u1.id
8364#define nd_plen u2.argc
8365#define nd_recv u1.node
8366#define nd_mid u2.id
8367#define nd_args u3.node
8368#define nd_ainfo u3.args
8369#define nd_defn u3.node
8370#define nd_cpath u1.node
8371#define nd_super u3.node
8372#define nd_beg u1.node
8373#define nd_end u2.node
8374#define nd_state u3.state
8375#define nd_rval u2.value
8376#define nd_nth u2.argc
8377#define nd_tag u1.id
8378#define nd_alias u1.id
8379#define nd_orig u2.id
8380#define nd_undef u2.node
8381#define nd_brace u2.argc
8382#define nd_pconst u1.node
8383#define nd_pkwargs u2.node
8384#define nd_pkwrestarg u3.node
8385#define nd_apinfo u3.apinfo
8386#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
8387#define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
8388#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
8389#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
8390#define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
8391#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
8392#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
8393#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
8394#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
8395#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
8396#define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
8397#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
8398#define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
8399#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
8400#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
8401#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
8402#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
8403#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
8404#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
8405#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
8406#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
8407#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
8408#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
8409#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
8410#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
8411#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
8412#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
8413#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
8414#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
8415#define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
8416#define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
8417#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
8418#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
8419#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v),loc)
8420#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
8421#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
8422#define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
8423#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
8424#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
8425#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
8426#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
8427#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
8428#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
8429#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
8430#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
8431#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
8432#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v),loc)
8433#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
8434#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
8435#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
8436#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
8437#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
8438#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
8439#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
8440#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
8441#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
8442#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
8443#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
8444#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
8445#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
8446#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
8447#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
8448#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
8449#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
8450#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
8451#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
8452#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
8453#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
8454#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
8455#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
8456#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
8457#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
8458#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
8459#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
8460#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
8461#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
8462#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
8463#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
8464#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
8465#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
8466#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
8467#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
8468#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
8469#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
8470#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
8471#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
8472#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
8473#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
8474#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
8475#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
8476#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
8477#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
8478#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
8479#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
8480#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
8481#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
8482#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
8483#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
8484#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
8485#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
8486#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
8487#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
8488#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
8490
8491#pragma GCC visibility push(default)
8492
8494typedef struct rb_ast_body_struct {
8495 const NODE *root;
8499typedef struct rb_ast_struct {
8504rb_ast_t *rb_ast_new(void);
8505void rb_ast_mark(rb_ast_t*);
8509void rb_ast_free(rb_ast_t*);
8510size_t rb_ast_memsize(const rb_ast_t*);
8514VALUE rb_parser_new(void);
8518VALUE rb_parser_dump_tree(const NODE *node, int comment);
8519void rb_parser_set_options(VALUE, int, int, int, int);
8520rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
8521rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
8522rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
8523rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
8524void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
8525const char *ruby_node_name(int node);
8526const struct kwtable *rb_reserved_word(const char *, unsigned int);
8538 unsigned int no_kwarg: 1;
8539 unsigned int ruby2_keywords: 1;
8541};
8547};
8548struct parser_params;
8549void *rb_parser_malloc(struct parser_params *, size_t);
8550void *rb_parser_realloc(struct parser_params *, void *, size_t);
8551void *rb_parser_calloc(struct parser_params *, size_t, size_t);
8552void rb_parser_free(struct parser_params *, void *);
8553void rb_parser_printf(struct parser_params *parser, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
8554
8555#pragma GCC visibility pop
8556
8557#define RUBY_VM_OPTS_H
8558#define OPT_TAILCALL_OPTIMIZATION 0
8559#define OPT_PEEPHOLE_OPTIMIZATION 1
8560#define OPT_SPECIALISED_INSTRUCTION 1
8561#define OPT_INLINE_CONST_CACHE 1
8562#define OPT_FROZEN_STRING_LITERAL 0
8563#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
8564#define OPT_THREADED_CODE 0
8565#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
8566#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
8567#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
8568#define OPT_CHECKED_RUN 1
8569#define OPT_INLINE_METHOD_CACHE 1
8570#define OPT_GLOBAL_METHOD_CACHE 1
8571#define OPT_BLOCKINLINING 0
8572#define OPT_IC_FOR_IVAR 1
8573#define OPT_OPERANDS_UNIFICATION 1
8574#define OPT_INSTRUCTIONS_UNIFICATION 0
8575#define OPT_UNIFY_ALL_COMBINATION 0
8576#define OPT_STACK_CACHING 0
8577#define OPT_SUPPORT_JOKE 0
8578#define VM_COLLECT_USAGE_DETAILS 0
8579#define RUBY_ID_H
8583 RUBY_ID_INSTANCE = (0x01<<1),
8584 RUBY_ID_GLOBAL = (0x03<<1),
8585 RUBY_ID_ATTRSET = (0x04<<1),
8586 RUBY_ID_CONST = (0x05<<1),
8587 RUBY_ID_CLASS = (0x06<<1),
8588 RUBY_ID_JUNK = (0x07<<1),
8593#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
8594#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
8595#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
8596#define ID_LOCAL RUBY_ID_LOCAL
8597#define ID_INSTANCE RUBY_ID_INSTANCE
8598#define ID_GLOBAL RUBY_ID_GLOBAL
8599#define ID_ATTRSET RUBY_ID_ATTRSET
8600#define ID_CONST RUBY_ID_CONST
8601#define ID_CLASS RUBY_ID_CLASS
8602#define ID_JUNK RUBY_ID_JUNK
8603#define ID_INTERNAL RUBY_ID_INTERNAL
8604#define symIFUNC ID2SYM(idIFUNC)
8605#define symCFUNC ID2SYM(idCFUNC)
8606#define RUBY_TOKEN_DOT2 128
8607#define RUBY_TOKEN_DOT3 129
8608#define RUBY_TOKEN_BDOT2 130
8609#define RUBY_TOKEN_BDOT3 131
8610#define RUBY_TOKEN_UPLUS 132
8611#define RUBY_TOKEN_UMINUS 133
8612#define RUBY_TOKEN_POW 134
8613#define RUBY_TOKEN_CMP 135
8614#define RUBY_TOKEN_LSHFT 136
8615#define RUBY_TOKEN_RSHFT 137
8616#define RUBY_TOKEN_LEQ 138
8617#define RUBY_TOKEN_GEQ 139
8618#define RUBY_TOKEN_EQ 140
8619#define RUBY_TOKEN_EQQ 141
8620#define RUBY_TOKEN_NEQ 142
8621#define RUBY_TOKEN_MATCH 143
8622#define RUBY_TOKEN_NMATCH 144
8623#define RUBY_TOKEN_AREF 145
8624#define RUBY_TOKEN_ASET 146
8625#define RUBY_TOKEN_COLON2 147
8626#define RUBY_TOKEN_ANDOP 148
8627#define RUBY_TOKEN_OROP 149
8628#define RUBY_TOKEN_ANDDOT 150
8629#define RUBY_TOKEN(t) RUBY_TOKEN_ ##t
8630#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
8631#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
8632#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
8633#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
8634#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
8635#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
8636#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
8638 idDot2 = 128,
8639 idDot3 = 129,
8640 idUPlus = 132,
8642 idPow = 134,
8643 idCmp = 135,
8644 idPLUS = '+',
8645 idMINUS = '-',
8646 idMULT = '*',
8647 idDIV = '/',
8648 idMOD = '%',
8649 idLTLT = 136,
8650 idGTGT = 137,
8651 idLT = '<',
8652 idLE = 138,
8653 idGT = '>',
8654 idGE = 139,
8655 idEq = 140,
8656 idEqq = 141,
8657 idNeq = 142,
8658 idNot = '!',
8659 idAnd = '&',
8660 idOr = '|',
8664 idAREF = 145,
8665 idASET = 146,
8667 idANDOP = 148,
8668 idOROP = 149,
8771#define DEFINE_LOCALID_FROM_TOKEN(n) id ##n = TOKEN2LOCALID(t ##n)
8837#define DEFINE_INSTANCEID_FROM_TOKEN(n) id ##n = TOKEN2INSTANCEID(t ##n)
8838#define DEFINE_GLOBALID_FROM_TOKEN(n) id ##n = TOKEN2GLOBALID(t ##n)
8842#define DEFINE_CONSTID_FROM_TOKEN(n) id ##n = TOKEN2CONSTID(t ##n)
8843#define DEFINE_CLASSID_FROM_TOKEN(n) id ##n = TOKEN2CLASSID(t ##n)
8844#define DEFINE_ATTRSETID_FROM_TOKEN(n) id ##n = TOKEN2ATTRSETID(t ##n)
8848#define RUBY_METHOD_H 1
8849#define END_OF_ENUMERATION(key)
8850typedef enum {
8855 METHOD_VISI_MASK = 0x03
8857typedef struct rb_scope_visi_struct {
8859 unsigned int module_func : 1;
8861typedef struct rb_cref_struct {
8882#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
8883#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
8884#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
8885#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3)
8886static inline void
8887METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
8888{
8889 ((void)0);
8890 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
8891}
8892static inline void
8893METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
8894{
8895 ((void)0);
8896 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
8897}
8898static inline void
8899METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
8900{
8901 ((void)0);
8902 ((void)0);
8903 me->flags =
8904 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8905 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
8906}
8907static inline void
8908METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
8909{
8910 dst->flags =
8911 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
8912 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
8913}
8914typedef enum {
8927
8929#define VM_METHOD_TYPE_MINIMUM_BITS 4
8930_Static_assert(VM_METHOD_TYPE_REFINED <= (1<<4), "VM_METHOD_TYPE_MINIMUM_BITS" ": " "VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS)");
8932#define rb_iseq_t rb_iseq_t
8939 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)());
8940 int argc;
8965 int alias_count : 28;
8967 unsigned int no_redef_warning: 1;
8968 union {
8979};
8981_Static_assert(__builtin_offsetof (rb_method_definition_t, body)==8, "sizeof_method_def" ": " "offsetof(rb_method_definition_t, body)==8");
8982#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
8983#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
8986void rb_add_refined_method_entry(VALUE refined_class, ID mid);
8995
8996#pragma GCC visibility push(default)
8997
8999
9000#pragma GCC visibility pop
9001
9014VALUE rb_unnamed_parameters(int arity);
9015#define RUBY_ATOMIC_H
9016typedef unsigned int rb_atomic_t;
9017#define ATOMIC_SET(var,val) (void)__atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
9018#define ATOMIC_INC(var) __atomic_fetch_add(&(var), 1, __ATOMIC_SEQ_CST)
9019#define ATOMIC_DEC(var) __atomic_fetch_sub(&(var), 1, __ATOMIC_SEQ_CST)
9020#define ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
9021#define ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
9022#define ATOMIC_CAS(var,oldval,newval) ({ __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup; })
9023#define ATOMIC_SIZE_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
9024#define ATOMIC_SIZE_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
9025#define RUBY_ATOMIC_GENERIC_MACRO 1
9026#define ATOMIC_SIZE_INC(var) ATOMIC_INC(var)
9027#define ATOMIC_SIZE_DEC(var) ATOMIC_DEC(var)
9028#define ATOMIC_SIZE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
9029#define ATOMIC_SIZE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
9030#define ATOMIC_PTR_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
9031#define ATOMIC_PTR_CAS(var,oldval,newval) ATOMIC_CAS(var, oldval, newval)
9032#define ATOMIC_VALUE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
9033#define ATOMIC_VALUE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
9034#define CCAN_LIST_H
9035#undef assert
9036#define assert(__e) ((__e) ? (void)0 : __assert_func (__FILE__, __LINE__, __ASSERT_FUNC, #__e))
9037#define __ASSERT_FUNC __func__
9038void __assert (const char *, int, const char *)
9039 __attribute__ ((__noreturn__));
9040void __assert_func (const char *, int, const char *, const char *)
9041 __attribute__ ((__noreturn__));
9042#define static_assert _Static_assert
9043#define CCAN_STR_H
9044#define stringify(expr) stringify_1(expr)
9045#define stringify_1(expr) #expr
9046#define CCAN_CONTAINER_OF_H
9047#define CCAN_CHECK_TYPE_H
9048#define check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
9049#define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
9050#define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
9051static inline char *container_of_or_null_(void *member_ptr, size_t offset)
9052{
9053 return member_ptr ? (char *)member_ptr - offset : ((void *)0);
9054}
9055#define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
9056#define container_off(containing_type,member) offsetof(containing_type, member)
9057#define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member)
9058#define container_off_var(var,member) container_off(typeof(*var), member)
9060{
9062};
9064{
9065 struct list_node n;
9066};
9067#define LIST_LOC __FILE__ ":" stringify(__LINE__)
9068#define list_debug(h,loc) ((void)loc, h)
9069#define list_debug_node(n,loc) ((void)loc, n)
9070#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
9071#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
9072static inline void list_head_init(struct list_head *h)
9073{
9074 h->n.next = h->n.prev = &h->n;
9075}
9076static inline void list_node_init(struct list_node *n)
9077{
9078 n->next = n->prev = n;
9079}
9080#define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC)
9081static inline void list_add_after_(struct list_head *h,
9082 struct list_node *p,
9083 struct list_node *n,
9084 const char *abortstr)
9085{
9086 n->next = p->next;
9087 n->prev = p;
9088 p->next->prev = n;
9089 p->next = n;
9090 (void)((void)abortstr, h);
9091}
9092#define list_add(h,n) list_add_(h, n, LIST_LOC)
9093static inline void list_add_(struct list_head *h,
9094 struct list_node *n,
9095 const char *abortstr)
9096{
9097 list_add_after_(h, &h->n, n, abortstr);
9098}
9099#define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC)
9100static inline void list_add_before_(struct list_head *h,
9101 struct list_node *p,
9102 struct list_node *n,
9103 const char *abortstr)
9104{
9105 n->next = p;
9106 n->prev = p->prev;
9107 p->prev->next = n;
9108 p->prev = n;
9109 (void)((void)abortstr, h);
9110}
9111#define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC)
9112static inline void list_add_tail_(struct list_head *h,
9113 struct list_node *n,
9114 const char *abortstr)
9115{
9116 list_add_before_(h, &h->n, n, abortstr);
9117}
9118#define list_empty(h) list_empty_(h, LIST_LOC)
9119static inline int list_empty_(const struct list_head *h, const char* abortstr)
9120{
9121 (void)((void)abortstr, h);
9122 return h->n.next == &h->n;
9123}
9124#define list_empty_nodebug(h) list_empty(h)
9125static inline _Bool list_empty_nocheck(const struct list_head *h)
9126{
9127 return h->n.next == &h->n;
9128}
9129#define list_del(n) list_del_(n, LIST_LOC)
9130static inline void list_del_(struct list_node *n, const char* abortstr)
9131{
9132 (void)((void)abortstr, n);
9133 n->next->prev = n->prev;
9134 n->prev->next = n->next;
9135}
9136#define list_del_init(n) list_del_init_(n, LIST_LOC)
9137static inline void list_del_init_(struct list_node *n, const char *abortstr)
9138{
9139 list_del_(n, abortstr);
9140 list_node_init(n);
9141}
9142static inline void list_del_from(struct list_head *h, struct list_node *n)
9143{
9144 ((!list_empty_(h, "../ruby-2.7.6/ccan/list/list.h" ":" "328")) ? (void)0 : __assert_func ("../ruby-2.7.6/ccan/list/list.h", 328, __func__, "!list_empty(h)"));
9145 list_del_(n, "../ruby-2.7.6/ccan/list/list.h" ":" "329");
9146}
9147#define list_swap(o,n) list_swap_(o, n, LIST_LOC)
9148static inline void list_swap_(struct list_node *o,
9149 struct list_node *n,
9150 const char* abortstr)
9151{
9152 (void)((void)abortstr, o);
9153 *n = *o;
9154 n->next->prev = n;
9155 n->prev->next = n;
9156}
9157#define list_entry(n,type,member) container_of(n, type, member)
9158#define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member)))
9159static inline const void *list_top_(const struct list_head *h, size_t off)
9160{
9161 if (list_empty_(h, "../ruby-2.7.6/ccan/list/list.h" ":" "399"))
9162 return ((void *)0);
9163 return (const char *)h->n.next - off;
9164}
9165#define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member)))
9166static inline const void *list_pop_(const struct list_head *h, size_t off)
9167{
9168 struct list_node *n;
9169 if (list_empty_(h, "../ruby-2.7.6/ccan/list/list.h" ":" "425"))
9170 return ((void *)0);
9171 n = h->n.next;
9172 list_del_(n, "../ruby-2.7.6/ccan/list/list.h" ":" "428");
9173 return (const char *)n - off;
9174}
9175#define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member)))
9176static inline const void *list_tail_(const struct list_head *h, size_t off)
9177{
9178 if (list_empty_(h, "../ruby-2.7.6/ccan/list/list.h" ":" "451"))
9179 return ((void *)0);
9180 return (const char *)h->n.prev - off;
9181}
9182#define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member))
9183#define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member))
9184#define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
9185#define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
9186#define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member)))
9187#define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member)))
9188#define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__))
9189static inline void list_append_list_(struct list_head *to,
9190 struct list_head *from,
9191 const char *abortstr)
9192{
9193 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
9194 struct list_node *to_tail = ((void)abortstr, to)->n.prev;
9195 to->n.prev = from_tail;
9196 from_tail->next = &to->n;
9197 to_tail->next = &from->n;
9198 from->n.prev = to_tail;
9199 list_del_(&from->n, "../ruby-2.7.6/ccan/list/list.h" ":" "600");
9200 list_head_init(from);
9201}
9202#define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC)
9203static inline void list_prepend_list_(struct list_head *to,
9204 struct list_head *from,
9205 const char *abortstr)
9206{
9207 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
9208 struct list_node *to_head = ((void)abortstr, to)->n.next;
9209 to->n.next = &from->n;
9210 from->n.prev = &to->n;
9211 to_head->prev = from_tail;
9212 from_tail->next = to_head;
9213 list_del_(&from->n, "../ruby-2.7.6/ccan/list/list.h" ":" "632");
9214 list_head_init(from);
9215}
9216#define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off)))
9217#define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)))
9218#define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next)
9219#define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev)
9220#define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
9221#define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
9222#define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off)))
9223#define list_head_off(h,type,off) ((type *)list_head_off((h), (off)))
9224#define list_tail_off(h,type,off) ((type *)list_tail_((h), (off)))
9225#define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off)))
9226#define list_del_off(n,off) list_del(list_node_from_off_((n), (off)))
9227#define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off)))
9228static inline void *list_node_to_off_(struct list_node *node, size_t off)
9229{
9230 return (void *)((char *)node - off);
9231}
9232static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
9233{
9234 return (struct list_node *)((char *)ptr + off);
9235}
9236#define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node))
9237#define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node))
9238#define list_typeof(var) typeof(var)
9239static inline void *list_entry_or_null(const struct list_head *h,
9240 const struct list_node *n,
9241 size_t off)
9242{
9243 if (n == &h->n)
9244 return ((void *)0);
9245 return (char *)n - off;
9246}
9247#define RUBY_THREAD_NATIVE_H 1
9248#define _SCHED_H_
9249#define _SYS_SCHED_H_
9250#define SCHED_OTHER 3
9251#define SCHED_FIFO 1
9252#define SCHED_RR 2
9255};
9257 pid_t __pid,
9258 const struct sched_param *__param
9259);
9261 pid_t __pid,
9262 struct sched_param *__param
9263);
9265 pid_t __pid,
9266 int __policy,
9267 const struct sched_param *__param
9268);
9270 pid_t __pid
9271);
9273 int __policy
9274);
9276 int __policy
9277);
9279 pid_t __pid,
9280 struct timespec *__interval
9281);
9282int sched_yield( void );
9285int sched_get_thread_affinity (void *, size_t, cpu_set_t *);
9286int sched_setaffinity (pid_t, size_t, const cpu_set_t *);
9287int sched_set_thread_affinity (void *, size_t, const cpu_set_t *);
9288#define _PTHREAD_H
9289#define PTHREAD_CANCEL_ASYNCHRONOUS 1
9290#define PTHREAD_CANCEL_ENABLE 0
9291#define PTHREAD_CANCEL_DEFERRED 0
9292#define PTHREAD_CANCEL_DISABLE 1
9293#define PTHREAD_CANCELED ((void *)-1)
9294#define PTHREAD_COND_INITIALIZER (pthread_cond_t)21
9295#define PTHREAD_CREATE_DETACHED 1
9296#define PTHREAD_CREATE_JOINABLE 0
9297#define PTHREAD_EXPLICIT_SCHED 1
9298#define PTHREAD_INHERIT_SCHED 0
9299#define PTHREAD_MUTEX_RECURSIVE 0
9300#define PTHREAD_MUTEX_ERRORCHECK 1
9301#define PTHREAD_MUTEX_NORMAL 2
9302#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
9303#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (pthread_mutex_t)18
9304#define PTHREAD_NORMAL_MUTEX_INITIALIZER_NP (pthread_mutex_t)19
9305#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP (pthread_mutex_t)20
9306#define PTHREAD_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER_NP
9307#define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
9308#define PTHREAD_PROCESS_SHARED 1
9309#define PTHREAD_PROCESS_PRIVATE 0
9310#define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)22
9311#define PTHREAD_SCOPE_PROCESS 0
9312#define PTHREAD_SCOPE_SYSTEM 1
9313#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
9314int pthread_atfork (void (*)(void), void (*)(void), void (*)(void));
9329int pthread_attr_getstack (const pthread_attr_t *, void **, size_t *);
9334typedef void (*__cleanup_routine_type) (void *);
9336{
9338 void *arg;
9342void _pthread_cleanup_pop (int execute);
9343#define pthread_cleanup_push(_fn,_arg) { __pthread_cleanup_handler __cleanup_handler = { _fn, _arg, NULL }; _pthread_cleanup_push( &__cleanup_handler );
9344#define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
9350 clockid_t, const struct timespec *);
9352 pthread_mutex_t *, const struct timespec *);
9365 const pthread_barrierattr_t *, unsigned);
9369 void *(*)(void *), void *);
9372void pthread_exit (void *) __attribute__ ((__noreturn__));
9377int pthread_key_create (pthread_key_t *, void (*)(void *));
9385 const struct timespec *);
9408 const struct timespec *);
9413 const struct timespec *);
9421int pthread_once (pthread_once_t *, void (*)(void));
9425int pthread_setcancelstate (int, int *);
9426int pthread_setcanceltype (int, int *);
9433int pthread_getname_np (pthread_t, char *, size_t) __attribute__((__nonnull__(2)));
9435int pthread_setname_np (pthread_t, const char *) __attribute__((__nonnull__(2)));
9436int pthread_sigqueue (pthread_t *, int, const union sigval);
9437int pthread_timedjoin_np (pthread_t, void **, const struct timespec *);
9439int pthread_yield (void);
9444
9445#pragma GCC visibility push(default)
9446
9452
9453#pragma GCC visibility pop
9454
9455#define RUBY_THREAD_PTHREAD_H
9456#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
9457#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
9460 union {
9464 struct
9465 {
9471#undef except
9472#undef try
9473#undef leave
9474#undef finally
9486#define _SETJMP_H_
9487
9488#define _JBTYPE long
9489#define _JBLEN 32
9490typedef long jmp_buf[32];
9491
9492typedef long sigjmp_buf[32 +1+((sizeof (long) + sizeof (sigset_t) - 1)
9493 /sizeof (long))];
9494#define _SAVEMASK _JBLEN
9495#define _SIGMASK (_JBLEN+1)
9496#define _CYGWIN_WORKING_SIGSETJMP
9497#define __SIGMASK_FUNC pthread_sigmask
9498extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__));
9499extern int sigsetjmp (sigjmp_buf, int);
9500#define sigsetjmp(env,savemask) __extension__ ({ sigjmp_buf *_sjbuf = &(env); ((*_sjbuf)[_SAVEMASK] = savemask, __SIGMASK_FUNC (SIG_SETMASK, 0, (sigset_t *)((*_sjbuf) + _SIGMASK)), setjmp (*_sjbuf)); })
9501#define siglongjmp(env,val) __extension__ ({ sigjmp_buf *_sjbuf = &(env); ((((*_sjbuf)[_SAVEMASK]) ? __SIGMASK_FUNC (SIG_SETMASK, (sigset_t *)((*_sjbuf) + _SIGMASK), 0) : 0), longjmp (*_sjbuf, val)); })
9502extern void _longjmp (jmp_buf, int) __attribute__ ((__noreturn__));
9503extern int _setjmp (jmp_buf);
9504
9505void longjmp (jmp_buf __jmpb, int __retval)
9506 __attribute__ ((__noreturn__));
9507int setjmp (jmp_buf __jmpb);
9508
9509#define RUBY_NSIG NSIG
9510#define RUBY_SIGCHLD (SIGCLD)
9511#define SIGCHLD_LOSSY (0)
9512#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
9513#define va_init_list(a,b) va_start((a),(b))
9514#define USE_SIGALTSTACK
9516#define RB_ALTSTACK_INIT(var) var = rb_register_sigaltstack()
9517#define RB_ALTSTACK_FREE(var) xfree(var)
9518#define RB_ALTSTACK(var) var
9520typedef unsigned long rb_num_t;
9521typedef signed long rb_snum_t;
9532 RUBY_TAG_MASK = 0xf
9534#define TAG_NONE RUBY_TAG_NONE
9535#define TAG_RETURN RUBY_TAG_RETURN
9536#define TAG_BREAK RUBY_TAG_BREAK
9537#define TAG_NEXT RUBY_TAG_NEXT
9538#define TAG_RETRY RUBY_TAG_RETRY
9539#define TAG_REDO RUBY_TAG_REDO
9540#define TAG_RAISE RUBY_TAG_RAISE
9541#define TAG_THROW RUBY_TAG_THROW
9542#define TAG_FATAL RUBY_TAG_FATAL
9543#define TAG_MASK RUBY_TAG_MASK
9546 VM_THROW_STATE_MASK = 0xff
9548struct rb_thread_struct;
9555};
9558 size_t index;
9559};
9561 struct {
9567};
9571};
9575};
9579 int argc;
9581};
9585};
9588#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
9589#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
9598#define PATHOBJ_PATH 0
9599#define PATHOBJ_REALPATH 1
9600static inline VALUE
9601pathobj_path(VALUE pathobj)
9602{
9603 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
9604 return pathobj;
9605 }
9606 else {
9607 ((void)0);
9608 return (rb_array_const_ptr_transient(pathobj)[0]);
9609 }
9610}
9611static inline VALUE
9612pathobj_realpath(VALUE pathobj)
9613{
9614 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
9615 return pathobj;
9616 }
9617 else {
9618 ((void)0);
9619 return (rb_array_const_ptr_transient(pathobj)[1]);
9620 }
9621}
9622struct rb_mjit_unit;
9635 unsigned int iseq_size;
9637 struct {
9638 struct {
9639 unsigned int has_lead : 1;
9640 unsigned int has_opt : 1;
9641 unsigned int has_rest : 1;
9642 unsigned int has_post : 1;
9643 unsigned int has_kw : 1;
9644 unsigned int has_kwrest : 1;
9645 unsigned int has_block : 1;
9646 unsigned int ambiguous_param0 : 1;
9647 unsigned int accepts_no_kwarg : 1;
9648 unsigned int ruby2_keywords: 1;
9650 unsigned int size;
9658 const struct rb_iseq_param_keyword {
9659 int num;
9662 int rest_start;
9663 const ID *table;
9670 unsigned int *positions;
9671 unsigned int size;
9680 struct {
9686 unsigned int local_table_size;
9687 unsigned int is_size;
9688 unsigned int ci_size;
9689 unsigned int ci_kw_size;
9690 unsigned int stack_max;
9693 struct rb_control_frame_struct *);
9694 long unsigned total_calls;
9697};
9702 union {
9704 struct {
9708 struct {
9713};
9714#define USE_LAZY_LOAD 0
9715static inline const rb_iseq_t *
9716rb_iseq_check(const rb_iseq_t *iseq)
9717{
9718 return iseq;
9719}
9720static inline const rb_iseq_t *
9721def_iseq_ptr(rb_method_definition_t *def)
9722{
9723 return rb_iseq_check(def->body.iseq.iseqptr);
9724}
9763 BOP_LAST_
9765#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
9766struct rb_vm_struct;
9767typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
9768typedef struct rb_at_exit_list {
9772struct rb_objspace;
9773struct rb_objspace *rb_objspace_alloc(void);
9774void rb_objspace_free(struct rb_objspace *);
9776typedef struct rb_hook_list_struct {
9779 unsigned int need_clean;
9780 unsigned int running;
9782typedef const struct rb_builtin_function *RB_BUILTIN;
9783typedef struct rb_vm_struct {
9784 VALUE self;
9797 volatile int ubf_async_safe;
9798 unsigned int running: 1;
9801 unsigned int safe_level_: 1;
9814 struct {
9834 struct {
9842#define RUBY_VM_SIZE_ALIGN 4096
9843#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
9844#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
9845#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
9846#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
9847#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
9848#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
9849#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
9850#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
9851#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
9852#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
9853#define STRING_REDEFINED_OP_FLAG (1 << 2)
9854#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
9855#define HASH_REDEFINED_OP_FLAG (1 << 4)
9856#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
9857#define TIME_REDEFINED_OP_FLAG (1 << 7)
9858#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
9859#define NIL_REDEFINED_OP_FLAG (1 << 9)
9860#define TRUE_REDEFINED_OP_FLAG (1 << 10)
9861#define FALSE_REDEFINED_OP_FLAG (1 << 11)
9862#define PROC_REDEFINED_OP_FLAG (1 << 12)
9863#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
9864#define VM_DEBUG_BP_CHECK 0
9865#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
9867 VALUE self;
9868 const VALUE *ep;
9869 union {
9871 const struct vm_ifunc *ifunc;
9874};
9887struct rb_block {
9888 union {
9894};
9896 const VALUE *pc;
9899 VALUE self;
9900 const VALUE *ep;
9901 const void *block_code;
9905static inline struct rb_thread_struct *
9906rb_thread_ptr(VALUE thval)
9907{
9909}
9916typedef void *rb_jmpbuf_t[5];
9923};
9924_Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0");
9925_Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)");
9928};
9931 void *arg;
9932};
9933struct rb_mutex_struct;
9938typedef struct rb_ensure_entry {
9943typedef struct rb_ensure_list {
9947typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
9971 struct {
9975 __attribute__((aligned(8))) jmp_buf regs;
9978#define VM_CORE_H_EC_DEFINED 1
9979void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
9982typedef struct rb_thread_struct {
9983 struct list_node vmlt_node;
9984 VALUE self;
9993 unsigned int to_kill : 1;
9994 unsigned int abort_on_exception: 1;
9995 unsigned int report_on_exception: 1;
10006 struct rb_unblock_callback unblock;
10010 union {
10011 struct {
10015 } proc;
10016 struct {
10017 VALUE (*func)(void *);
10018 void *arg;
10019 } func;
10020 } invoke_arg;
10021 enum {
10022 thread_invoke_type_none = 0,
10024 thread_invoke_type_func
10025 } invoke_type;
10031typedef enum {
10037#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
10038#define VM_DEFINECLASS_FLAG_SCOPED 0x08
10039#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
10040#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
10041#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
10042
10043#pragma GCC visibility push(default)
10044
10045rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
10049 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
10050struct iseq_link_anchor;
10054 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *);
10055 const void *data;
10056};
10057static inline struct rb_iseq_new_with_callback_callback_func *
10058rb_iseq_new_with_callback_new_callback(
10059 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr)
10060{
10062 return (struct rb_iseq_new_with_callback_callback_func *)memo;
10063}
10065 VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
10066 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
10068int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
10070extern VALUE rb_cISeq;
10071extern VALUE rb_cRubyVM;
10074
10075#pragma GCC visibility pop
10076
10077#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
10078typedef struct {
10079 const struct rb_block block;
10080 unsigned int is_from_method: 1;
10081 unsigned int is_lambda: 1;
10082} rb_proc_t;
10083typedef struct {
10086 const VALUE *ep;
10087 const VALUE *env;
10088 unsigned int env_size;
10089} rb_env_t;
10091#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
10092typedef struct {
10093 const struct rb_block block;
10095 unsigned short first_lineno;
10096} rb_binding_t;
10102#define VM_CHECKMATCH_TYPE_MASK 0x03
10103#define VM_CHECKMATCH_ARRAY 0x04
10119#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
10120#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
10121#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
10122#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
10123#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
10124#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
10125#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
10126#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
10127#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
10128#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
10129#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
10130#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
10145typedef struct rb_call_info *CALL_INFO;
10147typedef struct rb_call_data *CALL_DATA;
10149typedef rb_control_frame_t *
10151#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
10152#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
10153#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
10154#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
10155#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
10156enum {
10179#define VM_ENV_DATA_SIZE ( 3)
10180#define VM_ENV_DATA_INDEX_ME_CREF (-2)
10181#define VM_ENV_DATA_INDEX_SPECVAL (-1)
10182#define VM_ENV_DATA_INDEX_FLAGS ( 0)
10183#define VM_ENV_DATA_INDEX_ENV ( 1)
10184#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
10185static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
10186static inline void
10187VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
10188{
10189 VALUE flags = ep[( 0)];
10190 ((void)0);
10191 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
10192}
10193static inline void
10194VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
10195{
10196 VALUE flags = ep[( 0)];
10197 ((void)0);
10198 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
10199}
10200static inline unsigned long
10201VM_ENV_FLAGS(const VALUE *ep, long flag)
10202{
10203 VALUE flags = ep[( 0)];
10204 ((void)0);
10205 return flags & flag;
10206}
10207static inline unsigned long
10208VM_FRAME_TYPE(const rb_control_frame_t *cfp)
10209{
10210 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
10211}
10212static inline int
10213VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
10214{
10215 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
10216}
10217static inline int
10218VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp)
10219{
10220 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0;
10221}
10222static inline int
10223VM_FRAME_CFRAME_EMPTY_KW_P(const rb_control_frame_t *cfp)
10224{
10225 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_EMPTY_KW) != 0;
10226}
10227static inline int
10228VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
10229{
10230 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
10231}
10232static inline int
10233VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
10234{
10235 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
10236}
10237static inline int
10238rb_obj_is_iseq(VALUE iseq)
10239{
10240 return imemo_type_p(iseq, imemo_iseq);
10241}
10242static inline int
10243VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
10244{
10245 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
10246 ((void)0);
10247 return cframe_p;
10248}
10249static inline int
10250VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
10251{
10252 return !VM_FRAME_CFRAME_P(cfp);
10253}
10254#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
10255#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
10256#define VM_BLOCK_HANDLER_NONE 0
10257static inline int
10258VM_ENV_LOCAL_P(const VALUE *ep)
10259{
10260 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
10261}
10262static inline const VALUE *
10263VM_ENV_PREV_EP(const VALUE *ep)
10264{
10265 ((void)0);
10266 return ((void *)(((ep[(-1)])) & ~0x03));
10267}
10268static inline VALUE
10269VM_ENV_BLOCK_HANDLER(const VALUE *ep)
10270{
10271 ((void)0);
10272 return ep[(-1)];
10273}
10274static inline int
10275VM_ENV_ESCAPED_P(const VALUE *ep)
10276{
10277 ((void)0);
10278 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
10279}
10280static inline VALUE
10281VM_ENV_ENVVAL(const VALUE *ep)
10282{
10283 VALUE envval = ep[( 1)];
10284 ((void)0);
10285 ((void)0);
10286 return envval;
10287}
10288static inline const rb_env_t *
10289VM_ENV_ENVVAL_PTR(const VALUE *ep)
10290{
10291 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
10292}
10293static inline const rb_env_t *
10294vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
10295{
10296 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
10297 env->env_size = env_size;
10298 env_ep[( 1)] = (VALUE)env;
10299 return env;
10300}
10301static inline void
10302VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
10303{
10304 *((VALUE *)ptr) = v;
10305}
10306static inline void
10307VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
10308{
10309 ((void)0);
10310 VM_FORCE_WRITE(ptr, special_const_value);
10311}
10312static inline void
10313VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
10314{
10315 ((void)0);
10316 VM_FORCE_WRITE(&ep[index], v);
10317}
10318const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
10319const VALUE *rb_vm_proc_local_ep(VALUE proc);
10320void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
10321void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);
10323#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
10324#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
10325#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
10326static inline const rb_control_frame_t *
10327RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
10328{
10329 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
10330}
10331static inline int
10332RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
10333{
10334 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
10335}
10336static inline int
10337VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
10338{
10339 if ((block_handler & 0x03) == 0x01) {
10340 return 1;
10341 }
10342 else {
10343 return 0;
10344 }
10345}
10346static inline VALUE
10347VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
10348{
10349 VALUE block_handler = ((VALUE)(captured) | (0x01));
10350 ((void)0);
10351 return block_handler;
10352}
10353static inline const struct rb_captured_block *
10354VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
10355{
10356 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10357 ((void)0);
10358 return captured;
10359}
10360static inline int
10361VM_BH_IFUNC_P(VALUE block_handler)
10362{
10363 if ((block_handler & 0x03) == 0x03) {
10364 return 1;
10365 }
10366 else {
10367 return 0;
10368 }
10369}
10370static inline VALUE
10371VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
10372{
10373 VALUE block_handler = ((VALUE)(captured) | (0x03));
10374 ((void)0);
10375 return block_handler;
10376}
10377static inline const struct rb_captured_block *
10378VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
10379{
10380 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10381 ((void)0);
10382 return captured;
10383}
10384static inline const struct rb_captured_block *
10385VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
10386{
10387 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
10388 ((void)0);
10389 return captured;
10390}
10391static inline enum rb_block_handler_type
10392vm_block_handler_type(VALUE block_handler)
10393{
10394 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
10396 }
10397 else if (VM_BH_IFUNC_P(block_handler)) {
10399 }
10400 else if (((((VALUE)(block_handler)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_handler) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_handler) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_handler))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
10402 }
10403 else {
10404 ((void)0);
10406 }
10407}
10408static inline void
10409vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
10410{
10411 ((void)0);
10412}
10413static inline int
10414vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler)
10415{
10416 return ((VALUE) cfp->block_code) == block_handler;
10417}
10418static inline enum rb_block_type
10419vm_block_type(const struct rb_block *block)
10420{
10421 return block->type;
10422}
10423static inline void
10424vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
10425{
10426 struct rb_block *mb = (struct rb_block *)block;
10427 mb->type = type;
10428}
10429static inline const struct rb_block *
10430vm_proc_block(VALUE procval)
10431{
10432 ((void)0);
10433 return &((rb_proc_t *)(((struct RTypedData*)(procval))->data))->block;
10434}
10435static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
10436static inline const VALUE *vm_block_ep(const struct rb_block *block);
10437static inline const rb_iseq_t *
10438vm_proc_iseq(VALUE procval)
10439{
10440 return vm_block_iseq(vm_proc_block(procval));
10441}
10442static inline const VALUE *
10443vm_proc_ep(VALUE procval)
10444{
10445 return vm_block_ep(vm_proc_block(procval));
10446}
10447static inline const rb_iseq_t *
10448vm_block_iseq(const struct rb_block *block)
10449{
10450 switch (vm_block_type(block)) {
10451 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
10452 case block_type_proc: return vm_proc_iseq(block->as.proc);
10453 case block_type_ifunc:
10454 case block_type_symbol: return ((void *)0);
10455 }
10456 __builtin_unreachable();
10457 return ((void *)0);
10458}
10459static inline const VALUE *
10460vm_block_ep(const struct rb_block *block)
10461{
10462 switch (vm_block_type(block)) {
10463 case block_type_iseq:
10464 case block_type_ifunc: return block->as.captured.ep;
10465 case block_type_proc: return vm_proc_ep(block->as.proc);
10466 case block_type_symbol: return ((void *)0);
10467 }
10468 __builtin_unreachable();
10469 return ((void *)0);
10470}
10471static inline VALUE
10472vm_block_self(const struct rb_block *block)
10473{
10474 switch (vm_block_type(block)) {
10475 case block_type_iseq:
10476 case block_type_ifunc:
10477 return block->as.captured.self;
10478 case block_type_proc:
10479 return vm_block_self(vm_proc_block(block->as.proc));
10480 case block_type_symbol:
10481 return ((VALUE)RUBY_Qundef);
10482 }
10483 __builtin_unreachable();
10484 return ((VALUE)RUBY_Qundef);
10485}
10486static inline VALUE
10487VM_BH_TO_SYMBOL(VALUE block_handler)
10488{
10489 ((void)0);
10490 return block_handler;
10491}
10492static inline VALUE
10493VM_BH_FROM_SYMBOL(VALUE symbol)
10494{
10495 ((void)0);
10496 return symbol;
10497}
10498static inline VALUE
10499VM_BH_TO_PROC(VALUE block_handler)
10500{
10501 ((void)0);
10502 return block_handler;
10503}
10504static inline VALUE
10505VM_BH_FROM_PROC(VALUE procval)
10506{
10507 ((void)0);
10508 return procval;
10509}
10513VALUE rb_proc_dup(VALUE self);
10515extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
10517);
10518#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
10519#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
10520void rb_vm_bugreport(const void *);
10522__attribute__ ((__noreturn__)) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...);
10523
10524#pragma GCC visibility push(default)
10525
10530
10531#pragma GCC visibility pop
10532
10535int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
10536void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
10539static inline VALUE
10540rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
10541{
10542 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
10543}
10544static inline VALUE
10545rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
10546{
10547 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
10548}
10552const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
10554void rb_vm_gvl_destroy(rb_vm_t *vm);
10556 const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
10557static void rb_vm_pop_frame(rb_execution_context_t *ec);
10562static inline void
10563rb_vm_living_threads_init(rb_vm_t *vm)
10564{
10565 list_head_init(&vm->waiting_fds);
10566 list_head_init(&vm->waiting_pids);
10567 list_head_init(&vm->workqueue);
10568 list_head_init(&vm->waiting_grps);
10569 list_head_init(&vm->living_threads);
10570 vm->living_thread_num = 0;
10571}
10572static inline void
10573rb_vm_living_threads_insert(rb_vm_t *vm, rb_thread_t *th)
10574{
10575 list_add_tail_(&vm->living_threads, &th->vmlt_node, "../ruby-2.7.6/vm_core.h" ":" "1703");
10576 vm->living_thread_num++;
10577}
10578static inline void
10579rb_vm_living_threads_remove(rb_vm_t *vm, rb_thread_t *th)
10580{
10581 list_del_(&th->vmlt_node, "../ruby-2.7.6/vm_core.h" ":" "1710");
10582 vm->living_thread_num--;
10583}
10584typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
10590int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
10592static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
10593void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
10594#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
10596void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
10597static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
10598#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
10599#define RUBY_CONST_ASSERT(expr) (1/!!(expr))
10600#define VM_STACK_OVERFLOWED_P(cfp,sp,margin) (!RUBY_CONST_ASSERT(sizeof(*(sp)) == sizeof(VALUE)) || !RUBY_CONST_ASSERT(sizeof(*(cfp)) == sizeof(rb_control_frame_t)) || ((rb_control_frame_t *)((sp) + (margin)) + 1) >= (cfp))
10601#define WHEN_VM_STACK_OVERFLOWED(cfp,sp,margin) if (LIKELY(!VM_STACK_OVERFLOWED_P(cfp, sp, margin))) {(void)0;} else
10602#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin) vm_stackoverflow()
10603#define CHECK_VM_STACK_OVERFLOW(cfp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stackoverflow()
10604VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
10605
10606#pragma GCC visibility push(default)
10607
10612extern unsigned int ruby_vm_event_local_num;
10613
10614#pragma GCC visibility pop
10615
10616#define GET_VM() rb_current_vm()
10617#define GET_THREAD() rb_current_thread()
10618#define GET_EC() rb_current_execution_context()
10619static inline rb_thread_t *
10620rb_ec_thread_ptr(const rb_execution_context_t *ec)
10621{
10622 return ec->thread_ptr;
10623}
10624static inline rb_vm_t *
10625rb_ec_vm_ptr(const rb_execution_context_t *ec)
10626{
10627 const rb_thread_t *th = rb_ec_thread_ptr(ec);
10628 if (th) {
10629 return th->vm;
10630 }
10631 else {
10632 return ((void *)0);
10633 }
10634}
10635static inline rb_execution_context_t *
10636rb_current_execution_context(void)
10637{
10639}
10640static inline rb_thread_t *
10641rb_current_thread(void)
10642{
10643 const rb_execution_context_t *ec = rb_current_execution_context();
10644 return rb_ec_thread_ptr(ec);
10645}
10646static inline rb_vm_t *
10647rb_current_vm(void)
10648{
10649 ((void)0);
10650 return ruby_current_vm_ptr;
10651}
10652static inline void
10653rb_thread_set_current_raw(const rb_thread_t *th)
10654{
10656}
10657static inline void
10658rb_thread_set_current(rb_thread_t *th)
10659{
10660 if (th->vm->running_thread != th) {
10661 th->running_time_us = 0;
10662 }
10663 rb_thread_set_current_raw(th);
10664 th->vm->running_thread = th;
10665}
10666enum {
10670 TRAP_INTERRUPT_MASK = 0x08
10672#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
10673#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
10674#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
10675#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
10676#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
10677#define RUBY_VM_INTERRUPTED_ANY(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
10679int rb_signal_buff_size(void);
10680int rb_signal_exec(rb_thread_t *th, int sig);
10690void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
10693void rb_fiber_close(rb_fiber_t *fib);
10695#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
10696static inline void
10697rb_vm_check_ints(rb_execution_context_t *ec)
10698{
10699 ((void)0);
10700 if ((__builtin_expect(!!(((ec)->interrupt_flag & ~(ec)->interrupt_mask)), 0))) {
10701 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
10702 }
10703}
10708 VALUE self;
10716};
10719void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
10721void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
10722#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
10723static inline void
10724rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
10725 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
10726{
10728 ((void)0);
10729 trace_arg.event = flag;
10730 trace_arg.ec = ec;
10731 trace_arg.cfp = ec->cfp;
10732 trace_arg.self = self;
10733 trace_arg.id = id;
10739 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
10740}
10741static inline rb_hook_list_t *
10742rb_vm_global_hooks(const rb_execution_context_t *ec)
10743{
10744 return &rb_ec_vm_ptr(ec)->global_hooks;
10745}
10746#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
10747#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
10748static inline void
10749rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
10750{
10751 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, !((VALUE)(eval_script) != ((VALUE)RUBY_Qnil)) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0);
10752}
10753void rb_vm_trap_exit(rb_vm_t *vm);
10754
10755#pragma GCC visibility push(default)
10756
10758#define RUBY_EVENT_COVERAGE_LINE 0x010000
10759#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
10760extern VALUE rb_get_coverages(void);
10761extern void rb_set_coverages(VALUE, int, VALUE);
10762extern void rb_clear_coverages(void);
10763extern void rb_reset_coverages(void);
10765
10766#pragma GCC visibility pop
10767
10768#define RUBY_DEBUG_H
10769
10770#pragma GCC visibility push(default)
10771
10772#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
10773#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
10774#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
10775#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
10776VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
10777ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
10778NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
10779int ruby_debug_print_indent(int level, int debug_level, int indent_level);
10781void ruby_set_debug_option(const char *str);
10782
10783#pragma GCC visibility pop
10784
10785#define RUBY_ISEQ_H 1
10786extern const int ruby_api_version[];
10787#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
10788#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
10789extern const ID rb_iseq_shared_exc_local_tbl[];
10790static inline size_t
10791rb_call_info_kw_arg_bytes(int keyword_len)
10792{
10794 keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg),
10796}
10797#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
10798#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
10799#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
10800#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
10801#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
10802#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
10803#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
10804static inline rb_snum_t
10805ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
10806{
10809 return cnt;
10810}
10811static inline VALUE *
10812ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
10813{
10815}
10816static inline void
10817ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
10818{
10820 iseq->body->variable.original_iseq = ((void *)0);
10821 if (ptr) {
10822 ruby_xfree(ptr);
10823 }
10824}
10825static inline VALUE *
10826ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
10827{
10828 return iseq->body->variable.original_iseq =
10829 ((VALUE*)ruby_xmalloc2((size_t)(size),sizeof(VALUE)));
10830}
10831#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
10832#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
10833#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
10834#define ISEQ_TRANSLATED IMEMO_FL_USER3
10835#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
10836#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
10845 struct {
10848 } node;
10849 struct {
10850 struct iseq_compile_data_storage *storage_head;
10851 struct iseq_compile_data_storage *storage_current;
10852 } insn;
10857 unsigned int ci_index;
10858 unsigned int ci_kw_index;
10862};
10863static inline struct iseq_compile_data *
10864ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
10865{
10866 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
10867 return iseq->aux.compile_data;
10868 }
10869 else {
10870 return ((void *)0);
10871 }
10872}
10873static inline void
10874ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
10875{
10876 iseq->aux.compile_data = (((struct iseq_compile_data*)ruby_xcalloc((size_t)(1),sizeof(struct iseq_compile_data))));
10877 iseq->flags |= ((VALUE)RUBY_FL_USER6);
10878}
10879static inline void
10880ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
10881{
10882 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
10883 iseq->aux.compile_data = ((void *)0);
10884}
10885static inline rb_iseq_t *
10886iseq_imemo_alloc(void)
10887{
10888 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
10889}
10893const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
10896int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
10898const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
10899unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
10900
10901#pragma GCC visibility push(default)
10902
10907 VALUE locals, VALUE args,
10908 VALUE exception, VALUE body);
10910VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
10911VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
10912unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
10913void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
10914void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
10918const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
10924void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
10926const rb_iseq_t *rb_method_iseq(VALUE body);
10927const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
10929 unsigned int inline_const_cache: 1;
10930 unsigned int peephole_optimization: 1;
10931 unsigned int tailcall_optimization: 1;
10933 unsigned int operands_unification: 1;
10935 unsigned int stack_caching: 1;
10936 unsigned int frozen_string_literal: 1;
10938 unsigned int coverage_enabled: 1;
10940};
10944};
10947 CATCH_TYPE_RESCUE = (((VALUE)(1))<<1 | RUBY_FIXNUM_FLAG),
10948 CATCH_TYPE_ENSURE = (((VALUE)(2))<<1 | RUBY_FIXNUM_FLAG),
10949 CATCH_TYPE_RETRY = (((VALUE)(3))<<1 | RUBY_FIXNUM_FLAG),
10950 CATCH_TYPE_BREAK = (((VALUE)(4))<<1 | RUBY_FIXNUM_FLAG),
10951 CATCH_TYPE_REDO = (((VALUE)(5))<<1 | RUBY_FIXNUM_FLAG),
10952 CATCH_TYPE_NEXT = (((VALUE)(6))<<1 | RUBY_FIXNUM_FLAG)
10955 unsigned int start;
10956 unsigned int end;
10957 unsigned int cont;
10958 unsigned int sp;
10959};
10960struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed));
10961static inline int
10962iseq_catch_table_bytes(int n)
10963{
10964 enum {
10965 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
10966 catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size
10967 };
10968 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
10969 return (int)(__builtin_offsetof (struct iseq_catch_table, entries) +
10970 n * catch_table_entry_size);
10971}
10972#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
10975 unsigned int pos;
10976 unsigned int size;
10977 char buff[];
10978};
11002
11003#pragma GCC visibility pop
11004
11005#define RUBY_EVAL_INTERN_H
11006static inline void
11007vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
11008{
11009 vm_block_handler_verify(block_handler);
11011}
11012static inline void
11013pass_passed_block_handler(rb_execution_context_t *ec)
11014{
11016 vm_passed_block_handler_set(ec, block_handler);
11017 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
11018}
11019#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
11020#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
11021#define ruby_setjmp(env) RUBY_SETJMP(env)
11022#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
11023int _setjmp(jmp_buf);
11024__attribute__ ((__noreturn__)) void _longjmp(jmp_buf, int);
11025#define __ERRNO_H__
11026typedef int error_t;
11027#define __error_t_defined 1
11028#define _SYS_ERRNO_H_
11029#define errno (*__errno())
11030extern int *__errno (void);
11031extern __attribute__((dllimport)) const char * const _sys_errlist[];
11032extern __attribute__((dllimport)) int _sys_nerr;
11033extern __attribute__((dllimport)) const char * const sys_errlist[];
11034extern __attribute__((dllimport)) int sys_nerr;
11035extern __attribute__((dllimport)) char *program_invocation_name;
11036extern __attribute__((dllimport)) char *program_invocation_short_name;
11037#define __errno_r(ptr) ((ptr)->_errno)
11038#define EPERM 1
11039#define ENOENT 2
11040#define ESRCH 3
11041#define EINTR 4
11042#define EIO 5
11043#define ENXIO 6
11044#define E2BIG 7
11045#define ENOEXEC 8
11046#define EBADF 9
11047#define ECHILD 10
11048#define EAGAIN 11
11049#define ENOMEM 12
11050#define EACCES 13
11051#define EFAULT 14
11052#define ENOTBLK 15
11053#define EBUSY 16
11054#define EEXIST 17
11055#define EXDEV 18
11056#define ENODEV 19
11057#define ENOTDIR 20
11058#define EISDIR 21
11059#define EINVAL 22
11060#define ENFILE 23
11061#define EMFILE 24
11062#define ENOTTY 25
11063#define ETXTBSY 26
11064#define EFBIG 27
11065#define ENOSPC 28
11066#define ESPIPE 29
11067#define EROFS 30
11068#define EMLINK 31
11069#define EPIPE 32
11070#define EDOM 33
11071#define ERANGE 34
11072#define ENOMSG 35
11073#define EIDRM 36
11074#define ECHRNG 37
11075#define EL2NSYNC 38
11076#define EL3HLT 39
11077#define EL3RST 40
11078#define ELNRNG 41
11079#define EUNATCH 42
11080#define ENOCSI 43
11081#define EL2HLT 44
11082#define EDEADLK 45
11083#define ENOLCK 46
11084#define EBADE 50
11085#define EBADR 51
11086#define EXFULL 52
11087#define ENOANO 53
11088#define EBADRQC 54
11089#define EBADSLT 55
11090#define EDEADLOCK 56
11091#define EBFONT 57
11092#define ENOSTR 60
11093#define ENODATA 61
11094#define ETIME 62
11095#define ENOSR 63
11096#define ENONET 64
11097#define ENOPKG 65
11098#define EREMOTE 66
11099#define ENOLINK 67
11100#define EADV 68
11101#define ESRMNT 69
11102#define ECOMM 70
11103#define EPROTO 71
11104#define EMULTIHOP 74
11105#define ELBIN 75
11106#define EDOTDOT 76
11107#define EBADMSG 77
11108#define EFTYPE 79
11109#define ENOTUNIQ 80
11110#define EBADFD 81
11111#define EREMCHG 82
11112#define ELIBACC 83
11113#define ELIBBAD 84
11114#define ELIBSCN 85
11115#define ELIBMAX 86
11116#define ELIBEXEC 87
11117#define ENOSYS 88
11118#define ENMFILE 89
11119#define ENOTEMPTY 90
11120#define ENAMETOOLONG 91
11121#define ELOOP 92
11122#define EOPNOTSUPP 95
11123#define EPFNOSUPPORT 96
11124#define ECONNRESET 104
11125#define ENOBUFS 105
11126#define EAFNOSUPPORT 106
11127#define EPROTOTYPE 107
11128#define ENOTSOCK 108
11129#define ENOPROTOOPT 109
11130#define ESHUTDOWN 110
11131#define ECONNREFUSED 111
11132#define EADDRINUSE 112
11133#define ECONNABORTED 113
11134#define ENETUNREACH 114
11135#define ENETDOWN 115
11136#define ETIMEDOUT 116
11137#define EHOSTDOWN 117
11138#define EHOSTUNREACH 118
11139#define EINPROGRESS 119
11140#define EALREADY 120
11141#define EDESTADDRREQ 121
11142#define EMSGSIZE 122
11143#define EPROTONOSUPPORT 123
11144#define ESOCKTNOSUPPORT 124
11145#define EADDRNOTAVAIL 125
11146#define ENETRESET 126
11147#define EISCONN 127
11148#define ENOTCONN 128
11149#define ETOOMANYREFS 129
11150#define EPROCLIM 130
11151#define EUSERS 131
11152#define EDQUOT 132
11153#define ESTALE 133
11154#define ENOTSUP 134
11155#define ENOMEDIUM 135
11156#define ENOSHARE 136
11157#define ECASECLASH 137
11158#define EILSEQ 138
11159#define EOVERFLOW 139
11160#define ECANCELED 140
11161#define ENOTRECOVERABLE 141
11162#define EOWNERDEAD 142
11163#define ESTRPIPE 143
11164#define EWOULDBLOCK EAGAIN
11165#define __ELASTERROR 2000
11166#define _SYS_PARAM_H
11167#define __need_NULL
11168#undef __need_ptrdiff_t
11169#undef __need_size_t
11170#undef __need_wchar_t
11171#undef NULL
11172#define NULL ((void *)0)
11173#undef __need_NULL
11174#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
11175#define NOFILE 8192
11176#define NGROUPS NGROUPS_MAX
11177#define HZ 1000
11178#define MAXHOSTNAMELEN 128
11179#define MAXPATHLEN PATH_MAX
11180#define MAXSYMLINKS SYMLOOP_MAX
11181#define DEV_BSIZE 1024
11182#define NBBY 8
11183#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
11184#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
11185#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
11186#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
11187#define howmany(x,y) (((x)+((y)-1))/(y))
11188#define rounddown(x,y) (((x)/(y))*(y))
11189#define roundup(x,y) ((((x)+((y)-1))/(y))*(y))
11190#define roundup2(x,y) (((x)+((y)-1))&(~((y)-1)))
11191#define powerof2(x) ((((x)-1)&(x))==0)
11192#define MIN(a,b) (((a)<(b))?(a):(b))
11193#define MAX(a,b) (((a)>(b))?(a):(b))
11194#define SAVE_ROOT_JMPBUF_BEFORE_STMT
11195#define SAVE_ROOT_JMPBUF_AFTER_STMT
11196#define SAVE_ROOT_JMPBUF(th,stmt) 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)
11197#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag;
11198#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
11199#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
11200#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
11201#define VAR_FROM_MEMORY(var) (var)
11202#define VAR_INITIALIZED(var) ((void)&(var))
11203#define VAR_NOCLOBBERED(var) var
11204static inline int
11205rb_ec_tag_state(const rb_execution_context_t *ec)
11206{
11207 enum ruby_tag_type state = ec->tag->state;
11208 ec->tag->state = RUBY_TAG_NONE;
11209 return state;
11210}
11211__attribute__ ((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
11212static inline void
11213rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
11214{
11215 ec->tag->state = st;
11216 __builtin_longjmp(((ec->tag->buf)),(1));
11217}
11218#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
11219#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
11220#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
11221#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
11222#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
11223static inline VALUE
11224CREF_CLASS(const rb_cref_t *cref)
11225{
11226 return cref->klass;
11227}
11228static inline rb_cref_t *
11229CREF_NEXT(const rb_cref_t *cref)
11230{
11231 return cref->next;
11232}
11233static inline const rb_scope_visibility_t *
11234CREF_SCOPE_VISI(const rb_cref_t *cref)
11235{
11236 return &cref->scope_visi;
11237}
11238static inline VALUE
11239CREF_REFINEMENTS(const rb_cref_t *cref)
11240{
11241 return cref->refinements;
11242}
11243static inline void
11244CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
11245{
11246 __extension__({
11247#pragma GCC diagnostic push
11248 ;
11249#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
11250 ; typeof(rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "../ruby-2.7.6/eval_intern.h", 220)) unaligned_member_access_result = (rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "../ruby-2.7.6/eval_intern.h", 220));
11251#pragma GCC diagnostic pop
11252 ; unaligned_member_access_result; });
11253}
11254static inline int
11255CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
11256{
11257 return cref->flags & ((VALUE)RUBY_FL_USER5);
11258}
11259static inline void
11260CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
11261{
11262 cref->flags |= ((VALUE)RUBY_FL_USER5);
11263}
11264static inline int
11265CREF_OMOD_SHARED(const rb_cref_t *cref)
11266{
11267 return cref->flags & ((VALUE)RUBY_FL_USER6);
11268}
11269static inline void
11270CREF_OMOD_SHARED_SET(rb_cref_t *cref)
11271{
11272 cref->flags |= ((VALUE)RUBY_FL_USER6);
11273}
11274static inline void
11275CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
11276{
11277 cref->flags &= ~((VALUE)RUBY_FL_USER6);
11278}
11279enum {
11282 RAISED_NOMEMORY = 4
11284#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
11285#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
11286#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
11287#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
11291VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
11293__attribute__ ((__noreturn__)) void rb_method_name_error(VALUE, VALUE);
11294__attribute__ ((__noreturn__)) void rb_fiber_start(void);
11296__attribute__ ((__noreturn__)) void rb_print_undef_str(VALUE, VALUE);
11298__attribute__ ((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int);
11299__attribute__ ((__noreturn__)) void rb_vm_jump_tag_but_local_jump(int);
11301rb_cref_t *rb_vm_cref(void);
11304void rb_vm_set_progname(VALUE filename);
11305void rb_thread_terminate_all(void);
11306VALUE rb_vm_cbase(void);
11308VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
11310#define CharNext(p) rb_char_next(p)
11311static inline const char *
11312rb_char_next(const char *p)
11313{
11314 if (p) {
11315 int len = mblen(p, 0x7fffffff);
11316 p += len > 0 ? len : 1;
11317 }
11318 return p;
11319}
11320static inline void
11321translit_char(char *p, int from, int to)
11322{
11323 while (*p) {
11324 if ((unsigned char)*p == from)
11325 *p = to;
11326 p = rb_char_next(p);
11327 }
11328}
11329#define BUILTIN_H_INCLUDED
11331 const void * const func_ptr;
11332 const int argc;
11333 const int index;
11334 const char * const name;
11335};
11336#define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i }
11337void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
11338static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
11339static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
11340static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
11341static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
11342static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
11343static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11344static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11345static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11346static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11347static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11348static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11349static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11350static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11351static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11352static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11353static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
11355__attribute__ ((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index);
11356static inline VALUE
11357rb_vm_lvar(rb_execution_context_t *ec, int index)
11358{
11359 return ec->cfp->ep[index];
11360}
11362 const char *feature;
11363 const unsigned char *bin;
11364 size_t bin_size;
11365};
11366#define _PROBES_H
11367#define DTRACE_PROBES_DISABLED 1
11368#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
11369#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
11370#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
11371#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
11372#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
11373#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
11374#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
11375#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
11376#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
11377#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
11378#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
11379#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
11380#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
11381#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
11382#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
11383#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
11384#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
11385#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
11386#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
11387#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
11388#define RUBY_DTRACE_RAISE_ENABLED() 0
11389#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
11390#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
11391#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
11392#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
11393#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
11394#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
11395#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
11396#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
11397#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
11398#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
11399#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
11400#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
11401#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
11402#define RUBY_DTRACE_PARSE_END_ENABLED() 0
11403#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
11404#define RUBY_DTRACE_INSN_ENABLED() 0
11405#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
11406#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
11407#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
11408#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
11409#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
11410#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
11411#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
11412#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
11413#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
11414#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
11415#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
11416#define RUBY_DTRACE_METHOD_CACHE_CLEAR_ENABLED() 0
11417#define RUBY_DTRACE_METHOD_CACHE_CLEAR(class,filename,lineno) do {} while (0)
11418#define RUBY_PROBES_HELPER_H
11420 const char *classname;
11421 const char *methodname;
11422 const char *filename;
11424 volatile VALUE klass;
11425 volatile VALUE name;
11426};
11428#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
11429#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
11430#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
11431#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
11432#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
11433VALUE rb_str_concat_literals(size_t, const VALUE*);
11434__attribute__ ((__visibility__("default"))) extern
11436__attribute__ ((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
11437static inline const VALUE *
11438VM_EP_LEP(const VALUE *ep)
11439{
11440 while (!VM_ENV_LOCAL_P(ep)) {
11441 ep = VM_ENV_PREV_EP(ep);
11442 }
11443 return ep;
11444}
11445static inline const rb_control_frame_t *
11446rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
11447{
11448 if (!ep) {
11449 return ((void *)0);
11450 }
11451 else {
11452 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
11453 while (cfp < eocfp) {
11454 if (cfp->ep == ep) {
11455 return cfp;
11456 }
11457 cfp = ((cfp)+1);
11458 }
11459 return ((void *)0);
11460 }
11461}
11462const VALUE *
11464{
11465 return VM_EP_LEP(ep);
11466}
11467__attribute__ ((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
11468static inline const VALUE *
11469VM_CF_LEP(const rb_control_frame_t * const cfp)
11470{
11471 return VM_EP_LEP(cfp->ep);
11472}
11473static inline const VALUE *
11474VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
11475{
11476 return VM_ENV_PREV_EP(cfp->ep);
11477}
11478__attribute__ ((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
11479static inline VALUE
11480VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
11481{
11482 const VALUE *ep = VM_CF_LEP(cfp);
11483 return VM_ENV_BLOCK_HANDLER(ep);
11484}
11485int
11487{
11488 return VM_FRAME_CFRAME_KW_P(cfp);
11489}
11490int
11492{
11493 return VM_FRAME_CFRAME_EMPTY_KW_P(cfp);
11494}
11495VALUE
11497{
11498 return VM_CF_BLOCK_HANDLER(cfp);
11499}
11500static struct rb_captured_block *
11501VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
11502{
11503 ((void)0);
11504 return (struct rb_captured_block *)&cfp->self;
11505}
11506static rb_control_frame_t *
11507VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
11508{
11509 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
11510 ((void)0);
11511 ((void)0);
11512 return cfp;
11513}
11514static int
11515VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
11516{
11517 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
11518 return ((void *)((block_handler) & ~0x03)) == captured;
11519}
11520static VALUE
11521vm_passed_block_handler(rb_execution_context_t *ec)
11522{
11524 ec->passed_block_handler = 0;
11525 vm_block_handler_verify(block_handler);
11526 return block_handler;
11527}
11528static rb_cref_t *
11529vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev)
11530{
11531 VALUE refinements = ((VALUE)RUBY_Qnil);
11532 int omod_shared = 0;
11533 rb_cref_t *cref;
11534 union {
11536 VALUE value;
11537 } scope_visi;
11538 scope_visi.visi.method_visi = visi;
11539 scope_visi.visi.module_func = module_func;
11540 if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) {
11541 refinements = CREF_REFINEMENTS(prev_cref);
11542 if (!!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
11543 omod_shared = 1;
11544 CREF_OMOD_SHARED_SET(prev_cref);
11545 }
11546 }
11547 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
11548 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
11549 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
11550 return cref;
11551}
11552static rb_cref_t *
11553vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
11554{
11555 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0);
11556}
11557static rb_cref_t *
11558vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
11559{
11560 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1);
11561}
11562static int
11563ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
11564{
11565 return ((((VALUE)(key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) ? ST_DELETE : ST_CONTINUE;
11566}
11567static rb_cref_t *
11568vm_cref_dup(const rb_cref_t *cref)
11569{
11570 VALUE klass = CREF_CLASS(cref);
11571 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
11572 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
11573 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
11574 new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
11575 if (!!((VALUE)(CREF_REFINEMENTS(cref)) != ((VALUE)RUBY_Qnil))) {
11576 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
11577 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
11578 CREF_REFINEMENTS_SET(new_cref, ref);
11579 CREF_OMOD_SHARED_UNSET(new_cref);
11580 }
11581 return new_cref;
11582}
11583static rb_cref_t *
11584vm_cref_new_toplevel(rb_execution_context_t *ec)
11585{
11586 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0);
11587 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
11588 if (top_wrapper) {
11589 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0);
11590 }
11591 return cref;
11592}
11593rb_cref_t *
11595{
11596 return vm_cref_new_toplevel(rb_current_execution_context());
11597}
11598static void
11599vm_cref_dump(const char *mesg, const rb_cref_t *cref)
11600{
11601 fprintf(((__getreent())->_stderr), "vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
11602 while (cref) {
11603 fprintf(((__getreent())->_stderr), "= cref| klass: %s\n", (!(((struct RBasic*)(rb_class_path(CREF_CLASS(cref))))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.ary : ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.heap.ptr));
11604 cref = CREF_NEXT(cref);
11605 }
11606}
11607void
11608rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
11609{
11610 *((const VALUE **)&dst->as.captured.ep) = ep;
11611 rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "../ruby-2.7.6/vm.c", 318);
11612}
11613static void
11614vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
11615{
11616 const rb_env_t *env = (rb_env_t *)envval;
11617 __extension__({
11618#pragma GCC diagnostic push
11619 ;
11620#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
11621 ; typeof(rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "../ruby-2.7.6/vm.c", 325)) unaligned_member_access_result = (rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "../ruby-2.7.6/vm.c", 325));
11622#pragma GCC diagnostic pop
11623 ; unaligned_member_access_result; });
11624 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
11625}
11626static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
11628 int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
11630static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
11631#define RUBY_MJIT_H 1
11632#define USE_DEBUG_COUNTER 0
11633#define RUBY_DEBUG_COUNTER_H 1
11635#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name,
11812#undef RB_DEBUG_COUNTER
11814#define RB_DEBUG_COUNTER_INC(type) ((void)0)
11815#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (cond)
11816#define RB_DEBUG_COUNTER_INC_IF(type,cond) (cond)
11817void rb_debug_counter_show_results(const char *msg);
11818
11819#pragma GCC visibility push(default)
11820
11821size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
11822void ruby_debug_counter_reset(void);
11823void ruby_debug_counter_show_at_exit(int enable);
11824
11825#pragma GCC visibility pop
11826
11834 char on;
11837 char debug;
11839 unsigned int wait;
11840 unsigned int min_calls;
11843};
11848};
11850
11851#pragma GCC visibility push(default)
11852
11853extern struct mjit_options mjit_opts;
11854extern _Bool mjit_call_p;
11859
11860#pragma GCC visibility pop
11861
11862extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname);
11863extern void mjit_init(const struct mjit_options *opts);
11864extern void mjit_gc_start_hook(void);
11865extern void mjit_gc_exit_hook(void);
11866extern void mjit_free_iseq(const rb_iseq_t *iseq);
11868extern void mjit_mark(void);
11869extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
11870extern void mjit_cont_free(struct mjit_cont *cont);
11871extern void mjit_add_class_serial(rb_serial_t class_serial);
11872extern void mjit_remove_class_serial(rb_serial_t class_serial);
11873#define JIT_ISEQ_SIZE_THRESHOLD 1000
11874static inline int
11875mjit_target_iseq_p(struct rb_iseq_constant_body *body)
11876{
11877 return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK)
11878 && body->iseq_size < 1000;
11879}
11880static inline VALUE
11881mjit_exec(rb_execution_context_t *ec)
11882{
11883 const rb_iseq_t *iseq;
11884 struct rb_iseq_constant_body *body;
11885 long unsigned total_calls;
11886 mjit_func_t func;
11887 if (!mjit_call_p)
11888 return ((VALUE)RUBY_Qundef);
11889 ((void)0);
11890 iseq = ec->cfp->iseq;
11891 body = iseq->body;
11892 total_calls = ++body->total_calls;
11893 func = body->jit_func;
11894 if ((__builtin_expect(!!((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC), 0))) {
11895 ((void)0);
11896 switch ((enum rb_mjit_iseq_func)func) {
11898 ((void)0);
11899 if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
11900 ((void)0);
11902 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
11903 return rb_mjit_wait_call(ec, body);
11904 }
11905 }
11906 return ((VALUE)RUBY_Qundef);
11908 ((void)0);
11909 return ((VALUE)RUBY_Qundef);
11911 ((void)0);
11912 return ((VALUE)RUBY_Qundef);
11913 default:
11914 break;
11915 }
11916 }
11917 ((void)0);
11918 ((void)0);
11919 return func(ec, ec->cfp);
11920}
11922#define RUBY_INSNHELPER_H
11923
11924#pragma GCC visibility push(default)
11925
11930
11931#pragma GCC visibility pop
11932
11933#define COLLECT_USAGE_INSN(insn)
11934#define COLLECT_USAGE_OPERAND(insn,n,op)
11935#define COLLECT_USAGE_REGISTER(reg,s)
11936#define PUSH(x) (SET_SV(x), INC_SP(1))
11937#define TOPN(n) (*(GET_SP()-(n)-1))
11938#define POPN(n) (DEC_SP(n))
11939#define POP() (DEC_SP(1))
11940#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
11941#define VM_REG_CFP (reg_cfp)
11942#define VM_REG_PC (VM_REG_CFP->pc)
11943#define VM_REG_SP (VM_REG_CFP->sp)
11944#define VM_REG_EP (VM_REG_CFP->ep)
11945#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
11946#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
11947#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
11948#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
11949#define GET_CURRENT_INSN() (*GET_PC())
11950#define GET_OPERAND(n) (GET_PC()[(n)])
11951#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
11952#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
11953#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
11954#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
11955#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
11956#define GET_LEP() (VM_EP_LEP(GET_EP()))
11957#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
11958#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
11959#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
11960#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
11961#define SET_SV(x) (*GET_SP() = (x))
11962#define GET_ISEQ() (GET_CFP()->iseq)
11963#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
11964#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
11965static inline void
11966CC_SET_FASTPATH(CALL_CACHE cc, vm_call_handler func, _Bool enabled)
11967{
11968 if ((__builtin_expect(!!(enabled), 1))) {
11969 cc->call = func;
11970 }
11971}
11972static inline void
11973CC_SET_ME(CALL_CACHE cc, const rb_callable_method_entry_t *me)
11974{
11975 cc->me = me;
11977}
11978#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
11979#define SETUP_CANARY()
11980#define CHECK_CANARY()
11981#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
11982#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
11983#define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
11984#define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
11985#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
11986#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
11987static inline struct vm_throw_data *
11988THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
11989{
11990 struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
11991 obj->throw_state = st;
11992 return obj;
11993}
11994static inline VALUE
11995THROW_DATA_VAL(const struct vm_throw_data *obj)
11996{
11997 ((void)0);
11998 return obj->throw_obj;
11999}
12000static inline const rb_control_frame_t *
12001THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
12002{
12003 ((void)0);
12004 return obj->catch_frame;
12005}
12006static inline int
12007THROW_DATA_STATE(const struct vm_throw_data *obj)
12008{
12009 ((void)0);
12010 return obj->throw_state;
12011}
12012static inline int
12013THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
12014{
12015 ((void)0);
12016 return obj->flags & ((VALUE)RUBY_FL_USER4);
12017}
12018static inline void
12019THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
12020{
12021 ((void)0);
12022 obj->catch_frame = cfp;
12023}
12024static inline void
12025THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
12026{
12027 ((void)0);
12028 obj->throw_state = st;
12029}
12030static inline void
12031THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
12032{
12033 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(obj)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(obj))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(obj)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO))) &&
12034 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
12035 obj->flags |= ((VALUE)RUBY_FL_USER4);
12036 }
12037}
12038#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
12039#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
12040#define IS_ARGS_KW_SPLAT(ci) ((ci)->flag & VM_CALL_KW_SPLAT)
12041#define IS_ARGS_KW_OR_KW_SPLAT(ci) ((ci)->flag & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
12042static _Bool
12043vm_call_iseq_optimizable_p(const struct rb_call_info *ci, const struct rb_call_cache *cc)
12044{
12045 return !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
12046 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED);
12047}
12048#define RUBY_VM_EXEC_H
12049typedef long OFFSET;
12050typedef unsigned long lindex_t;
12053#define debugs
12054#define DEBUG_ENTER_INSN(insn)
12055#define DEBUG_END_INSN()
12056#define throwdebug if(0)printf
12057#define LABEL(x) INSN_LABEL_ ##x
12058#define ELABEL(x) INSN_ELABEL_ ##x
12059#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
12060#define INSN_ENTRY_SIG(insn) if (0) fprintf(stderr, "exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, (reg_pc - reg_cfp->iseq->body->iseq_encoded), (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded));
12061#define INSN_DISPATCH_SIG(insn)
12062#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
12063#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
12064#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
12065#define INSN_DISPATCH() TC_DISPATCH(__START__) {
12066#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
12067#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
12068#define START_OF_ORIGINAL_INSN(x) start_of_ ##x:
12069#define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x;
12070#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
12071#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
12072#define SCREG(r) (reg_ ##r)
12073#define VM_DEBUG_STACKOVERFLOW 0
12074#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
12075#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
12076#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
12077#define BIN(n) YARVINSN_ ##n
12287#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE)
12288#define CONSTANT_H
12289typedef enum {
12296#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
12297#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
12298#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
12301 int line;
12308void rb_free_const_table(struct rb_id_table *tbl);
12313int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
12318 VALUE ivptr[];
12319};
12320struct st_table *rb_ivar_generic_ivtbl(void);
12322extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
12325 int argc, const VALUE *argv, int priv);
12326static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
12327static VALUE
12328ruby_vm_special_exception_copy(VALUE exc)
12329{
12330 VALUE e = rb_obj_alloc(rb_class_real((((struct RBasic*)(exc))->klass)));
12332 return e;
12333}
12334__attribute__ ((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int);
12335static void
12336ec_stack_overflow(rb_execution_context_t *ec, int setup)
12337{
12338 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
12340 if (setup) {
12342 mesg = ruby_vm_special_exception_copy(mesg);
12343 rb_ivar_set(mesg, idBt, at);
12344 rb_ivar_set(mesg, idBt_locations, at);
12345 }
12346 ec->errinfo = mesg;
12347 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
12348}
12349__attribute__ ((__noreturn__)) static void vm_stackoverflow(void);
12350static void
12351vm_stackoverflow(void)
12352{
12353 ec_stack_overflow(rb_current_execution_context(), 1);
12354}
12355__attribute__ ((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
12356static void
12358{
12359 if (crit || rb_during_gc()) {
12361 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
12362 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
12363 }
12364 ec_stack_overflow(ec, 1);
12365}
12366#define vm_check_canary(ec,sp)
12367#define vm_check_frame(a,b,c,d)
12368static inline rb_control_frame_t *
12369vm_push_frame(rb_execution_context_t *ec,
12370 const rb_iseq_t *iseq,
12371 VALUE type,
12372 VALUE self,
12373 VALUE specval,
12374 VALUE cref_or_me,
12375 const VALUE *pc,
12376 VALUE *sp,
12377 int local_size,
12378 int stack_max)
12379{
12380 rb_control_frame_t *const cfp = ((ec->cfp)-1);
12381 ;
12382 ((void)0);
12383 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*(sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)((sp) + (local_size + stack_max)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
12384 ;
12385 ec->cfp = cfp;
12386 cfp->pc = (VALUE *)pc;
12387 cfp->iseq = (rb_iseq_t *)iseq;
12388 cfp->self = self;
12389 cfp->block_code = ((void *)0);
12390 for (int i=0; i < local_size; i++) {
12391 *sp++ = ((VALUE)RUBY_Qnil);
12392 }
12393 ((void)0);
12394 ((void)0);
12395 ((void)0);
12396 *sp++ = cref_or_me;
12397 *sp++ = specval ;
12398 *sp = type;
12399 cfp->ep = sp;
12400 cfp->__bp__ = cfp->sp = sp + 1;
12401 if (0 == 2) {
12402 rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
12403 }
12404 return cfp;
12405}
12406static inline int
12407vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
12408{
12409 VALUE flags = ep[( 0)];
12410 if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency();
12411 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
12412 rb_vm_check_ints(ec);
12413 ec->cfp = ((cfp)+1);
12414 return flags & VM_FRAME_FLAG_FINISH;
12415}
12416static void
12417rb_vm_pop_frame(rb_execution_context_t *ec)
12418{
12419 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
12420}
12421static inline VALUE
12422rb_arity_error_new(int argc, int min, int max)
12423{
12424 VALUE err_mess = 0;
12425 if (min == max) {
12426 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
12427 }
12428 else if (max == (-1)) {
12429 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
12430 }
12431 else {
12432 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
12433 }
12434 return rb_exc_new_str(rb_eArgError, err_mess);
12435}
12436static void
12437rb_error_arity(int argc, int min, int max)
12438{
12439 rb_exc_raise(rb_arity_error_new(argc, min, max));
12440}
12441__attribute__ ((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
12442static void
12443vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
12444{
12445 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
12446 VM_FORCE_WRITE(&ep[index], v);
12447 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
12448 ((void)0);
12449}
12450static inline void
12451vm_env_write(const VALUE *ep, int index, VALUE v)
12452{
12453 VALUE flags = ep[( 0)];
12454 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
12455 VM_STACK_ENV_WRITE(ep, index, v);
12456 }
12457 else {
12458 vm_env_write_slowpath(ep, index, v);
12459 }
12460}
12461static VALUE
12462rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
12463{
12464 if (block_handler == 0) {
12465 return ((VALUE)RUBY_Qnil);
12466 }
12467 else {
12468 switch (vm_block_handler_type(block_handler)) {
12471 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
12473 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
12475 return VM_BH_TO_PROC(block_handler);
12476 default:
12477 __builtin_unreachable();
12478 }
12479 }
12480}
12481static inline struct vm_svar *
12482lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
12483{
12484 VALUE svar;
12485 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
12486 svar = lep[(-2)];
12487 }
12488 else {
12489 svar = ec->root_svar;
12490 }
12491 ((void)0);
12492 return (struct vm_svar *)svar;
12493}
12494static inline void
12495lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
12496{
12497 ((void)0);
12498 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
12499 vm_env_write(lep, (-2), (VALUE)svar);
12500 }
12501 else {
12502 __extension__({
12503#pragma GCC diagnostic push
12504;
12505#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
12506; typeof(rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "../ruby-2.7.6/vm_insnhelper.c", 486)) unaligned_member_access_result = (rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "../ruby-2.7.6/vm_insnhelper.c", 486));
12507#pragma GCC diagnostic pop
12508; unaligned_member_access_result; });
12509 }
12510}
12511static VALUE
12512lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
12513{
12514 const struct vm_svar *svar = lep_svar(ec, lep);
12515 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
12516 switch (key) {
12517 case VM_SVAR_LASTLINE:
12518 return svar->lastline;
12519 case VM_SVAR_BACKREF:
12520 return svar->backref;
12521 default: {
12522 const VALUE ary = svar->others;
12523 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
12524 return ((VALUE)RUBY_Qnil);
12525 }
12526 else {
12527 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
12528 }
12529 }
12530 }
12531}
12532static struct vm_svar *
12533svar_new(VALUE obj)
12534{
12536}
12537static void
12538lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
12539{
12540 struct vm_svar *svar = lep_svar(ec, lep);
12541 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
12542 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
12543 }
12544 switch (key) {
12545 case VM_SVAR_LASTLINE:
12546 __extension__({
12547#pragma GCC diagnostic push
12548;
12549#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
12550; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 532)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 532));
12551#pragma GCC diagnostic pop
12552; unaligned_member_access_result; });
12553 return;
12554 case VM_SVAR_BACKREF:
12555 __extension__({
12556#pragma GCC diagnostic push
12557;
12558#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
12559; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 535)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 535));
12560#pragma GCC diagnostic pop
12561; unaligned_member_access_result; });
12562 return;
12563 default: {
12564 VALUE ary = svar->others;
12565 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
12566 __extension__({
12567#pragma GCC diagnostic push
12568 ;
12569#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
12570 ; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "../ruby-2.7.6/vm_insnhelper.c", 541)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "../ruby-2.7.6/vm_insnhelper.c", 541));
12571#pragma GCC diagnostic pop
12572 ; unaligned_member_access_result; });
12573 }
12575 }
12576 }
12577}
12578static inline VALUE
12579vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
12580{
12581 VALUE val;
12582 if (type == 0) {
12583 val = lep_svar_get(ec, lep, key);
12584 }
12585 else {
12586 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
12587 if (type & 0x01) {
12588 switch (type >> 1) {
12589 case '&':
12591 break;
12592 case '`':
12594 break;
12595 case '\'':
12597 break;
12598 case '+':
12600 break;
12601 default:
12602 rb_bug("unexpected back-ref");
12603 }
12604 }
12605 else {
12606 val = rb_reg_nth_match((int)(type >> 1), backref);
12607 }
12608 }
12609 return val;
12610}
12611__attribute__ ((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
12613check_method_entry(VALUE obj, int can_be_svar)
12614{
12615 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
12616 switch (imemo_type(obj)) {
12617 case imemo_ment:
12619 case imemo_cref:
12620 return ((void *)0);
12621 case imemo_svar:
12622 if (can_be_svar) {
12623 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
12624 }
12625 default:
12626 return ((void *)0);
12627 }
12628}
12629static const rb_callable_method_entry_t *
12630rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
12631{
12632 const VALUE *ep = cfp->ep;
12634 while (!VM_ENV_LOCAL_P(ep)) {
12635 if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me;
12636 ep = VM_ENV_PREV_EP(ep);
12637 }
12638 return check_method_entry(ep[(-2)], 1);
12639}
12640static rb_cref_t *
12641method_entry_cref(rb_callable_method_entry_t *me)
12642{
12643 switch (me->def->type) {
12645 return me->def->body.iseq.cref;
12646 default:
12647 return ((void *)0);
12648 }
12649}
12650__attribute__ ((__pure__)) static rb_cref_t *check_cref(VALUE, int);
12651static rb_cref_t *
12652check_cref(VALUE obj, int can_be_svar)
12653{
12654 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
12655 switch (imemo_type(obj)) {
12656 case imemo_ment:
12657 return method_entry_cref((rb_callable_method_entry_t *)obj);
12658 case imemo_cref:
12659 return (rb_cref_t *)obj;
12660 case imemo_svar:
12661 if (can_be_svar) {
12662 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
12663 }
12664 default:
12665 return ((void *)0);
12666 }
12667}
12668static inline rb_cref_t *
12669vm_env_cref(const VALUE *ep)
12670{
12671 rb_cref_t *cref;
12672 while (!VM_ENV_LOCAL_P(ep)) {
12673 if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref;
12674 ep = VM_ENV_PREV_EP(ep);
12675 }
12676 return check_cref(ep[(-2)], 1);
12677}
12678static int
12679is_cref(const VALUE v, int can_be_svar)
12680{
12681 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
12682 switch (imemo_type(v)) {
12683 case imemo_cref:
12684 return 1;
12685 case imemo_svar:
12686 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
12687 default:
12688 break;
12689 }
12690 }
12691 return 0;
12692}
12693static int
12694vm_env_cref_by_cref(const VALUE *ep)
12695{
12696 while (!VM_ENV_LOCAL_P(ep)) {
12697 if (is_cref(ep[(-2)], 0)) return 1;
12698 ep = VM_ENV_PREV_EP(ep);
12699 }
12700 return is_cref(ep[(-2)], 1);
12701}
12702static rb_cref_t *
12703cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
12704{
12705 const VALUE v = *vptr;
12706 rb_cref_t *cref, *new_cref;
12707 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
12708 switch (imemo_type(v)) {
12709 case imemo_cref:
12710 cref = (rb_cref_t *)v;
12711 new_cref = vm_cref_dup(cref);
12712 if (parent) {
12713 __extension__({
12714#pragma GCC diagnostic push
12715 ;
12716#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
12717 ; typeof(rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "../ruby-2.7.6/vm_insnhelper.c", 716)) unaligned_member_access_result = (rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "../ruby-2.7.6/vm_insnhelper.c", 716));
12718#pragma GCC diagnostic pop
12719 ; unaligned_member_access_result; });
12720 }
12721 else {
12722 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
12723 }
12724 return (rb_cref_t *)new_cref;
12725 case imemo_svar:
12726 if (can_be_svar) {
12727 return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v);
12728 }
12729 case imemo_ment:
12730 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
12731 default:
12732 break;
12733 }
12734 }
12735 return 0;
12736}
12737static rb_cref_t *
12738vm_cref_replace_with_duplicated_cref(const VALUE *ep)
12739{
12740 if (vm_env_cref_by_cref(ep)) {
12741 rb_cref_t *cref;
12742 VALUE envval;
12743 while (!VM_ENV_LOCAL_P(ep)) {
12744 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
12745 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) {
12746 return cref;
12747 }
12748 ep = VM_ENV_PREV_EP(ep);
12749 }
12750 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
12751 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
12752 }
12753 else {
12754 rb_bug("vm_cref_dup: unreachable");
12755 }
12756}
12757static rb_cref_t *
12758vm_get_cref(const VALUE *ep)
12759{
12760 rb_cref_t *cref = vm_env_cref(ep);
12761 if (cref != ((void *)0)) {
12762 return cref;
12763 }
12764 else {
12765 rb_bug("vm_get_cref: unreachable");
12766 }
12767}
12768static rb_cref_t *
12769vm_ec_cref(const rb_execution_context_t *ec)
12770{
12772 if (cfp == ((void *)0)) {
12773 return ((void *)0);
12774 }
12775 return vm_get_cref(cfp->ep);
12776}
12777static const rb_cref_t *
12778vm_get_const_key_cref(const VALUE *ep)
12779{
12780 const rb_cref_t *cref = vm_get_cref(ep);
12781 const rb_cref_t *key_cref = cref;
12782 while (cref) {
12783 if (((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0) ||
12784 ((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_USER6)))):0)) {
12785 return key_cref;
12786 }
12787 cref = CREF_NEXT(cref);
12788 }
12789 return ((void *)0);
12790}
12791void
12792rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
12793{
12794 rb_cref_t *new_cref;
12795 while (cref) {
12796 if (CREF_CLASS(cref) == old_klass) {
12797 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
12798 *new_cref_ptr = new_cref;
12799 return;
12800 }
12801 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
12802 cref = CREF_NEXT(cref);
12803 *new_cref_ptr = new_cref;
12804 new_cref_ptr = (rb_cref_t **)&new_cref->next;
12805 }
12806 *new_cref_ptr = ((void *)0);
12807}
12808static rb_cref_t *
12809vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
12810{
12811 rb_cref_t *prev_cref = ((void *)0);
12812 if (ep) {
12813 prev_cref = vm_env_cref(ep);
12814 }
12815 else {
12816 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
12817 if (cfp) {
12818 prev_cref = vm_env_cref(cfp->ep);
12819 }
12820 }
12821 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval);
12822}
12823static inline VALUE
12824vm_get_cbase(const VALUE *ep)
12825{
12826 const rb_cref_t *cref = vm_get_cref(ep);
12828 while (cref) {
12829 if ((klass = CREF_CLASS(cref)) != 0) {
12830 break;
12831 }
12832 cref = CREF_NEXT(cref);
12833 }
12834 return klass;
12835}
12836static inline VALUE
12837vm_get_const_base(const VALUE *ep)
12838{
12839 const rb_cref_t *cref = vm_get_cref(ep);
12841 while (cref) {
12842 if (!CREF_PUSHED_BY_EVAL(cref) &&
12843 (klass = CREF_CLASS(cref)) != 0) {
12844 break;
12845 }
12846 cref = CREF_NEXT(cref);
12847 }
12848 return klass;
12849}
12850static inline void
12851vm_check_if_namespace(VALUE klass)
12852{
12853 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS))) && !( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
12854 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
12855 }
12856}
12857static inline void
12858vm_ensure_not_refinement_module(VALUE self)
12859{
12860 if (( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(self))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((self) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((self) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((self) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((self) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(self)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(self))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_MODULE))) && ((!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((self)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
12861 rb_warn("not defined at the refinement, but at the outer class/module");
12862 }
12863}
12864static inline VALUE
12865vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
12866{
12867 return klass;
12868}
12869static inline VALUE
12870vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined)
12871{
12873 VALUE val;
12874 if (orig_klass == ((VALUE)RUBY_Qnil) && allow_nil) {
12875 const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep);
12876 const rb_cref_t *cref;
12878 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
12879 root_cref = CREF_NEXT(root_cref);
12880 }
12881 cref = root_cref;
12882 while (cref && CREF_NEXT(cref)) {
12883 if (CREF_PUSHED_BY_EVAL(cref)) {
12884 klass = ((VALUE)RUBY_Qnil);
12885 }
12886 else {
12887 klass = CREF_CLASS(cref);
12888 }
12889 cref = CREF_NEXT(cref);
12890 if (!!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
12891 VALUE av, am = 0;
12892 rb_const_entry_t *ce;
12893 search_continue:
12894 if ((ce = rb_const_lookup(klass, id))) {
12896 val = ce->value;
12897 if (val == ((VALUE)RUBY_Qundef)) {
12898 if (am == klass) break;
12899 am = klass;
12900 if (is_defined) return 1;
12901 if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av;
12903 goto search_continue;
12904 }
12905 else {
12906 if (is_defined) {
12907 return 1;
12908 }
12909 else {
12910 return val;
12911 }
12912 }
12913 }
12914 }
12915 }
12916 if (root_cref && !!((VALUE)(CREF_CLASS(root_cref)) != ((VALUE)RUBY_Qnil))) {
12917 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
12918 }
12919 else {
12920 klass = rb_class_of((VALUE)(ec->cfp->self));
12921 }
12922 if (is_defined) {
12923 return rb_const_defined(klass, id);
12924 }
12925 else {
12926 return rb_const_get(klass, id);
12927 }
12928 }
12929 else {
12930 vm_check_if_namespace(orig_klass);
12931 if (is_defined) {
12932 return rb_public_const_defined_from(orig_klass, id);
12933 }
12934 else {
12935 return rb_public_const_get_from(orig_klass, id);
12936 }
12937 }
12938}
12939static inline VALUE
12940vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp)
12941{
12942 VALUE klass;
12943 if (!cref) {
12944 rb_bug("vm_get_cvar_base: no cref");
12945 }
12946 while (CREF_NEXT(cref) &&
12947 (!((VALUE)(CREF_CLASS(cref)) != ((VALUE)RUBY_Qnil)) || ((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0) ||
12948 CREF_PUSHED_BY_EVAL(cref))) {
12949 cref = CREF_NEXT(cref);
12950 }
12951 if (!CREF_NEXT(cref)) {
12952 rb_warn("class variable access from toplevel");
12953 }
12954 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
12955 if (!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
12956 rb_raise(rb_eTypeError, "no class variables available");
12957 }
12958 return klass;
12959}
12960static VALUE
12961vm_search_const_defined_class(const VALUE cbase, ID id)
12962{
12963 if (rb_const_defined_at(cbase, id)) return cbase;
12964 if (cbase == rb_cObject) {
12965 VALUE tmp = RCLASS_SUPER(cbase);
12966 while (tmp) {
12967 if (rb_const_defined_at(tmp, id)) return tmp;
12968 tmp = RCLASS_SUPER(tmp);
12969 }
12970 }
12971 return 0;
12972}
12973__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, IVC, struct rb_call_cache *, int);
12974static inline VALUE
12975vm_getivar(VALUE obj, ID id, IVC ic, struct rb_call_cache *cc, int is_attr)
12976{
12977 VALUE val = ((VALUE)RUBY_Qundef);
12978 if ((((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
12979 }
12980 else if ((__builtin_expect(!!(is_attr ? (cc->aux.index > 0) : (ic->ic_serial == (((struct RClass*)(((struct RBasic*)(obj))->klass))->class_serial))), 1))) {
12981 st_index_t index = !is_attr ? ic->index : (cc->aux.index - 1);
12982 ((void)0);
12983 if ((__builtin_expect(!!((int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_OBJECT), 1)) &&
12984 (__builtin_expect(!!(index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv)), 1))) {
12985 val = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr)[index];
12986 }
12987 else if ((((struct RBasic*)(obj))->flags&(((VALUE)RUBY_FL_EXIVAR)))) {
12988 struct gen_ivtbl *ivtbl;
12990 (__builtin_expect(!!(index < ivtbl->numiv), 1))) {
12991 val = ivtbl->ivptr[index];
12992 }
12993 }
12994 goto ret;
12995 }
12996 else {
12997 struct st_table *iv_index_tbl;
12998 st_index_t numiv;
12999 VALUE *ivptr;
13001 if ((int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_OBJECT) {
13002 iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
13003 numiv = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv);
13004 ivptr = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr);
13005 fill:
13006 if (iv_index_tbl) {
13007 if (rb_st_lookup(iv_index_tbl, id, &index)) {
13008 if (!is_attr) {
13009 ic->index = index;
13010 ic->ic_serial = (((struct RClass*)(((struct RBasic*)(obj))->klass))->class_serial);
13011 }
13012 else {
13013 cc->aux.index = (int)index + 1;
13014 }
13015 if (index < numiv) {
13016 val = ivptr[index];
13017 }
13018 }
13019 }
13020 }
13021 else if ((((struct RBasic*)(obj))->flags&(((VALUE)RUBY_FL_EXIVAR)))) {
13022 struct gen_ivtbl *ivtbl;
13024 numiv = ivtbl->numiv;
13025 ivptr = ivtbl->ivptr;
13026 iv_index_tbl = ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl);
13027 goto fill;
13028 }
13029 }
13030 else {
13031 goto general_path;
13032 }
13033 ret:
13034 if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) {
13035 return val;
13036 }
13037 else {
13038 if (!is_attr && !(((VALUE)((*rb_ruby_verbose_ptr())) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
13039 rb_warning("instance variable %""l""i" "\v"" not initialized", rb_id_quote_unprintable(id));
13040 }
13041 return ((VALUE)RUBY_Qnil);
13042 }
13043 }
13044 general_path:
13045 ((void)0);
13046 if (is_attr) {
13047 return rb_attr_get(obj, id);
13048 }
13049 else {
13050 return rb_ivar_get(obj, id);
13051 }
13052}
13053static inline VALUE
13054vm_setivar(VALUE obj, ID id, VALUE val, IVC ic, struct rb_call_cache *cc, int is_attr)
13055{
13056 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!((!(!(((VALUE)(frozen_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(frozen_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(frozen_obj))->flags & RUBY_T_MASK) != RUBY_T_NODE) || (((struct RBasic*)(frozen_obj))->flags&RUBY_FL_FREEZE))), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
13057 if ((__builtin_expect(!!(( ((RUBY_T_OBJECT) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_OBJECT) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_OBJECT) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_OBJECT) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_OBJECT) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_OBJECT) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_OBJECT) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_OBJECT)))), 1))) {
13058 VALUE klass = ((struct RBasic*)(obj))->klass;
13060 if ((__builtin_expect(!!((!is_attr && (ic->ic_serial == (((struct RClass*)(klass))->class_serial))) || ( is_attr && (cc->aux.index > 0))), 1))) {
13061 VALUE *ptr = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr);
13062 index = !is_attr ? ic->index : cc->aux.index-1;
13063 if ((index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv))) {
13064 __extension__({
13065#pragma GCC diagnostic push
13066 ;
13067#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
13068 ; typeof(rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 1127)) unaligned_member_access_result = (rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 1127));
13069#pragma GCC diagnostic pop
13070 ; unaligned_member_access_result; });
13071 ((void)0);
13072 return val;
13073 }
13074 }
13075 else {
13076 struct st_table *iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
13078 if (!is_attr) {
13079 ic->index = index;
13080 ic->ic_serial = (((struct RClass*)(klass))->class_serial);
13081 }
13082 else if (index >= 0x7fffffff) {
13083 rb_raise(rb_eArgError, "too many instance variables");
13084 }
13085 else {
13086 cc->aux.index = (int)(index + 1);
13087 }
13088 }
13089 }
13090 }
13091 else {
13092 ((void)0);
13093 }
13094 ((void)0);
13095 return rb_ivar_set(obj, id, val);
13096}
13097static inline VALUE
13098vm_getinstancevariable(VALUE obj, ID id, IVC ic)
13099{
13100 return vm_getivar(obj, id, ic, ((void *)0), 0);
13101}
13102static inline void
13103vm_setinstancevariable(VALUE obj, ID id, VALUE val, IVC ic)
13104{
13105 vm_setivar(obj, id, val, ic, 0, 0);
13106}
13107static VALUE
13108vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
13109{
13110 if ((((int)(long)(err))&RUBY_FIXNUM_FLAG)) {
13111 ec->tag->state = ((int)rb_fix2int((VALUE)(err)));
13112 }
13113 else if (((((VALUE)(err)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(err) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(err) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(err))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
13114 ec->tag->state = RUBY_TAG_THROW;
13115 }
13116 else if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(err)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(err)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(err)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(err))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(err)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
13117 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
13118 }
13119 else {
13120 ec->tag->state = RUBY_TAG_RAISE;
13121 }
13122 return err;
13123}
13124static VALUE
13125vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
13126 const int flag, const VALUE throwobj)
13127{
13128 const rb_control_frame_t *escape_cfp = ((void *)0);
13129 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
13130 if (flag != 0) {
13131 }
13132 else if (state == RUBY_TAG_BREAK) {
13133 int is_orphan = 1;
13134 const VALUE *ep = ((((reg_cfp)->ep)));
13135 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
13136 escape_cfp = reg_cfp;
13137 while (base_iseq->body->type != ISEQ_TYPE_BLOCK) {
13138 if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
13139 escape_cfp = ((escape_cfp)+1);
13140 ep = escape_cfp->ep;
13141 base_iseq = escape_cfp->iseq;
13142 }
13143 else {
13144 ep = VM_ENV_PREV_EP(ep);
13145 base_iseq = base_iseq->body->parent_iseq;
13146 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
13147 ((void)0);
13148 }
13149 }
13150 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
13151 is_orphan = 0;
13152 state = RUBY_TAG_RETURN;
13153 }
13154 else {
13155 ep = VM_ENV_PREV_EP(ep);
13156 while (escape_cfp < eocfp) {
13157 if (escape_cfp->ep == ep) {
13158 const rb_iseq_t *const iseq = escape_cfp->iseq;
13159 const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded;
13160 const struct iseq_catch_table *const ct = iseq->body->catch_table;
13161 unsigned int i;
13162 if (!ct) break;
13163 for (i=0; i < ct->size; i++) {
13164 const struct iseq_catch_table_entry *const entry =
13165 __extension__({
13166#pragma GCC diagnostic push
13167 ;
13168#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
13169 ; typeof(&(ct)->entries[i]) unaligned_member_access_result = (&(ct)->entries[i]);
13170#pragma GCC diagnostic pop
13171 ; unaligned_member_access_result; });
13172 if (entry->type == CATCH_TYPE_BREAK &&
13173 entry->iseq == base_iseq &&
13174 entry->start < epc && entry->end >= epc) {
13175 if (entry->cont == epc) {
13176 is_orphan = 0;
13177 }
13178 break;
13179 }
13180 }
13181 break;
13182 }
13183 escape_cfp = ((escape_cfp)+1);
13184 }
13185 }
13186 if (is_orphan) {
13187 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
13188 }
13189 }
13190 else if (state == RUBY_TAG_RETRY) {
13191 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
13192 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
13193 }
13194 else if (state == RUBY_TAG_RETURN) {
13195 const VALUE *current_ep = ((((reg_cfp)->ep)));
13196 const VALUE *target_lep = VM_EP_LEP(current_ep);
13197 int in_class_frame = 0;
13198 int toplevel = 1;
13199 escape_cfp = reg_cfp;
13200 while (escape_cfp < eocfp) {
13201 const VALUE *lep = VM_CF_LEP(escape_cfp);
13202 if (!target_lep) {
13203 target_lep = lep;
13204 }
13205 if (lep == target_lep &&
13206 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
13207 escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
13208 in_class_frame = 1;
13209 target_lep = 0;
13210 }
13211 if (lep == target_lep) {
13212 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
13213 toplevel = 0;
13214 if (in_class_frame) {
13215 goto valid_return;
13216 }
13217 else {
13218 const VALUE *tep = current_ep;
13219 while (target_lep != tep) {
13220 if (escape_cfp->ep == tep) {
13221 goto valid_return;
13222 }
13223 tep = VM_ENV_PREV_EP(tep);
13224 }
13225 }
13226 }
13227 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
13228 switch (escape_cfp->iseq->body->type) {
13229 case ISEQ_TYPE_TOP:
13230 case ISEQ_TYPE_MAIN:
13231 if (toplevel) {
13232 if (in_class_frame) goto unexpected_return;
13233 goto valid_return;
13234 }
13235 break;
13236 case ISEQ_TYPE_EVAL:
13237 case ISEQ_TYPE_CLASS:
13238 toplevel = 0;
13239 break;
13240 default:
13241 break;
13242 }
13243 }
13244 }
13245 if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
13246 goto valid_return;
13247 }
13248 escape_cfp = ((escape_cfp)+1);
13249 }
13250 unexpected_return:;
13251 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
13252 valid_return:;
13253 }
13254 else {
13255 rb_bug("isns(throw): unsupported throw type");
13256 }
13257 ec->tag->state = state;
13258 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
13259}
13260static VALUE
13262 rb_num_t throw_state, VALUE throwobj)
13263{
13264 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
13265 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
13266 if (state != 0) {
13267 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
13268 }
13269 else {
13270 return vm_throw_continue(ec, throwobj);
13271 }
13272}
13273static inline void
13274vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
13275{
13276 int is_splat = flag & 0x01;
13277 rb_num_t space_size = num + is_splat;
13278 VALUE *base = sp - 1;
13279 const VALUE *ptr;
13280 rb_num_t len;
13281 const VALUE obj = ary;
13282 if (!( ((RUBY_T_ARRAY) == RUBY_T_FIXNUM) ? (((int)(long)(ary))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ARRAY) == RUBY_T_TRUE) ? ((ary) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ARRAY) == RUBY_T_FALSE) ? ((ary) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ARRAY) == RUBY_T_NIL) ? ((ary) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ARRAY) == RUBY_T_UNDEF) ? ((ary) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ARRAY) == RUBY_T_SYMBOL) ? ((((VALUE)(ary)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ARRAY) == RUBY_T_FLOAT) ? ( ((((int)(long)(ary))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_ARRAY))) && !((VALUE)(ary = rb_check_array_type(ary)) != ((VALUE)RUBY_Qnil))) {
13283 ary = obj;
13284 ptr = &ary;
13285 len = 1;
13286 }
13287 else {
13288 ptr = rb_array_const_ptr_transient(ary);
13289 len = (rb_num_t)rb_array_len(ary);
13290 }
13291 if (space_size == 0) {
13292 }
13293 else if (flag & 0x02) {
13294 rb_num_t i = 0, j;
13295 if (len < num) {
13296 for (i=0; i<num-len; i++) {
13297 *base++ = ((VALUE)RUBY_Qnil);
13298 }
13299 }
13300 for (j=0; i<num; i++, j++) {
13301 VALUE v = ptr[len - j - 1];
13302 *base++ = v;
13303 }
13304 if (is_splat) {
13305 *base = rb_ary_new_from_values(len - j, ptr);
13306 }
13307 }
13308 else {
13309 rb_num_t i;
13310 VALUE *bptr = &base[space_size - 1];
13311 for (i=0; i<num; i++) {
13312 if (len <= i) {
13313 for (; i<num; i++) {
13314 *bptr-- = ((VALUE)RUBY_Qnil);
13315 }
13316 break;
13317 }
13318 *bptr-- = ptr[i];
13319 }
13320 if (is_splat) {
13321 if (num > len) {
13322 *bptr = rb_ary_new();
13323 }
13324 else {
13325 *bptr = rb_ary_new_from_values(len - num, ptr + num);
13326 }
13327 }
13328 }
13329 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
13330}
13331static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
13332__attribute__((__artificial__))
13333static inline vm_call_handler
13334calccall(const struct rb_call_data *cd, const rb_callable_method_entry_t *me)
13335{
13336 const struct rb_call_info *ci = &cd->ci;
13337 const struct rb_call_cache *cc = &cd->cc;
13338 if ((__builtin_expect(!!(!me), 0))) {
13339 ((void)0);
13340 return vm_call_general;
13341 }
13342 else if ((__builtin_expect(!!(cc->me != me), 1))) {
13343 ((void)0);
13344 return vm_call_general;
13345 }
13347 ((void)0);
13348 return vm_call_general;
13349 }
13350 else if (((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) != METHOD_VISI_PUBLIC) &&
13351 !(ci->flag & (0x01 << VM_CALL_FCALL_bit))) {
13352 ((void)0);
13353 return vm_call_general;
13354 }
13355 else {
13356 ((void)0);
13357 (void)(cc->call != vm_call_general);
13358 return cc->call;
13359 }
13360}
13361__attribute__ ((__visibility__("default"))) extern void
13363{
13364 const struct rb_call_info *ci = &cd->ci;
13365 struct rb_call_cache *cc = &cd->cc;
13368 const vm_call_handler call = calccall(cd, me);
13371 { (((struct RClass*)(klass))->class_serial) },
13372 me,
13373 me ? me->def->method_serial : 0,
13374 call,
13375 };
13376 if (call != vm_call_general) {
13377 for (int i = 0; i < ((int)(sizeof(cc->class_serial) / sizeof((cc->class_serial)[0]))) - 1; i++) {
13378 buf.class_serial[i + 1] = cc->class_serial[i];
13379 }
13380 }
13381 ((__builtin_object_size((cc), 0) != (size_t)-1) ? __builtin___memcpy_chk((cc), (&buf), sizeof(struct rb_call_cache)*(size_t)(1), __builtin_object_size((cc), 0)) : __memcpy_ichk((cc), (&buf), sizeof(struct rb_call_cache)*(size_t)(1)));
13382 ((void)0);
13383}
13384static inline _Bool
13385vm_cache_check_for_class_serial(struct rb_call_cache *cc, rb_serial_t class_serial)
13386{
13387 int i;
13388 rb_serial_t j;
13389 for (i = 0; i < ((int)(sizeof(cc->class_serial) / sizeof((cc->class_serial)[0]))); i++) {
13390 j = cc->class_serial[i];
13391 if (! j) {
13392 break;
13393 }
13394 else if (j != class_serial) {
13395 continue;
13396 }
13397 else if (! i) {
13398 return 1;
13399 }
13400 else {
13401 goto hit;
13402 }
13403 }
13404 ((void)0);
13405 return 0;
13406 hit:
13407 for (; i > 0; i--) {
13408 cc->class_serial[i] = cc->class_serial[i - 1];
13409 }
13410 cc->class_serial[0] = j;
13411 ((__builtin_object_size((&cc->aux), 0) != (size_t)-1) ? __builtin___memset_chk((&cc->aux), 0, sizeof(cc->aux)*(size_t)(1), __builtin_object_size((&cc->aux), 0)) : __memset_ichk((&cc->aux), 0, sizeof(cc->aux)*(size_t)(1)));
13412 return 1;
13413}
13414static void
13415vm_search_method_fastpath(struct rb_call_data *cd, VALUE klass)
13416{
13417 struct rb_call_cache *cc = &cd->cc;
13418 if ((__builtin_expect(!!(((ruby_vm_global_method_state) == cc->method_state) && vm_cache_check_for_class_serial(cc, (((struct RClass*)(klass))->class_serial))), 1))) {
13419 ((void)0);
13420 ((void)0);
13421 return;
13422 }
13423 ((void)0);
13425}
13426static void
13427vm_search_method(struct rb_call_data *cd, VALUE recv)
13428{
13429 VALUE klass = rb_class_of((VALUE)(recv));
13430 ((void)0);
13431 ((void)0);
13432 vm_search_method_fastpath(cd, klass);
13433}
13434static inline int
13435check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
13436{
13437 if (me && me->def->type == VM_METHOD_TYPE_CFUNC &&
13438 me->def->body.cfunc.func == func) {
13439 return 1;
13440 }
13441 else {
13442 return 0;
13443 }
13444}
13445static inline int
13446vm_method_cfunc_is(CALL_DATA cd, VALUE recv, VALUE (*func)())
13447{
13448 vm_search_method(cd, recv);
13449 return check_cfunc(cd->cc.me, func);
13450}
13451static VALUE
13452opt_equal_fallback(VALUE recv, VALUE obj, CALL_DATA cd)
13453{
13454 if (vm_method_cfunc_is(cd, recv, rb_obj_equal)) {
13455 return recv == obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13456 }
13457 return ((VALUE)RUBY_Qundef);
13458}
13459#define BUILTIN_CLASS_P(x,k) (!SPECIAL_CONST_P(x) && RBASIC_CLASS(x) == k)
13460#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG)
13461static inline _Bool
13462FIXNUM_2_P(VALUE a, VALUE b)
13463{
13464 long x = a;
13465 long y = b;
13466 long z = x & y & 1;
13467 return z == 1;
13468}
13469static inline _Bool
13470FLONUM_2_P(VALUE a, VALUE b)
13471{
13472 long x = a;
13473 long y = b;
13474 long z = ((x ^ 2) | (y ^ 2)) & 3;
13475 return !z;
13476}
13477static inline int
13478comparable_by_identity(VALUE recv, VALUE obj)
13479{
13480 if (FIXNUM_2_P(recv, obj)) {
13481 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1))) != 0) * 2 - 1;
13482 }
13483 if (FLONUM_2_P(recv, obj)) {
13484 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1))) != 0) * 2 - 1;
13485 }
13486 if (((((VALUE)(recv)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(recv))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
13487 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1))) != 0) * 2 - 1;
13488 }
13489 return 0;
13490}
13491static
13492inline
13493VALUE
13494opt_eq_func(VALUE recv, VALUE obj, CALL_DATA cd)
13495{
13496 switch (comparable_by_identity(recv, obj)) {
13497 case 1:
13498 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13499 case -1:
13500 goto fallback;
13501 }
13502 if (0) {
13503 }
13504 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
13505 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
13506 return rb_float_equal(recv, obj);
13507 }
13508 }
13509 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
13510 if (recv == obj) return ((VALUE)RUBY_Qtrue);
13511 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
13512 return rb_str_eql_internal(recv, obj);
13513 }
13514 }
13515 fallback:
13516 return opt_equal_fallback(recv, obj, cd);
13517}
13518static
13519inline
13520VALUE
13521opt_eql_func(VALUE recv, VALUE obj, CALL_DATA cd)
13522{
13523 switch (comparable_by_identity(recv, obj)) {
13524 case 1:
13525 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13526 case -1:
13527 goto fallback;
13528 }
13529 if (0) {
13530 }
13531 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
13532 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
13533 return rb_float_eql(recv, obj);
13534 }
13535 }
13536 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString)) {
13537 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
13538 return rb_str_eql(recv, obj);
13539 }
13540 }
13541 fallback:
13542 return opt_equal_fallback(recv, obj, cd);
13543}
13544#undef BUILTIN_CLASS_P
13545#undef EQ_UNREDEFINED_P
13546VALUE
13548{
13549 struct rb_call_data cd = { .ci = { .mid = idEq, }, };
13550 return opt_eq_func(obj1, obj2, &cd);
13551}
13552VALUE
13554{
13555 struct rb_call_data cd = { .ci = { .mid = idEqlP, }, };
13556 return opt_eql_func(obj1, obj2, &cd);
13557}
13558extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat);
13559static VALUE
13560check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
13561{
13562 switch (type) {
13564 return pattern;
13566 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
13567 rb_raise(rb_eTypeError, "class or module required for rescue clause");
13568 }
13571 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(pattern)), idEqq, ((void *)0));
13572 if (me) {
13573 return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, 0);
13574 }
13575 else {
13576 return __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, pattern, idEqq, 1, &target); });
13577 }
13578 }
13579 default:
13580 rb_bug("check_match: unreachable");
13581 }
13582}
13583#define CHECK_CMP_NAN(a,b)
13584static inline VALUE
13585double_cmp_lt(double a, double b)
13586{
13587 ;
13588 return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13589}
13590static inline VALUE
13591double_cmp_le(double a, double b)
13592{
13593 ;
13594 return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13595}
13596static inline VALUE
13597double_cmp_gt(double a, double b)
13598{
13599 ;
13600 return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13601}
13602static inline VALUE
13603double_cmp_ge(double a, double b)
13604{
13605 ;
13606 return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
13607}
13608static inline VALUE *
13609vm_base_ptr(const rb_control_frame_t *cfp)
13610{
13611 return cfp->__bp__;
13612}
13613__attribute__ ((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
13614__attribute__ ((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
13615__attribute__ ((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
13617static VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv,
13618 enum method_missing_reason call_status, int kw_splat);
13619__attribute__ ((__visibility__("default"))) extern
13623 int argc;
13629};
13634static inline void
13635arg_rest_dup(struct args_info *args)
13636{
13637 if (!args->rest_dupped) {
13638 args->rest = rb_ary_dup(args->rest);
13639 args->rest_dupped = 1;
13640 }
13641}
13642static inline int
13643args_argc(struct args_info *args)
13644{
13645 if (args->rest == ((VALUE)RUBY_Qfalse)) {
13646 return args->argc;
13647 }
13648 else {
13649 return args->argc + rb_long2int_inline(rb_array_len(args->rest)) - args->rest_index;
13650 }
13651}
13652static inline void
13653args_extend(struct args_info *args, const int min_argc)
13654{
13655 int i;
13656 if (args->rest) {
13657 arg_rest_dup(args);
13658 ((void)0);
13659 for (i=args->argc + rb_long2int_inline(rb_array_len(args->rest)); i<min_argc; i++) {
13660 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
13661 }
13662 }
13663 else {
13664 for (i=args->argc; i<min_argc; i++) {
13665 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
13666 }
13667 }
13668}
13669static inline void
13670args_reduce(struct args_info *args, int over_argc)
13671{
13672 if (args->rest) {
13673 const long len = rb_array_len(args->rest);
13674 if (len > over_argc) {
13675 arg_rest_dup(args);
13676 rb_ary_resize(args->rest, len - over_argc);
13677 return;
13678 }
13679 else {
13680 args->rest = ((VALUE)RUBY_Qfalse);
13681 over_argc -= len;
13682 }
13683 }
13684 ((void)0);
13685 args->argc -= over_argc;
13686}
13687static inline int
13688args_check_block_arg0(struct args_info *args)
13689{
13690 VALUE ary = ((VALUE)RUBY_Qnil);
13691 if (args->rest && rb_array_len(args->rest) == 1) {
13692 VALUE arg0 = (rb_array_const_ptr_transient(args->rest)[0]);
13693 ary = rb_check_array_type(arg0);
13694 }
13695 else if (args->argc == 1) {
13696 VALUE arg0 = args->argv[0];
13697 ary = rb_check_array_type(arg0);
13698 args->argv[0] = arg0;
13699 }
13700 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
13701 args->rest = ary;
13702 args->rest_index = 0;
13703 args->argc = 0;
13704 return 1;
13705 }
13706 return 0;
13707}
13708static inline void
13709args_copy(struct args_info *args)
13710{
13711 if (args->rest != ((VALUE)RUBY_Qfalse)) {
13712 int argc = args->argc;
13713 args->argc = 0;
13714 arg_rest_dup(args);
13715 while (args->rest_index > 0 && argc > 0) {
13716 do { const VALUE _ary = (args->rest); const VALUE _v = (args->argv[--argc]); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); __extension__({
13717#pragma GCC diagnostic push
13718 ;
13719#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
13720 ; typeof(rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[--args->rest_index]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 154)) unaligned_member_access_result = (rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[--args->rest_index]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 154));
13721#pragma GCC diagnostic pop
13722 ; unaligned_member_access_result; }); rb_array_ptr_use_end(_ary, 1); } while (0);
13723 }
13724 while (argc > 0) {
13725 rb_ary_unshift(args->rest, args->argv[--argc]);
13726 }
13727 }
13728 else if (args->argc > 0) {
13729 args->rest = rb_ary_new_from_values(args->argc, args->argv);
13730 args->rest_index = 0;
13731 args->rest_dupped = 1;
13732 args->argc = 0;
13733 }
13734}
13735static inline const VALUE *
13736args_rest_argv(struct args_info *args)
13737{
13738 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
13739}
13740static inline VALUE
13741args_rest_array(struct args_info *args)
13742{
13743 VALUE ary;
13744 if (args->rest) {
13745 ary = rb_ary_behead(args->rest, args->rest_index);
13746 args->rest_index = 0;
13747 args->rest = 0;
13748 }
13749 else {
13750 ary = rb_ary_new();
13751 }
13752 return ary;
13753}
13754#define KW_HASH_HAS_NO_KEYS 0
13755#define KW_HASH_HAS_SYMBOL_KEY 1
13756#define KW_HASH_HAS_OTHER_KEY 2
13757#define KW_HASH_HAS_BOTH_KEYS 3
13758static int
13759keyword_hash_symbol_other_iter(st_data_t key, st_data_t val, st_data_t arg)
13760{
13761 *(int*)arg |= ((((VALUE)((VALUE)key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) ? 1 : 2;
13762 if ((*(int*)arg & 3) == 3) {
13763 return ST_STOP;
13764 }
13765 return ST_CONTINUE;
13766}
13767static int
13768keyword_hash_symbol_other(VALUE hash)
13769{
13770 int symbol_other = 0;
13771 rb_hash_stlike_foreach(hash, keyword_hash_symbol_other_iter, (st_data_t)(&symbol_other));
13772 return symbol_other;
13773}
13774static int
13775keyword_hash_split_iter(st_data_t key, st_data_t val, st_data_t arg)
13776{
13777 if (((((VALUE)((VALUE)key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
13778 rb_hash_aset((VALUE)arg, (VALUE)key, (VALUE)val);
13779 return ST_DELETE;
13780 }
13781 return ST_CONTINUE;
13782}
13783static void
13784keyword_hash_split(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr)
13785{
13786 *kw_hash_ptr = rb_hash_new();
13787 rb_hash_stlike_foreach(*rest_hash_ptr, keyword_hash_split_iter, (st_data_t)(*kw_hash_ptr));
13788}
13789static int
13790keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr, int check_only_symbol)
13791{
13792 *rest_hash_ptr = rb_check_hash_type(*kw_hash_ptr);
13793 if (!!((VALUE)(*rest_hash_ptr) != ((VALUE)RUBY_Qnil))) {
13794 if (check_only_symbol) {
13795 switch (keyword_hash_symbol_other(*rest_hash_ptr)) {
13796 case 0:
13797 case 1:
13798 break;
13799 case 2:
13800 *kw_hash_ptr = ((VALUE)RUBY_Qnil);
13801 return 0;
13802 case 3:
13803 *rest_hash_ptr = rb_hash_dup(*rest_hash_ptr);
13804 keyword_hash_split(kw_hash_ptr, rest_hash_ptr);
13805 return 1;
13806 }
13807 }
13808 *kw_hash_ptr = *rest_hash_ptr;
13809 *rest_hash_ptr = ((VALUE)RUBY_Qfalse);
13810 return 1;
13811 }
13812 else {
13813 *kw_hash_ptr = ((VALUE)RUBY_Qnil);
13814 return 0;
13815 }
13816}
13817static VALUE
13818args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr, int check_only_symbol)
13819{
13820 VALUE rest_hash;
13821 if (args->rest == ((VALUE)RUBY_Qfalse)) {
13822 from_argv:
13823 ((void)0);
13824 *kw_hash_ptr = args->argv[args->argc-1];
13825 if (keyword_hash_p(kw_hash_ptr, &rest_hash, check_only_symbol)) {
13826 if (rest_hash) {
13827 args->argv[args->argc-1] = rest_hash;
13828 }
13829 else {
13830 args->argc--;
13831 return 1;
13832 }
13833 }
13834 }
13835 else {
13836 long len = rb_array_len(args->rest);
13837 if (len > 0) {
13838 *kw_hash_ptr = (rb_array_const_ptr_transient(args->rest)[len - 1]);
13839 if (keyword_hash_p(kw_hash_ptr, &rest_hash, check_only_symbol)) {
13840 if (rest_hash) {
13841 do { const VALUE _ary = (args->rest); const VALUE _v = (rest_hash); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); __extension__({
13842#pragma GCC diagnostic push
13843 ;
13844#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
13845 ; typeof(rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 291)) unaligned_member_access_result = (rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 291));
13846#pragma GCC diagnostic pop
13847 ; unaligned_member_access_result; }); rb_array_ptr_use_end(_ary, 1); } while (0);
13848 }
13849 else {
13850 arg_rest_dup(args);
13851 rb_ary_pop(args->rest);
13852 return 1;
13853 }
13854 }
13855 }
13856 else {
13857 goto from_argv;
13858 }
13859 }
13860 return 0;
13861}
13862static int
13863args_kw_argv_to_hash(struct args_info *args)
13864{
13865 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
13866 const VALUE *const passed_keywords = kw_arg->keywords;
13867 const int kw_len = kw_arg->keyword_len;
13868 VALUE h = rb_hash_new_with_size(kw_len);
13869 const int kw_start = args->argc - kw_len;
13870 const VALUE * const kw_argv = args->argv + kw_start;
13871 int i;
13872 args->argc = kw_start + 1;
13873 for (i=0; i<kw_len; i++) {
13874 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
13875 }
13876 args->argv[args->argc - 1] = h;
13877 return args->argc;
13878}
13879static void
13880args_stored_kw_argv_to_hash(struct args_info *args)
13881{
13882 int i;
13883 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
13884 const VALUE *const passed_keywords = kw_arg->keywords;
13885 const int passed_keyword_len = kw_arg->keyword_len;
13886 VALUE h = rb_hash_new_with_size(passed_keyword_len);
13887 for (i=0; i<passed_keyword_len; i++) {
13888 rb_hash_aset(h, passed_keywords[i], args->kw_argv[i]);
13889 }
13890 args->kw_argv = ((void *)0);
13891 if (args->rest) {
13892 arg_rest_dup(args);
13893 rb_ary_push(args->rest, h);
13894 }
13895 else {
13896 args->argv[args->argc++] = h;
13897 }
13898}
13899static inline void
13900args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
13901{
13902 if (args->argc >= argc) {
13903 args->argc -= argc;
13904 args->argv += argc;
13905 }
13906 else {
13907 int i, j;
13908 const VALUE *argv = args_rest_argv(args);
13909 for (i=args->argc, j=0; i<argc; i++, j++) {
13910 locals[i] = argv[j];
13911 }
13912 args->rest_index += argc - args->argc;
13913 args->argc = 0;
13914 }
13915}
13916static inline void
13917args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
13918{
13919 long len;
13920 len = rb_array_len(args->rest);
13921 ((__builtin_object_size((locals), 0) != (size_t)-1) ? __builtin___memcpy_chk((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), sizeof(VALUE)*(size_t)(argc), __builtin_object_size((locals), 0)) : __memcpy_ichk((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), sizeof(VALUE)*(size_t)(argc)));
13922 rb_ary_resize(args->rest, len - argc);
13923}
13924static inline int
13925args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
13926{
13927 int i;
13928 if (args->argc >= opt_max) {
13929 args->argc -= opt_max;
13930 args->argv += opt_max;
13931 i = opt_max;
13932 }
13933 else {
13934 int j;
13935 i = args->argc;
13936 args->argc = 0;
13937 if (args->rest) {
13938 int len = rb_long2int_inline(rb_array_len(args->rest));
13939 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
13940 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
13941 locals[i] = argv[args->rest_index];
13942 }
13943 }
13944 for (j=i; j<opt_max; j++) {
13945 locals[j] = ((VALUE)RUBY_Qnil);
13946 }
13947 }
13948 return i;
13949}
13950static inline void
13951args_setup_rest_parameter(struct args_info *args, VALUE *locals)
13952{
13953 *locals = args_rest_array(args);
13954}
13955static VALUE
13956make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
13957{
13958 int i;
13960 for (i=0; i<passed_keyword_len; i++) {
13961 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
13962 rb_ary_push(obj, passed_keywords[i]);
13963 }
13964 }
13965 return obj;
13966}
13967static VALUE
13968make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
13969{
13970 int i;
13971 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
13972 for (i=0; i<passed_keyword_len; i++) {
13973 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
13974 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
13975 }
13976 }
13977 return obj;
13978}
13979static inline int
13980args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
13981{
13982 int i;
13983 const VALUE keyname = (rb_id2sym(key));
13984 for (i=0; i<passed_keyword_len; i++) {
13985 if (keyname == passed_keywords[i]) {
13986 *ptr = passed_values[i];
13987 passed_values[i] = ((VALUE)RUBY_Qundef);
13988 return 1;
13989 }
13990 }
13991 return 0;
13992}
13993#define KW_SPECIFIED_BITS_MAX (32-1)
13994static void
13995args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
13996 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
13997 VALUE *const locals)
13998{
13999 const ID *acceptable_keywords = iseq->body->param.keyword->table;
14000 const int req_key_num = iseq->body->param.keyword->required_num;
14001 const int key_num = iseq->body->param.keyword->num;
14002 const VALUE * const default_values = iseq->body->param.keyword->default_values;
14003 VALUE missing = 0;
14004 int i, di, found = 0;
14005 int unspecified_bits = 0;
14006 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
14007 for (i=0; i<req_key_num; i++) {
14008 ID key = acceptable_keywords[i];
14009 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
14010 found++;
14011 }
14012 else {
14013 if (!missing) missing = rb_ary_tmp_new(1);
14014 rb_ary_push(missing, (rb_id2sym(key)));
14015 }
14016 }
14017 if (missing) argument_kw_error(ec, iseq, "missing", missing);
14018 for (di=0; i<key_num; i++, di++) {
14019 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
14020 found++;
14021 }
14022 else {
14023 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
14024 locals[i] = ((VALUE)RUBY_Qnil);
14025 if ((__builtin_expect(!!(i < (32-1)), 1))) {
14026 unspecified_bits |= 0x01 << di;
14027 }
14028 else {
14029 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
14030 int j;
14031 unspecified_bits_value = rb_hash_new();
14032 for (j=0; j<(32-1); j++) {
14033 if (unspecified_bits & (0x01 << j)) {
14034 rb_hash_aset(unspecified_bits_value, (((VALUE)(j))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
14035 }
14036 }
14037 }
14038 rb_hash_aset(unspecified_bits_value, (((VALUE)(di))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
14039 }
14040 }
14041 else {
14042 locals[i] = default_values[di];
14043 }
14044 }
14045 }
14046 if (iseq->body->param.flags.has_kwrest) {
14047 const int rest_hash_index = key_num + 1;
14048 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
14049 }
14050 else {
14051 if (found != passed_keyword_len) {
14052 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
14053 argument_kw_error(ec, iseq, "unknown", keys);
14054 }
14055 }
14056 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
14057 unspecified_bits_value = (((VALUE)(unspecified_bits))<<1 | RUBY_FIXNUM_FLAG);
14058 }
14059 locals[key_num] = unspecified_bits_value;
14060}
14061static inline void
14062args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals)
14063{
14064 locals[0] = !((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) ? rb_hash_new() : rb_hash_dup(keyword_hash);
14065}
14066static inline void
14067args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
14068{
14069 VALUE block_handler = calling->block_handler;
14070 *locals = rb_vm_bh_to_procval(ec, block_handler);
14071}
14075 int argc;
14076};
14077static int
14078fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
14079{
14080 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
14081 int i = arg->argc++;
14082 arg->keys[i] = (VALUE)key;
14083 arg->vals[i] = (VALUE)val;
14084 return ST_CONTINUE;
14085}
14086static inline int
14087ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq)
14088{
14089 if (!(iseq->body->param.flags.has_kw) &&
14091 keyword_hash = rb_check_hash_type(keyword_hash);
14092 if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) && (((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)) == 0)) {
14093 return 1;
14094 }
14095 }
14096 return 0;
14097}
14099static st_table *caller_to_callees = 0;
14100static VALUE
14101rb_warn_check(const rb_execution_context_t * const ec, const rb_iseq_t *const iseq)
14102{
14104 if (!iseq) return 0;
14107 if (!cfp) return 0;
14108 const st_data_t caller = (st_data_t)cfp->pc;
14109 if (!caller_to_callees) {
14110 caller_to_callees = rb_st_init_numtable();
14111 }
14112 st_data_t val;
14113 if (rb_st_lookup(caller_to_callees, caller, &val)) {
14114 st_table *callees;
14115 if (val & 1) {
14116 val &= ~(st_data_t)1;
14117 if (val == callee) return 1;
14118 callees = rb_st_init_numtable();
14119 rb_st_insert(callees, val, 1);
14120 }
14121 else {
14122 callees = (st_table *) val;
14123 if (rb_st_lookup((callees),(callee),(st_data_t *)0)) return 1;
14124 }
14125 rb_st_insert(callees, callee, 1);
14126 rb_st_insert(caller_to_callees, caller, (st_data_t) callees);
14127 }
14128 else {
14129 rb_st_insert(caller_to_callees, caller, callee | 1);
14130 }
14131 return 0;
14132}
14133static inline void
14134rb_warn_keyword_to_last_hash(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
14135{
14136 if (rb_warn_check(ec, iseq)) return;
14137 VALUE name, loc;
14138 if (calling->recv == ((VALUE)RUBY_Qundef)) {
14139 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
14140 return;
14141 }
14142 name = rb_id2str(ci->mid);
14143 loc = rb_iseq_location(iseq);
14144 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
14145 rb_warn("Passing the keyword argument for `%""l""i" "\v""' as the last hash parameter is deprecated",
14146 name);
14147 }
14148 else {
14149 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
14150 if (name) {
14151 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14152 "The called method `%""l""i" "\v""' is defined here", name);
14153 }
14154 else {
14155 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14156 "The called method is defined here");
14157 }
14158 }
14159}
14160static inline void
14161rb_warn_split_last_hash_to_keyword(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
14162{
14163 if (rb_warn_check(ec, iseq)) return;
14164 VALUE name, loc;
14165 name = rb_id2str(ci->mid);
14166 loc = rb_iseq_location(iseq);
14167 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
14168 rb_warn("Splitting the last argument for `%""l""i" "\v""' into positional and keyword parameters is deprecated",
14169 name);
14170 }
14171 else {
14172 rb_warn("Splitting the last argument into positional and keyword parameters is deprecated");
14173 if (calling->recv != ((VALUE)RUBY_Qundef)) {
14174 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14175 "The called method `%""l""i" "\v""' is defined here", name);
14176 }
14177 else {
14178 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14179 "The called method is defined here");
14180 }
14181 }
14182}
14183static inline void
14184rb_warn_last_hash_to_keyword(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
14185{
14186 if (rb_warn_check(ec, iseq)) return;
14187 VALUE name, loc;
14188 name = rb_id2str(ci->mid);
14189 loc = rb_iseq_location(iseq);
14190 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
14191 rb_warn("Using the last argument for `%""l""i" "\v""' as keyword parameters is deprecated; maybe ** should be added to the call",
14192 name);
14193 }
14194 else {
14195 rb_warn("Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call");
14196 if (calling->recv != ((VALUE)RUBY_Qundef)) {
14197 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14198 "The called method `%""l""i" "\v""' is defined here", name);
14199 }
14200 else {
14201 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
14202 "The called method is defined here");
14203 }
14204 }
14205}
14206static int
14207setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
14208 struct rb_calling_info *const calling,
14209 const struct rb_call_info *ci,
14210 VALUE * const locals, const enum arg_setup_type arg_setup_type)
14211{
14213 const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1);
14214 int given_argc;
14215 int kw_splat = 0;
14216 unsigned int kw_flag = ci->flag & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit));
14217 int opt_pc = 0, allow_autosplat = !kw_flag;
14218 struct args_info args_body, *args;
14219 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
14220 VALUE * const orig_sp = ec->cfp->sp;
14221 unsigned int i;
14222 int remove_empty_keyword_hash = 1;
14223 VALUE flag_keyword_hash = 0;
14224 ;
14225 for (i=calling->argc; i<iseq->body->param.size; i++) {
14226 locals[i] = ((VALUE)RUBY_Qnil);
14227 }
14228 ec->cfp->sp = &locals[i];
14229 args = &args_body;
14230 given_argc = args->argc = calling->argc;
14231 args->argv = locals;
14232 args->rest_dupped = 0;
14233 if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) {
14234 args->kw_arg = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
14235 if (iseq->body->param.flags.has_kw) {
14236 int kw_len = args->kw_arg->keyword_len;
14237 args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len)), _Alignof(VALUE) * 8);
14238 args->argc -= kw_len;
14239 given_argc -= kw_len;
14240 ((__builtin_object_size((args->kw_argv), 0) != (size_t)-1) ? __builtin___memcpy_chk((args->kw_argv), (locals + args->argc), sizeof(VALUE)*(size_t)(kw_len), __builtin_object_size((args->kw_argv), 0)) : __memcpy_ichk((args->kw_argv), (locals + args->argc), sizeof(VALUE)*(size_t)(kw_len)));
14241 }
14242 else {
14243 args->kw_argv = ((void *)0);
14244 given_argc = args_kw_argv_to_hash(args);
14245 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit);
14246 }
14247 }
14248 else {
14249 args->kw_arg = ((void *)0);
14250 args->kw_argv = ((void *)0);
14251 }
14252 if (kw_flag && iseq->body->param.flags.ruby2_keywords) {
14253 remove_empty_keyword_hash = 0;
14254 }
14255 if (ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
14256 VALUE rest_last = 0;
14257 int len;
14258 args->rest = locals[--args->argc];
14259 args->rest_index = 0;
14260 len = rb_long2int_inline(rb_array_len(args->rest));
14261 given_argc += len - 1;
14262 rest_last = (rb_array_const_ptr_transient(args->rest)[len - 1]);
14263 if (!kw_flag && len > 0) {
14264 if (( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(rest_last))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((rest_last) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((rest_last) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((rest_last) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((rest_last) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(rest_last)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(rest_last))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) &&
14265 (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
14266 rest_last = rb_hash_dup(rest_last);
14267 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit);
14269 remove_empty_keyword_hash = 0;
14270 }
14271 }
14272 else {
14273 rest_last = 0;
14274 }
14275 }
14276 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
14277 if (len > 0 && ignore_keyword_hash_p(rest_last, iseq)) {
14278 if (given_argc != min_argc) {
14279 if (remove_empty_keyword_hash) {
14280 arg_rest_dup(args);
14281 rb_ary_pop(args->rest);
14282 given_argc--;
14283 kw_flag &= ~(0x01 << VM_CALL_KW_SPLAT_bit);
14284 }
14285 else {
14286 if (( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(rest_last))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((rest_last) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((rest_last) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((rest_last) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((rest_last) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(rest_last)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(rest_last))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) && rb_obj_frozen_p(rest_last)) {
14287 rest_last = rb_hash_new();
14288 do { const VALUE _ary = (args->rest); const VALUE _v = (rest_last); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); __extension__({
14289#pragma GCC diagnostic push
14290 ;
14291#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
14292 ; typeof(rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 826)) unaligned_member_access_result = (rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "../ruby-2.7.6/vm_args.c", 826));
14293#pragma GCC diagnostic pop
14294 ; unaligned_member_access_result; }); rb_array_ptr_use_end(_ary, 1); } while (0);
14295 }
14296 flag_keyword_hash = rest_last;
14297 }
14298 }
14299 else {
14300 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
14301 }
14302 }
14303 else if (!remove_empty_keyword_hash && rest_last) {
14304 flag_keyword_hash = rest_last;
14305 }
14306 }
14307 }
14308 else {
14309 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
14310 VALUE last_arg = args->argv[args->argc-1];
14311 if (ignore_keyword_hash_p(last_arg, iseq)) {
14312 if (given_argc != min_argc) {
14313 if (remove_empty_keyword_hash) {
14314 args->argc--;
14315 given_argc--;
14316 kw_flag &= ~(0x01 << VM_CALL_KW_SPLAT_bit);
14317 }
14318 else {
14319 if (( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(last_arg))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((last_arg) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((last_arg) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((last_arg) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((last_arg) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(last_arg)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(last_arg) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last_arg) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last_arg))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(last_arg))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(last_arg) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last_arg) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last_arg))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(last_arg) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last_arg) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last_arg))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) && rb_obj_frozen_p(last_arg)) {
14320 last_arg = rb_hash_new();
14321 args->argv[args->argc-1] = last_arg;
14322 }
14323 flag_keyword_hash = last_arg;
14324 }
14325 }
14326 else {
14327 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
14328 }
14329 }
14330 else if (!remove_empty_keyword_hash) {
14331 flag_keyword_hash = args->argv[args->argc-1];
14332 }
14333 }
14334 args->rest = ((VALUE)RUBY_Qfalse);
14335 }
14336 if (flag_keyword_hash && ( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(flag_keyword_hash))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(flag_keyword_hash)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(flag_keyword_hash))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == (RUBY_T_HASH)))) {
14337 ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
14338 }
14339 if (kw_flag && iseq->body->param.flags.accepts_no_kwarg) {
14340 rb_raise(rb_eArgError, "no keywords accepted");
14341 }
14342 switch (arg_setup_type) {
14343 case arg_setup_method:
14344 break;
14345 case arg_setup_block:
14346 if (given_argc == 1 &&
14347 allow_autosplat &&
14348 (min_argc > 0 || iseq->body->param.opt_num > 1 ||
14351 args_check_block_arg0(args)) {
14352 given_argc = rb_long2int_inline(rb_array_len(args->rest));
14353 }
14354 break;
14355 }
14356 if (given_argc < min_argc) {
14357 if (given_argc == min_argc - 1 && args->kw_argv) {
14358 args_stored_kw_argv_to_hash(args);
14359 given_argc = args_argc(args);
14360 }
14361 else {
14363 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(ec->cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((ec->cfp)->sp) + (min_argc)) + 1) >= (ec->cfp))), 1))) {(void)0;} else vm_stackoverflow();
14364 given_argc = min_argc;
14365 args_extend(args, min_argc);
14366 }
14367 else {
14368 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
14369 }
14370 }
14371 }
14372 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
14373 kw_splat = !iseq->body->param.flags.has_rest;
14374 }
14376 (kw_splat && given_argc > max_argc)) &&
14377 args->kw_argv == ((void *)0)) {
14378 if (given_argc > min_argc) {
14379 if (kw_flag) {
14380 int check_only_symbol = (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) &&
14383 if (args_pop_keyword_hash(args, &keyword_hash, check_only_symbol)) {
14384 given_argc--;
14385 }
14386 else if (check_only_symbol) {
14387 if (keyword_hash != ((VALUE)RUBY_Qnil)) {
14388 rb_warn_split_last_hash_to_keyword(ec, calling, ci, iseq);
14389 }
14390 else {
14391 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
14392 }
14393 }
14394 }
14395 else if (args_pop_keyword_hash(args, &keyword_hash, 1)) {
14396 rb_warn_last_hash_to_keyword(ec, calling, ci, iseq);
14397 given_argc--;
14398 }
14399 else if (keyword_hash != ((VALUE)RUBY_Qnil)) {
14400 rb_warn_split_last_hash_to_keyword(ec, calling, ci, iseq);
14401 }
14402 }
14403 else if (given_argc == min_argc && kw_flag) {
14404 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
14405 }
14406 }
14407 if (given_argc > max_argc && max_argc != (-1)) {
14409 args_reduce(args, given_argc - max_argc);
14410 given_argc = max_argc;
14411 }
14412 else {
14413 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
14414 }
14415 }
14416 if (iseq->body->param.flags.has_lead) {
14417 args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0);
14418 }
14420 args_copy(args);
14421 }
14422 if (iseq->body->param.flags.has_post) {
14423 args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start);
14424 }
14425 if (iseq->body->param.flags.has_opt) {
14426 int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num);
14427 opt_pc = (int)iseq->body->param.opt_table[opt];
14428 }
14429 if (iseq->body->param.flags.has_rest) {
14430 args_setup_rest_parameter(args, locals + iseq->body->param.rest_start);
14431 }
14432 if (iseq->body->param.flags.has_kw) {
14433 VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num;
14434 if (args->kw_argv != ((void *)0)) {
14435 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
14436 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
14437 }
14438 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil))) {
14439 int kw_len = rb_long2int_inline(((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)));
14440 struct fill_values_arg arg;
14441 arg.keys = args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len * 2)), _Alignof(VALUE) * 8);
14442 arg.vals = arg.keys + kw_len;
14443 arg.argc = 0;
14444 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
14445 ((void)0);
14446 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
14447 }
14448 else {
14449 ((void)0);
14450 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
14451 }
14452 }
14453 else if (iseq->body->param.flags.has_kwrest) {
14454 args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start);
14455 }
14456 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) && ((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)) > 0 && arg_setup_type == arg_setup_method) {
14457 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
14458 }
14459 if (iseq->body->param.flags.has_block) {
14460 if (iseq->body->local_iseq == iseq) {
14461 }
14462 else {
14463 args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
14464 }
14465 }
14466 ec->cfp->sp = orig_sp;
14467 return opt_pc;
14468}
14470static void
14471raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
14472{
14473 VALUE at;
14474 if (iseq) {
14475 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
14476 0 , ((VALUE)RUBY_Qfalse) ,
14478 ec->cfp->sp, 0, 0 );
14479 at = rb_ec_backtrace_object(ec);
14481 rb_vm_pop_frame(ec);
14482 }
14483 else {
14484 at = rb_ec_backtrace_object(ec);
14485 }
14489}
14490static void
14491argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
14492{
14493 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
14494 if (iseq->body->param.flags.has_kw) {
14495 const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword;
14496 const ID *keywords = kw->table;
14497 int req_key_num = kw->required_num;
14498 if (req_key_num > 0) {
14499 static const char required[] = "; required keywords";
14500 VALUE mesg = rb_attr_get(exc, idMesg);
14501 rb_str_resize(mesg, (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1);
14502 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
14503 __extension__ ({ (__builtin_constant_p(":")) ? rb_str_cat((mesg), (":"), (long)strlen(":")) : rb_str_cat_cstr((mesg), (":")); });
14504 do {
14505 __extension__ ({ (__builtin_constant_p(" ")) ? rb_str_cat((mesg), (" "), (long)strlen(" ")) : rb_str_cat_cstr((mesg), (" ")); });
14506 rb_str_append(mesg, rb_id2str(*keywords++));
14507 __extension__ ({ (__builtin_constant_p(",")) ? rb_str_cat((mesg), (","), (long)strlen(",")) : rb_str_cat_cstr((mesg), (",")); });
14508 } while (--req_key_num);
14509 (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? ((struct RString*)(mesg))->as.ary : ((struct RString*)(mesg))->as.heap.ptr)[(!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1] = ')';
14510 }
14511 }
14512 raise_argument_error(ec, iseq, exc);
14513}
14514static void
14515argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
14516{
14517 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
14518}
14519static inline void
14520vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
14521{
14522 int argc = calling->argc;
14523 VALUE *argv = cfp->sp - argc;
14524 VALUE ary = argv[argc-1];
14525 ;
14526 cfp->sp--;
14527 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
14528 const VALUE *ptr = rb_array_const_ptr_transient(ary);
14529 long len = rb_array_len(ary), i;
14530 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (len)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
14531 for (i = 0; i < len; i++) {
14532 *cfp->sp++ = ptr[i];
14533 }
14534 calling->argc += i - 1;
14535 }
14536}
14537static inline void
14538vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci)
14539{
14540 struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
14541 const VALUE *const passed_keywords = ci_kw->kw_arg->keywords;
14542 const int kw_len = ci_kw->kw_arg->keyword_len;
14543 const VALUE h = rb_hash_new_with_size(kw_len);
14544 VALUE *sp = cfp->sp;
14545 int i;
14546 for (i=0; i<kw_len; i++) {
14547 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
14548 }
14549 (sp-kw_len)[0] = h;
14550 cfp->sp -= kw_len - 1;
14551 calling->argc -= kw_len - 1;
14552 calling->kw_splat = 1;
14553}
14554static VALUE
14555vm_to_proc(VALUE proc)
14556{
14557 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
14558 VALUE b;
14560 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(proc)), idTo_proc, ((void *)0));
14561 if (me) {
14562 b = rb_vm_call0(rb_current_execution_context(), proc, idTo_proc, 0, ((void *)0), me, 0);
14563 }
14564 else {
14566 }
14567 if (!((VALUE)(b) != ((VALUE)RUBY_Qnil)) || !rb_obj_is_proc(b)) {
14569 "wrong argument type %s (expected Proc)",
14570 rb_obj_classname(proc));
14571 }
14572 return b;
14573 }
14574 else {
14575 return proc;
14576 }
14577}
14578static VALUE
14579refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
14580{
14581 VALUE obj;
14582 ID mid;
14585 const VALUE symbol = (rb_array_const_ptr_transient(callback_arg)[0]);
14586 const VALUE refinements = (rb_array_const_ptr_transient(callback_arg)[1]);
14587 int kw_splat = 3;
14588 VALUE v;
14589 VALUE ret;
14590 VALUE klass;
14591 if (argc-- < 1) {
14592 rb_raise(rb_eArgError, "no receiver given");
14593 }
14594 obj = *argv++;
14595 mid = (rb_sym2id(symbol));
14596 for (klass = rb_class_of((VALUE)(obj)); klass; klass = RCLASS_SUPER(klass)) {
14598 if (me) {
14600 if (me) break;
14601 }
14602 }
14603 ec = rb_current_execution_context();
14604 if (!!((VALUE)(blockarg) != ((VALUE)RUBY_Qnil))) {
14605 vm_passed_block_handler_set(ec, blockarg);
14606 }
14607 v = rb_adjust_argv_kw_splat(&argc, &argv, &kw_splat);
14608 if (!me) {
14609 ret = method_missing(obj, mid, argc, argv, MISSING_NOENTRY, kw_splat);
14610 }
14611 else {
14612 ret = rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat);
14613 }
14615 return ret;
14616}
14617static VALUE
14618vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
14619 const struct rb_call_info *ci, const rb_iseq_t *blockiseq, const int is_super)
14620{
14621 if (ci->flag & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
14622 VALUE block_code = *(--reg_cfp->sp);
14623 if (!((VALUE)(block_code) != ((VALUE)RUBY_Qnil))) {
14624 return 0;
14625 }
14626 else if (block_code == rb_block_param_proxy) {
14627 ((void)0);
14628 VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp);
14629 reg_cfp->block_code = (const void *) handler;
14630 return handler;
14631 }
14632 else if (((((VALUE)(block_code)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_code) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_code) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_code))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && __extension__({ static struct rb_call_data rb_mbdp; (rb_cSymbol == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cSymbol, idTo_proc); })) {
14633 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
14634 if (cref && !!((VALUE)(cref->refinements) != ((VALUE)RUBY_Qnil))) {
14635 VALUE ref = cref->refinements;
14636 VALUE func = rb_hash_lookup(ref, block_code);
14637 if (!((VALUE)(func) != ((VALUE)RUBY_Qnil))) {
14638 VALUE callback_arg = rb_ary_tmp_new(2);
14639 rb_ary_push(callback_arg, block_code);
14640 rb_ary_push(callback_arg, ref);
14641 (void)(((struct RBasic*)(callback_arg))->flags |= RUBY_FL_FREEZE);
14642 func = rb_func_proc_new(refine_sym_proc_call, callback_arg);
14643 rb_hash_aset(ref, block_code, func);
14644 }
14645 block_code = func;
14646 }
14647 return block_code;
14648 }
14649 else {
14650 return vm_to_proc(block_code);
14651 }
14652 }
14653 else if (blockiseq != ((void *)0)) {
14654 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
14655 captured->code.iseq = blockiseq;
14656 return VM_BH_FROM_ISEQ_BLOCK(captured);
14657 }
14658 else {
14659 if (is_super) {
14660 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
14661 }
14662 else {
14663 return 0;
14664 }
14665 }
14666}
14667static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc, int param_size, int local_size);
14668__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
14669static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc);
14670static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
14671static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
14672static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
14673static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
14674static vm_call_handler vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size);
14675static VALUE
14676vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
14677{
14678 ((void)0);
14679 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, 0);
14680}
14681static VALUE
14682vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
14683{
14684 ((void)0);
14685 struct rb_call_cache *cc = &cd->cc;
14686 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14687 int param = iseq->body->param.size;
14688 int local = iseq->body->local_table_size;
14689 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
14690}
14691static _Bool
14693{
14694 return iseq->body->param.flags.has_opt == 0 &&
14695 iseq->body->param.flags.has_rest == 0 &&
14696 iseq->body->param.flags.has_post == 0 &&
14697 iseq->body->param.flags.has_kw == 0 &&
14698 iseq->body->param.flags.has_kwrest == 0 &&
14700 iseq->body->param.flags.has_block == 0;
14701}
14702static _Bool
14703rb_iseq_only_optparam_p(const rb_iseq_t *iseq)
14704{
14705 return iseq->body->param.flags.has_opt == 1 &&
14706 iseq->body->param.flags.has_rest == 0 &&
14707 iseq->body->param.flags.has_post == 0 &&
14708 iseq->body->param.flags.has_kw == 0 &&
14709 iseq->body->param.flags.has_kwrest == 0 &&
14711 iseq->body->param.flags.has_block == 0;
14712}
14713static _Bool
14714rb_iseq_only_kwparam_p(const rb_iseq_t *iseq)
14715{
14716 return iseq->body->param.flags.has_opt == 0 &&
14717 iseq->body->param.flags.has_rest == 0 &&
14718 iseq->body->param.flags.has_post == 0 &&
14719 iseq->body->param.flags.has_kw == 1 &&
14720 iseq->body->param.flags.has_kwrest == 0 &&
14721 iseq->body->param.flags.has_block == 0;
14722}
14723static inline void
14724CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict__ cfp,
14726 const struct rb_call_info *__restrict__ ci)
14727{
14728 if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) {
14729 VALUE final_hash;
14730 vm_caller_setup_arg_splat(cfp, calling);
14731 if (!((ci)->flag & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) &&
14732 calling->argc > 0 &&
14733 ( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)((final_hash = *(cfp->sp - 1))))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)((final_hash = *(cfp->sp - 1)))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)((final_hash = *(cfp->sp - 1))))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) &&
14734 (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
14735 *(cfp->sp - 1) = rb_hash_dup(final_hash);
14736 calling->kw_splat = 1;
14737 }
14738 }
14739 if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) {
14740 vm_caller_setup_arg_kw(cfp, calling, ci);
14741 }
14742}
14743static inline void
14744CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict__ cfp,
14746 const struct rb_call_info *__restrict__ ci)
14747{
14748 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
14749 if ((((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
14750 cfp->sp--;
14751 calling->argc--;
14752 calling->kw_splat = 0;
14753 }
14754 }
14755}
14756#define USE_OPT_HIST 0
14757static VALUE
14758vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
14759 struct rb_calling_info *calling,
14760 struct rb_call_data *cd)
14761{
14762 const struct rb_call_cache *cc = &cd->cc;
14763 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14764 const int lead_num = iseq->body->param.lead_num;
14765 const int opt = calling->argc - lead_num;
14766 const int opt_num = iseq->body->param.opt_num;
14767 const int opt_pc = (int)iseq->body->param.opt_table[opt];
14768 const int param = iseq->body->param.size;
14769 const int local = iseq->body->local_table_size;
14770 const int delta = opt_num - opt;
14771 ((void)0);
14772 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, opt_pc, param - delta, local);
14773}
14774static VALUE
14775vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
14776 struct rb_calling_info *calling,
14777 struct rb_call_data *cd)
14778{
14779 const struct rb_call_cache *cc = &cd->cc;
14780 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14781 const int lead_num = iseq->body->param.lead_num;
14782 const int opt = calling->argc - lead_num;
14783 const int opt_pc = (int)iseq->body->param.opt_table[opt];
14784 ((void)0);
14785 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
14786}
14787static void
14788args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
14789 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
14790 VALUE *const locals);
14791static VALUE
14792vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
14793 struct rb_calling_info *calling,
14794 struct rb_call_data *cd)
14795{
14796 const struct rb_kwarg_call_data *kcd = (void *)cd;
14797 const struct rb_call_info_with_kwarg *ci_kw = &kcd->ci_kw;
14798 const struct rb_call_cache *cc = &kcd->cc;
14799 ((void)0);
14800 ((void)0);
14801 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14802 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
14803 const struct rb_call_info_kw_arg *kw_arg = ci_kw->kw_arg;
14804 const int ci_kw_len = kw_arg->keyword_len;
14805 const VALUE * const ci_keywords = kw_arg->keywords;
14806 VALUE *argv = cfp->sp - calling->argc;
14807 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
14808 const int lead_num = iseq->body->param.lead_num;
14809 VALUE * const ci_kws = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(ci_kw_len)), _Alignof(VALUE) * 8);
14810 ((__builtin_object_size((ci_kws), 0) != (size_t)-1) ? __builtin___memcpy_chk((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len), __builtin_object_size((ci_kws), 0)) : __memcpy_ichk((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len)));
14811 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
14812 int param = iseq->body->param.size;
14813 int local = iseq->body->local_table_size;
14814 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
14815}
14816static VALUE
14817vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
14818 struct rb_calling_info *calling,
14819 struct rb_call_data *cd)
14820{
14821 const struct rb_call_info *__attribute__ ((__unused__)) ci = &cd->ci;
14822 const struct rb_call_cache *cc = &cd->cc;
14823 ((void)0);
14824 ((void)0);
14825 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14826 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
14827 VALUE * const argv = cfp->sp - calling->argc;
14828 VALUE * const klocals = argv + kw_param->bits_start - kw_param->num;
14829 int i;
14830 for (i=0; i<kw_param->num; i++) {
14831 klocals[i] = kw_param->default_values[i];
14832 }
14833 klocals[i] = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
14834 int param = iseq->body->param.size;
14835 int local = iseq->body->local_table_size;
14836 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
14837}
14838static inline int
14839vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd,
14840 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
14841{
14842 const struct rb_call_info *ci = &cd->ci;
14843 struct rb_call_cache *cc = &cd->cc;
14844 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
14845 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) {
14846 rb_control_frame_t *cfp = ec->cfp;
14847 CALLER_SETUP_ARG(cfp, calling, ci);
14848 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
14849 if (calling->argc != iseq->body->param.lead_num) {
14850 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
14851 }
14852 CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), vm_call_iseq_optimizable_p(&cd->ci, &cd->cc));
14853 return 0;
14854 }
14855 else if (rb_iseq_only_optparam_p(iseq)) {
14856 rb_control_frame_t *cfp = ec->cfp;
14857 CALLER_SETUP_ARG(cfp, calling, ci);
14858 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
14859 const int lead_num = iseq->body->param.lead_num;
14860 const int opt_num = iseq->body->param.opt_num;
14861 const int argc = calling->argc;
14862 const int opt = argc - lead_num;
14863 if (opt < 0 || opt > opt_num) {
14864 argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num);
14865 }
14866 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
14867 CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start,
14868 !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
14869 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
14870 }
14871 else {
14872 CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start,
14873 !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
14874 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
14875 }
14876 ((void)0);
14877 for (int i=argc; i<lead_num + opt_num; i++) {
14878 argv[i] = ((VALUE)RUBY_Qnil);
14879 }
14880 return (int)iseq->body->param.opt_table[opt];
14881 }
14882 else if (rb_iseq_only_kwparam_p(iseq) && !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))) {
14883 const int lead_num = iseq->body->param.lead_num;
14884 const int argc = calling->argc;
14885 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
14886 if (ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
14887 const struct rb_call_info_kw_arg *kw_arg = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
14888 if (argc - kw_arg->keyword_len == lead_num) {
14889 const int ci_kw_len = kw_arg->keyword_len;
14890 const VALUE * const ci_keywords = kw_arg->keywords;
14891 VALUE * const ci_kws = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(ci_kw_len)), _Alignof(VALUE) * 8);
14892 ((__builtin_object_size((ci_kws), 0) != (size_t)-1) ? __builtin___memcpy_chk((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len), __builtin_object_size((ci_kws), 0)) : __memcpy_ichk((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len)));
14893 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
14894 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
14895 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg,
14896 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
14897 return 0;
14898 }
14899 }
14900 else if (argc == lead_num) {
14901 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
14902 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
14903 if (klocals[kw_param->num] == (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG)) {
14904 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg,
14905 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
14906 }
14907 return 0;
14908 }
14909 }
14910 }
14911 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
14912}
14913static VALUE
14914vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
14915{
14916 ((void)0);
14917 const struct rb_call_cache *cc = &cd->cc;
14918 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
14919 const int param_size = iseq->body->param.size;
14920 const int local_size = iseq->body->local_table_size;
14921 const int opt_pc = vm_callee_setup_arg(ec, calling, cd, def_iseq_ptr(cc->me->def), cfp->sp - calling->argc, param_size, local_size);
14922 return vm_call_iseq_setup_2(ec, cfp, calling, cd, opt_pc, param_size, local_size);
14923}
14924static inline VALUE
14925vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
14926 int opt_pc, int param_size, int local_size)
14927{
14928 const struct rb_call_info *ci = &cd->ci;
14929 const struct rb_call_cache *cc = &cd->cc;
14930 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
14931 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, opt_pc, param_size, local_size);
14932 }
14933 else {
14934 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
14935 }
14936}
14937static inline VALUE
14939 int opt_pc, int param_size, int local_size)
14940{
14941 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
14942 VALUE *argv = cfp->sp - calling->argc;
14943 VALUE *sp = argv + param_size;
14944 cfp->sp = argv - 1 ;
14945 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
14946 calling->block_handler, (VALUE)me,
14947 iseq->body->iseq_encoded + opt_pc, sp,
14949 iseq->body->stack_max);
14950 return ((VALUE)RUBY_Qundef);
14951}
14952static inline VALUE
14953vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
14954 int opt_pc)
14955{
14956 const struct rb_call_cache *cc = &cd->cc;
14957 unsigned int i;
14958 VALUE *argv = cfp->sp - calling->argc;
14960 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
14961 VALUE *src_argv = argv;
14962 VALUE *sp_orig, *sp;
14963 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
14964 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
14965 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
14966 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
14967 dst_captured->code.val = src_captured->code.val;
14968 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
14969 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
14970 }
14971 else {
14972 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
14973 }
14974 }
14975 vm_pop_frame(ec, cfp, cfp->ep);
14976 cfp = ec->cfp;
14977 sp_orig = sp = cfp->sp;
14978 sp[0] = calling->recv;
14979 sp++;
14980 for (i=0; i < iseq->body->param.size; i++) {
14981 *sp++ = src_argv[i];
14982 }
14983 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
14984 calling->recv, calling->block_handler, (VALUE)me,
14985 iseq->body->iseq_encoded + opt_pc, sp,
14987 iseq->body->stack_max);
14988 cfp->sp = sp_orig;
14989 return ((VALUE)RUBY_Qundef);
14990}
14991static VALUE
14992call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
14993{
14994 return (*func)(recv, rb_ary_new_from_values(argc, argv));
14995}
14996static VALUE
14997call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
14998{
14999 return (*func)(argc, argv, recv);
15000}
15001static VALUE
15002call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15003{
15004 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
15005 return (*f)(recv);
15006}
15007static VALUE
15008call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15009{
15010 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
15011 return (*f)(recv, argv[0]);
15012}
15013static VALUE
15014call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15015{
15016 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
15017 return (*f)(recv, argv[0], argv[1]);
15018}
15019static VALUE
15020call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15021{
15022 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
15023 return (*f)(recv, argv[0], argv[1], argv[2]);
15024}
15025static VALUE
15026call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15027{
15028 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
15029 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
15030}
15031static VALUE
15032call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15033{
15035 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
15036}
15037static VALUE
15038call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15039{
15041 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
15042}
15043static VALUE
15044call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15045{
15047 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
15048}
15049static VALUE
15050call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15051{
15053 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
15054}
15055static VALUE
15056call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15057{
15059 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
15060}
15061static VALUE
15062call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15063{
15065 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
15066}
15067static VALUE
15068call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15069{
15071 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
15072}
15073static VALUE
15074call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15075{
15077 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
15078}
15079static VALUE
15080call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15081{
15083 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
15084}
15085static VALUE
15086call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15087{
15089 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
15090}
15091static VALUE
15092call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
15093{
15095 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
15096}
15097static inline int
15098vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
15099{
15100 const int ov_flags = RAISED_STACKOVERFLOW;
15101 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
15102 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
15103 ((ec)->raised_flag &= ~(ov_flags));
15104 return 1;
15105 }
15106 return 0;
15107}
15108#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
15109static inline
15110const rb_method_cfunc_t *
15111vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
15112{
15113 return __extension__({
15114#pragma GCC diagnostic push
15115 ;
15116#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
15117 ; typeof(&(me->def)->body.cfunc) unaligned_member_access_result = (&(me->def)->body.cfunc);
15118#pragma GCC diagnostic pop
15119 ; unaligned_member_access_result; });
15120}
15121static VALUE
15122vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int empty_kw_splat)
15123{
15124 const struct rb_call_info *ci = &cd->ci;
15125 const struct rb_call_cache *cc = &cd->cc;
15126 VALUE val;
15128 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
15129 int len = cfunc->argc;
15130 VALUE recv = calling->recv;
15131 VALUE block_handler = calling->block_handler;
15133 int argc = calling->argc;
15134 int orig_argc = argc;
15135 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
15136 frame_type |= VM_FRAME_FLAG_CFRAME_KW;
15137 }
15138 else if ((__builtin_expect(!!(empty_kw_splat), 0))) {
15139 frame_type |= VM_FRAME_FLAG_CFRAME_EMPTY_KW;
15140 }
15141 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
15142 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
15143 vm_push_frame(ec, ((void *)0), frame_type, recv,
15145 0, ec->cfp->sp, 0, 0);
15146 if (len >= 0) rb_check_arity(argc, len, len);
15147 reg_cfp->sp -= orig_argc + 1;
15148 val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func);
15149 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
15150 rb_vm_pop_frame(ec);
15151 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, val, 0); } } while (0);
15152 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
15153 return val;
15154}
15155static VALUE
15157{
15158 const struct rb_call_info *ci = &cd->ci;
15159 int empty_kw_splat;
15160 ((void)0);
15161 CALLER_SETUP_ARG(reg_cfp, calling, ci);
15162 empty_kw_splat = calling->kw_splat;
15163 CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci);
15164 if (empty_kw_splat && calling->kw_splat) {
15165 empty_kw_splat = 0;
15166 }
15167 return vm_call_cfunc_with_frame(ec, reg_cfp, calling, cd, empty_kw_splat);
15168}
15169static VALUE
15171{
15172 struct rb_call_cache *cc = &cd->cc;
15173 ((void)0);
15174 cfp->sp -= 1;
15175 return vm_getivar(calling->recv, cc->me->def->body.attr.id, ((void *)0), cc, 1);
15176}
15177static VALUE
15178vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15179{
15180 struct rb_call_cache *cc = &cd->cc;
15181 ((void)0);
15182 VALUE val = *(cfp->sp - 1);
15183 cfp->sp -= 2;
15184 return vm_setivar(calling->recv, cc->me->def->body.attr.id, val, ((void *)0), cc, 1);
15185}
15186static inline VALUE
15187vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv)
15188{
15189 rb_proc_t *proc;
15190 VALUE val;
15191 const struct rb_call_cache *cc = &cd->cc;
15192 (((proc)) = (rb_proc_t*)(((struct RData*)(((cc->me->def->body.bmethod.proc))))->data));
15193 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, cc->me);
15194 return val;
15195}
15196static VALUE
15197vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15198{
15199 ((void)0);
15200 VALUE *argv;
15201 int argc;
15202 const struct rb_call_info *ci = &cd->ci;
15203 CALLER_SETUP_ARG(cfp, calling, ci);
15204 argc = calling->argc;
15205 argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(argc)), _Alignof(VALUE) * 8);
15206 ((__builtin_object_size((argv), 0) != (size_t)-1) ? __builtin___memcpy_chk((argv), (cfp->sp - argc), sizeof(VALUE)*(size_t)(argc), __builtin_object_size((argv), 0)) : __memcpy_ichk((argv), (cfp->sp - argc), sizeof(VALUE)*(size_t)(argc)));
15207 cfp->sp += - argc - 1;
15208 return vm_call_bmethod_body(ec, calling, cd, argv);
15209}
15210static enum method_missing_reason
15211ci_missing_reason(const struct rb_call_info *ci)
15212{
15214 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
15215 if (ci->flag & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
15216 if (ci->flag & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
15217 return stat;
15218}
15219static VALUE
15220vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *orig_cd)
15221{
15222 ((void)0);
15223 int i;
15224 VALUE sym;
15225 const struct rb_call_info *orig_ci = &orig_cd->ci;
15226 const struct rb_call_cache *orig_cc = &orig_cd->cc;
15227 struct rb_call_info *ci;
15228 struct rb_call_cache *cc;
15229 struct rb_kwarg_call_data cd;
15230 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
15231 i = calling->argc - 1;
15232 if (calling->argc == 0) {
15233 rb_raise(rb_eArgError, "no method name given");
15234 }
15235 if (orig_ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
15236 const struct rb_kwarg_call_data *orig_kcd = (void *)orig_cd;
15237 cd = *orig_kcd;
15238 }
15239 else {
15240 cd.ci_kw.ci = *orig_ci;
15241 cd.cc = *orig_cc;
15242 }
15243 ci = &cd.ci_kw.ci;
15244 cc = &cd.cc;
15245 sym = (*(((((reg_cfp)->sp)))-(i)-1));
15246 if (!(ci->mid = rb_check_id(&sym))) {
15247 if (__extension__({ static struct rb_call_data rb_mbdp; (rb_class_of((VALUE)(calling->recv)) == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_class_of((VALUE)(calling->recv)), idMethodMissing); })) {
15248 VALUE exc =
15250 rb_long2int_inline(calling->argc), &(*(((((reg_cfp)->sp)))-(i)-1)),
15251 ci->flag & ((0x01 << VM_CALL_FCALL_bit)|(0x01 << VM_CALL_VCALL_bit)));
15253 }
15254 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(sym);
15255 ci->mid = idMethodMissing;
15256 ec->method_missing_reason = cc->aux.method_missing_reason = ci_missing_reason(ci);
15257 }
15258 else {
15259 if (i > 0) {
15260 ((__builtin_object_size((&(*(((((reg_cfp)->sp)))-(i)-1))), 0) != (size_t)-1) ? __builtin___memmove_chk((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), sizeof(VALUE)*(size_t)(i), __builtin_object_size((&(*(((((reg_cfp)->sp)))-(i)-1))), 0)) : __memmove_ichk((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), sizeof(VALUE)*(size_t)(i)));
15261 }
15262 calling->argc -= 1;
15263 (((reg_cfp)->sp) -= (((1))));
15264 }
15265 CC_SET_ME(cc, rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(calling->recv)), ci->mid, ((void *)0)));
15266 ci->flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
15267 return vm_call_method(ec, reg_cfp, calling, (CALL_DATA)&cd);
15268}
15269static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
15270__attribute__ ((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
15271static VALUE
15272vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15273 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
15274{
15275 int argc = calling->argc;
15276 if (argc > 0) ((__builtin_object_size((&(*(((((reg_cfp)->sp)))-(argc)-1))), 0) != (size_t)-1) ? __builtin___memmove_chk((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), sizeof(VALUE)*(size_t)(argc), __builtin_object_size((&(*(((((reg_cfp)->sp)))-(argc)-1))), 0)) : __memmove_ichk((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), sizeof(VALUE)*(size_t)(argc)));
15277 (((reg_cfp)->sp) -= (((1))));
15278 return vm_invoke_block(ec, reg_cfp, calling, ci, block_handler);
15279}
15280static VALUE
15281vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15282{
15283 ((void)0);
15284 const struct rb_call_info *ci = &cd->ci;
15285 VALUE procval = calling->recv;
15286 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
15287}
15288static VALUE
15289vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15290{
15291 ((void)0);
15292 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
15293 const struct rb_call_info *ci = &cd->ci;
15294 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
15295 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
15296 }
15297 else {
15298 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
15299 vm_search_method(cd, calling->recv);
15300 return vm_call_general(ec, reg_cfp, calling, cd);
15301 }
15302}
15303static VALUE
15304vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *orig_cd)
15305{
15306 ((void)0);
15307 const struct rb_call_info *orig_ci = &orig_cd->ci;
15308 const struct rb_call_cache *orig_cc = &orig_cd->cc;
15309 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
15310 struct rb_call_data cd = *orig_cd;
15311 unsigned int argc;
15312 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
15313 argc = calling->argc+1;
15314 cd.ci.flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
15315 cd.ci.mid = idMethodMissing;
15316 cd.ci.orig_argc = argc;
15317 cd.cc.me =
15319 idMethodMissing, ((void *)0));
15320 calling->argc = argc;
15321 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(reg_cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((reg_cfp)->sp) + (1)) + 1) >= (reg_cfp))), 1))) {(void)0;} else vm_stackoverflow();
15322 ;
15323 if (argc > 1) {
15324 ((__builtin_object_size((argv+1), 0) != (size_t)-1) ? __builtin___memmove_chk((argv+1), (argv), sizeof(VALUE)*(size_t)(argc-1), __builtin_object_size((argv+1), 0)) : __memmove_ichk((argv+1), (argv), sizeof(VALUE)*(size_t)(argc-1)));
15325 }
15326 argv[0] = (rb_id2sym(orig_ci->mid));
15327 (((reg_cfp)->sp) += (((1))));
15329 return vm_call_method(ec, reg_cfp, calling, &cd);
15330}
15331static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
15332static VALUE
15334{
15335 ((void)0);
15336 const struct rb_call_info *ci = &cd->ci;
15337 struct rb_call_cache *cc = &cd->cc;
15339 CC_SET_ME(cc, klass ? rb_callable_method_entry(klass, ci->mid) : ((void *)0));
15340 if (!cc->me) {
15341 return vm_call_method_nome(ec, cfp, calling, cd);
15342 }
15343 if (cc->me->def->type == VM_METHOD_TYPE_REFINED &&
15344 cc->me->def->body.refined.orig_me) {
15345 CC_SET_ME(cc, refined_method_callable_without_refinement(cc->me));
15346 }
15347 return vm_call_method_each_type(ec, cfp, calling, cd);
15348}
15349static inline VALUE
15350find_refinement(VALUE refinements, VALUE klass)
15351{
15352 if (!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
15353 return ((VALUE)RUBY_Qnil);
15354 }
15355 return rb_hash_lookup(refinements, klass);
15356}
15357__attribute__ ((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
15358static rb_control_frame_t *
15359current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
15360{
15361 rb_control_frame_t *top_cfp = cfp;
15362 if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) {
15363 const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq;
15364 do {
15365 cfp = ((cfp)+1);
15366 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
15367 return top_cfp;
15368 }
15369 } while (cfp->iseq != local_iseq);
15370 }
15371 return cfp;
15372}
15373__attribute__ ((__visibility__("default"))) extern VALUE
15375{
15377 if (( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) && ((!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((klass)))->flags&((((VALUE)RUBY_FL_USER5)))):0)) klass = (((struct RBasic*)(klass))->klass);
15378 while (!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
15379 VALUE owner = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ? (((struct RBasic*)(klass))->klass) : klass;
15380 if (owner == target_owner) {
15381 return klass;
15382 }
15384 }
15386}
15387static const rb_callable_method_entry_t *
15388aliased_callable_method_entry(const rb_callable_method_entry_t *me)
15389{
15390 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
15391 const rb_callable_method_entry_t *cme;
15392 if (orig_me->defined_class == 0) {
15393 VALUE defined_class = rb_find_defined_class_by_owner(me->defined_class, orig_me->owner);
15394 ((void)0);
15395 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
15396 if (me->def->alias_count + me->def->complemented_count == 0) {
15397 __extension__({
15398#pragma GCC diagnostic push
15399 ;
15400#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
15401 ; typeof(rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "../ruby-2.7.6/vm_insnhelper.c", 2828)) unaligned_member_access_result = (rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "../ruby-2.7.6/vm_insnhelper.c", 2828));
15402#pragma GCC diagnostic pop
15403 ; unaligned_member_access_result; });
15404 }
15405 else {
15408 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
15409 }
15410 }
15411 else {
15412 cme = (const rb_callable_method_entry_t *)orig_me;
15413 }
15414 ((void)0);
15415 return cme;
15416}
15417static const rb_callable_method_entry_t *
15418refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
15419{
15420 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
15421 const rb_callable_method_entry_t *cme;
15422 if (orig_me->defined_class == 0) {
15423 cme = ((void *)0);
15425 }
15426 else {
15427 cme = (const rb_callable_method_entry_t *)orig_me;
15428 }
15429 ((void)0);
15430 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
15431 cme = ((void *)0);
15432 }
15433 return cme;
15434}
15435static int
15436search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, ID mid, struct rb_call_cache *cc)
15437{
15438 const rb_cref_t *cref = vm_get_cref(cfp->ep);
15439 for (; cref; cref = CREF_NEXT(cref)) {
15440 const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), cc->me->owner);
15441 if (!((VALUE)(refinement) != ((VALUE)RUBY_Qnil))) continue;
15442 const rb_callable_method_entry_t *const ref_me =
15443 rb_callable_method_entry(refinement, mid);
15444 if (ref_me) {
15445 if (cc->call == vm_call_super_method) {
15446 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
15447 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
15448 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
15449 continue;
15450 }
15451 }
15452 if (cc->me->def->type != VM_METHOD_TYPE_REFINED ||
15453 cc->me->def != ref_me->def) {
15454 CC_SET_ME(cc, ref_me);
15455 }
15456 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
15457 return 1;
15458 }
15459 }
15460 else {
15461 CC_SET_ME(cc, ((void *)0));
15462 return 0;
15463 }
15464 }
15465 if (cc->me->def->body.refined.orig_me) {
15466 CC_SET_ME(cc, refined_method_callable_without_refinement(cc->me));
15467 }
15468 else {
15470 CC_SET_ME(cc, klass ? rb_callable_method_entry(klass, mid) : ((void *)0));
15471 }
15472 return 1;
15473}
15474static VALUE
15475vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15476{
15477 const struct rb_call_info *ci = &cd->ci;
15478 struct rb_call_cache *cc = &cd->cc;
15479 switch (cc->me->def->type) {
15481 CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1);
15482 return vm_call_iseq_setup(ec, cfp, calling, cd);
15485 CC_SET_FASTPATH(cc, vm_call_cfunc, 1);
15486 return vm_call_cfunc(ec, cfp, calling, cd);
15488 CALLER_SETUP_ARG(cfp, calling, ci);
15489 if (calling->argc == 1 && calling->kw_splat && (((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
15490 rb_warn_keyword_to_last_hash(ec, calling, ci, ((void *)0));
15491 }
15492 else {
15493 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
15494 }
15495 rb_check_arity(calling->argc, 1, 1);
15496 cc->aux.index = 0;
15497 CC_SET_FASTPATH(cc, vm_call_attrset, !((ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (ci->flag & (0x01 << VM_CALL_KWARG_bit))));
15498 return vm_call_attrset(ec, cfp, calling, cd);
15500 CALLER_SETUP_ARG(cfp, calling, ci);
15501 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
15502 rb_check_arity(calling->argc, 0, 0);
15503 cc->aux.index = 0;
15504 CC_SET_FASTPATH(cc, vm_call_ivar, !(ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)));
15505 return vm_call_ivar(ec, cfp, calling, cd);
15508 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
15509 return vm_call_method_missing(ec, cfp, calling, cd);
15511 CC_SET_FASTPATH(cc, vm_call_bmethod, 1);
15512 return vm_call_bmethod(ec, cfp, calling, cd);
15514 CC_SET_ME(cc, aliased_callable_method_entry(cc->me));
15515 ((void)0);
15516 return vm_call_method_each_type(ec, cfp, calling, cd);
15518 switch (cc->me->def->body.optimize_type) {
15520 CC_SET_FASTPATH(cc, vm_call_opt_send, 1);
15521 return vm_call_opt_send(ec, cfp, calling, cd);
15523 CC_SET_FASTPATH(cc, vm_call_opt_call, 1);
15524 return vm_call_opt_call(ec, cfp, calling, cd);
15526 CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1);
15527 return vm_call_opt_block_call(ec, cfp, calling, cd);
15528 default:
15529 rb_bug("vm_call_method: unsupported optimized method type (%d)",
15531 }
15533 break;
15535 return vm_call_zsuper(ec, cfp, calling, cd, ((((struct RClass*)(cc->me->defined_class))->ptr)->origin_));
15537 if (search_refined_method(ec, cfp, ci->mid, cc))
15538 return vm_call_method(ec, cfp, calling, cd);
15539 else
15540 return vm_call_method_nome(ec, cfp, calling, cd);
15541 }
15542 rb_bug("vm_call_method: unsupported method type (%d)", cc->me->def->type);
15543}
15544__attribute__ ((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
15545static VALUE
15546vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15547{
15548 const struct rb_call_info *ci = &cd->ci;
15549 struct rb_call_cache *cc = &cd->cc;
15550 const int stat = ci_missing_reason(ci);
15551 if (ci->mid == idMethodMissing) {
15553 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
15554 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
15555 }
15556 else {
15558 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
15559 return vm_call_method_missing(ec, cfp, calling, cd);
15560 }
15561}
15562static inline VALUE
15563vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15564{
15565 const struct rb_call_info *ci = &cd->ci;
15566 struct rb_call_cache *cc = &cd->cc;
15567 ((void)0);
15568 if (cc->me != ((void *)0)) {
15569 switch ((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
15570 case METHOD_VISI_PUBLIC:
15571 return vm_call_method_each_type(ec, cfp, calling, cd);
15573 if (!(ci->flag & (0x01 << VM_CALL_FCALL_bit))) {
15575 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
15577 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
15578 return vm_call_method_missing(ec, cfp, calling, cd);
15579 }
15580 return vm_call_method_each_type(ec, cfp, calling, cd);
15582 if (!(ci->flag & (0x01 << VM_CALL_OPT_SEND_bit))) {
15585 return vm_call_method_missing(ec, cfp, calling, cd);
15586 }
15587 else {
15588 ((void)0);
15589 if (ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
15590 struct rb_kwarg_call_data *kcd = (void *)cd;
15591 struct rb_kwarg_call_data cd_entry = *kcd;
15592 return vm_call_method_each_type(ec, cfp, calling, (void *)&cd_entry);
15593 }
15594 else {
15595 struct rb_call_data cd_entry = *cd;
15596 return vm_call_method_each_type(ec, cfp, calling, &cd_entry);
15597 }
15598 }
15599 }
15600 return vm_call_method_each_type(ec, cfp, calling, cd);
15601 default:
15602 rb_bug("unreachable");
15603 }
15604 }
15605 else {
15606 return vm_call_method_nome(ec, cfp, calling, cd);
15607 }
15608}
15609static VALUE
15610vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15611{
15612 ((void)0);
15613 return vm_call_method(ec, reg_cfp, calling, cd);
15614}
15615static VALUE
15616vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15617{
15618 ((void)0);
15619 const struct rb_call_cache *cc = &cd->cc;
15620 if (cc->call != vm_call_super_method) rb_bug("bug");
15621 return vm_call_method(ec, reg_cfp, calling, cd);
15622}
15623static inline VALUE
15624vm_search_normal_superclass(VALUE klass)
15625{
15626 if ((int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_ICLASS &&
15627 ((!(((VALUE)(((struct RBasic*)(klass))->klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(((struct RBasic*)(klass))->klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(((struct RBasic*)(klass))->klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((((struct RBasic*)(klass))->klass)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
15628 klass = ((struct RBasic*)(klass))->klass;
15629 }
15630 klass = ((((struct RClass*)(klass))->ptr)->origin_);
15631 return RCLASS_SUPER(klass);
15632}
15633__attribute__ ((__noreturn__)) static void vm_super_outside(void);
15634static void
15635vm_super_outside(void)
15636{
15637 rb_raise(rb_eNoMethodError, "super called outside of method");
15638}
15639static void
15640vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv)
15641{
15642 VALUE current_defined_class, klass;
15643 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
15644 struct rb_call_info *ci = &cd->ci;
15645 struct rb_call_cache *cc = &cd->cc;
15646 if (!me) {
15647 vm_super_outside();
15648 }
15649 current_defined_class = me->defined_class;
15650 if (!!((VALUE)(((((struct RClass*)(current_defined_class))->ptr)->refined_class)) != ((VALUE)RUBY_Qnil))) {
15651 current_defined_class = ((((struct RClass*)(current_defined_class))->ptr)->refined_class);
15652 }
15653 if ((int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_MODULE &&
15654 !((!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((current_defined_class)))->flags&((RMODULE_INCLUDED_INTO_REFINEMENT))):0) &&
15655 !rb_obj_is_kind_of(recv, current_defined_class)) {
15656 VALUE m = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(current_defined_class))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((current_defined_class) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((current_defined_class) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((current_defined_class) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((current_defined_class) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(current_defined_class)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(current_defined_class))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ?
15657 ((((struct RClass*)(current_defined_class))->ptr)->includer) : current_defined_class;
15658 if (m) {
15660 "self has wrong type to call super in this context: "
15661 "%""l""i" "\v"" (expected %""l""i" "\v"")",
15662 rb_obj_class(recv), m);
15663 }
15664 }
15665 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (ci->flag & (0x01 << VM_CALL_ZSUPER_bit))) {
15667 "implicit argument passing of super from method defined"
15668 " by define_method() is not supported."
15669 " Specify all arguments explicitly.");
15670 }
15671 ci->mid = me->def->original_id;
15672 klass = vm_search_normal_superclass(me->defined_class);
15673 if (!klass) {
15675 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
15676 }
15677 else {
15678 CC_SET_ME(cc, rb_callable_method_entry(klass, ci->mid));
15679 CC_SET_FASTPATH(cc, vm_call_super_method, 1);
15680 }
15681}
15682static inline int
15683block_proc_is_lambda(const VALUE procval)
15684{
15685 rb_proc_t *proc;
15686 if (procval) {
15687 (((proc)) = (rb_proc_t*)(((struct RData*)(((procval))))->data));
15688 return proc->is_lambda;
15689 }
15690 else {
15691 return 0;
15692 }
15693}
15694static VALUE
15695vm_yield_with_cfunc(rb_execution_context_t *ec,
15696 const struct rb_captured_block *captured,
15697 VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
15699{
15700 int is_lambda = 0;
15701 VALUE val, arg, blockarg;
15702 int frame_flag;
15703 const struct vm_ifunc *ifunc = captured->code.ifunc;
15704 if (is_lambda) {
15706 }
15707 else if (argc == 0) {
15708 arg = ((VALUE)RUBY_Qnil);
15709 }
15710 else {
15711 arg = argv[0];
15712 }
15713 blockarg = rb_vm_bh_to_procval(ec, block_handler);
15715 switch (kw_splat) {
15716 case 1:
15717 frame_flag |= VM_FRAME_FLAG_CFRAME_KW;
15718 break;
15719 case 2:
15720 frame_flag |= VM_FRAME_FLAG_CFRAME_EMPTY_KW;
15721 break;
15722 }
15723 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
15724 frame_flag,
15725 self,
15726 ((VALUE)((captured->ep)) | (0x01)),
15727 (VALUE)me,
15728 0, ec->cfp->sp, 0, 0);
15729 val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg);
15730 rb_vm_pop_frame(ec);
15731 return val;
15732}
15733static VALUE
15734vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
15735{
15736 return rb_sym_proc_call((rb_sym2id(symbol)), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler));
15737}
15738static inline int
15739vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
15740{
15741 int i;
15742 long len = rb_array_len(ary);
15743 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
15744 for (i=0; i<len && i<iseq->body->param.lead_num; i++) {
15745 argv[i] = (rb_array_const_ptr_transient(ary)[i]);
15746 }
15747 return i;
15748}
15749static inline VALUE
15750vm_callee_setup_block_arg_arg0_check(VALUE *argv)
15751{
15752 VALUE ary, arg0 = argv[0];
15753 ary = rb_check_array_type(arg0);
15754 ((void)0);
15755 return ary;
15756}
15757static int
15758vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
15759{
15760 if (rb_simple_iseq_p(iseq)) {
15761 rb_control_frame_t *cfp = ec->cfp;
15762 VALUE arg0;
15763 CALLER_SETUP_ARG(cfp, calling, ci);
15764 if (calling->kw_splat && calling->argc == iseq->body->param.lead_num + iseq->body->param.post_num && (((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
15765 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
15766 }
15767 else {
15768 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
15769 }
15771 calling->argc == 1 &&
15774 !!((VALUE)(arg0 = vm_callee_setup_block_arg_arg0_check(argv)) != ((VALUE)RUBY_Qnil))) {
15775 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
15776 }
15777 if (calling->argc != iseq->body->param.lead_num) {
15779 if (calling->argc < iseq->body->param.lead_num) {
15780 int i;
15781 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
15782 for (i=calling->argc; i<iseq->body->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
15783 calling->argc = iseq->body->param.lead_num;
15784 }
15785 else if (calling->argc > iseq->body->param.lead_num) {
15786 calling->argc = iseq->body->param.lead_num;
15787 }
15788 }
15789 else {
15790 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
15791 }
15792 }
15793 return 0;
15794 }
15795 else {
15796 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
15797 }
15798}
15799static int
15800vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type)
15801{
15802 struct rb_calling_info calling_entry, *calling;
15803 struct rb_call_info ci_entry, *ci;
15804 calling = &calling_entry;
15805 calling->argc = argc;
15806 calling->block_handler = block_handler;
15807 calling->kw_splat = kw_splat;
15808 calling->recv = ((VALUE)RUBY_Qundef);
15809 ci_entry.flag = kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0;
15810 ci = &ci_entry;
15811 return vm_callee_setup_block_arg(ec, calling, ci, iseq, argv, arg_setup_type);
15812}
15813static VALUE
15814vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15815 struct rb_calling_info *calling, const struct rb_call_info *ci,
15816 int is_lambda, const struct rb_captured_block *captured)
15817{
15818 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
15819 const int arg_size = iseq->body->param.size;
15820 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
15821 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
15822 (((reg_cfp)->sp) = (((rsp))));
15823 vm_push_frame(ec, iseq,
15824 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
15825 captured->self,
15826 ((VALUE)((captured->ep)) | (0x01)), 0,
15828 rsp + arg_size,
15829 iseq->body->local_table_size - arg_size, iseq->body->stack_max);
15830 return ((VALUE)RUBY_Qundef);
15831}
15832static VALUE
15833vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15834 struct rb_calling_info *calling, const struct rb_call_info *ci,
15835 VALUE symbol)
15836{
15837 VALUE val;
15838 int argc;
15839 CALLER_SETUP_ARG(ec->cfp, calling, ci);
15840 argc = calling->argc;
15841 val = vm_yield_with_symbol(ec, symbol, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler);
15842 ((((reg_cfp)->sp) -= (((argc)))));
15843 return val;
15844}
15845static VALUE
15846vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
15847 struct rb_calling_info *calling, const struct rb_call_info *ci,
15848 const struct rb_captured_block *captured)
15849{
15850 VALUE val;
15851 int argc;
15852 int kw_splat = calling->kw_splat;
15853 CALLER_SETUP_ARG(ec->cfp, calling, ci);
15854 CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci);
15855 if (kw_splat && !calling->kw_splat) {
15856 kw_splat = 2;
15857 }
15858 else {
15859 kw_splat = calling->kw_splat;
15860 }
15861 argc = calling->argc;
15862 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), kw_splat, calling->block_handler, ((void *)0));
15863 ((((reg_cfp)->sp) -= (((argc)))));
15864 return val;
15865}
15866static VALUE
15867vm_proc_to_block_handler(VALUE procval)
15868{
15869 const struct rb_block *block = vm_proc_block(procval);
15870 switch (vm_block_type(block)) {
15871 case block_type_iseq:
15872 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
15873 case block_type_ifunc:
15874 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
15875 case block_type_symbol:
15876 return VM_BH_FROM_SYMBOL(block->as.symbol);
15877 case block_type_proc:
15878 return VM_BH_FROM_PROC(block->as.proc);
15879 }
15880 __builtin_unreachable();
15881 return ((VALUE)RUBY_Qundef);
15882}
15883static inline VALUE
15885 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
15886{
15887 int is_lambda = 0;
15888 again:
15889 switch (vm_block_handler_type(block_handler)) {
15891 {
15892 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
15893 return vm_invoke_iseq_block(ec, reg_cfp, calling, ci, is_lambda, captured);
15894 }
15896 {
15897 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
15898 return vm_invoke_ifunc_block(ec, reg_cfp, calling, ci, captured);
15899 }
15901 is_lambda = block_proc_is_lambda(VM_BH_TO_PROC(block_handler));
15902 block_handler = vm_proc_to_block_handler(VM_BH_TO_PROC(block_handler));
15903 goto again;
15905 return vm_invoke_symbol_block(ec, reg_cfp, calling, ci, VM_BH_TO_SYMBOL(block_handler));
15906 }
15907 __builtin_unreachable();
15908 return ((VALUE)RUBY_Qnil);
15909}
15910static VALUE
15911vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
15912{
15913 const rb_execution_context_t *ec = rb_current_execution_context();
15915 struct rb_captured_block *captured;
15916 if (cfp == 0) {
15917 rb_bug("vm_make_proc_with_iseq: unreachable");
15918 }
15919 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
15920 captured->code.iseq = blockiseq;
15921 return rb_vm_make_proc(ec, captured, rb_cProc);
15922}
15923static VALUE
15924vm_once_exec(VALUE iseq)
15925{
15926 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
15927 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
15928}
15929static VALUE
15930vm_once_clear(VALUE data)
15931{
15932 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
15933 is->once.running_thread = ((void *)0);
15934 return ((VALUE)RUBY_Qnil);
15935}
15938{
15939 (*(((((reg_cfp)->sp)))-(0)-1)) = rb_struct_aref((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)));
15940 return reg_cfp;
15941}
15944{
15945 rb_struct_aset((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)), (*(((((reg_cfp)->sp)))-(1)-1)));
15946 return reg_cfp;
15947}
15948static enum defined_type
15949check_respond_to_missing(VALUE obj, VALUE v)
15950{
15951 VALUE args[2];
15952 VALUE r;
15953 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
15955 if (r != ((VALUE)RUBY_Qundef) && !(((VALUE)(r) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
15956 return DEFINED_METHOD;
15957 }
15958 else {
15959 return DEFINED_NOT_DEFINED;
15960 }
15961}
15962static VALUE
15963vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v)
15964{
15965 VALUE klass;
15966 enum defined_type expr_type = DEFINED_NOT_DEFINED;
15967 enum defined_type type = (enum defined_type)op_type;
15968 switch (type) {
15969 case DEFINED_IVAR:
15970 if (rb_ivar_defined((((((reg_cfp)))->self)), (rb_sym2id(obj)))) {
15971 expr_type = DEFINED_IVAR;
15972 }
15973 break;
15974 case DEFINED_IVAR2:
15975 klass = vm_get_cbase(((((reg_cfp)->ep))));
15976 break;
15977 case DEFINED_GVAR:
15979 expr_type = DEFINED_GVAR;
15980 }
15981 break;
15982 case DEFINED_CVAR: {
15983 const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep))));
15984 klass = vm_get_cvar_base(cref, (((reg_cfp))));
15986 expr_type = DEFINED_CVAR;
15987 }
15988 break;
15989 }
15990 case DEFINED_CONST:
15991 case DEFINED_CONST_FROM: {
15992 _Bool allow_nil = type == DEFINED_CONST;
15993 klass = v;
15994 if (vm_get_ev_const(ec, klass, (rb_sym2id(obj)), allow_nil, 1)) {
15995 expr_type = DEFINED_CONST;
15996 }
15997 break;
15998 }
15999 case DEFINED_FUNC:
16000 klass = rb_class_of((VALUE)(v));
16001 if (rb_method_boundp(klass, (rb_sym2id(obj)), 0)) {
16002 expr_type = DEFINED_METHOD;
16003 }
16004 else {
16005 expr_type = check_respond_to_missing(obj, v);
16006 }
16007 break;
16008 case DEFINED_METHOD:{
16009 VALUE klass = rb_class_of((VALUE)(v));
16011 if (me) {
16012 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
16014 break;
16016 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(me->defined_class))) {
16017 break;
16018 }
16019 case METHOD_VISI_PUBLIC:
16020 expr_type = DEFINED_METHOD;
16021 break;
16022 default:
16023 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
16024 }
16025 }
16026 else {
16027 expr_type = check_respond_to_missing(obj, v);
16028 }
16029 break;
16030 }
16031 case DEFINED_YIELD:
16032 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
16033 expr_type = DEFINED_YIELD;
16034 }
16035 break;
16036 case DEFINED_ZSUPER:
16037 {
16038 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
16039 if (me) {
16040 VALUE klass = vm_search_normal_superclass(me->defined_class);
16041 ID id = me->def->original_id;
16042 if (rb_method_boundp(klass, id, 0)) {
16043 expr_type = DEFINED_ZSUPER;
16044 }
16045 }
16046 }
16047 break;
16048 case DEFINED_REF:{
16049 if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), ((int)rb_fix2int((VALUE)(obj)))) != ((VALUE)RUBY_Qnil)) {
16050 expr_type = DEFINED_GVAR;
16051 }
16052 break;
16053 }
16054 default:
16055 rb_bug("unimplemented defined? type (VM)");
16056 break;
16057 }
16058 if (expr_type != 0) {
16059 if (needstr != ((VALUE)RUBY_Qfalse)) {
16060 return rb_iseq_defined_string(expr_type);
16061 }
16062 else {
16063 return ((VALUE)RUBY_Qtrue);
16064 }
16065 }
16066 else {
16067 return ((VALUE)RUBY_Qnil);
16068 }
16069}
16070static const VALUE *
16071vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
16072{
16073 rb_num_t i;
16074 const VALUE *ep = reg_ep;
16075 for (i = 0; i < lv; i++) {
16076 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
16077 }
16078 return ep;
16079}
16080static VALUE
16081vm_get_special_object(const VALUE *const reg_ep,
16083{
16084 switch (type) {
16086 return rb_mRubyVMFrozenCore;
16088 return vm_get_cbase(reg_ep);
16090 return vm_get_const_base(reg_ep);
16091 default:
16092 rb_bug("putspecialobject insn: unknown value_type %d", type);
16093 }
16094}
16095static void
16096vm_freezestring(VALUE str, VALUE debug)
16097{
16098 if (!!((VALUE)(debug) != ((VALUE)RUBY_Qnil))) {
16100 }
16102}
16103static VALUE
16104vm_concat_array(VALUE ary1, VALUE ary2st)
16105{
16106 const VALUE ary2 = ary2st;
16107 VALUE tmp1 = rb_check_to_array(ary1);
16108 VALUE tmp2 = rb_check_to_array(ary2);
16109 if (!((VALUE)(tmp1) != ((VALUE)RUBY_Qnil))) {
16110 tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
16111 }
16112 if (!((VALUE)(tmp2) != ((VALUE)RUBY_Qnil))) {
16113 tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
16114 }
16115 if (tmp1 == ary1) {
16116 tmp1 = rb_ary_dup(ary1);
16117 }
16118 return rb_ary_concat(tmp1, tmp2);
16119}
16120static VALUE
16121vm_splat_array(VALUE flag, VALUE ary)
16122{
16123 VALUE tmp = rb_check_to_array(ary);
16124 if (!((VALUE)(tmp) != ((VALUE)RUBY_Qnil))) {
16125 return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
16126 }
16127 else if (!(((VALUE)(flag) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
16128 return rb_ary_dup(tmp);
16129 }
16130 else {
16131 return tmp;
16132 }
16133}
16134static VALUE
16135vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
16136{
16137 enum vm_check_match_type type = ((int)flag) & 0x03;
16138 if (flag & 0x04) {
16139 long i;
16140 const long n = rb_array_len(pattern);
16141 for (i = 0; i < n; i++) {
16142 VALUE v = (rb_array_const_ptr_transient(pattern)[i]);
16143 VALUE c = check_match(ec, v, target, type);
16144 if (!(((VALUE)(c) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
16145 return c;
16146 }
16147 }
16148 return ((VALUE)RUBY_Qfalse);
16149 }
16150 else {
16151 return check_match(ec, pattern, target, type);
16152 }
16153}
16154static VALUE
16155vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
16156{
16157 const VALUE kw_bits = *(ep - bits);
16158 if ((((int)(long)(kw_bits))&RUBY_FIXNUM_FLAG)) {
16159 unsigned int b = (unsigned int)((unsigned long)((long)(((long)(kw_bits))>>(int)(1))));
16160 if ((idx < (32-1)) && (b & (0x01 << idx)))
16161 return ((VALUE)RUBY_Qfalse);
16162 }
16163 else {
16164 ((void)0);
16165 if (rb_hash_has_key(kw_bits, (((VALUE)(idx))<<1 | RUBY_FIXNUM_FLAG))) return ((VALUE)RUBY_Qfalse);
16166 }
16167 return ((VALUE)RUBY_Qtrue);
16168}
16169static void
16170vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
16171{
16172 if (0 ||
16173 0 ||
16174 0 ||
16175 0) {
16176 switch (flag) {
16177 case 0x0008:
16178 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
16179 return;
16180 case 0x0020:
16181 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
16182 return;
16183 case 0x0010:
16184 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
16185 return;
16186 case 0x0040:
16187 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
16188 return;
16189 }
16190 }
16191}
16192static VALUE
16193vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
16194{
16195 VALUE ns;
16196 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
16197 return ns;
16198 }
16199 else if (((flags) & 0x08)) {
16200 return rb_public_const_get_at(ns, id);
16201 }
16202 else {
16203 return rb_const_get_at(ns, id);
16204 }
16205}
16206static VALUE
16207vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
16208{
16209 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
16210 return 0;
16211 }
16212 else if (((flags) & 0x10)) {
16214 if (tmp != super) {
16216 "superclass mismatch for class %""l""i" "\v""",
16217 rb_id2str(id));
16218 }
16219 else {
16220 return klass;
16221 }
16222 }
16223 else {
16224 return klass;
16225 }
16226}
16227static VALUE
16228vm_check_if_module(ID id, VALUE mod)
16229{
16230 if (!( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(mod))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((mod) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((mod) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((mod) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((mod) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(mod)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(mod))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
16231 return 0;
16232 }
16233 else {
16234 return mod;
16235 }
16236}
16237static VALUE
16238declare_under(ID id, VALUE cbase, VALUE c)
16239{
16241 rb_const_set(cbase, id, c);
16242 return c;
16243}
16244static VALUE
16245vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
16246{
16247 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
16248 VALUE c = declare_under(id, cbase, rb_define_class_id(id, s));
16249 rb_class_inherited(s, c);
16250 return c;
16251}
16252static VALUE
16253vm_declare_module(ID id, VALUE cbase)
16254{
16255 return declare_under(id, cbase, rb_define_module_id(id));
16256}
16257__attribute__ ((__noreturn__)) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old);
16258static void
16259unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old)
16260{
16261 VALUE name = rb_id2str(id);
16262 VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s",
16263 name, type);
16264 VALUE location = rb_const_source_location_at(cbase, id);
16265 if (!!((VALUE)(location) != ((VALUE)RUBY_Qnil))) {
16266 rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":"
16267 " previous definition of %""l""i" "\v"" was here",
16268 rb_ary_entry(location, 0), rb_ary_entry(location, 1), name);
16269 }
16271}
16272static VALUE
16273vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
16274{
16275 VALUE klass;
16276 if (((flags) & 0x10) && !( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(super))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((super) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((super) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((super) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((super) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(super)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(super))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
16278 "superclass must be a Class (%""l""i" "\v"" given)",
16279 rb_obj_class(super));
16280 }
16281 vm_check_if_namespace(cbase);
16283 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
16284 if (!vm_check_if_class(id, flags, super, klass))
16285 unmatched_redefinition("class", cbase, id, klass);
16286 return klass;
16287 }
16288 else {
16289 return vm_declare_class(id, flags, cbase, super);
16290 }
16291}
16292static VALUE
16293vm_define_module(ID id, rb_num_t flags, VALUE cbase)
16294{
16295 VALUE mod;
16296 vm_check_if_namespace(cbase);
16297 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
16298 if (!vm_check_if_module(id, mod))
16299 unmatched_redefinition("module", cbase, id, mod);
16300 return mod;
16301 }
16302 else {
16303 return vm_declare_module(id, cbase);
16304 }
16305}
16306static VALUE
16307vm_find_or_create_class_by_id(ID id,
16308 rb_num_t flags,
16309 VALUE cbase,
16310 VALUE super)
16311{
16313 switch (type) {
16315 return vm_define_class(id, flags, cbase, super);
16317 return rb_singleton_class(cbase);
16319 return vm_define_module(id, flags, cbase);
16320 default:
16321 rb_bug("unknown defineclass type: %d", (int)type);
16322 }
16323}
16325vm_scope_visibility_get(const rb_execution_context_t *ec)
16326{
16328 if (!vm_env_cref_by_cref(cfp->ep)) {
16329 return METHOD_VISI_PUBLIC;
16330 }
16331 else {
16332 return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi;
16333 }
16334}
16335static int
16336vm_scope_module_func_check(const rb_execution_context_t *ec)
16337{
16339 if (!vm_env_cref_by_cref(cfp->ep)) {
16340 return 0;
16341 }
16342 else {
16343 return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func;
16344 }
16345}
16346static void
16347vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton)
16348{
16349 VALUE klass;
16351 rb_cref_t *cref = vm_ec_cref(ec);
16352 if (!is_singleton) {
16353 klass = CREF_CLASS(cref);
16354 visi = vm_scope_visibility_get(ec);
16355 }
16356 else {
16358 visi = METHOD_VISI_PUBLIC;
16359 }
16360 if (!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
16361 rb_raise(rb_eTypeError, "no class/module to add method");
16362 }
16363 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi);
16364 if (!is_singleton && vm_scope_module_func_check(ec)) {
16366 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC);
16367 }
16368}
16369static void
16370vm_search_method_wrap(
16371 const struct rb_control_frame_struct *reg_cfp,
16372 struct rb_call_data *cd,
16373 VALUE recv)
16374{
16375 vm_search_method(cd, recv);
16376}
16377static void
16378vm_search_invokeblock(
16379 const struct rb_control_frame_struct *reg_cfp,
16380 struct rb_call_data *cd,
16381 VALUE recv)
16382{
16383}
16384static VALUE
16385vm_invokeblock_i(
16386 struct rb_execution_context_struct *ec,
16388 struct rb_calling_info *calling,
16389 struct rb_call_data *cd)
16390{
16391 const struct rb_call_info *ci = &cd->ci;
16392 VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp))));
16393 if (block_handler == 0) {
16394 rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0);
16395 }
16396 else {
16397 return vm_invoke_block(ec, (((reg_cfp))), calling, ci, block_handler);
16398 }
16399}
16400static VALUE
16401vm_sendish(
16402 struct rb_execution_context_struct *ec,
16404 struct rb_call_data *cd,
16406 void (*method_explorer)(
16407 const struct rb_control_frame_struct *reg_cfp,
16408 struct rb_call_data *cd,
16409 VALUE recv))
16410{
16411 CALL_INFO ci = &cd->ci;
16412 CALL_CACHE cc = &cd->cc;
16413 VALUE val;
16414 int argc = ci->orig_argc;
16415 VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1));
16416 struct rb_calling_info calling;
16417 calling.block_handler = block_handler;
16418 calling.kw_splat = ((ci)->flag & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0;
16419 calling.recv = recv;
16420 calling.argc = argc;
16421 method_explorer((((reg_cfp))), cd, recv);
16422 val = cc->call(ec, (((reg_cfp))), &calling, cd);
16423 if (val != ((VALUE)RUBY_Qundef)) {
16424 return val;
16425 }
16426 else {
16427 do { (reg_cfp) = ec->cfp; } while (0);
16428 }
16429 if (((((reg_cfp)))->iseq)->body->catch_except_p) {
16430 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
16431 return rb_vm_exec(ec, 1);
16432 }
16433 else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) {
16434 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
16435 return rb_vm_exec(ec, 0);
16436 }
16437 else {
16438 return val;
16439 }
16440}
16441static VALUE
16442vm_opt_str_freeze(VALUE str, int bop, ID id)
16443{
16444 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
16445 return str;
16446 }
16447 else {
16448 return ((VALUE)RUBY_Qundef);
16449 }
16450}
16451#define id_cmp idCmp
16452static VALUE
16453vm_opt_newarray_max(rb_num_t num, const VALUE *ptr)
16454{
16455 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
16456 if (num == 0) {
16457 return ((VALUE)RUBY_Qnil);
16458 }
16459 else {
16460 struct cmp_opt_data cmp_opt = { 0, 0 };
16461 VALUE result = *ptr;
16462 rb_snum_t i = num - 1;
16463 while (i-- > 0) {
16464 const VALUE v = *++ptr;
16465 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cInteger == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cInteger, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cString == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cString, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cFloat == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cFloat, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(__extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, v, idCmp, 1, &result); }), v, result)) > 0) {
16466 result = v;
16467 }
16468 }
16469 return result;
16470 }
16471 }
16472 else {
16473 VALUE ary = rb_ary_new_from_values(num, ptr);
16474 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, ary, idMax, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); });
16475 }
16476}
16477static VALUE
16478vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
16479{
16480 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
16481 if (num == 0) {
16482 return ((VALUE)RUBY_Qnil);
16483 }
16484 else {
16485 struct cmp_opt_data cmp_opt = { 0, 0 };
16486 VALUE result = *ptr;
16487 rb_snum_t i = num - 1;
16488 while (i-- > 0) {
16489 const VALUE v = *++ptr;
16490 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cInteger == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cInteger, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cString == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cString, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cFloat == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cFloat, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(__extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, v, idCmp, 1, &result); }), v, result)) < 0) {
16491 result = v;
16492 }
16493 }
16494 return result;
16495 }
16496 }
16497 else {
16498 VALUE ary = rb_ary_new_from_values(num, ptr);
16499 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, ary, idMin, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); });
16500 }
16501}
16502#undef id_cmp
16503static int
16504vm_ic_hit_p(IC ic, const VALUE *reg_ep)
16505{
16507 return (ic->ic_cref == ((void *)0) ||
16508 ic->ic_cref == vm_get_cref(reg_ep));
16509 }
16510 return 0;
16511}
16512static void
16513vm_ic_update(IC ic, VALUE val, const VALUE *reg_ep)
16514{
16515 ((void)0);
16516 ic->value = val;
16518 ic->ic_cref = vm_get_const_key_cref(reg_ep);
16520}
16521static VALUE
16522vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
16523{
16524 rb_thread_t *th = rb_ec_thread_ptr(ec);
16525 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
16526 again:
16527 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
16528 return is->once.value;
16529 }
16530 else if (is->once.running_thread == ((void *)0)) {
16531 VALUE val;
16532 is->once.running_thread = th;
16533 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
16534 __extension__({
16535#pragma GCC diagnostic push
16536;
16537#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
16538; typeof(rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 4160)) unaligned_member_access_result = (rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "../ruby-2.7.6/vm_insnhelper.c", 4160));
16539#pragma GCC diagnostic pop
16540; unaligned_member_access_result; });
16541 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
16542 return val;
16543 }
16544 else if (is->once.running_thread == th) {
16545 return vm_once_exec((VALUE)iseq);
16546 }
16547 else {
16548 rb_vm_check_ints(ec);
16550 goto again;
16551 }
16552}
16553static OFFSET
16554vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
16555{
16556 switch (__extension__({ VALUE arg_obj = (key); (((VALUE)(arg_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(arg_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) ? -1 : (int)(((struct RBasic*)(arg_obj))->flags & RUBY_T_MASK); })) {
16557 case -1:
16558 case RUBY_T_FLOAT:
16559 case RUBY_T_SYMBOL:
16560 case RUBY_T_BIGNUM:
16561 case RUBY_T_STRING:
16562 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
16563 st_data_t val;
16564 if (( ((((int)(long)(key))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == RUBY_T_FLOAT))) {
16565 double kval = rb_float_value_inline(key);
16566 if (!(__builtin_isinf_sign (kval)) && modf(kval, &kval) == 0.0) {
16567 key = (((kval) < (0x7fffffffffffffffL>>1)+1) && ((kval) >= (((long)(-0x7fffffffffffffffL -1L))>>(int)(1)))) ? (((VALUE)((long)kval))<<1 | RUBY_FIXNUM_FLAG) : rb_dbl2big(kval);
16568 }
16569 }
16570 if (rb_hash_stlike_lookup(hash, key, &val)) {
16571 return ((long)(((long)((VALUE)val))>>(int)(1)));
16572 }
16573 else {
16574 return else_offset;
16575 }
16576 }
16577 }
16578 return 0;
16579}
16580__attribute__ ((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
16581static void
16582vm_stack_consistency_error(const rb_execution_context_t *ec,
16583 const rb_control_frame_t *cfp,
16584 const VALUE *bp)
16585{
16586 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
16587 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
16588 static const char stack_consistency_error[] =
16589 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
16590 rb_bug(stack_consistency_error, nsp, nbp);
16591}
16592static VALUE
16593vm_opt_plus(VALUE recv, VALUE obj)
16594{
16595 if (FIXNUM_2_P(recv, obj) &&
16596 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
16597 return rb_fix_plus_fix(recv, obj);
16598 }
16599 else if (FLONUM_2_P(recv, obj) &&
16600 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
16601 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
16602 }
16603 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16604 return ((VALUE)RUBY_Qundef);
16605 }
16606 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16607 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16608 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
16609 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
16610 }
16611 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
16612 (((struct RBasic*)(obj))->klass) == rb_cString &&
16613 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
16614 return rb_str_opt_plus(recv, obj);
16615 }
16616 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
16617 (((struct RBasic*)(obj))->klass) == rb_cArray &&
16618 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
16619 return rb_ary_plus(recv, obj);
16620 }
16621 else {
16622 return ((VALUE)RUBY_Qundef);
16623 }
16624}
16625static VALUE
16626vm_opt_minus(VALUE recv, VALUE obj)
16627{
16628 if (FIXNUM_2_P(recv, obj) &&
16629 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
16630 return rb_fix_minus_fix(recv, obj);
16631 }
16632 else if (FLONUM_2_P(recv, obj) &&
16633 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
16634 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
16635 }
16636 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16637 return ((VALUE)RUBY_Qundef);
16638 }
16639 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16640 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16641 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
16642 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
16643 }
16644 else {
16645 return ((VALUE)RUBY_Qundef);
16646 }
16647}
16648static VALUE
16649vm_opt_mult(VALUE recv, VALUE obj)
16650{
16651 if (FIXNUM_2_P(recv, obj) &&
16652 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
16653 return rb_fix_mul_fix(recv, obj);
16654 }
16655 else if (FLONUM_2_P(recv, obj) &&
16656 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
16657 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
16658 }
16659 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16660 return ((VALUE)RUBY_Qundef);
16661 }
16662 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16663 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16664 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
16665 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
16666 }
16667 else {
16668 return ((VALUE)RUBY_Qundef);
16669 }
16670}
16671static VALUE
16672vm_opt_div(VALUE recv, VALUE obj)
16673{
16674 if (FIXNUM_2_P(recv, obj) &&
16675 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
16676 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
16677 }
16678 else if (FLONUM_2_P(recv, obj) &&
16679 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
16680 return rb_flo_div_flo(recv, obj);
16681 }
16682 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16683 return ((VALUE)RUBY_Qundef);
16684 }
16685 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16686 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16687 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
16688 return rb_flo_div_flo(recv, obj);
16689 }
16690 else {
16691 return ((VALUE)RUBY_Qundef);
16692 }
16693}
16694static VALUE
16695vm_opt_mod(VALUE recv, VALUE obj)
16696{
16697 if (FIXNUM_2_P(recv, obj) &&
16698 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
16699 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
16700 }
16701 else if (FLONUM_2_P(recv, obj) &&
16702 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
16703 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
16704 }
16705 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16706 return ((VALUE)RUBY_Qundef);
16707 }
16708 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16709 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16710 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
16711 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
16712 }
16713 else {
16714 return ((VALUE)RUBY_Qundef);
16715 }
16716}
16717static VALUE
16718vm_opt_neq(CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj)
16719{
16720 if (vm_method_cfunc_is(cd, recv, rb_obj_not_equal)) {
16721 VALUE val = opt_eq_func(recv, obj, cd_eq);
16722 if (val != ((VALUE)RUBY_Qundef)) {
16723 return !(((VALUE)(val) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
16724 }
16725 }
16726 return ((VALUE)RUBY_Qundef);
16727}
16728static VALUE
16729vm_opt_lt(VALUE recv, VALUE obj)
16730{
16731 if (FIXNUM_2_P(recv, obj) &&
16732 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
16733 return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16734 }
16735 else if (FLONUM_2_P(recv, obj) &&
16736 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
16737 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16738 }
16739 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16740 return ((VALUE)RUBY_Qundef);
16741 }
16742 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16743 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16744 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
16745 ;
16746 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16747 }
16748 else {
16749 return ((VALUE)RUBY_Qundef);
16750 }
16751}
16752static VALUE
16753vm_opt_le(VALUE recv, VALUE obj)
16754{
16755 if (FIXNUM_2_P(recv, obj) &&
16756 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
16757 return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16758 }
16759 else if (FLONUM_2_P(recv, obj) &&
16760 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
16761 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16762 }
16763 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16764 return ((VALUE)RUBY_Qundef);
16765 }
16766 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16767 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16768 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
16769 ;
16770 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16771 }
16772 else {
16773 return ((VALUE)RUBY_Qundef);
16774 }
16775}
16776static VALUE
16777vm_opt_gt(VALUE recv, VALUE obj)
16778{
16779 if (FIXNUM_2_P(recv, obj) &&
16780 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
16781 return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16782 }
16783 else if (FLONUM_2_P(recv, obj) &&
16784 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
16785 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16786 }
16787 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16788 return ((VALUE)RUBY_Qundef);
16789 }
16790 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16791 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16792 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
16793 ;
16794 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16795 }
16796 else {
16797 return ((VALUE)RUBY_Qundef);
16798 }
16799}
16800static VALUE
16801vm_opt_ge(VALUE recv, VALUE obj)
16802{
16803 if (FIXNUM_2_P(recv, obj) &&
16804 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
16805 return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16806 }
16807 else if (FLONUM_2_P(recv, obj) &&
16808 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
16809 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16810 }
16811 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16812 return ((VALUE)RUBY_Qundef);
16813 }
16814 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
16815 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
16816 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
16817 ;
16818 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
16819 }
16820 else {
16821 return ((VALUE)RUBY_Qundef);
16822 }
16823}
16824static VALUE
16825vm_opt_ltlt(VALUE recv, VALUE obj)
16826{
16827 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16828 return ((VALUE)RUBY_Qundef);
16829 }
16830 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
16831 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
16832 return rb_str_concat(recv, obj);
16833 }
16834 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
16835 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
16836 return rb_ary_push(recv, obj);
16837 }
16838 else {
16839 return ((VALUE)RUBY_Qundef);
16840 }
16841}
16842static VALUE
16843vm_opt_and(VALUE recv, VALUE obj)
16844{
16845 if (FIXNUM_2_P(recv, obj) &&
16846 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
16847 return (recv & obj) | 1;
16848 }
16849 else {
16850 return ((VALUE)RUBY_Qundef);
16851 }
16852}
16853static VALUE
16854vm_opt_or(VALUE recv, VALUE obj)
16855{
16856 if (FIXNUM_2_P(recv, obj) &&
16857 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
16858 return recv | obj;
16859 }
16860 else {
16861 return ((VALUE)RUBY_Qundef);
16862 }
16863}
16864static VALUE
16865vm_opt_aref(VALUE recv, VALUE obj)
16866{
16867 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16868 if (FIXNUM_2_P(recv, obj) &&
16869 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) {
16870 return rb_fix_aref(recv, obj);
16871 }
16872 return ((VALUE)RUBY_Qundef);
16873 }
16874 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
16875 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
16876 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
16877 return rb_ary_entry_internal(recv, ((long)(((long)(obj))>>(int)(1))));
16878 }
16879 else {
16880 return rb_ary_aref1(recv, obj);
16881 }
16882 }
16883 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
16884 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
16885 return rb_hash_aref(recv, obj);
16886 }
16887 else {
16888 return ((VALUE)RUBY_Qundef);
16889 }
16890}
16891static VALUE
16892vm_opt_aset(VALUE recv, VALUE obj, VALUE set)
16893{
16894 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16895 return ((VALUE)RUBY_Qundef);
16896 }
16897 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
16898 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
16899 (((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
16900 rb_ary_store(recv, ((long)(((long)(obj))>>(int)(1))), set);
16901 return set;
16902 }
16903 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
16904 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
16905 rb_hash_aset(recv, obj, set);
16906 return set;
16907 }
16908 else {
16909 return ((VALUE)RUBY_Qundef);
16910 }
16911}
16912static VALUE
16913vm_opt_aref_with(VALUE recv, VALUE key)
16914{
16915 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
16916 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
16918 return rb_hash_aref(recv, key);
16919 }
16920 else {
16921 return ((VALUE)RUBY_Qundef);
16922 }
16923}
16924static VALUE
16925vm_opt_aset_with(VALUE recv, VALUE key, VALUE val)
16926{
16927 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
16928 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
16930 return rb_hash_aset(recv, key, val);
16931 }
16932 else {
16933 return ((VALUE)RUBY_Qundef);
16934 }
16935}
16936static VALUE
16937vm_opt_length(VALUE recv, int bop)
16938{
16939 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
16940 return ((VALUE)RUBY_Qundef);
16941 }
16942 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
16943 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
16944 if (bop == BOP_EMPTY_P) {
16945 return rb_long2num_inline((!(((struct RBasic*)(recv))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(recv))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(recv))->as.heap.len));
16946 }
16947 else {
16948 return rb_str_length(recv);
16949 }
16950 }
16951 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
16952 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
16953 return rb_long2num_inline(rb_array_len(recv));
16954 }
16955 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
16956 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
16957 return (((VALUE)(((!(((struct RBasic*)((recv)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(recv))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(recv))->as.st)->num_entries))))<<1 | RUBY_FIXNUM_FLAG);
16958 }
16959 else {
16960 return ((VALUE)RUBY_Qundef);
16961 }
16962}
16963static VALUE
16964vm_opt_empty_p(VALUE recv)
16965{
16966 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
16967 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
16968 case (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG): return ((VALUE)RUBY_Qtrue);
16969 default: return ((VALUE)RUBY_Qfalse);
16970 }
16971}
16973static VALUE
16974vm_opt_nil_p(CALL_DATA cd, VALUE recv)
16975{
16976 if (recv == ((VALUE)RUBY_Qnil) &&
16977 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) {
16978 return ((VALUE)RUBY_Qtrue);
16979 }
16980 else if (vm_method_cfunc_is(cd, recv, rb_false)) {
16981 return ((VALUE)RUBY_Qfalse);
16982 }
16983 else {
16984 return ((VALUE)RUBY_Qundef);
16985 }
16986}
16987static VALUE
16988fix_succ(VALUE x)
16989{
16990 switch (x) {
16991 case ~0UL:
16992 return (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
16993 case ((~0UL)>>(int)(1)):
16994 return rb_uint2big(1UL << (8 * 8 - 2));
16995 default:
16996 return x + 2;
16997 }
16998}
16999static VALUE
17000vm_opt_succ(VALUE recv)
17001{
17002 if ((((int)(long)(recv))&RUBY_FIXNUM_FLAG) &&
17003 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
17004 return fix_succ(recv);
17005 }
17006 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
17007 return ((VALUE)RUBY_Qundef);
17008 }
17009 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
17010 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
17011 return rb_str_succ(recv);
17012 }
17013 else {
17014 return ((VALUE)RUBY_Qundef);
17015 }
17016}
17017static VALUE
17018vm_opt_not(CALL_DATA cd, VALUE recv)
17019{
17020 if (vm_method_cfunc_is(cd, recv, rb_obj_not)) {
17021 return !(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
17022 }
17023 else {
17024 return ((VALUE)RUBY_Qundef);
17025 }
17026}
17027static VALUE
17028vm_opt_regexpmatch2(VALUE recv, VALUE obj)
17029{
17030 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
17031 return ((VALUE)RUBY_Qundef);
17032 }
17033 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
17034 rb_class_of((VALUE)(obj)) == rb_cRegexp &&
17035 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
17036 return rb_reg_match(obj, recv);
17037 }
17038 else if ((((struct RBasic*)(recv))->klass) == rb_cRegexp &&
17039 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
17040 return rb_reg_match(recv, obj);
17041 }
17042 else {
17043 return ((VALUE)RUBY_Qundef);
17044 }
17045}
17047__attribute__ ((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc);
17048static inline void
17049vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
17050 rb_event_flag_t pc_events, rb_event_flag_t target_event,
17051 rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val)
17052{
17053 rb_event_flag_t event = pc_events & target_event;
17054 VALUE self = (((((reg_cfp)))->self));
17055 ((void)0);
17056 if (event & global_hooks->events) {
17057 reg_cfp->pc++;
17058 vm_dtrace(event, ec);
17059 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
17060 reg_cfp->pc--;
17061 }
17062 if (local_hooks != ((void *)0)) {
17063 if (event & local_hooks->events) {
17064 reg_cfp->pc++;
17065 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
17066 reg_cfp->pc--;
17067 }
17068 }
17069}
17070#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0)
17071static void
17073{
17074 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000);
17075 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
17076 return;
17077 }
17078 else {
17079 const rb_iseq_t *iseq = reg_cfp->iseq;
17080 size_t pos = pc - iseq->body->iseq_encoded;
17081 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
17082 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
17083 rb_event_flag_t local_hook_events = local_hooks != ((void *)0) ? local_hooks->events : 0;
17084 enabled_flags |= local_hook_events;
17085 ((void)0);
17086 if ((pc_events & enabled_flags) == 0) {
17087 return;
17088 }
17089 else if (ec->trace_arg != ((void *)0)) {
17090 return;
17091 }
17092 else {
17093 rb_hook_list_t *global_hooks = rb_vm_global_hooks(ec);
17094 if (0) {
17095 fprintf(((__getreent())->_stderr), "vm_trace>>%4d (%4x) - %s:%d %s\n",
17096 (int)pos,
17097 (int)pc_events,
17098 (!(((struct RBasic*)(rb_iseq_path(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_path(iseq)))->as.ary : ((struct RString*)(rb_iseq_path(iseq)))->as.heap.ptr),
17099 (int)rb_iseq_line_no(iseq, pos),
17100 (!(((struct RBasic*)(rb_iseq_label(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_label(iseq)))->as.ary : ((struct RString*)(rb_iseq_label(iseq)))->as.heap.ptr));
17101 }
17102 ((void)0);
17103 ((void)0);
17104 ((void)0);
17105 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
17106 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
17107 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
17108 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
17109 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
17110 }
17111 }
17112}
17114static VALUE
17115builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17116{
17117 typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self);
17118 return (*(rb_invoke_funcptr0_t)funcptr)(ec, self);
17119}
17120static VALUE
17121builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17122{
17123 typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1);
17124 return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]);
17125}
17126static VALUE
17127builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17128{
17129 typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2);
17130 return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]);
17131}
17132static VALUE
17133builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17134{
17135 typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3);
17136 return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]);
17137}
17138static VALUE
17139builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17140{
17141 typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4);
17142 return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]);
17143}
17144static VALUE
17145builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17146{
17147 typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5);
17148 return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]);
17149}
17150static VALUE
17151builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17152{
17153 typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6);
17154 return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
17155}
17156static VALUE
17157builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17158{
17159 typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7);
17160 return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
17161}
17162static VALUE
17163builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17164{
17165 typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8);
17166 return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
17167}
17168static VALUE
17169builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17170{
17171 typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9);
17172 return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
17173}
17174static VALUE
17175builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17176{
17177 typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10);
17178 return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
17179}
17180static VALUE
17181builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17182{
17183 typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11);
17184 return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
17185}
17186static VALUE
17187builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17188{
17189 typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12);
17190 return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
17191}
17192static VALUE
17193builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17194{
17195 typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13);
17196 return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
17197}
17198static VALUE
17199builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17200{
17201 typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14);
17202 return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
17203}
17204static VALUE
17205builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
17206{
17207 typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15);
17208 return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
17209}
17211static builtin_invoker
17212lookup_builtin_invoker(int argc)
17213{
17214 static const builtin_invoker invokers[] = {
17215 builtin_invoker0,
17216 builtin_invoker1,
17217 builtin_invoker2,
17218 builtin_invoker3,
17219 builtin_invoker4,
17220 builtin_invoker5,
17221 builtin_invoker6,
17222 builtin_invoker7,
17223 builtin_invoker8,
17224 builtin_invoker9,
17225 builtin_invoker10,
17226 builtin_invoker11,
17227 builtin_invoker12,
17228 builtin_invoker13,
17229 builtin_invoker14,
17230 builtin_invoker15,
17231 };
17232 return invokers[argc];
17233}
17234static inline VALUE
17235invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
17236{
17237 VALUE self = cfp->self;
17238 return (*lookup_builtin_invoker(bf->argc))(ec, self, argv, (rb_insn_func_t)bf->func_ptr);
17239}
17240static VALUE
17241vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
17242{
17243 return invoke_bf(ec, cfp, bf, argv);
17244}
17245static VALUE
17246vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
17247{
17248 if (0) {
17249 fprintf(((__getreent())->_stderr), "vm_invoke_builtin_delegate: passing -> ");
17250 for (int i=0; i<bf->argc; i++) {
17251 fprintf(((__getreent())->_stderr), ":%s ", rb_id2name(cfp->iseq->body->local_table[i+start_index]));
17252 }
17253 fprintf(((__getreent())->_stderr), "\n");
17254 fprintf(((__getreent())->_stderr), "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
17255 }
17256 if (bf->argc == 0) {
17257 return invoke_bf(ec, cfp, bf, ((void *)0));
17258 }
17259 else {
17260 const VALUE *argv = cfp->ep - cfp->iseq->body->local_table_size - ( 3) + 1 + start_index;
17261 return invoke_bf(ec, cfp, bf, argv);
17262 }
17263}
17264VALUE
17266{
17267 const rb_control_frame_t *cfp = ec->cfp;
17268 return cfp->ep[index];
17269}
17272};
17273static inline VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat);
17274static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda);
17275static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat);
17276static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat);
17277static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
17279static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
17280static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
17281static VALUE rb_eUncaughtThrow;
17282static ID id_result, id_tag, id_value;
17283#define id_mesg idMesg
17284typedef enum call_type {
17292static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
17293static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv);
17294static inline void
17295stack_check(rb_execution_context_t *ec)
17296{
17297 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
17298 rb_ec_stack_check(ec)) {
17299 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
17300 rb_ec_stack_overflow(ec, 0);
17301 }
17302}
17303static void
17304raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
17305 enum method_missing_reason last_call_status)
17306{
17308 VALUE format = 0;
17309 if ((__builtin_expect(!!(argc == 0), 0))) {
17310 rb_raise(rb_eArgError, "no method name given");
17311 }
17312 else if ((__builtin_expect(!!(!((((VALUE)(argv[0])&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(argv[0]) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(argv[0]) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(argv[0]))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))), 0))) {
17313 const VALUE e = rb_eArgError;
17314 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
17315 rb_obj_class(argv[0]));
17316 }
17317 stack_check(ec);
17318 if (last_call_status & MISSING_PRIVATE) {
17319 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
17320 }
17321 else if (last_call_status & MISSING_PROTECTED) {
17322 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
17323 }
17324 else if (last_call_status & MISSING_VCALL) {
17325 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
17327 }
17328 else if (last_call_status & MISSING_SUPER) {
17329 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
17330 }
17331 {
17333 last_call_status & (MISSING_FCALL|MISSING_VCALL));
17334 if (!(last_call_status & MISSING_MISSING)) {
17335 rb_vm_pop_cfunc_frame();
17336 }
17338 }
17339}
17340static void
17341vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
17342 VALUE obj, int call_status)
17343{
17344 vm_passed_block_handler_set(ec, 0);
17345 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
17346}
17347static inline VALUE
17348method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat)
17349{
17350 VALUE *nargv, result, work, klass;
17351 rb_execution_context_t *ec = rb_current_execution_context();
17352 VALUE block_handler = vm_passed_block_handler(ec);
17355 if (id == idMethodMissing) {
17356 missing:
17357 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
17358 }
17359 nargv = ((VALUE*)(((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca((size_t)(argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (long)(argc + 1), sizeof(VALUE))));
17360 nargv[0] = (rb_id2sym(id));
17361 ((__builtin_object_size((nargv + 1), 0) != (size_t)-1) ? __builtin___memcpy_chk((nargv + 1), (argv), sizeof(VALUE)*(size_t)(argc), __builtin_object_size((nargv + 1), 0)) : __memcpy_ichk((nargv + 1), (argv), sizeof(VALUE)*(size_t)(argc)));
17362 ++argc;
17363 argv = nargv;
17364 klass = rb_class_of((VALUE)(obj));
17365 if (!klass) goto missing;
17367 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
17368 vm_passed_block_handler_set(ec, block_handler);
17369 result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat);
17370 if (work) rb_free_tmp_buffer(&(work));
17371 return result;
17372}
17373static rb_control_frame_t *
17374vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
17375{
17376 if (VM_FRAME_RUBYFRAME_P(cfp)) {
17377 return (rb_control_frame_t *)cfp;
17378 }
17379 cfp = ((cfp)+1);
17380 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
17381 if (VM_FRAME_RUBYFRAME_P(cfp)) {
17382 return (rb_control_frame_t *)cfp;
17383 }
17384 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
17385 break;
17386 }
17387 cfp = ((cfp)+1);
17388 }
17389 return 0;
17390}
17391static void
17392rb_vm_pop_cfunc_frame(void)
17393{
17394 rb_execution_context_t *ec = rb_current_execution_context();
17395 rb_control_frame_t *cfp = ec->cfp;
17396 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
17397 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
17398 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
17399 vm_pop_frame(ec, cfp, cfp->ep);
17400}
17401static VALUE
17402vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17403{
17404 ((void)0);
17405 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 0);
17406}
17407static VALUE
17408vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17409{
17410 ((void)0);
17411 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 1);
17412}
17413static VALUE
17414vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17415{
17416 ((void)0);
17417 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 2);
17418}
17419static VALUE
17420vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17421{
17422 ((void)0);
17423 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 3);
17424}
17425static VALUE
17426vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17427{
17428 ((void)0);
17429 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 4);
17430}
17431static VALUE
17432vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17433{
17434 ((void)0);
17435 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 5);
17436}
17437static VALUE
17438vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17439{
17440 ((void)0);
17441 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 0);
17442}
17443static VALUE
17444vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17445{
17446 ((void)0);
17447 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 1);
17448}
17449static VALUE
17450vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17451{
17452 ((void)0);
17453 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 2);
17454}
17455static VALUE
17456vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17457{
17458 ((void)0);
17459 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 3);
17460}
17461static VALUE
17462vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17463{
17464 ((void)0);
17465 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 4);
17466}
17467static VALUE
17468vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17469{
17470 ((void)0);
17471 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 5);
17472}
17473static VALUE
17474vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17475{
17476 ((void)0);
17477 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 0);
17478}
17479static VALUE
17480vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17481{
17482 ((void)0);
17483 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 1);
17484}
17485static VALUE
17486vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17487{
17488 ((void)0);
17489 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 2);
17490}
17491static VALUE
17492vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17493{
17494 ((void)0);
17495 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 3);
17496}
17497static VALUE
17498vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17499{
17500 ((void)0);
17501 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 4);
17502}
17503static VALUE
17504vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17505{
17506 ((void)0);
17507 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 5);
17508}
17509static VALUE
17510vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17511{
17512 ((void)0);
17513 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 0);
17514}
17515static VALUE
17516vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17517{
17518 ((void)0);
17519 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 1);
17520}
17521static VALUE
17522vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17523{
17524 ((void)0);
17525 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 2);
17526}
17527static VALUE
17528vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17529{
17530 ((void)0);
17531 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 3);
17532}
17533static VALUE
17534vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17535{
17536 ((void)0);
17537 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 4);
17538}
17539static VALUE
17540vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
17541{
17542 ((void)0);
17543 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 5);
17544}
17545static const vm_call_handler vm_call_iseq_handlers[][6] = {
17546{vm_call_iseq_setup_normal_0start_0params_0locals,
17547 vm_call_iseq_setup_normal_0start_0params_1locals,
17548 vm_call_iseq_setup_normal_0start_0params_2locals,
17549 vm_call_iseq_setup_normal_0start_0params_3locals,
17550 vm_call_iseq_setup_normal_0start_0params_4locals,
17551 vm_call_iseq_setup_normal_0start_0params_5locals},
17552{vm_call_iseq_setup_normal_0start_1params_0locals,
17553 vm_call_iseq_setup_normal_0start_1params_1locals,
17554 vm_call_iseq_setup_normal_0start_1params_2locals,
17555 vm_call_iseq_setup_normal_0start_1params_3locals,
17556 vm_call_iseq_setup_normal_0start_1params_4locals,
17557 vm_call_iseq_setup_normal_0start_1params_5locals},
17558{vm_call_iseq_setup_normal_0start_2params_0locals,
17559 vm_call_iseq_setup_normal_0start_2params_1locals,
17560 vm_call_iseq_setup_normal_0start_2params_2locals,
17561 vm_call_iseq_setup_normal_0start_2params_3locals,
17562 vm_call_iseq_setup_normal_0start_2params_4locals,
17563 vm_call_iseq_setup_normal_0start_2params_5locals},
17564{vm_call_iseq_setup_normal_0start_3params_0locals,
17565 vm_call_iseq_setup_normal_0start_3params_1locals,
17566 vm_call_iseq_setup_normal_0start_3params_2locals,
17567 vm_call_iseq_setup_normal_0start_3params_3locals,
17568 vm_call_iseq_setup_normal_0start_3params_4locals,
17569 vm_call_iseq_setup_normal_0start_3params_5locals}
17570};
17571static inline vm_call_handler
17572vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size)
17573{
17574 if ((__builtin_expect(!!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
17575 return &vm_call_iseq_setup_tailcall_0start;
17576 }
17577 else if (0) {
17578 return &vm_call_iseq_setup_normal_0start;
17579 }
17580 else {
17581 if (param_size <= 3 &&
17582 local_size <= 5) {
17583 ((void)0);
17584 return vm_call_iseq_handlers[param_size][local_size];
17585 }
17586 return &vm_call_iseq_setup_normal_0start;
17587 }
17588}
VALUE rb_int2big(intptr_t n)
Definition: bignum.c:3180
VALUE rb_uint2big(uintptr_t n)
Definition: bignum.c:3158
int rb_big_sign(VALUE x)
Definition: bignum.c:6772
void rb_cmperr(VALUE x, VALUE y)
Definition: compar.c:25
VALUE rb_complex_polar(VALUE x, VALUE y)
Definition: complex.c:1539
void rb_fiber_start(void)
Definition: cont.c:1804
#define sym(x)
Definition: date_core.c:3717
#define mod(x, y)
Definition: date_strftime.c:28
#define range(low, item, hi)
Definition: date_strftime.c:21
enum @73::@75::@76 mask
struct RIMemo * ptr
Definition: debug.c:65
union @73::@75 imemo
#define d1
struct rb_encoding_entry * list
Definition: encoding.c:56
int rb_data_is_encoding(VALUE obj)
Definition: encoding.c:89
int count
Definition: encoding.c:57
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:288
VALUE rb_f_raise(int argc, VALUE *argv)
Definition: eval.c:727
void rb_print_undef(VALUE klass, ID id, rb_method_visibility_t visi)
Definition: eval_error.c:383
void rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
Definition: eval_error.c:411
void rb_print_undef_str(VALUE klass, VALUE name)
Definition: eval_error.c:398
#define __builtin_expect(x, expected_value)
Definition: ffi_common.h:123
void rb_memerror(void)
Definition: gc.c:9611
VALUE rb_newobj(void)
Definition: gc.c:2303
int rb_during_gc(void)
Definition: gc.c:8703
#define rb_data_object_alloc
Definition: gc.c:14
void * rb_aligned_malloc(size_t alignment, size_t size)
Definition: gc.c:9643
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: gc.c:2412
void ruby_malloc_size_overflow(size_t count, size_t elsize)
Definition: gc.c:10107
VALUE rb_newobj_of(VALUE klass, VALUE flags)
Definition: gc.c:2309
#define rb_data_typed_object_alloc
Definition: gc.c:15
VALUE rb_class_protected_instance_methods(int, const VALUE *, VALUE)
Definition: class.c:1305
void rb_class_foreach_subclass(VALUE klass, void(*f)(VALUE, VALUE), VALUE)
Definition: class.c:116
void rb_include_module(VALUE, VALUE)
Definition: class.c:882
void rb_extend_object(VALUE, VALUE)
Extend the object with the module.
Definition: eval.c:1701
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:662
VALUE rb_class_new(VALUE)
Creates a new class.
Definition: class.c:244
VALUE rb_singleton_class_clone(VALUE)
Definition: class.c:373
VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj)
Definition: class.c:1413
void rb_class_subclass_add(VALUE super, VALUE klass)
Definition: class.c:39
VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj)
Definition: class.c:1379
void rb_prepend_module(VALUE, VALUE)
Definition: class.c:1017
VALUE rb_singleton_class(VALUE)
Returns the singleton class of obj.
Definition: class.c:1743
void rb_class_detach_subclasses(VALUE)
Definition: class.c:136
void Init_class_hierarchy(void)
Definition: class.c:562
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:711
VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach)
Definition: class.c:380
VALUE rb_include_class_new(VALUE, VALUE)
Definition: class.c:838
VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj)
Definition: class.c:1398
VALUE rb_obj_singleton_methods(int, const VALUE *, VALUE)
Definition: class.c:1467
VALUE rb_module_new(void)
Definition: class.c:771
int rb_singleton_class_internal_p(VALUE sklass)
Definition: class.c:468
VALUE rb_class_instance_methods(int, const VALUE *, VALUE)
Definition: class.c:1290
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
Definition: class.c:636
void rb_check_inheritable(VALUE)
Ensures a class can be derived from super.
Definition: class.c:222
VALUE rb_class_public_instance_methods(int, const VALUE *, VALUE)
Definition: class.c:1343
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
Definition: class.c:204
VALUE rb_define_module(const char *)
Definition: class.c:785
void rb_class_modify_check(VALUE)
Asserts that klass is not a frozen class.
Definition: eval.c:438
void rb_class_detach_module_subclasses(VALUE)
Definition: class.c:148
VALUE rb_special_singleton_class(VALUE)
Definition: class.c:1639
VALUE rb_define_module_id_under(VALUE, ID)
Definition: class.c:816
void rb_singleton_class_attached(VALUE, VALUE)
Attach a object to a singleton class.
Definition: class.c:444
void rb_freeze_singleton_class(VALUE x)
Definition: class.c:1692
VALUE rb_mod_included_modules(VALUE)
Definition: class.c:1049
VALUE rb_define_class_id_under(VALUE, ID, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:734
VALUE rb_mod_ancestors(VALUE)
Definition: class.c:1117
VALUE rb_mod_include_p(VALUE, VALUE)
Definition: class.c:1085
VALUE rb_class_private_instance_methods(int, const VALUE *, VALUE)
Definition: class.c:1328
void rb_class_remove_from_module_subclasses(VALUE)
Definition: class.c:97
VALUE rb_mod_init_copy(VALUE, VALUE)
Definition: class.c:316
VALUE rb_define_module_under(VALUE, const char *)
Definition: class.c:810
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
Definition: class.c:1712
VALUE rb_make_metaclass(VALUE, VALUE)
Definition: class.c:593
VALUE rb_define_module_id(ID)
Definition: class.c:779
VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj)
Definition: class.c:1428
VALUE rb_define_class_id(ID, VALUE)
Defines a new class.
Definition: class.c:615
void rb_class_remove_from_super_subclasses(VALUE)
Definition: class.c:79
ID rb_frame_callee(void)
The name of the current method.
Definition: eval.c:1200
ID rb_frame_this_func(void)
The original name of the current method.
Definition: eval.c:1183
VALUE rb_extract_keywords(VALUE *orighash)
Definition: class.c:1886
int rb_class_has_methods(VALUE c)
Definition: class.c:2219
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:932
VALUE rb_keyword_error_new(const char *error, VALUE keys)
Definition: class.c:1837
void rb_define_attr(VALUE, const char *, int, int)
Defines (a) public accessor method(s) for an attribute.
Definition: class.c:1831
void rb_undef_method(VALUE, const char *)
Definition: class.c:1593
int rb_scan_args_kw(int, int, const VALUE *, const char *,...)
Definition: class.c:2198
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:1818
void rb_undef_methods_from(VALUE klass, VALUE super)
Definition: class.c:1607
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:898
int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *)
Definition: class.c:1904
VALUE rb_cArray
Definition: array.c:27
VALUE rb_cTrueClass
TrueClass class.
Definition: ruby.h:2051
VALUE rb_cThread
Definition: ruby.h:2049
VALUE rb_cNilClass
NilClass class.
Definition: ruby.h:2038
VALUE rb_cRange
Definition: ruby.h:2042
struct RBasic basic
Definition: ruby.h:1135
size_t(* dsize)(const void *)
Definition: ruby.h:1153
union RString::@156 as
void * data
Definition: ruby.h:1172
VALUE rb_cRational
Definition: ruby.h:2043
VALUE rb_cEnumerator
Definition: enumerator.c:109
void(* dfree)(void *)
Definition: ruby.h:1152
VALUE rb_cUnboundMethod
Definition: ruby.h:2052
VALUE rb_mKernel
Kernel module.
Definition: ruby.h:2000
struct RBasic basic
Definition: ruby.h:923
struct RBasic basic
Definition: ruby.h:1049
VALUE rb_eStopIteration
Definition: enumerator.c:124
@ ROBJECT_ENUM_END
Definition: ruby.h:919
union RString::@156::@157::@158 aux
VALUE * ivptr
Definition: ruby.h:927
VALUE rb_cClass
Class class.
Definition: ruby.h:2018
VALUE rb_cData
Data class.
Definition: ruby.h:2020
void(* dmark)(void *)
Definition: ruby.h:1151
const rb_data_type_t * parent
Definition: ruby.h:1158
VALUE rb_eZeroDivError
Definition: ruby.h:2073
VALUE rb_eLocalJumpError
Definition: eval.c:34
VALUE rb_cFile
Definition: file.c:159
struct RObject::@154::@155 heap
VALUE rb_cStruct
Definition: ruby.h:2047
const VALUE shared_root
Definition: ruby.h:1060
VALUE rb_cBasicObject
BasicObject class.
Definition: ruby.h:2011
VALUE rb_cObject
Object class.
Definition: ruby.h:2012
struct RBasic basic
Definition: ruby.h:989
VALUE rb_cHash
Definition: hash.c:92
long capa
Definition: ruby.h:995
VALUE rb_cInteger
Definition: ruby.h:2033
VALUE rb_eEOFError
Definition: ruby.h:2061
VALUE rb_cTime
Definition: ruby.h:2050
void * data
Definition: ruby.h:1143
struct rb_io_t * fptr
Definition: ruby.h:1136
VALUE rb_cNumeric
Definition: ruby.h:2039
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Definition: ruby.h:1064
VALUE rb_eRegexpError
Definition: ruby.h:2080
struct RBasic basic
Definition: ruby.h:1140
VALUE rb_eIOError
Definition: ruby.h:2066
struct RBasic basic
Definition: ruby.h:1113
void * reserved[1]
Definition: ruby.h:1155
union RObject::@154 as
VALUE rb_cString
Definition: ruby.h:2046
VALUE typed_flag
Definition: ruby.h:1171
VALUE rb_cFalseClass
FalseClass class.
Definition: ruby.h:2024
const VALUE src
Definition: ruby.h:1115
union RArray::@159::@160::@161 aux
VALUE rb_mGC
Definition: gc.c:1000
long len
Definition: ruby.h:992
VALUE rb_cRandom
Definition: ruby.h:2041
@ RARRAY_ENUM_END
Definition: ruby.h:1041
char ary[RSTRING_EMBED_LEN_MAX+1]
Definition: ruby.h:999
VALUE rb_cRegexp
Definition: ruby.h:2044
long capa
Definition: ruby.h:1054
const rb_data_type_t * type
Definition: ruby.h:1170
struct RBasic basic
Definition: ruby.h:1169
VALUE rb_cSymbol
Definition: ruby.h:2048
VALUE rb_eFloatDomainError
Definition: ruby.h:2077
const char * wrap_struct_name
Definition: ruby.h:1149
long len
Definition: ruby.h:1052
VALUE rb_eThreadError
Definition: eval.c:924
#define RUBY_FL_USER19
Definition: ruby.h:878
VALUE shared
Definition: ruby.h:996
VALUE rb_mProcess
Definition: ruby.h:2007
char * ptr
Definition: ruby.h:993
VALUE rb_cProc
Definition: ruby.h:2040
VALUE rb_cMatch
Definition: ruby.h:2034
VALUE rb_mWaitWritable
Definition: ruby.h:2009
VALUE rb_cComplex
Definition: complex.c:33
VALUE rb_mWaitReadable
Definition: ruby.h:2008
VALUE rb_mEnumerable
Definition: enum.c:20
unsigned long usecnt
Definition: ruby.h:1116
VALUE rb_eSysStackError
Definition: eval.c:35
uint32_t numiv
Definition: ruby.h:926
VALUE rb_cStat
Definition: file.c:161
void(* dfree)(void *)
Definition: ruby.h:1142
VALUE rb_cBinding
Definition: ruby.h:2017
@ RSTRING_ENUM_END
Definition: ruby.h:985
VALUE rb_cModule
Module class.
Definition: ruby.h:2036
void * iv_index_tbl
Definition: ruby.h:928
struct RString::@156::@157 heap
VALUE rb_mComparable
Definition: compar.c:16
VALUE rb_cFloat
Definition: ruby.h:2030
VALUE rb_mMath
Definition: ruby.h:2006
VALUE rb_mFileTest
Definition: file.c:160
VALUE rb_cMethod
Definition: ruby.h:2035
const VALUE * ptr
Definition: ruby.h:1062
void(* dcompact)(void *)
Definition: ruby.h:1154
VALUE rb_cEncoding
Definition: encoding.c:46
VALUE rb_cCont
Definition: ruby.h:2019
@ RUBY_FL_PROMOTED1
Definition: ruby.h:844
@ RUBY_FL_SINGLETON
Definition: ruby.h:883
@ RUBY_FL_TAINT
Definition: ruby.h:847
@ RUBY_FL_USHIFT
Definition: ruby.h:853
@ RUBY_FL_WB_PROTECTED
Definition: ruby.h:842
@ RUBY_FL_PROMOTED0
Definition: ruby.h:843
@ RUBY_FL_EXIVAR
Definition: ruby.h:850
@ RUBY_FL_UNTRUSTED
Definition: ruby.h:848
@ RUBY_FL_PROMOTED
Definition: ruby.h:845
@ RUBY_FL_FREEZE
Definition: ruby.h:851
@ RUBY_FL_DUPPED
Definition: ruby.h:882
@ RUBY_FL_SEEN_OBJ_ID
Definition: ruby.h:849
@ RUBY_FL_FINALIZE
Definition: ruby.h:846
VALUE rb_cIO
Definition: ruby.h:2032
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Definition: ruby.h:930
@ RMODULE_ENUM_END
Definition: ruby.h:959
struct RArray::@159::@160 heap
union RArray::@159 as
struct re_pattern_buffer * ptr
Definition: ruby.h:1114
VALUE rb_stdin
Definition: ruby.h:2092
VALUE rb_eMathDomainError
Definition: ruby.h:2090
void(* dmark)(void *)
Definition: ruby.h:1141
VALUE rb_cDir
Definition: dir.c:439
void rb_notimplement(void)
Definition: error.c:2714
int rb_bug_reporter_add(void(*func)(FILE *, void *), void *data)
Definition: error.c:457
void rb_syserr_fail(int e, const char *mesg)
Definition: error.c:2783
VALUE rb_get_backtrace(VALUE info)
Definition: error.c:1231
void rb_raise(VALUE exc, const char *fmt,...)
Definition: error.c:2671
_Bool rb_warning_category_enabled_p(rb_warning_category_t category)
Definition: error.c:166
int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent)
Definition: error.c:864
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Definition: error.c:2843
VALUE rb_rescue2(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE, VALUE), VALUE,...)
An equivalent of rescue clause.
Definition: eval.c:962
VALUE rb_eNotImpError
Definition: error.c:934
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Definition: error.c:2835
VALUE rb_eScriptError
Definition: error.c:939
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:668
int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type)
Definition: error.c:874
VALUE rb_eKeyError
Definition: error.c:927
void rb_bug(const char *fmt,...)
Definition: error.c:636
VALUE rb_cNameErrorMesg
Definition: error.c:936
VALUE rb_eSystemExit
Definition: error.c:917
void rb_name_error(ID id, const char *fmt,...)
Definition: error.c:1515
VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv)
Definition: error.c:1675
VALUE rb_syserr_new(int, const char *)
Definition: error.c:2769
void rb_check_copyable(VALUE obj, VALUE orig)
Definition: error.c:3049
VALUE rb_eStandardError
Definition: error.c:921
VALUE rb_mErrno
Definition: error.c:944
VALUE rb_syserr_new_str(int n, VALUE arg)
Definition: error.c:2777
void rb_error_frozen(const char *what)
Definition: error.c:2976
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1896
void rb_syserr_fail_str(int e, VALUE mesg)
Definition: error.c:2789
const char * rb_builtin_type_name(int t)
Definition: error.c:763
void rb_interrupt(void)
Raises an Interrupt exception.
Definition: eval.c:697
VALUE rb_eFrozenError
Definition: error.c:923
void rb_sys_fail_str(VALUE mesg)
Definition: error.c:2801
VALUE rb_eNoMemError
Definition: error.c:935
VALUE rb_eRangeError
Definition: error.c:928
void rb_error_untrusted(VALUE)
Definition: error.c:3036
VALUE rb_eLoadError
Definition: error.c:941
VALUE rb_eTypeError
Definition: error.c:924
VALUE rb_eNoMatchingPatternError
Definition: error.c:937
void rb_name_error_str(VALUE str, const char *fmt,...)
Definition: error.c:1530
void rb_fatal(const char *fmt,...)
Definition: error.c:2722
void rb_frozen_error_raise(VALUE frozen_obj, const char *fmt,...)
Definition: error.c:2982
VALUE rb_eEncCompatError
Definition: error.c:931
void rb_vraise(VALUE exc, const char *fmt, va_list ap)
Definition: error.c:2665
VALUE rb_protect(VALUE(*)(VALUE), VALUE, int *)
Protects a function call from potential global escapes from the function.
Definition: eval.c:1072
void rb_load_fail(VALUE path, const char *err)
Definition: error.c:2967
void rb_unexpected_type(VALUE x, int t)
Definition: error.c:854
VALUE rb_eFatal
Definition: error.c:920
void rb_invalid_str(const char *str, const char *type)
Definition: error.c:1867
VALUE rb_eInterrupt
Definition: error.c:918
VALUE rb_eNameError
Definition: error.c:929
const char * rb_builtin_class_name(VALUE x)
Definition: error.c:799
VALUE rb_make_exception(int, const VALUE *)
Make an Exception object from the list of arguments in a manner similar to Kernel#raise.
Definition: eval.c:851
MJIT_FUNC_EXPORTED void rb_assert_failure(const char *file, int line, const char *name, const char *expr)
Definition: error.c:718
VALUE rb_eNoMethodError
Definition: error.c:932
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
Definition: eval.c:684
void rb_bug_errno(const char *mesg, int errno_arg)
Definition: error.c:669
VALUE rb_eRuntimeError
Definition: error.c:922
VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method)
Definition: error.c:1594
void * rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type)
Definition: error.c:891
void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *ctx, const char *fmt,...)
Definition: error.c:651
void rb_warn(const char *fmt,...)
Definition: error.c:315
rb_warning_category_t rb_warning_category_from_name(VALUE category)
Definition: error.c:142
VALUE rb_exc_new(VALUE, const char *, long)
Definition: error.c:961
void rb_error_frozen_object(VALUE frozen_obj)
Definition: error.c:3008
VALUE rb_exc_new_str(VALUE, VALUE)
Definition: error.c:974
VALUE rb_eArgError
Definition: error.c:925
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Definition: error.c:2851
void rb_loaderror(const char *fmt,...)
Definition: error.c:2690
VALUE rb_eException
Definition: error.c:916
VALUE rb_eIndexError
Definition: error.c:926
VALUE rb_rescue(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE, VALUE), VALUE)
An equivalent of rescue clause.
Definition: eval.c:1047
VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt)
Definition: error.c:1312
void rb_loaderror_with_path(VALUE path, const char *fmt,...)
Definition: error.c:2702
VALUE rb_eEAGAIN
Definition: error.c:54
VALUE rb_ensure(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE), VALUE)
An equivalent to ensure clause.
Definition: eval.c:1115
void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args)
Definition: error.c:712
VALUE rb_eEINPROGRESS
Definition: error.c:56
VALUE rb_errinfo(void)
The current exception in the current thread.
Definition: eval.c:1882
void rb_async_bug_errno(const char *mesg, int errno_arg)
Definition: error.c:690
void rb_check_trusted(VALUE)
Definition: error.c:3043
VALUE rb_eSyntaxError
Definition: error.c:940
VALUE rb_eEncodingError
Definition: error.c:930
void rb_jump_tag(int tag)
Continues the exception caught by rb_protect() and rb_eval_string_protect().
Definition: eval.c:884
VALUE rb_eSecurityError
Definition: error.c:933
void rb_sys_fail(const char *mesg)
Definition: error.c:2795
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Definition: error.c:2859
VALUE rb_eEWOULDBLOCK
Definition: error.c:55
void rb_check_type(VALUE, int)
Definition: error.c:839
VALUE rb_eSystemCallError
Definition: error.c:943
VALUE rb_eSignal
Definition: error.c:919
VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name)
Definition: error.c:1909
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
Definition: object.c:1976
VALUE rb_obj_taint(VALUE)
call-seq: obj.taint -> obj
Definition: object.c:999
VALUE rb_false(VALUE obj)
Definition: object.c:1391
VALUE rb_obj_trust(VALUE)
call-seq: obj.trust -> obj
Definition: object.c:1057
VALUE rb_class_get_superclass(VALUE)
Returns the superclass of klass The return value might be an iclass of a module, unlike rb_class_supe...
Definition: object.c:2001
VALUE rb_convert_type(VALUE, int, const char *, const char *)
Converts an object into another type.
Definition: object.c:2900
VALUE rb_Float(VALUE)
Equivalent to Kernel#Float in Ruby.
Definition: object.c:3493
VALUE rb_check_to_int(VALUE)
Tries to convert val into Integer.
Definition: object.c:3036
VALUE rb_obj_reveal(VALUE obj, VALUE klass)
Make a hidden object visible again.
Definition: object.c:95
VALUE rb_check_convert_type(VALUE, int, const char *, const char *)
Tries to convert an object into another type.
Definition: object.c:2941
VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound)
Definition: object.c:3791
void rb_obj_call_init(VALUE, int, const VALUE *)
Calls #initialize method of obj with the given arguments.
Definition: eval.c:1681
VALUE rb_any_to_s(VALUE)
Default implementation of #to_s.
Definition: object.c:527
VALUE rb_obj_alloc(VALUE)
Allocates an instance of klass.
Definition: object.c:1895
VALUE rb_class_new_instance(int, const VALUE *, VALUE)
Allocates and initializes an instance of klass.
Definition: object.c:1955
VALUE rb_class_new_instance_kw(int, const VALUE *, VALUE, int)
Definition: object.c:1931
void rb_obj_copy_ivar(VALUE dest, VALUE obj)
Definition: object.c:247
int rb_opts_exception_p(VALUE opts, int default_value)
Definition: object.c:3125
VALUE rb_obj_hide(VALUE obj)
Make the object invisible from Ruby code.
Definition: object.c:78
double rb_num_to_dbl(VALUE val)
Definition: object.c:3576
int rb_bool_expected(VALUE, const char *)
Definition: object.c:3112
VALUE rb_check_to_float(VALUE)
Tries to convert an object into Float.
Definition: object.c:3559
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
Definition: object.c:3727
void rb_obj_infect(VALUE victim, VALUE carrier)
Does nothing.
Definition: object.c:1068
VALUE rb_obj_frozen_p(VALUE obj)
Determines if the object is frozen.
Definition: object.c:1099
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
Definition: object.c:500
int rb_eql(VALUE, VALUE)
Determines if obj1 and obj2 are equal in terms of Object::eql?.
Definition: object.c:147
double rb_str_to_dbl(VALUE, int)
Parses a string representation of a floating point number.
Definition: object.c:3371
VALUE rb_Integer(VALUE)
Equivalent to Kernel#Integer in Ruby.
Definition: object.c:3106
VALUE rb_Array(VALUE)
Equivalent to Kernel#Array in Ruby.
Definition: object.c:3684
VALUE rb_obj_class(VALUE)
Equivalent to Object#class in Ruby.
Definition: object.c:217
VALUE rb_obj_dup(VALUE)
Equivalent to Object#dup in Ruby.
Definition: object.c:420
VALUE rb_inspect(VALUE)
Convenient wrapper of Object::inspect.
Definition: object.c:551
VALUE rb_obj_untrust(VALUE)
call-seq: obj.untrust -> obj
Definition: object.c:1042
VALUE rb_class_inherited_p(VALUE mod, VALUE arg)
Determines if mod inherits arg.
Definition: object.c:1574
VALUE rb_obj_is_instance_of(VALUE, VALUE)
Determines if obj is an instance of c.
Definition: object.c:675
VALUE rb_convert_type_with_id(VALUE, int, const char *, ID)
Definition: object.c:2914
VALUE rb_class_real(VALUE cl)
Looks up the nearest ancestor of cl, skipping singleton classes or module inclusions.
Definition: object.c:202
VALUE rb_to_float(VALUE)
Converts a Numeric object into Float.
Definition: object.c:3542
double rb_num2dbl(VALUE)
Converts a Numeric object to double.
Definition: object.c:3616
VALUE rb_equal(VALUE, VALUE)
Same as Object#===, case equality.
Definition: object.c:124
VALUE rb_obj_clone(VALUE)
Almost same as Object::clone.
Definition: object.c:410
VALUE rb_obj_is_kind_of(VALUE, VALUE)
Determines if obj is a kind of c.
Definition: object.c:692
double rb_cstr_to_dbl(const char *, int)
Parses a string representation of a floating point number.
Definition: object.c:3319
VALUE rb_obj_freeze(VALUE)
Make the object unmodifiable.
Definition: object.c:1080
VALUE rb_check_to_integer(VALUE, const char *)
Tries to convert val into Integer.
Definition: object.c:2999
VALUE rb_immutable_obj_clone(int, VALUE *, VALUE)
Definition: object.c:346
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Definition: object.c:713
VALUE rb_obj_untrusted(VALUE obj)
call-seq: obj.untrusted? -> false
Definition: object.c:1028
VALUE rb_String(VALUE)
Equivalent to Kernel#String in Ruby.
Definition: object.c:3652
VALUE rb_obj_untaint(VALUE)
call-seq: obj.untaint -> obj
Definition: object.c:1014
VALUE rb_obj_tainted(VALUE obj)
call-seq: obj.tainted? -> false
Definition: object.c:985
VALUE rb_check_convert_type_with_id(VALUE, int, const char *, ID)
Definition: object.c:2957
VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2)
Definition: object.c:187
VALUE rb_to_int(VALUE)
Converts val into Integer.
Definition: object.c:3021
VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type)
Fills common (RBasic) fields in obj.
Definition: object.c:112
size_t rb_hash_size_num(VALUE hash)
Definition: hash.c:2945
fd_set rb_fdset_t
Definition: intern.h:403
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite writable, int n, const char *mesg)
Definition: io.c:12944
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite writable, const char *mesg)
Definition: io.c:12938
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:39
The main namespace.
Definition: cxxanyargs.hpp:17
unsigned int input
Definition: nkf.c:4325
const char * name
Definition: nkf.c:208
const char * alias
Definition: nkf.c:1159
unsigned int last
Definition: nkf.c:4324
void rb_num_zerodiv(void)
Definition: numeric.c:194
long rb_num2int(VALUE val)
Definition: numeric.c:3002
VALUE rb_dbl_cmp(double a, double b)
Definition: numeric.c:1431
long rb_fix2int(VALUE val)
Definition: numeric.c:3008
#define debug(lvl, x...)
Definition: ffi.c:52
my_ffi_struct callee(struct my_ffi_struct a1, struct my_ffi_struct a2)
Definition: problem1.c:16
VALUE rb_find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
void rb_method_name_error(VALUE klass, VALUE str)
Definition: proc.c:1778
VALUE rb_f_abort(int argc, const VALUE *argv)
Definition: process.c:4312
VALUE rb_f_exit(int argc, const VALUE *argv)
Definition: process.c:4238
VALUE rb_f_exec(int argc, const VALUE *argv)
Definition: process.c:2910
void rb_exit(int status)
Definition: process.c:4225
float expf(float)
int rb_int_negative_p(VALUE num)
Definition: numeric.c:307
double round(double)
Definition: numeric.c:80
void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src)
Definition: vm.c:885
void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause)
Definition: eval.c:639
VALUE rb_class_name(VALUE)
Definition: variable.c:274
void rb_load(VALUE, int)
Definition: load.c:693
pid_t vfork(void)
void srand48(long)
ssize_t __ssp_real_readlinkat(int __dirfd1, const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) __asm__("" "readlinkat")
double nextafter(double, double)
Definition: nextafter.c:9
int char char * _vasnprintf_r(struct _reent *, char *, size_t *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
struct rb_code_location_struct rb_code_location_t
double _strtod_r(struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR)
VALUE rb_big_even_p(VALUE)
Definition: bignum.c:6840
void rb_thread_wait_for(struct timeval)
Definition: thread.c:1346
int _setjmp(jmp_buf)
int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int)
VALUE rb_call_super_kw(int, const VALUE *, int)
Definition: vm_eval.c:298
#define RARRAY_EMBED_FLAG
useconds_t ualarm(useconds_t __useconds, useconds_t __interval)
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Definition: bignum.c:3547
int pipe2(int __fildes[2], int flags)
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
Definition: array.c:762
__uint32_t uint32_t
VALUE rb_cArithSeq
Definition: enumerator.c:180
int rb_ec_set_raised(rb_execution_context_t *ec)
Definition: thread.c:2343
int rb_thread_check_trap_pending(void)
Definition: thread.c:1371
int rb_reg_backref_number(VALUE match, VALUE backref)
Definition: re.c:1181
const rb_method_entry_t * rb_method_entry_clone(const rb_method_entry_t *me)
Definition: vm_method.c:406
void rb_iseq_remove_coverage_all(void)
Definition: iseq.c:1110
@ THREAD_STOPPED_FOREVER
unsigned long rb_genrand_ulong_limited(unsigned long i)
Definition: random.c:811
VALUE rb_str_unlocktmp(VALUE)
Definition: string.c:2675
float nearbyintf(float)
__uint32_t in_addr_t
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:327
VALUE rb_eval_string(const char *)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1715
double atan2(double, double)
const rb_data_type_t ruby_threadptr_data_type
Definition: vm.c:2645
int fgetpos(FILE *__restrict__, fpos_t *__restrict__)
float fmodf(float, float)
VALUE rb_parser_encoding(VALUE)
Definition: ripper.c:19462
double rint(double)
long int lrintl(long double)
void * memchr(const void *, int, size_t)
VALUE(* builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
float atan2f(float, float)
VALUE rb_hash_lookup(VALUE, VALUE)
Definition: hash.c:2063
void rb_fiber_reset_root_local_storage(struct rb_thread_struct *)
Definition: cont.c:2135
struct rb_execarg * rb_execarg_get(VALUE execarg_obj)
Definition: process.c:2636
__off_t off_t
float fabsf(float)
VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE *, int)
Definition: vm_eval.c:499
void rb_ast_dispose(rb_ast_t *)
Definition: node.c:1387
@ RB_DEBUG_COUNTER_ccf_opt_send
@ RB_DEBUG_COUNTER_mjit_frame_VM2VM
@ RB_DEBUG_COUNTER_mc_miss_reuse_call
@ RB_DEBUG_COUNTER_ivar_set_base
@ RB_DEBUG_COUNTER_gc_major_force
@ RB_DEBUG_COUNTER_gc_minor_capi
@ RB_DEBUG_COUNTER_frame_push_rescue
@ RB_DEBUG_COUNTER_obj_data_empty
@ RB_DEBUG_COUNTER_obj_file_ptr
@ RB_DEBUG_COUNTER_mc_miss_by_refine
@ RB_DEBUG_COUNTER_mjit_length_compact_units
@ RB_DEBUG_COUNTER_ccf_general
@ RB_DEBUG_COUNTER_obj_class_ptr
@ RB_DEBUG_COUNTER_obj_ary_extracapa
@ RB_DEBUG_COUNTER_heap_xfree
@ RB_DEBUG_COUNTER_obj_promote
@ RB_DEBUG_COUNTER_obj_hash_force_convert
@ RB_DEBUG_COUNTER_obj_float
@ RB_DEBUG_COUNTER_ccf_method_missing
@ RB_DEBUG_COUNTER_ivar_get_ic_miss_serial
@ RB_DEBUG_COUNTER_obj_hash_5_8
@ RB_DEBUG_COUNTER_obj_match_ge4
@ RB_DEBUG_COUNTER_mjit_frame_JT2VM
@ RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject
@ RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject
@ RB_DEBUG_COUNTER_obj_ary_shared_create
@ RB_DEBUG_COUNTER_frame_push
@ RB_DEBUG_COUNTER_lvar_set
@ RB_DEBUG_COUNTER_mc_miss_by_nome
@ RB_DEBUG_COUNTER_mc_inline_hit
@ RB_DEBUG_COUNTER_obj_struct_transient
@ RB_DEBUG_COUNTER_ivar_get_ic_miss
@ RB_DEBUG_COUNTER_heap_xrealloc
@ RB_DEBUG_COUNTER_obj_ary_shared_root_occupied
@ RB_DEBUG_COUNTER_frame_push_cfunc
@ RB_DEBUG_COUNTER_artable_hint_notfound
@ RB_DEBUG_COUNTER_ccf_opt_call
@ RB_DEBUG_COUNTER_ivar_get_base
@ RB_DEBUG_COUNTER_obj_str_ptr
@ RB_DEBUG_COUNTER_mc_global_miss
@ RB_DEBUG_COUNTER_frame_R2C
@ RB_DEBUG_COUNTER_obj_imemo_svar
@ RB_DEBUG_COUNTER_ivar_get_ic_miss_unset
@ RB_DEBUG_COUNTER_ccf_iseq_setup_0start
@ RB_DEBUG_COUNTER_obj_ary_ptr
@ RB_DEBUG_COUNTER_gc_major_oldmalloc
@ RB_DEBUG_COUNTER_obj_hash_ar
@ RB_DEBUG_COUNTER_mc_miss_by_distinct
@ RB_DEBUG_COUNTER_artable_hint_hit
@ RB_DEBUG_COUNTER_gc_major_nofree
@ RB_DEBUG_COUNTER_obj_imemo_memo
@ RB_DEBUG_COUNTER_obj_hash_4
@ RB_DEBUG_COUNTER_obj_str_fstr
@ RB_DEBUG_COUNTER_gc_isptr_align
@ RB_DEBUG_COUNTER_lvar_set_dynamic
@ RB_DEBUG_COUNTER_frame_push_dummy
@ RB_DEBUG_COUNTER_gc_isptr_trial
@ RB_DEBUG_COUNTER_obj_obj_embed
@ RB_DEBUG_COUNTER_obj_free
@ RB_DEBUG_COUNTER_obj_wb_unprotect
@ RB_DEBUG_COUNTER_mjit_compile_failures
@ RB_DEBUG_COUNTER_frame_C2C
@ RB_DEBUG_COUNTER_ccf_bmethod
@ RB_DEBUG_COUNTER_obj_hash_st
@ RB_DEBUG_COUNTER_obj_regexp_ptr
@ RB_DEBUG_COUNTER_mjit_cancel_send_inline
@ RB_DEBUG_COUNTER_obj_imemo_ment
@ RB_DEBUG_COUNTER_obj_newobj_wb_unprotected
@ RB_DEBUG_COUNTER_mc_inline_miss
@ RB_DEBUG_COUNTER_mjit_cancel_ivar_inline
@ RB_DEBUG_COUNTER_obj_imemo_ifunc
@ RB_DEBUG_COUNTER_lvar_get_dynamic
@ RB_DEBUG_COUNTER_mjit_cancel_invalidate_all
@ RB_DEBUG_COUNTER_ivar_set_ic_miss_unset
@ RB_DEBUG_COUNTER_obj_rational
@ RB_DEBUG_COUNTER_ivar_set_ic_miss_oorange
@ RB_DEBUG_COUNTER_frame_push_eval
@ RB_DEBUG_COUNTER_lvar_set_slowpath
@ RB_DEBUG_COUNTER_mjit_exec_not_added
@ RB_DEBUG_COUNTER_obj_bignum_ptr
@ RB_DEBUG_COUNTER_gc_minor_stress
@ RB_DEBUG_COUNTER_gc_major_oldgen
@ RB_DEBUG_COUNTER_ccf_cfunc
@ RB_DEBUG_COUNTER_frame_push_method
@ RB_DEBUG_COUNTER_mjit_exec_not_added_add_iseq
@ RB_DEBUG_COUNTER_gc_minor_method
@ RB_DEBUG_COUNTER_mjit_exec
@ RB_DEBUG_COUNTER_mjit_cancel
@ RB_DEBUG_COUNTER_obj_data_zombie
@ RB_DEBUG_COUNTER_obj_hash_empty
@ RB_DEBUG_COUNTER_gc_major_shady
@ RB_DEBUG_COUNTER_obj_hash_2
@ RB_DEBUG_COUNTER_frame_R2R
@ RB_DEBUG_COUNTER_ccf_zsuper
@ RB_DEBUG_COUNTER_obj_imemo_tmpbuf
@ RB_DEBUG_COUNTER_obj_imemo_env
@ RB_DEBUG_COUNTER_ccf_super_method
@ RB_DEBUG_COUNTER_ccf_iseq_setup
@ RB_DEBUG_COUNTER_obj_hash_null
@ RB_DEBUG_COUNTER_frame_push_top
@ RB_DEBUG_COUNTER_mjit_exec_not_ready
@ RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start
@ RB_DEBUG_COUNTER_gc_minor_newobj
@ RB_DEBUG_COUNTER_obj_obj_transient
@ RB_DEBUG_COUNTER_ccf_iseq_fix
@ RB_DEBUG_COUNTER_obj_module_ptr
@ RB_DEBUG_COUNTER_obj_str_embed
@ RB_DEBUG_COUNTER_obj_imemo_iseq
@ RB_DEBUG_COUNTER_mc_search_super
@ RB_DEBUG_COUNTER_mjit_length_active_units
@ RB_DEBUG_COUNTER_artable_hint_miss
@ RB_DEBUG_COUNTER_ivar_set_ic_miss
@ RB_DEBUG_COUNTER_mc_cme_complement
@ RB_DEBUG_COUNTER_mc_global_hit
@ RB_DEBUG_COUNTER_obj_imemo_cref
@ RB_DEBUG_COUNTER_lvar_get
@ RB_DEBUG_COUNTER_obj_obj_ptr
@ RB_DEBUG_COUNTER_mjit_length_stale_units
@ RB_DEBUG_COUNTER_ivar_get_ic_hit
@ RB_DEBUG_COUNTER_mjit_exec_not_compiled
@ RB_DEBUG_COUNTER_obj_complex
@ RB_DEBUG_COUNTER_mjit_frame_JT2JT
@ RB_DEBUG_COUNTER_mjit_length_unit_queue
@ RB_DEBUG_COUNTER_obj_symbol
@ RB_DEBUG_COUNTER_obj_ary_embed
@ RB_DEBUG_COUNTER_obj_struct_embed
@ RB_DEBUG_COUNTER_obj_match_ge8
@ RB_DEBUG_COUNTER_theap_alloc_fail
@ RB_DEBUG_COUNTER_mjit_cancel_opt_insn
@ RB_DEBUG_COUNTER_obj_hash_transient
@ RB_DEBUG_COUNTER_obj_iclass_ptr
@ RB_DEBUG_COUNTER_obj_imemo_throw_data
@ RB_DEBUG_COUNTER_obj_struct_ptr
@ RB_DEBUG_COUNTER_gc_isptr_maybe
@ RB_DEBUG_COUNTER_gc_minor_malloc
@ RB_DEBUG_COUNTER_obj_data_imm_free
@ RB_DEBUG_COUNTER_obj_str_shared
@ RB_DEBUG_COUNTER_obj_ary_transient
@ RB_DEBUG_COUNTER_mjit_frame_VM2JT
@ RB_DEBUG_COUNTER_theap_evacuate
@ RB_DEBUG_COUNTER_obj_imemo_ast
@ RB_DEBUG_COUNTER_obj_imemo_parser_strterm
@ RB_DEBUG_COUNTER_frame_push_ifunc
@ RB_DEBUG_COUNTER_ccf_iseq_kw1
@ RB_DEBUG_COUNTER_obj_data_xfree
@ RB_DEBUG_COUNTER_ccf_iseq_opt
@ RB_DEBUG_COUNTER_frame_push_class
@ RB_DEBUG_COUNTER_mjit_exec_call_func
@ RB_DEBUG_COUNTER_obj_str_nofree
@ RB_DEBUG_COUNTER_frame_C2R
@ RB_DEBUG_COUNTER_mc_global_state_miss
@ RB_DEBUG_COUNTER_ccf_opt_block_call
@ RB_DEBUG_COUNTER_ccf_attrset
@ RB_DEBUG_COUNTER_obj_hash_3
@ RB_DEBUG_COUNTER_obj_match_under4
@ RB_DEBUG_COUNTER_obj_newobj_slowpath
@ RB_DEBUG_COUNTER_obj_ary_shared
@ RB_DEBUG_COUNTER_obj_newobj
@ RB_DEBUG_COUNTER_obj_bignum_embed
@ RB_DEBUG_COUNTER_mc_class_serial_miss
@ RB_DEBUG_COUNTER_theap_alloc
@ RB_DEBUG_COUNTER_heap_xmalloc
@ RB_DEBUG_COUNTER_ivar_set_ic_miss_serial
@ RB_DEBUG_COUNTER_obj_match_ptr
@ RB_DEBUG_COUNTER_obj_hash_1
@ RB_DEBUG_COUNTER_frame_push_block
@ RB_DEBUG_COUNTER_ccf_iseq_kw2
@ RB_DEBUG_COUNTER_mc_cme_complement_hit
@ RB_DEBUG_COUNTER_ccf_ivar
@ RB_DEBUG_COUNTER_ivar_set_ic_hit
@ RB_DEBUG_COUNTER_mc_miss_spurious
@ RB_DEBUG_COUNTER_mc_miss_by_visi
@ RB_DEBUG_COUNTER_gc_isptr_range
@ RB_DEBUG_COUNTER_gc_count
@ RB_DEBUG_COUNTER_obj_hash_g8
VALUE rb_file_s_expand_path(int, const VALUE *)
Definition: file.c:4052
#define SI_KERNEL
ssize_t readlink(const char *__restrict__ __path, char *__restrict__ __buf, size_t __buflen)
int pthread_condattr_setclock(pthread_condattr_t *, clockid_t)
int pthread_mutexattr_getprotocol(const pthread_mutexattr_t *, int *)
void rb_ec_clear_vm_stack(rb_execution_context_t *ec)
Definition: vm.c:2701
#define clearerr(p)
float cosf(float)
VALUE rb_math_log(int argc, const VALUE *argv)
Definition: math.c:459
int _fiprintf_r(struct _reent *, FILE *, const char *,...) __attribute__((__format__(__printf__
VALUE rb_dir_getwd(void)
Definition: dir.c:1141
double gamma(double)
VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat)
Definition: cont.c:2097
void rb_hash_foreach(VALUE, int(*)(VALUE, VALUE, VALUE), VALUE)
double rb_random_real(VALUE rnd)
Definition: random.c:874
void rb_undef(VALUE, ID)
Definition: vm_method.c:1217
long int __intmax_t
int pthread_getname_np(pthread_t, char *, size_t) __attribute__((__nonnull__(2)))
int fsync(int __fd)
long int int_fast64_t
VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE)
Definition: gc.c:2287
VALUE rb_f_trace_var(int, const VALUE *)
Definition: variable.c:528
int execvpe(const char *__file, char *const __argv[], char *const __envp[])
int rb_objspace_internal_object_p(VALUE obj)
Definition: gc.c:3110
void __cygwin_lock_unlock(_LOCK_T *)
VALUE rb_str_to_str(VALUE)
Definition: string.c:1382
void Init_newline(void)
int strncasecmp(const char *, const char *, size_t) __attribute__((__pure__))
#define SIGEV_SIGNAL
pid_t getpgrp(void)
__int8_t int8_t
VALUE rb_iseq_path(const rb_iseq_t *iseq)
Definition: iseq.c:1027
VALUE * ruby_initial_gc_stress_ptr
Definition: gc.c:905
long double nanl(const char *)
long int __intptr_t
#define rb_data_object_get
rb_ast_t * rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line)
Definition: ripper.c:13075
void __stack_chk_fail(void) __attribute__((__noreturn__))
int pthread_atfork(void(*)(void), void(*)(void), void(*)(void))
void * _reallocf_r(struct _reent *, void *, size_t)
VALUE rb_get_coverages(void)
Definition: thread.c:5476
VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
Definition: thread.c:5085
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
Definition: node.c:1095
#define rb_funcallv(recv, mid, argc, argv)
VALUE rb_hash_default_value(VALUE hash, VALUE key)
Definition: hash.c:1990
int memcmp(const void *, const void *, size_t)
Definition: memcmp.c:7
void rb_file_const(const char *, VALUE)
Definition: file.c:6104
VALUE rb_str_freeze(VALUE)
Definition: string.c:2616
void rb_print_backtrace(void)
Definition: vm_dump.c:750
void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size)
Definition: vm.c:2685
void rb_provide(const char *)
Definition: load.c:607
@ id_core_set_method_alias
@ id_debug_created_info
@ id_core_hash_merge_kwd
@ tSingleton_method_added
@ idSingleton_method_added
@ id_core_define_singleton_method
@ id_core_set_variable_alias
@ idRespond_to_missing
@ idSingleton_method_removed
@ id_core_hash_merge_ptr
@ idSingleton_method_undefined
@ tSingleton_method_undefined
@ tTOKEN_ATTRSET_BEGIN
@ id_core_undef_method
@ tTOKEN_INSTANCE_BEGIN
@ id_core_define_method
@ tSingleton_method_removed
int pthread_rwlock_clockrdlock(pthread_rwlock_t *, clockid_t, const struct timespec *)
#define RSTRUCT_EMBED_LEN_SHIFT
unsigned long strtoul(const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
unsigned int rb_random_int32(VALUE rnd)
Definition: random.c:839
int sigpending(sigset_t *)
float erff(float)
const char *void void rb_compile_warning(const char *, int, const char *,...) __attribute__((format(printf
VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *)
Definition: vm_eval.c:237
float dremf(float, float)
int int int int int int int int char char int int fiprintf(FILE *, const char *,...) __attribute__((__format__(__printf__
int getopt(int, char *const *, const char *)
int int _fpurge_r(struct _reent *, FILE *)
int rb_thread_interrupted(VALUE thval)
Definition: thread.c:1378
VALUE rb_str_resize(VALUE, long)
Definition: string.c:2709
VALUE rb_argv0
Definition: intern.h:734
VALUE rb_f_send(int argc, VALUE *argv, VALUE recv)
Definition: vm_eval.c:1188
void rb_backref_set_string(VALUE string, long pos, long len)
Definition: re.c:1348
unsigned long lindex_t
ssize_t getdelim(char **, size_t *, int, FILE *)
long double exp2l(long double)
char * strsignal(int __signo)
const VALUE * rb_vm_ep_local_ep(const VALUE *ep)
int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2)
pid_t getsid(pid_t)
rb_nativethread_id_t rb_nativethread_self()
VALUE rb_hash(VALUE)
Definition: hash.c:129
void div_t div(int __numer, int __denom)
long double asinhl(long double)
long long int llrintf(float)
float atanhf(float)
@ RB_WARN_CATEGORY_DEPRECATED
@ RB_WARN_CATEGORY_ALL_BITS
@ RB_WARN_CATEGORY_EXPERIMENTAL
@ RB_WARN_CATEGORY_NONE
VALUE rb_random_int(VALUE rnd, VALUE max)
struct rb_global_entry * rb_global_entry(ID)
Definition: variable.c:326
void rb_iseq_init_trace(rb_iseq_t *iseq)
Definition: iseq.c:623
int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2)
Definition: vm_method.c:1493
int mkfifoat(int, const char *, mode_t)
void(* ruby_sighandler_t)(int)
void __cygwin_lock_lock(_LOCK_T *)
VALUE rb_last_status_get(void)
Definition: process.c:546
VALUE rb_str_locktmp_ensure(VALUE str, VALUE(*func)(VALUE), VALUE arg)
Definition: string.c:2685
VALUE rb_complex_uminus(VALUE z)
Definition: complex.c:758
VALUE rb_complex_div(VALUE x, VALUE y)
Definition: complex.c:948
void * reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2
double hypot(double, double)
Definition: hypot.c:6
VALUE rb_get_argv(void)
Definition: io.c:12904
int __signbitf(float)
long unsigned int uint_fast32_t
int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg)
Definition: hash.c:1453
VALUE rb_rational_cmp(VALUE self, VALUE other)
Definition: rational.c:1097
int char char int int int int _fclose_r(struct _reent *, FILE *)
__suseconds_t suseconds_t
rb_iseq_t * rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func *ifunc, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t *)
Definition: iseq.c:828
const rb_callable_method_entry_t * rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:948
VALUE rb_thread_wakeup_alive(VALUE)
Definition: thread.c:2548
VALUE rb_class_path_cached(VALUE)
Definition: variable.c:162
struct rb_method_cfunc_struct rb_method_cfunc_t
int sethostname(const char *, size_t)
VALUE rb_hash_values(VALUE hash)
Definition: hash.c:3456
#define rb_str_buf_cat2
void rb_objspace_each_objects(int(*callback)(void *start, void *end, size_t stride, void *data), void *data)
int wctomb(char *, wchar_t)
VALUE rb_str_scrub(VALUE, VALUE)
Definition: string.c:10248
void rb_objspace_reachable_objects_from_root(void(func)(const char *category, VALUE, void *), void *data)
Definition: gc.c:9509
long double tanl(long double)
VALUE rb_struct_alloc_noinit(VALUE)
Definition: struct.c:349
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Definition: vm_trace.c:157
VALUE rb_big_pow(VALUE, VALUE)
Definition: bignum.c:6244
VALUE rb_parser_dump_tree(const NODE *node, int comment)
Definition: node.c:1076
size_t rb_big_size(VALUE)
Definition: bignum.c:6778
void rb_debug_counter_show_results(const char *msg)
#define _(args)
VALUE rb_reg_check_preprocess(VALUE)
Definition: re.c:2707
char * rb_str_fill_terminator(VALUE str, const int termlen)
Definition: string.c:2306
void * _LOCK_T
int clock_gettime(clockid_t clock_id, struct timespec *tp)
Definition: win32.c:4642
void void * reallocf(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2)))
ldiv_t ldiv(long __numer, long __denom)
int cookie_close_function_t(void *__cookie)
VALUE rb_hash_resurrect(VALUE hash)
Definition: hash.c:1575
long random(void)
unsigned long __timer_t
int putchar(int)
__extension__ typedef long long _off64_t
char * strlwr(char *)
size_t wcstombs(char *__restrict__, const wchar_t *__restrict__, size_t)
int char char int int int int int int int int int int int int int int int int int int fpurge(FILE *)
void rb_define_virtual_variable(const char *, rb_gvar_getter_t *, rb_gvar_setter_t *)
Definition: variable.c:511
int pthread_attr_getguardsize(const pthread_attr_t *, size_t *)
int setgid(gid_t __gid)
int sched_getscheduler(pid_t __pid)
int _fputs_unlocked_r(struct _reent *, const char *__restrict__, FILE *__restrict__)
int execlpe(const char *__file, const char *,...)
rb_serial_t ruby_vm_class_serial
Definition: vm.c:381
int rb_cloexec_pipe(int fildes[2])
Definition: io.c:378
__sigset_t sigset_t
double fabs(double)
struct __pthread_mutexattr_t * pthread_mutexattr_t
struct rb_ast_struct rb_ast_t
void _rewind_r(struct _reent *, FILE *)
char * l64a(long __input)
VALUE rb_backtrace_to_str_ary(VALUE obj)
Definition: vm_backtrace.c:620
VALUE rb_rs
Definition: intern.h:585
size_t _wcstombs_r(struct _reent *, char *__restrict__, const wchar_t *__restrict__, size_t, _mbstate_t *)
VALUE rb_io_getbyte(VALUE)
Definition: io.c:4219
VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath)
Definition: iseq.c:450
VALUE rb_rational_uminus(VALUE self)
Definition: rational.c:624
int getc_unlocked(FILE *)
void mjit_finish(_Bool close_handle_p)
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, int *)
struct __pthread_cond_t * pthread_cond_t
int _fputc_r(struct _reent *, int, FILE *)
double tanh(double)
Definition: math.c:284
uintmax_t strtoumax_l(const char *__restrict__, char **_restrict, int, locale_t)
void rb_parser_free(struct parser_params *, void *)
Definition: ripper.c:19583
#define sprintf(str,...)
char * getusershell(void)
unsigned long __clock_t
void rb_vm_gvl_destroy(rb_vm_t *vm)
Definition: thread.c:421
const rb_method_entry_t * rb_method_entry(VALUE klass, ID id)
Definition: vm_method.c:854
VALUE rb_iseq_eval_main(const rb_iseq_t *iseq)
Definition: vm.c:2173
VALUE rb_mRubyVMFrozenCore
Definition: vm.c:367
void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq)
Definition: iseq.c:595
VALUE rb_thread_local_aref(VALUE, ID)
Definition: thread.c:3215
void rb_remove_method_id(VALUE, ID)
Definition: vm_method.c:1043
int kill(pid_t, int)
Definition: win32.c:4819
void rb_io_fptr_finalize_internal(void *ptr)
Definition: io.c:4734
int rb_proc_exec(const char *)
Definition: process.c:1693
int int renameat(int, const char *, int, const char *)
long double copysignl(long double, long double)
@ VM_THROW_NO_ESCAPE_FLAG
void rb_encdb_declare(const char *name)
Definition: encoding.c:350
void rb_set_class_path_string(VALUE, VALUE, VALUE)
Definition: variable.c:198
NODE * rb_ast_newnode(rb_ast_t *, enum node_type type)
Definition: node.c:1198
void rb_ec_error_print(rb_execution_context_t *volatile ec, volatile VALUE errinfo)
Definition: eval_error.c:346
#define rb_hash_uint(h, i)
long double ldexpl(long double, int)
int __signbitd(double)
long double expl(long double)
uintmax_t wcstoumax_l(const wchar_t *__restrict__, wchar_t **_restrict, int, locale_t)
VALUE rb_parser_new(void)
Definition: ripper.c:19389
long _strtol_r(struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
VALUE rb_const_get(VALUE, ID)
Definition: variable.c:2391
VALUE rb_Rational(VALUE, VALUE)
Definition: rational.c:1963
st_table * rb_st_init_numtable_with_size(st_index_t)
long double remquol(long double, long double, int *)
rb_cref_t * rb_vm_cref_new_toplevel(void)
long double powl(long double, long double)
__uid_t uid_t
#define CLD_STOPPED
long ftell(FILE *)
int vhangup(void)
VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
Definition: thread.c:5097
void rb_attr(VALUE, ID, int, int, int)
Definition: vm_method.c:1180
int dup3(int __fildes, int __fildes2, int flags)
#define log2(x)
VALUE rb_rational_pow(VALUE self, VALUE other)
Definition: rational.c:1002
void __eprintf(const char *, const char *, unsigned int, const char *)
FILE * _fopencookie_r(struct _reent *, void *__cookie, const char *__mode, cookie_io_functions_t __functions)
double strtod(const char *__restrict__ __n, char **__restrict__ __end_PTR)
VALUE rb_ull2inum(unsigned long long)
int ruby_is_fd_loadable(int fd)
Definition: file.c:6216
VALUE rb_obj_instance_eval(int, const VALUE *, VALUE)
Definition: vm_eval.c:1997
void pthread_exit(void *) __attribute__((__noreturn__))
rb_gvar_setter_t rb_gvar_var_setter
float strtof(const char *__restrict__ __n, char **__restrict__ __end_PTR)
long rb_str_offset(VALUE, long)
Definition: string.c:2416
rb_control_frame_t struct rb_calling_info const struct rb_call_info VALUE block_handler
_sig_func_ptr sighandler_t
VALUE rb_ary_aref(int, const VALUE *, VALUE)
Definition: array.c:1574
#define RCLASS_SUPER(c)
const char * ruby_escaped_char(int c)
Definition: string.c:5848
size_t __ssp_real_fread_unlocked(void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp) __asm__("" "fread_unlocked")
int getloadavg(double loadavg[], int nelem)
int setregid(gid_t __rgid, gid_t __egid)
void rb_backtrace_each(VALUE(*iter)(VALUE recv, VALUE str), VALUE output)
Definition: vm_backtrace.c:855
char * setstate(char *)
VALUE rb_int2inum(intptr_t)
Definition: bignum.c:3208
void rb_set_class_path(VALUE, VALUE, const char *)
Definition: variable.c:218
int pthread_cond_signal(pthread_cond_t *)
rb_vm_t * ruby_current_vm_ptr
Definition: vm.c:372
int rb_method_entry_arity(const rb_method_entry_t *me)
Definition: proc.c:2555
const ID rb_iseq_shared_exc_local_tbl[]
Definition: compile.c:110
enum ruby_tag_type st
VALUE rb_integer_float_eq(VALUE x, VALUE y)
Definition: bignum.c:5386
double strtod_l(const char *__restrict__, char **__restrict__, locale_t)
#define BUS_OBJERR
void srandom(unsigned)
#define RHASH_AR_TABLE_SIZE_SHIFT
void __cygwin_lock_init(_LOCK_T *)
VALUE rb_mod_class_variables(int, const VALUE *, VALUE)
Definition: variable.c:3248
#define bp()
void rb_mark_tbl(struct st_table *)
Definition: gc.c:5021
rb_gvar_marker_t rb_gvar_var_marker
int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t(*)(st_data_t))
VALUE rb_big_hash(VALUE)
Definition: bignum.c:6726
double cosh(double)
Definition: math.c:228
char * strstr(const char *, const char *)
Definition: strstr.c:8
void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen)
Definition: string.c:2230
const VALUE const VALUE *void rb_remove_method(VALUE, const char *)
Definition: vm_method.c:1049
char * itoa(int, char *, int)
__inline__ int __len
int int int int vscanf(const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
void rb_copy_generic_ivar(VALUE, VALUE)
Definition: variable.c:1447
unsigned long st_data_t
int sched_set_thread_affinity(void *, size_t, const cpu_set_t *)
void rb_gc_mark_maybe(VALUE)
Definition: gc.c:5060
VALUE rb_big_eql(VALUE, VALUE)
Definition: bignum.c:5544
int pthread_mutex_timedlock(pthread_mutex_t *, const struct timespec *)
@ VM_CALL_ARGS_SIMPLE_bit
@ VM_CALL_ARGS_BLOCKARG_bit
@ VM_CALL_ARGS_SPLAT_bit
char * _tmpnam_r(struct _reent *, char *)
void rb_must_asciicompat(VALUE)
Definition: string.c:2166
int rb_empty_keyword_given_p(void)
Definition: eval.c:919
int pthread_mutex_clocklock(pthread_mutex_t *, clockid_t, const struct timespec *)
double rb_big_fdiv_double(VALUE x, VALUE y)
Definition: bignum.c:6209
VALUE rb_yield_1(VALUE val)
Definition: vm_eval.c:1231
VALUE rb_flt_rationalize_with_prec(VALUE, VALUE)
Definition: rational.c:2238
int int int int int int int int int fgetc(FILE *)
VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int)
Definition: ripper.c:19399
const VALUE int int int int int int VALUE * vars[]
int setenv(const char *__string, const char *__value, int __overwrite)
VALUE rb_big_minus(VALUE, VALUE)
Definition: bignum.c:5853
time_t mktime(struct tm *_timeptr)
VALUE rb_ll2inum(long long)
void rb_compile_warn(const char *, int, const char *,...) __attribute__((format(printf
struct st_table * rb_hash_tbl(VALUE, const char *file, int line)
Definition: hash.c:1601
int int int int int int int int char char int int int int iprintf(const char *,...) __attribute__((__format__(__printf__
void rb_threadptr_check_signal(rb_thread_t *mth)
Definition: thread.c:4317
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2996
long double atanhl(long double)
int ftrylockfile(FILE *)
short unsigned int __uint16_t
VALUE rb_int_modulo(VALUE x, VALUE y)
Definition: numeric.c:3891
void rb_ibf_load_iseq_complete(rb_iseq_t *iseq)
Definition: compile.c:11434
void srand(unsigned __seed)
void rb_mutex_allow_trap(VALUE self, int val)
Definition: thread_sync.c:545
VALUE rb_str_eql(VALUE str1, VALUE str2)
Definition: string.c:3287
void sincos(double, double *, double *)
long double fminl(long double, long double)
VALUE rb_reg_nth_defined(int, VALUE)
Definition: re.c:1696
void ruby_thread_init_stack(rb_thread_t *th)
Definition: thread.c:642
void rb_fd_clr(int, rb_fdset_t *)
int rmdir(const char *__path)
struct iseq_inline_cache_entry * IC
const rb_callable_method_entry_t * rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:934
VALUE rb_fix_aref(VALUE fix, VALUE idx)
Definition: numeric.c:4649
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
Definition: hash.c:99
#define memset(dst, val, len)
const char * getprogname(void)
FILE * funopen(const void *__cookie, int(*__readfn)(void *__c, char *__buf, size_t __n), int(*__writefn)(void *__c, const char *__buf, size_t __n), _fpos64_t(*__seekfn)(void *__c, _fpos64_t __off, int __whence), int(*__closefn)(void *__c))
float truncf(float)
VALUE rb_vm_call_cfunc(VALUE recv, VALUE(*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename)
Definition: vm.c:2212
long int int_fast32_t
int rb_objspace_garbage_object_p(VALUE obj)
Definition: gc.c:3620
int rb_str_symname_p(VALUE)
Definition: string.c:10695
char * _fgets_unlocked_r(struct _reent *, char *__restrict__, int, FILE *__restrict__)
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE)
Definition: vm_eval.c:1528
size_t strlen(const char *)
int strcmp(const char *, const char *)
int flsll(long long) __attribute__((__const__))
void(*)(int) ruby_posix_signal(int, void(*)(int))
void rb_hash_st_table_set(VALUE hash, st_table *st)
Definition: hash.c:558
int pthread_cond_clockwait(pthread_cond_t *, pthread_mutex_t *, clockid_t, const struct timespec *)
size_t fwrite(const void *__restrict__, size_t _size, size_t _n, FILE *)
long unsigned int __uintmax_t
void rb_define_private_method(VALUE, const char *, VALUE(*)(), int)
int ruby_thread_has_gvl_p(void)
Definition: thread.c:1704
const void ** rb_vm_get_insns_address_table(void)
Definition: vm_exec.c:134
long pathconf(const char *__path, int __name)
#define rb_utf8_str_new_cstr(str)
int _atoi_r(struct _reent *, const char *__nptr)
VALUE rb_check_to_array(VALUE ary)
Definition: array.c:915
#define BUS_ADRERR
int execv(const char *__path, char *const __argv[])
VALUE(* vm_call_handler)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
long double log1pl(long double)
#define rb_hash_end(h)
void VALUE rb_dir_getwd_ospath(void)
Definition: dir.c:1117
FILE * tmpfile(void)
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
Definition: struct.c:405
long int ptrdiff_t
void * malloc(size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1)))
VALUE rb_assoc_new(VALUE, VALUE)
Definition: array.c:896
_Bool mjit_call_p
Definition: mjit_worker.c:180
VALUE rb_big2str_generic(VALUE x, int base)
Definition: bignum.c:5004
float exp10l(float)
VALUE rb_mutex_new(void)
Definition: thread_sync.c:165
size_t _fwrite_unlocked_r(struct _reent *, const void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
int _fgetpos_r(struct _reent *, FILE *, fpos_t *)
void ruby_debug_printf(const char *,...) __attribute__((format(printf
char * ptsname(int)
void rb_mark_end_proc(void)
Definition: eval_jump.c:78
int getgroups(int __gidsetsize, gid_t __grouplist[])
void Init_native_thread(rb_thread_t *th)
VALUE rb_to_array_type(VALUE obj)
Definition: array.c:902
VALUE rb_struct_s_members(VALUE)
Definition: struct.c:58
void ruby_debug_breakpoint(void)
Definition: debug.c:135
#define rb_hash_uint32(h, i)
int pthread_mutex_getprioceiling(const pthread_mutex_t *, int *)
const rb_iseq_t const int const int min_argc
VALUE rb_str_quote_unprintable(VALUE)
Definition: string.c:10714
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Definition: range.c:1248
int abs(int)
__uint64_t u_int64_t
int _vasiprintf_r(struct _reent *, char **, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
void * rb_parser_malloc(struct parser_params *, size_t)
Definition: ripper.c:19543
int pthread_mutexattr_settype(pthread_mutexattr_t *, int)
unsigned char __uint8_t
VALUE rb_hash_aref(VALUE, VALUE)
Definition: hash.c:2037
VALUE rb_backref_get(void)
Definition: vm.c:1304
__fsblkcnt_t fsblkcnt_t
void mjit_gc_exit_hook(void)
VALUE rb_io_eof(VALUE)
Definition: io.c:2149
VALUE rb_str_encode_ospath(VALUE)
Definition: file.c:236
long unsigned int uint_fast16_t
char ruby_check_sizeof_int[4==sizeof(int) ? 1 :-1]
void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc)
Definition: vm_dump.c:385
VALUE rb_memory_id(VALUE)
Definition: gc.c:3753
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock)
Definition: thread.c:440
#define rb_yield_values(argc,...)
int setjmp(jmp_buf __jmpb)
#define RARRAY_TRANSIENT_FLAG
VALUE rb_str_new_shared(VALUE)
Definition: string.c:1197
#define strncat(dst, src, len)
VALUE rb_big_div(VALUE, VALUE)
Definition: bignum.c:6091
int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int)
double fdim(double, double)
double remainder(double, double)
int int int int int sscanf(const char *__restrict__, const char *__restrict__,...) __attribute__((__format__(__scanf__
void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi)
Definition: vm_method.c:685
int _mkostemp_r(struct _reent *, char *, int)
int sigsuspend(const sigset_t *)
long double nextafterl(long double, long double)
int sched_rr_get_interval(pid_t __pid, struct timespec *__interval)
int fstat(int __fd, struct stat *__sbuf)
int pthread_cancel(pthread_t)
VALUE rb_gc_disable(void)
Definition: gc.c:9262
short unsigned int __uint_least16_t
uintmax_t _strtoumax_r(struct _reent *, const char *__restrict__, char **__restrict__, int)
size_t rb_objspace_data_type_memsize(VALUE obj)
Definition: gc.c:2432
int rb_bigzero_p(VALUE x)
Definition: bignum.c:2919
int putc_unlocked(int, FILE *)
__uint16_t uint16_t
VALUE rb_file_open(const char *, const char *)
Definition: io.c:6263
VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler, const rb_callable_method_entry_t *me)
Definition: vm.c:1242
void rb_str_shared_replace(VALUE, VALUE)
Definition: string.c:1391
unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos)
Definition: iseq.c:1761
void Init_heap(void)
Definition: gc.c:2924
int ruby_debug_print_indent(int level, int debug_level, int indent_level)
Definition: debug.c:74
int ttyname_r(int, char *, size_t)
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE(*func)(), int argc, rb_method_visibility_t visi)
int int _fseek_r(struct _reent *, FILE *, long, int)
VALUE rb_big_idiv(VALUE, VALUE)
Definition: bignum.c:6097
_fpos64_t fpos_t
const int ruby_api_version[]
Definition: iseq.h:15
#define SEGV_MAPERR
VALUE rb_path2class(const char *)
Definition: variable.c:268
int stime(const time_t *)
struct rb_method_attr_struct rb_method_attr_t
long rb_big2long(VALUE)
Definition: bignum.c:5140
double fmin(double, double)
#define RUBY_Qfalse
void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath)
Definition: iseq.c:469
VALUE rb_getpwdirnam_for_login(VALUE login)
int char char int int int int int int int int int int int int _vsiprintf_r(struct _reent *, char *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_cvar_defined(VALUE, ID)
Definition: variable.c:3123
#define SIGEV_THREAD
float strtof_l(const char *__restrict__, char **__restrict__, locale_t)
VALUE ruby_vm_const_missing_count
Definition: vm.c:371
VALUE rb_require_string(VALUE)
Definition: load.c:1145
const rb_method_entry_t * rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me)
Definition: vm_method.c:989
VALUE rb_gc_start(void)
Definition: gc.c:8688
int ffsll(long long) __attribute__((__const__))
rb_control_frame_t * cfp
long double sinl(long double)
int int int int __vsnprintf_chk(char *__restrict__, size_t, int, size_t, const char *__restrict__, __va_list) __attribute__((__format__(__printf__
intmax_t strtoimax(const char *__restrict__, char **__restrict__, int)
VALUE rb_const_source_location(VALUE, ID)
Definition: variable.c:2461
VALUE rb_enum_values_pack(int, const VALUE *)
Definition: enum.c:33
void rb_hash_free(VALUE)
int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val)
Definition: hash.c:4547
__uint8_t uint8_t
int close(int __fildes)
int timer_settime(timer_t timerid, int flags, const struct itimerspec *__restrict__ value, struct itimerspec *__restrict__ ovalue)
void ruby_set_argv(int, char **)
Definition: ruby.c:2379
double scalbln(double, long int)
VALUE rb_num_pow(VALUE x, VALUE y)
Definition: numeric.c:4123
#define RMODULE_INCLUDED_INTO_REFINEMENT
char * cuserid(char *)
st_table * rb_st_init_strcasetable_with_size(st_index_t)
float nextafterf(float, float)
VALUE rb_big2str_gmp(VALUE x, int base)
#define rb_data_object_wrap_warning(klass, ptr, mark, free)
#define sigsetjmp(env, savemask)
long double asinl(long double)
char * rb_str_subpos(VALUE, long, long *)
Definition: string.c:2497
int rb_threadptr_execute_interrupts(rb_thread_t *, int)
Definition: thread.c:2193
time_t time(time_t *_timer)
int atoi(const char *__nptr)
void * __memset_chk(void *, int, size_t, size_t)
void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi)
Definition: vm_method.c:675
int rb_proc_arity(VALUE)
Definition: proc.c:1112
void Init_vm_eval(void)
Definition: vm_eval.c:2472
unsigned char uint_fast8_t
#define CLD_KILLED
void rb_define_global_function(const char *, VALUE(*)(), int)
#define mempcpy(dst, src, len)
VALUE rb_const_list(void *)
Definition: variable.c:2598
#define RHASH_AR_TABLE_BOUND_SHIFT
int mkstemps(char *, int)
void * memalign(size_t, size_t)
struct iseq_inline_iv_cache_entry * IVC
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *)
VALUE rb_ary_cat(VALUE, const VALUE *, long)
Definition: array.c:1208
VALUE rb_ary_tmp_new_fill(long capa)
Definition: array.c:776
int fsetpos(FILE *, const fpos_t *)
ssize_t pread(int __fd, void *__buf, size_t __nbytes, off_t __offset)
float dreml(long double, long double)
VALUE rb_struct_init_copy(VALUE copy, VALUE s)
Definition: struct.c:974
void Init_enc(void)
Definition: dmyenc.c:5
VALUE rb_big_mul_toom3(VALUE x, VALUE y)
Definition: bignum.c:2267
VALUE rb_big_comp(VALUE x)
Definition: bignum.c:5564
void ruby_reset_leap_second_info(void)
Definition: time.c:1193
float tanf(float)
VALUE rb_str_concat(VALUE, VALUE)
Definition: string.c:3065
double rb_big2dbl(VALUE)
Definition: bignum.c:5310
int sigdelset(sigset_t *, const int)
char * ctermid(char *)
VALUE rb_range_beg_len(VALUE, long *, long *, long, int)
Definition: range.c:1278
VALUE rb_num_coerce_bin(VALUE, VALUE, ID)
Definition: numeric.c:446
size_t rb_obj_memsize_of(VALUE)
Definition: gc.c:3950
uid_t getuid(void)
Definition: win32.c:2795
const struct rb_call_cache * cc
void * rb_parser_calloc(struct parser_params *, size_t, size_t)
Definition: ripper.c:19553
int rb_vm_insn_addr2insn(const void *)
Definition: iseq.c:3115
char * _gets_r(struct _reent *, char *)
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:94
int pthread_spin_init(pthread_spinlock_t *, int)
struct rb_thread_struct rb_thread_t
int linkat(int __dirfd1, const char *__path1, int __dirfd2, const char *__path2, int __flags)
int pthread_suspend(pthread_t)
double _drand48_r(struct _reent *)
int sigtimedwait(const sigset_t *, siginfo_t *, const struct timespec *)
float powf(float, float)
int rb_st_shift(st_table *, st_data_t *, st_data_t *)
#define vsprintf(str, fmt, ap)
int rb_vm_cframe_empty_keyword_p(const rb_control_frame_t *cfp)
float sinf(float)
int pthread_attr_setschedpolicy(pthread_attr_t *, int)
VALUE rb_obj_method(VALUE, VALUE)
Definition: proc.c:1861
VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc)
Definition: string.c:10816
int sigwait(const sigset_t *, int *)
int strtosigno(const char *__name)
void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj)
Definition: gc.c:6954
long atol(const char *__nptr)
VALUE rb_vrescue2(VALUE(*)(VALUE), VALUE, VALUE(*)(VALUE, VALUE), VALUE, va_list)
An equivalent of rescue clause.
Definition: eval.c:977
__fsfilcnt_t fsfilcnt_t
const rb_data_type_t ruby_binding_data_type
Definition: proc.c:319
#define bzero(dst, len)
void(* __cleanup_routine_type)(void *)
#define RMODULE_IS_REFINEMENT
#define rb_str_cat2
long double cbrtl(long double)
VALUE rb_flt_rationalize(VALUE)
Definition: rational.c:2254
void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE)
VALUE rb_uint2inum(uintptr_t)
Definition: bignum.c:3201
double j1(double)
struct rb_call_cache * CALL_CACHE
int clock_getenable_attr(clockid_t clock_id, int *attr)
int posix_memalign(void **, size_t, size_t) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__))
int rb_obj_respond_to(VALUE, ID, int)
Definition: vm_method.c:2197
VALUE rb_cISeq
Definition: iseq.c:32
VALUE rb_big_norm(VALUE)
Definition: bignum.c:3152
VALUE rb_int_abs(VALUE num)
Definition: numeric.c:4862
FILE * open_memstream(char **, size_t *)
int __locale_mb_cur_max(void)
void rb_vm_encoded_insn_data_table_init(void)
Definition: iseq.c:3085
void rb_execarg_parent_end(VALUE execarg_obj)
Definition: process.c:2883
void ruby_mimfree(void *ptr)
Definition: gc.c:10250
VALUE rb_dbl2big(double)
Definition: bignum.c:5249
__clockid_t clockid_t
void rb_warn_deprecated(const char *fmt, const char *suggest,...) __attribute__((format(printf
int int int int int int vfprintf(FILE *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
size_t strftime_l(char *__restrict__ _s, size_t _maxsize, const char *__restrict__ _fmt, const struct tm *__restrict__ _t, locale_t _l)
unsigned long long strtoull_l(const char *__restrict__, char **__restrict__, int, locale_t __loc)
VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *)
Definition: enumerator.c:516
int char char int int int int int int int int int int int int int int int int int _vsscanf_r(struct _reent *, const char *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__scanf__
char * realpath(const char *__restrict__ path, char *__restrict__ resolved_path)
int rb_cloexec_dup2(int oldfd, int newfd)
Definition: io.c:325
__int16_t int16_t
int __isinff(float)
unsigned long __useconds_t
rb_imemo_tmpbuf_t * rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt)
Definition: gc.c:2341
size_t rb_str_memsize(VALUE)
Definition: string.c:1371
int sched_yield(void)
VALUE rb_ivar_get(VALUE, ID)
Definition: variable.c:1070
VALUE rb_gc_latest_gc_info(VALUE)
Definition: gc.c:8832
int __cygwin_lock_trylock(_LOCK_T *)
#define RSTRUCT_EMBED_LEN_MASK
VALUE rb_gv_set(const char *, VALUE)
Definition: variable.c:671
int(* __compar_fn_t)(const void *, const void *)
const char * rb_sourcefile(void)
Definition: vm.c:1331
int fputc(int, FILE *)
void endusershell(void)
_Static_assert(sizeof(struct rb_call_cache)<=64, "cachelined" ": " "sizeof(struct rb_call_cache) <= CACHELINE")
void rb_write_error_str(VALUE mesg)
Definition: io.c:7940
VALUE rb_time_num_new(VALUE, VALUE)
Definition: time.c:2567
rb_iseq_t * rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno, const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t *)
Definition: iseq.c:807
VALUE rb_big_sq_fast(VALUE x)
Definition: bignum.c:1630
int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval)
Definition: hash.c:2310
VALUE rb_mutex_owned_p(VALUE self)
Definition: thread_sync.c:345
const VALUE VALUE obj
VALUE rb_float_floor(VALUE x, int ndigits)
Definition: numeric.c:1898
VALUE rb_fiber_alive_p(VALUE)
Definition: cont.c:2152
long long int llround(double)
long double sqrtl(long double)
void rb_vm_stack_to_heap(rb_execution_context_t *ec)
Definition: vm.c:786
VALUE rb_io_printf(int, const VALUE *, VALUE)
Definition: io.c:7509
VALUE rb_int_div(VALUE x, VALUE y)
Definition: numeric.c:3821
#define ROBJECT_EMBED_LEN_MAX
int rb_feature_provided(const char *, const char **)
Definition: load.c:562
VALUE rb_file_expand_path_fast(VALUE, VALUE)
Definition: file.c:4046
#define rb_check_frozen(obj)
st_index_t rb_hash_proc(st_index_t hash, VALUE proc)
Definition: proc.c:1302
VALUE rb_ary_pop(VALUE)
Definition: array.c:1241
intmax_t wcstoimax_l(const wchar_t *__restrict__, wchar_t **_restrict, int, locale_t)
void mjit_update_references(const rb_iseq_t *iseq)
void Init_eval_method(void)
Definition: vm_method.c:2298
int execl(const char *__path, const char *,...)
float sqrtf(float)
int strcasecmp_l(const char *, const char *, locale_t)
int ruby_exec_node(void *n)
Runs the given compiled source.
Definition: eval.c:341
VALUE rb_external_str_new(const char *, long)
Definition: string.c:1087
char * __ssp_real_getcwd(char *__buf, size_t __len) __asm__("" "getcwd")
float gammaf(float)
VALUE rb_reg_last_match(VALUE)
Definition: re.c:1739
int pthread_attr_init(pthread_attr_t *)
void sincosl(long double, long double *, long double *)
#define RSTRING_NOEMBED
void rb_thread_wait_fd(int)
Definition: thread.c:4041
int pthread_spin_lock(pthread_spinlock_t *)
void * rb_xrealloc_mul_add(const void *, size_t, size_t, size_t)
Definition: gc.c:10196
void rb_glob(const char *, void(*)(const char *, VALUE, void *), VALUE)
Definition: dir.c:2544
double yn(int, double)
VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE)
Definition: proc.c:2309
int system(const char *__string)
int sigfillset(sigset_t *)
struct sigaltstack stack_t
int pthread_barrier_wait(pthread_barrier_t *)
void ruby_incpush(const char *)
Definition: ruby.c:426
long long int llroundl(long double)
double ceil(double)
int int int vfscanf(FILE *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__scanf__
VALUE rb_cstr2inum(const char *, int)
Definition: bignum.c:4538
int * __errno(void)
VALUE rb_big_clone(VALUE)
Definition: bignum.c:3020
VALUE rb_hash_delete_if(VALUE)
Definition: hash.c:2493
VALUE rb_thread_kill(VALUE)
Definition: thread.c:2445
void rb_clear_coverages(void)
Definition: thread.c:4467
int ilogbl(long double)
long double log2l(long double)
VALUE rb_reg_match_post(VALUE)
Definition: re.c:1783
VALUE rb_big2str_poweroftwo(VALUE x, int base)
Definition: bignum.c:4921
double nearbyint(double)
VALUE rb_ary_each(VALUE)
Definition: array.c:2129
@ VM_SPECIAL_OBJECT_CBASE
@ VM_SPECIAL_OBJECT_VMCORE
@ VM_SPECIAL_OBJECT_CONST_BASE
int ilogb(double)
int __ssp_real_gethostname(char *__buf, size_t __len) __asm__("" "gethostname")
VALUE rb_io_close(VALUE)
Definition: io.c:4824
char * _findenv_r(struct _reent *, const char *, int *)
long unsigned int uint_fast64_t
unsigned long clock_t
int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *)
int chroot(const char *__path)
int int int int int int int _sscanf_r(struct _reent *, const char *__restrict__, const char *__restrict__,...) __attribute__((__format__(__scanf__
st_index_t rb_ivar_count(VALUE)
Definition: variable.c:1511
float remquof(float, float, int *)
void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc, VALUE locals, VALUE args, VALUE exception, VALUE body)
Definition: compile.c:9248
size_t rb_size_mul_or_raise(size_t, size_t, VALUE)
Definition: gc.c:192
_sig_func_ptr signal(int, _sig_func_ptr)
int fileno(FILE *)
char * strchrnul(const char *, int)
VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE *, int)
Definition: vm_eval.c:962
VALUE rb_big_xor(VALUE, VALUE)
Definition: bignum.c:6573
VALUE rb_io_fdopen(int, int, const char *)
Definition: io.c:8008
VALUE rb_iseq_location(const rb_iseq_t *iseq)
Definition: proc.c:1242
VALUE rb_gc_enable(void)
Definition: gc.c:9225
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:56
char * asctime(const struct tm *_tblock)
long double hypotl(long double, long double)
char * _strndup_r(struct _reent *, const char *, size_t)
VALUE rb_define_finalizer(VALUE, VALUE)
Definition: gc.c:3302
void rb_free_generic_ivar(VALUE)
Definition: variable.c:993
int isnanf(float)
char * __strncpy_chk(char *, const char *, size_t, size_t)
VALUE rb_struct_size(VALUE s)
Definition: struct.c:1291
int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)
Definition: thread.c:4066
pid_t rb_fork_async_signal_safe(int *status, int(*chfunc)(void *, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen)
pid_t setsid(void)
void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func)
Definition: gc.c:11726
int _fsetpos_r(struct _reent *, FILE *, const fpos_t *)
__uint32_t __id_t
VALUE rb_rational_plus(VALUE self, VALUE other)
Definition: rational.c:737
int _asiprintf_r(struct _reent *, char **, const char *,...) __attribute__((__format__(__printf__
int getchar(void)
double frexp(double, int *)
intmax_t _wcstoimax_r(struct _reent *, const wchar_t *__restrict__, wchar_t **__restrict__, int)
#define CLD_EXITED
char * _strdup_r(struct _reent *, const char *)
gid_t getegid(void)
Definition: win32.c:2816
VALUE rb_suppress_tracing(VALUE(*func)(VALUE), VALUE arg)
Definition: vm_trace.c:415
int utimensat(int, const char *, const struct timespec[2], int)
void * rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len, size_t count) __attribute__((alloc_size(2
const char * rb_raw_obj_info(char *buff, const int buff_size, VALUE obj)
Definition: gc.c:11477
VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
VALUE rb_file_directory_p(VALUE, VALUE)
Definition: file.c:1577
VALUE rb_big_lshift(VALUE, VALUE)
Definition: bignum.c:6621
int pthread_getaffinity_np(pthread_t, size_t, cpu_set_t *)
void rb_gc_register_mark_object(VALUE)
Definition: gc.c:7079
const rb_iseq_t const char * error
VALUE rb_gcd_normal(VALUE self, VALUE other)
Definition: rational.c:344
VALUE rb_complex_plus(VALUE x, VALUE y)
Definition: complex.c:778
double lgamma(double)
@ RB_INT_PARSE_UNDERSCORE
@ RB_INT_PARSE_DEFAULT
void rb_str_update(VALUE, long, long, VALUE)
Definition: string.c:4643
int int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
Definition: sprintf.c:1004
int pthread_mutex_unlock(pthread_mutex_t *)
void rb_gc_unregister_address(VALUE *)
Definition: gc.c:7105
int usleep(useconds_t __useconds)
int _fgetc_unlocked_r(struct _reent *, FILE *)
VALUE rb_ary_resurrect(VALUE ary)
Definition: array.c:2251
void ruby_set_inplace_mode(const char *)
Definition: io.c:12872
char * strerror(int)
Definition: strerror.c:11
long sigjmp_buf[32+1+((sizeof(long)+sizeof(sigset_t) - 1)/sizeof(long))]
void rb_objspace_call_finalizer(struct rb_objspace *)
Definition: gc.c:3456
struct RNode NODE
#define ILL_ILLOPC
size_t strspn(const char *, const char *)
VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec)
Definition: vm_backtrace.c:557
double erfc(double)
Definition: erf.c:81
VALUE rb_undefine_finalizer(VALUE)
Definition: gc.c:3206
unsigned long strtoul_l(const char *__restrict__, char **__restrict__, int, locale_t __loc)
int char char int int int _vdprintf_r(struct _reent *, int, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
int ffsl(long) __attribute__((__const__))
int issetugid(void)
VALUE rb_str_plus(VALUE, VALUE)
Definition: string.c:1894
void __chk_fail(void) __attribute__((__noreturn__))
VALUE rb_id2str(ID)
Definition: symbol.c:795
float lgammaf_r(float, int *)
VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv, rb_enumerator_size_func *size_fn, VALUE beg, VALUE end, VALUE step, int excl)
Definition: enumerator.c:3308
VALUE rb_str_export_locale(VALUE)
Definition: string.c:1129
#define rb_str_buf_new2
VALUE rb_obj_is_method(VALUE)
Definition: proc.c:1459
long double atan2l(long double, long double)
VALUE(* mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *)
#define RSTRUCT_EMBED_LEN_MAX
int _fprintf_r(struct _reent *, FILE *__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
st_table * rb_st_init_strtable(void)
union sigval sigval_t
VALUE rb_float_pow(VALUE x, VALUE y)
Definition: numeric.c:1298
void rb_objspace_each_objects_without_setup(int(*callback)(void *, void *, size_t, void *), void *data)
VALUE VALUE rb_str_vcatf(VALUE, const char *, va_list)
Definition: sprintf.c:1210
int int int printf(const char *__restrict__,...) __attribute__((__format__(__printf__
VALUE rb_big_rshift(VALUE, VALUE)
Definition: bignum.c:6651
#define bcopy(src, dst, len)
long double ceill(long double)
void rb_clear_constant_cache(void)
Definition: vm_method.c:87
long rb_reg_search0(VALUE, VALUE, long, int, int)
Definition: re.c:1538
long unsigned int __uintptr_t
void ruby_vm_at_exit(void(*func)(ruby_vm_t *))
Definition: vm.c:623
int __isnanf(float)
char ruby_check_sizeof_long_long[8==sizeof(long long) ? 1 :-1]
void rb_p(VALUE)
Definition: io.c:7802
void rb_gc_mark_machine_stack(const rb_execution_context_t *ec)
Definition: gc.c:4997
int setgroups(int ngroups, const gid_t *grouplist)
__uint32_t __dev_t
int int int int int int int int char char int int int int int iscanf(const char *,...) __attribute__((__format__(__scanf__
#define FPE_FLTINV
VALUE rb_ident_hash_new(void)
Definition: hash.c:4278
int clock_getres(clockid_t clock_id, struct timespec *res)
Definition: win32.c:4682
VALUE rb_obj_is_proc(VALUE)
Definition: proc.c:152
VALUE rb_thread_run(VALUE)
Definition: thread.c:2586
st_index_t rb_memhash(const void *ptr, long len)
Definition: random.c:1444
size_t rb_obj_gc_flags(VALUE, ID[], size_t)
VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n)
Definition: vm_backtrace.c:714
int rb_block_arity(void)
Definition: proc.c:1144
int _putchar_r(struct _reent *, int)
int pthread_setschedparam(pthread_t, int, const struct sched_param *)
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src)
Definition: vm_method.c:451
int strcoll(const char *, const char *)
VALUE rb_hash_set_pair(VALUE hash, VALUE pair)
Definition: hash.c:3332
int pause(void)
#define rb_str_new(str, len)
float log2f(float)
void rb_add_refined_method_entry(VALUE refined_class, ID mid)
Definition: vm_method.c:491
int unlockpt(int)
int _ungetc_r(struct _reent *, int, FILE *)
int sigignore(int)
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc)
Definition: iseq.c:2939
VALUE rb_block_call_kw(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE, int)
Definition: vm_eval.c:1484
st_table * rb_st_init_table_with_size(const struct st_hash_type *, st_index_t)
VALUE rb_ary_last(int, const VALUE *, VALUE)
Definition: array.c:1677
const rb_iseq_t const int miss_argc
int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag)
Definition: variable.c:2078
VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec)
Definition: eval.c:1852
VALUE rb_find_file_safe(VALUE, int)
Definition: file.c:6350
long long int llrint(double)
#define rb_str_buf_cat
void rb_fd_init(rb_fdset_t *)
VALUE rb_str_format(int, const VALUE *, VALUE)
Definition: sprintf.c:204
int sigismember(const sigset_t *, int)
__intptr_t intptr_t
int pthread_attr_setstacksize(pthread_attr_t *, size_t)
void rb_gvar_marker_t(VALUE *var)
VALUE rb_check_funcall(VALUE, ID, int, const VALUE *)
Definition: vm_eval.c:505
VALUE rb_io_ungetc(VALUE, VALUE)
Definition: io.c:4319
int rb_enc_set_dummy(int index)
Definition: encoding.c:393
VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE)
Definition: file.c:3667
void rb_ary_modify(VALUE)
Definition: array.c:548
char ruby_check_sizeof_voidp[8==sizeof(void *) ? 1 :-1]
void rb_reset_random_seed(void)
Definition: random.c:1502
VALUE rb_int_pow(VALUE x, VALUE y)
Definition: numeric.c:4111
int sched_getaffinity(pid_t, size_t, cpu_set_t *)
int pthread_setcancelstate(int, int *)
#define ROBJECT_EMBED
const rb_callable_method_entry_t * me
long _lrand48_r(struct _reent *)
void rb_vm_bugreport(const void *)
Definition: vm_dump.c:918
struct rb_at_exit_list rb_at_exit_list
void _pthread_cleanup_pop(int execute)
int pthread_mutexattr_gettype(const pthread_mutexattr_t *, int *)
VALUE rb_hash_rehash(VALUE hash)
Definition: hash.c:1958
pthread_cond_t rb_nativethread_cond_t
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Definition: complex.c:1533
int char char int int int int int int int int int int int int int _vsiscanf_r(struct _reent *, const char *, const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
int rb_is_instance_name(VALUE name)
Definition: symbol.c:1062
void rb_deprecate_constant(VALUE mod, const char *name)
Definition: variable.c:2958
int pthread_rwlockattr_init(pthread_rwlockattr_t *)
char * __stpcpy_chk(char *, const char *, size_t)
void rb_gc_mark_global_tbl(void)
Definition: variable.c:434
int _fgetc_r(struct _reent *, FILE *)
void rb_mark_generic_ivar(VALUE)
Definition: variable.c:973
int putenv(char *__string)
int getc(FILE *)
VALUE rb_float_numerator(VALUE x)
Definition: rational.c:2093
pthread_t pthread_self(void)
int sigemptyset(sigset_t *)
unsigned short * seed48(unsigned short[3])
const rb_iseq_t * rb_proc_get_iseq(VALUE proc, int *is_proc)
Definition: proc.c:1194
VALUE rb_method_call(int, const VALUE *, VALUE)
Definition: proc.c:2273
VALUE rb_detach_process(pid_t pid)
VALUE rb_fiber_current(void)
Definition: cont.c:1956
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
Definition: bignum.c:3247
_sig_func_ptr _signal_r(struct _reent *, int, _sig_func_ptr)
void rb_match_busy(VALUE)
Definition: re.c:1295
VALUE rb_complex_arg(VALUE z)
Definition: complex.c:1208
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
Definition: bignum.c:3382
long double nexttowardl(long double, long double)
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
void encrypt(char *__block, int __edflag)
VALUE rb_check_symbol(volatile VALUE *namep)
Definition: symbol.c:952
struct __pthread_spinlock_t * pthread_spinlock_t
int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int)
int char * _asniprintf_r(struct _reent *, char *, size_t *, const char *,...) __attribute__((__format__(__printf__
VALUE rb_random_bytes(VALUE rnd, long n)
Definition: random.c:1025
double acos(double)
int int int int int int int int char char int int int int int int int int int char char int int vfiprintf(FILE *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_id2sym(ID)
Definition: symbol.c:776
VALUE rb_str_cat(VALUE, const char *, long)
Definition: string.c:2812
size_t strcspn(const char *, const char *)
void * ruby_xrealloc2(void *, size_t, size_t) __attribute__((__returns_nonnull__)) __attribute__((alloc_size(2
VALUE rb_filesystem_str_new(const char *, long)
Definition: string.c:1111
void ruby_register_rollback_func_for_ensure(VALUE(*ensure_func)(VALUE), VALUE(*rollback_func)(VALUE))
rb_ast_t * rb_ast_new(void)
Definition: node.c:1235
FILE * _fdopen_r(struct _reent *, int, const char *)
int rb_absint_singlebit_p(VALUE val)
Definition: bignum.c:3446
VALUE rb_io_gets(VALUE)
Definition: io.c:3577
int unsetenv(const char *)
#define SI_QUEUE
VALUE rb_locale_str_new(const char *, long)
Definition: string.c:1099
char * strrchr(const char *, int)
Definition: strchr.c:20
float infinityf(void)
float roundf(float)
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Definition: bignum.c:3633
const char * rb_id2name(ID)
Definition: symbol.c:801
pid_t tcgetpgrp(int __fildes)
int rename(const char *, const char *)
int rb_thread_to_be_killed(VALUE thread)
Definition: thread.c:2471
long unsigned int __uint_least64_t
_Bool mjit_enabled
Definition: mjit_worker.c:177
int pthread_attr_getstack(const pthread_attr_t *, void **, size_t *)
VALUE rb_math_cos(VALUE)
float j0f(float)
void rb_backtrace_print_as_bugreport(void)
Definition: vm_backtrace.c:813
void __cygwin_lock_init_recursive(_LOCK_T *)
struct __pthread_rwlockattr_t * pthread_rwlockattr_t
int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *)
void sincosf(float, float *, float *)
void setbuf(FILE *__restrict__, char *__restrict__)
int seteuid(uid_t __uid)
unsigned char __uint_least8_t
VALUE rb_fix2str(VALUE, int)
Definition: numeric.c:3513
VALUE rb_proc_dup(VALUE self)
Definition: vm.c:920
@ block_handler_type_ifunc
@ block_handler_type_proc
@ block_handler_type_symbol
@ block_handler_type_iseq
__int_least32_t int_least32_t
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, int *)
_Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname)
void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column)
Definition: iseq.c:1076
VALUE rb_thread_main(void)
Definition: thread.c:2696
double infinity(void)
char * strpbrk(const char *, const char *)
VALUE rb_hash_has_key(VALUE hash, VALUE key)
Definition: hash.c:3507
int timer_gettime(timer_t timerid, struct itimerspec *value)
VALUE rb_int2str(VALUE num, int base)
Definition: numeric.c:3567
#define strncpy(dst, src, len)
int sched_setscheduler(pid_t __pid, int __policy, const struct sched_param *__param)
void rb_maygvl_fd_fix_cloexec(int fd)
Definition: io.c:245
void rb_big_2comp(VALUE)
Definition: bignum.c:3049
int pthread_spin_trylock(pthread_spinlock_t *)
VALUE rb_iseq_label(const rb_iseq_t *iseq)
Definition: iseq.c:1045
int fileno_unlocked(FILE *)
VALUE rb_f_untrace_var(int, const VALUE *)
Definition: variable.c:574
VALUE rb_cEncodingConverter
Definition: transcode.c:25
const VALUE int int int int int int VALUE char int varc
int on_exit(void(*__func)(int, void *), void *__arg)
int __sched_getaffinity_sys(pid_t, size_t, cpu_set_t *)
char * ttyname(int __fildes)
int const VALUE VALUE int call_status
int char char int int int int int int int int int _viscanf_r(struct _reent *, const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
VALUE rb_binding_alloc(VALUE klass)
Definition: proc.c:331
const VALUE int int int int int f_hash
void rb_vm_at_exit_func(struct rb_vm_struct *)
__uintptr_t u_register_t
int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg)
long double strtold(const char *__restrict__, char **__restrict__)
int fprintf(FILE *__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v)
Definition: debug.c:96
float scalblnf(float, long int)
long double expm1l(long double)
void rb_ary_set_len(VALUE, long)
Definition: array.c:1932
long double frexpl(long double, int *)
void setbuffer(FILE *, char *, int)
const char size_t n
#define rb_usascii_str_new(str, len)
int pthread_rwlock_clockwrlock(pthread_rwlock_t *, clockid_t, const struct timespec *)
double exp10(double)
const char *const char ruby_exec_prefix[]
Definition: loadpath.c:59
VALUE rb_big_gt(VALUE x, VALUE y)
Definition: bignum.c:5489
unsigned long rb_big2ulong(VALUE)
Definition: bignum.c:5125
double trunc(double)
VALUE rb_float_equal(VALUE x, VALUE y)
Definition: numeric.c:1383
int char char int int int int int int _vfprintf_r(struct _reent *, FILE *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
#define rb_exc_new_cstr(klass, ptr)
lldiv_t lldiv(long long __numer, long long __denom)
#define basename
VALUE rb_sym_all_symbols(void)
Definition: symbol.c:840
int __swbuf_r(struct _reent *, int, FILE *)
#define rb_secure(level)
__int_least64_t int_least64_t
int mkstemp(char *)
char * rb_string_value_ptr(volatile VALUE *)
Definition: string.c:2186
struct __pthread_rwlock_t * pthread_rwlock_t
VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE)
Definition: proc.c:1000
const char * rb_type_str(enum ruby_value_type type)
Definition: vm_eval.c:572
void ruby_set_debug_option(const char *str)
Definition: debug.c:226
int pipe(int __fildes[2])
__intptr_t register_t
double sinh(double)
Definition: math.c:256
st_index_t rb_hash_start(st_index_t)
Definition: random.c:1438
void psignal(int, const char *)
VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE *, const rb_callable_method_entry_t *, int kw_splat)
Definition: vm_eval.c:46
void rb_thread_sleep_forever(void)
Definition: thread.c:1313
void rb_enc_set_base(const char *name, const char *orig)
Definition: encoding.c:382
int ruby_brace_glob(const char *, int, ruby_glob_func *, VALUE)
Definition: dir.c:2659
void rb_define_variable(const char *, VALUE *)
Definition: variable.c:499
VALUE rb_io_write(VALUE, VALUE)
Definition: io.c:1804
float ynf(int, float)
int pthread_attr_setguardsize(pthread_attr_t *, size_t)
VALUE rb_io_flush_raw(VALUE, int)
Definition: io.c:1864
int getw(FILE *)
rb_execution_context_t * ruby_current_execution_context_ptr
Definition: vm.c:373
VALUE rb_str_export(VALUE)
Definition: string.c:1123
@ ruby_error_stackfatal
@ ruby_special_error_count
@ ruby_error_stream_closed
VALUE rb_obj_instance_exec(int, const VALUE *, VALUE)
Definition: vm_eval.c:2029
VALUE rb_big_ge(VALUE x, VALUE y)
Definition: bignum.c:5495
gid_t getgid(void)
Definition: win32.c:2809
int pthread_attr_getinheritsched(const pthread_attr_t *, int *)
int rb_path_check(const char *)
Definition: file.c:6189
void Init_vm_backtrace(void)
size_t fread_unlocked(void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
int pthread_create(pthread_t *, const pthread_attr_t *, void *(*)(void *), void *)
int fchown(int __fildes, uid_t __owner, gid_t __group)
struct tm * gmtime(const time_t *_timer)
int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned)
VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp)
Definition: vm.c:953
VALUE rb_hash_key_str(VALUE)
Definition: hash.c:2802
VALUE rb_rational_raw(VALUE, VALUE)
Definition: rational.c:1951
int char char int int int int int int int int int int int int int int _vsniprintf_r(struct _reent *, char *, size_t, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
pid_t rb_spawn(int, const VALUE *)
Definition: process.c:4476
int FILE * fmemopen(void *__restrict__, size_t, const char *__restrict__)
int __fpclassifyd(double)
void rb_define_global_const(const char *, VALUE)
Definition: variable.c:2903
long _mrand48_r(struct _reent *)
size_t strftime(char *__restrict__ _s, size_t _maxsize, const char *__restrict__ _fmt, const struct tm *__restrict__ _t)
int setreuid(uid_t __ruid, uid_t __euid)
ssize_t readlinkat(int __dirfd1, const char *__restrict__ __path, char *__restrict__ __buf, size_t __buflen)
int _printf_r(struct _reent *, const char *__restrict__,...) __attribute__((__format__(__printf__
void * rb_alloc_tmp_buffer(volatile VALUE *store, long len) __attribute__((alloc_size(2)))
Definition: gc.c:10278
int rb_require_internal(VALUE fname)
Definition: load.c:1110
VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef)
Definition: variable.c:1035
float acosf(float)
int int int int int int int int char char int int int int int int int int int vasiprintf(char **, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
long _ftell_r(struct _reent *, FILE *)
int ruby_snprintf(char *str, size_t n, char const *fmt,...) __attribute__((format(printf
VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt)
Definition: compile.c:11376
const VALUE int int int int f_var
void rb_str_set_len(VALUE, long)
Definition: string.c:2692
int rb_respond_to(VALUE, ID)
Definition: vm_method.c:2207
int pthread_attr_getschedparam(const pthread_attr_t *, struct sched_param *)
VALUE rb_mod_module_eval(int, const VALUE *, VALUE)
Definition: vm_eval.c:2069
unsigned long VALUE
double rb_genrand_real(void)
Definition: random.c:126
int rb_env_path_tainted(void)
Definition: hash.c:4904
VALUE rb_ary_push(VALUE, VALUE)
Definition: array.c:1195
void _longjmp(jmp_buf, int) __attribute__((__noreturn__))
void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size)
Definition: vm.c:2678
int int int int int int asprintf(char **__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
int rb_remove_event_hook(rb_event_hook_func_t func)
Definition: vm_trace.c:262
VALUE rb_big_aref(VALUE x, VALUE y)
Definition: bignum.c:6681
struct native_thread_data_struct native_thread_data_t
VALUE rb_ary_join(VALUE, VALUE)
Definition: array.c:2347
int rb_obj_method_arity(VALUE, ID)
Definition: proc.c:2652
long double remainderl(long double, long double)
int __int_least32_t
VALUE rb_math_atan2(VALUE, VALUE)
void rb_ary_detransient(VALUE a)
Definition: array.c:408
__uintmax_t uintmax_t
VALUE rb_io_ascii8bit_binmode(VALUE)
Definition: io.c:5384
VALUE rb_str_replace(VALUE, VALUE)
Definition: string.c:5363
VALUE rb_thread_wakeup(VALUE)
Definition: thread.c:2539
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:163
VALUE rb_int_uminus(VALUE num)
Definition: numeric.c:3484
void * realloc(void *, size_t) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(2)))
VALUE rb_ary_shared_with_p(VALUE, VALUE)
Definition: array.c:661
VALUE rb_math_sinh(VALUE)
int sigqueue(pid_t, int, const union sigval)
void _lcong48_r(struct _reent *, unsigned short[7])
VALUE rb_cRubyVM
Definition: vm.c:365
int getentropy(void *, size_t)
double erand48(unsigned short[3])
void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts)
Definition: vm_method.c:232
VALUE rb_current_receiver(void)
Definition: vm_eval.c:314
struct rb_callable_method_entry_struct rb_callable_method_entry_t
st_table * rb_st_init_strtable_with_size(st_index_t)
VALUE rb_autoload_at_p(VALUE, ID, int)
Definition: variable.c:2291
struct rb_thread_list_struct rb_thread_list_t
void _reclaim_reent(struct _reent *)
int rb_st_get_key(st_table *, st_data_t, st_data_t *)
int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t)
@ POSTPONED_JOB_INTERRUPT_MASK
@ PENDING_INTERRUPT_MASK
VALUE rb_str_substr(VALUE, long, long)
Definition: string.c:2584
VALUE rb_float_mul(VALUE x, VALUE y)
Definition: numeric.c:1072
void rb_hook_list_free(rb_hook_list_t *hooks)
Definition: vm_trace.c:66
size_t rb_gc_stat(VALUE)
Definition: gc.c:9190
VALUE rb_reg_match_p(VALUE re, VALUE str, long pos)
Definition: re.c:3340
__inline__ const void *__restrict__ src
VALUE rb_cv_get(VALUE, const char *)
Definition: variable.c:3149
VALUE rb_thread_shield_new(void)
Definition: thread.c:4789
int rb_local_defined(ID, const struct rb_iseq_struct *)
VALUE rb_sym2str(VALUE)
Definition: symbol.c:784
void rb_str_free(VALUE)
Definition: string.c:1349
void __assert(const char *, int, const char *) __attribute__((__noreturn__))
void * sbrk(ptrdiff_t __incr)
pid_t rb_spawn_err(int, const VALUE *, char *, size_t)
Definition: process.c:4470
int getpagesize(void)
__uint16_t __sa_family_t
void rb_str_modify(VALUE)
Definition: string.c:2114
rb_control_frame_t struct rb_calling_info const struct rb_call_info * ci
__pid_t pid_t
void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v)
Definition: thread.c:1756
size_t strlcat(char *, const char *, size_t)
Definition: strlcat.c:31
VALUE rb_int_equal(VALUE x, VALUE y)
Definition: numeric.c:4168
int pselect(int __n, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, const struct timespec *__timeout, const sigset_t *__set)
int fclose(FILE *)
void rb_update_max_fd(int fd)
Definition: io.c:218
rb_control_frame_t * reg_cfp
int rb_vm_get_sourceline(const rb_control_frame_t *)
Definition: vm_backtrace.c:68
int ilogbf(float)
VALUE rb_big_mul(VALUE, VALUE)
Definition: bignum.c:5933
int ruby_vm_destruct(ruby_vm_t *vm)
Definition: vm.c:2329
size_t strlcpy(char *, const char *, size_t)
Definition: strlcpy.c:29
VALUE rb_ary_concat(VALUE, VALUE)
Definition: array.c:4069
VALUE rb_hash_lookup2(VALUE, VALUE, VALUE)
Definition: hash.c:2050
VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc)
Definition: proc.c:735
void ruby_init_setproctitle(int argc, char *argv[])
void * rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__))
Definition: gc.c:10210
double pow10(double)
char * __ssp_real_fgets_unlocked(char *__restrict__ __buf, int __len, FILE *__fp) __asm__("" "fgets_unlocked")
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:2982
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Definition: vm.c:2206
const rb_iseq_t const char const VALUE keys
VALUE rb_time_new(time_t, long)
Definition: time.c:2506
int _mblen_r(struct _reent *, const char *, size_t, _mbstate_t *)
VALUE rb_str_buf_new(long)
Definition: string.c:1315
int int int int int int int int char * asniprintf(char *, size_t *, const char *,...) __attribute__((__format__(__printf__
double modf(double, double *)
intmax_t imaxabs(intmax_t)
#define ferror_unlocked(p)
VALUE rb_iseq_base_label(const rb_iseq_t *iseq)
Definition: iseq.c:1051
#define rb_sym_intern_ascii_cstr(ptr)
int rb_gc_for_fd(int err)
Definition: io.c:953
union iseq_inline_storage_entry * ISE
const signed char ruby_digit36_to_number_table[]
Definition: escape.c:6
VALUE rb_check_string_type(VALUE)
Definition: string.c:2314
VALUE rb_big_mul_gmp(VALUE x, VALUE y)
VALUE rb_float_plus(VALUE x, VALUE y)
Definition: numeric.c:1024
void rb_free_method_entry(const rb_method_entry_t *me)
Definition: vm_method.c:174
long int lround(double)
void rb_threadptr_pending_interrupt_clear(rb_thread_t *th)
Definition: thread.c:1750
VALUE rb_mutex_trylock(VALUE mutex)
Definition: thread_sync.c:203
rb_iseq_t * rb_iseq_new(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type)
Definition: iseq.c:761
VALUE rb_mutex_locked_p(VALUE mutex)
Definition: thread_sync.c:177
int char char int int int int int int int int _viprintf_r(struct _reent *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_big_eq(VALUE, VALUE)
Definition: bignum.c:5524
void * calloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__alloc_size__(1
int strcoll_l(const char *, const char *, locale_t)
VALUE rb_int_positive_pow(long x, unsigned long y)
Definition: numeric.c:4038
void * __mempcpy_chk(void *, const void *, size_t, size_t)
struct rb_method_entry_struct rb_method_entry_t
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Definition: thread_sync.c:522
struct timespec rb_time_timespec(VALUE time)
Definition: time.c:2706
void rb_ast_free(rb_ast_t *)
Definition: node.c:1352
struct __mcontext mcontext_t
VALUE rb_str_resurrect(VALUE str)
Definition: string.c:1522
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
Definition: cont.c:2123
VALUE rb_str_inspect(VALUE)
Definition: string.c:5930
const struct rb_builtin_function * RB_BUILTIN
_Bool rb_reg_start_with_p(VALUE re, VALUE str)
Definition: re.c:1626
rb_gvar_setter_t rb_gvar_val_setter
int int int int int vsscanf(const char *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__scanf__
VALUE rb_big_bit_length(VALUE big)
Definition: bignum.c:6790
int pthread_rwlock_destroy(pthread_rwlock_t *)
pid_t rb_fork_ruby(int *status)
double atof(const char *__nptr)
pid_t getpgid(pid_t)
int rb_objspace_marked_object_p(VALUE obj)
Definition: gc.c:5238
int futimens(int, const struct timespec[2])
VALUE rb_obj_is_fiber(VALUE)
Definition: cont.c:1040
@ METHOD_VISI_PROTECTED
void * aligned_alloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__alloc_align__(1))) __attribute__((__alloc_size__(2))) __attribute__((__warn_unused_result__))
return current_class
void * rb_jmpbuf_t[5]
struct _reent * __getreent(void)
VALUE rb_thread_shield_destroy(VALUE self)
Definition: thread.c:4845
VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary)
Definition: enum.c:1568
void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
Definition: vm_dump.c:192
int rb_st_lookup(st_table *, st_data_t, st_data_t *)
__uint_least64_t uint_least64_t
int strncasecmp_l(const char *, const char *, size_t, locale_t)
const VALUE int int int n_trail
int timingsafe_memcmp(const void *, const void *, size_t)
unsigned long long rb_big2ull(VALUE)
int rb_ec_stack_check(rb_execution_context_t *ec)
Definition: gc.c:4681
int fchmod(int __fd, mode_t __mode)
#define rb_float_new(d)
int pthread_setconcurrency(int)
void _pthread_cleanup_push(__pthread_cleanup_handler *handler)
int rb_const_defined_at(VALUE, ID)
Definition: variable.c:2692
VALUE rb_filesystem_str_new_cstr(const char *)
Definition: string.c:1117
rb_method_entry_t * rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex)
Definition: vm_method.c:714
VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE *, VALUE)
Definition: vm_eval.c:1050
ssize_t getline(char **, size_t *, FILE *)
struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t
VALUE rb_obj_id(VALUE)
Definition: gc.c:3786
ssize_t __getline(char **, size_t *, FILE *)
void rb_last_status_clear(void)
Definition: process.c:582
VALUE rb_sym_to_s(VALUE)
Definition: string.c:10793
int pthread_condattr_destroy(pthread_condattr_t *)
float fminf(float, float)
int pthread_setcanceltype(int, int *)
#define isinf(__x)
int isinff(float)
const VALUE int int int int int int f_block
VALUE rb_cstr_to_inum(const char *, int, int)
Definition: bignum.c:4012
#define rb_str_buf_new_cstr(str)
void rb_st_cleanup_safe(st_table *, st_data_t)
const rb_iseq_t * rb_iseq_ibf_load_bytes(const char *cstr, size_t)
Definition: compile.c:11614
const VALUE *pid_t rb_waitpid(pid_t pid, int *status, int flags)
st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size)
long double rintl(long double)
VALUE rb_hash_dup(VALUE)
Definition: hash.c:1564
int rb_vm_check_optimizable_mid(VALUE mid)
Definition: vm.c:1581
size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr)
long rb_str_strlen(VALUE)
Definition: string.c:1829
void rb_define_alloc_func(VALUE, rb_alloc_func_t)
struct __pthread_barrierattr_t * pthread_barrierattr_t
void rb_cvar_set(VALUE, ID, VALUE)
Definition: variable.c:3085
VALUE rb_flo_div_flo(VALUE x, VALUE y)
Definition: numeric.c:1110
struct rb_ast_body_struct rb_ast_body_t
VALUE rb_parser_end_seen_p(VALUE)
Definition: ripper.c:19447
int char char int int int int int int int int int int int int int int int _vsnprintf_r(struct _reent *, char *__restrict__, size_t, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE *)
Definition: vm_eval.c:1032
signed long rb_snum_t
void rb_gc_writebarrier_unprotect(VALUE obj)
Definition: gc.c:6854
double tgamma(double)
Definition: tgamma.c:66
char * get_current_dir_name(void)
#define rb_usascii_str_new_cstr(str)
int pthread_sigqueue(pthread_t *, int, const union sigval)
VALUE rb_catch(const char *, rb_block_call_func_t, VALUE)
Definition: vm_eval.c:2290
uint32_t i
void rb_execarg_setenv(VALUE execarg_obj, VALUE env)
Definition: process.c:2674
int ruby_glob(const char *, int, ruby_glob_func *, VALUE)
Definition: dir.c:2519
#define BUS_ADRALN
struct _reent *const _global_impure_ptr
int pthread_attr_getscope(const pthread_attr_t *, int *)
VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info)
Definition: proc.c:1360
#define memcpy(dst, src, len)
rb_gvar_marker_t rb_gvar_undef_marker
__int32_t int32_t
VALUE rb_thread_stop(void)
Definition: thread.c:2595
int timingsafe_bcmp(const void *, const void *, size_t)
VALUE rb_insns_name_array(void)
Definition: compile.c:8766
double y0(double)
int _putchar_unlocked_r(struct _reent *, int)
int rand_r(unsigned *__seed)
char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) *2+3]
#define char
int fchdir(int __fildes)
int setpgid(pid_t __pid, pid_t __pgid)
VALUE rb_complex_new(VALUE, VALUE)
Definition: complex.c:1527
void tzset(void)
const rb_callable_method_entry_t * rb_callable_method_entry(VALUE klass, ID id)
Definition: vm_method.c:895
int int int int int int int int char char int int int fiscanf(FILE *, const char *,...) __attribute__((__format__(__scanf__
VALUE rb_eql_opt(VALUE obj1, VALUE obj2)
rb_control_frame_t struct rb_calling_info const rb_callable_method_entry_t int int param_size
int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)
int _fseeko_r(struct _reent *, FILE *, _off_t, int)
rb_iseq_t * rb_iseq_new_main(const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent)
Definition: iseq.c:785
VALUE rb_fstring(VALUE)
Definition: string.c:312
unsigned long ulong
struct rb_vm_struct rb_vm_t
void rb_gc_free_dsymbol(VALUE)
Definition: symbol.c:678
VALUE rb_rational_num(VALUE rat)
Definition: rational.c:1972
int fseek(FILE *, long, int)
__inline__ size_t size_t __n
#define isnan(__x)
#define FPE_FLTSUB
long double fmal(long double, long double, long double)
void * ruby_xmalloc2(size_t, size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((alloc_size(1
float tgammaf(float)
long a64l(const char *__input)
int int remove(const char *)
int strncmp(const char *, const char *, size_t)
__ino_t ino_t
VALUE rb_file_open_str(VALUE, const char *)
Definition: io.c:6256
__inline__ const void *__restrict__ size_t len
int fchmodat(int, const char *, mode_t, int)
signed char __int_least8_t
double remquo(double, double, int *)
VALUE rb_uninterruptible(VALUE(*b_proc)(VALUE), VALUE data)
Definition: thread.c:5553
void * pthread_getspecific(pthread_key_t)
_off64_t __loff_t
int int _putc_r(struct _reent *, int, FILE *)
const VALUE int int int int int int VALUE char * fmt
VALUE rb_int_cmp(VALUE x, VALUE y)
Definition: numeric.c:4217
VALUE rb_utf8_str_new_static(const char *, long)
Definition: string.c:884
double log1p(double)
__uint64_t uint64_t
int pthread_key_create(pthread_key_t *, void(*)(void *))
int sched_get_thread_affinity(void *, size_t, cpu_set_t *)
void rb_hash_bulk_insert(long, const VALUE *, VALUE)
Definition: hash.c:4590
struct rb_method_iseq_struct rb_method_iseq_t
VALUE rb_rational_floor(VALUE self, int ndigits)
Definition: rational.c:1415
int pthread_attr_getdetachstate(const pthread_attr_t *, int *)
int sigrelse(int)
_LOCK_T _flock_t
VALUE rb_gvar_defined(struct rb_global_entry *)
Definition: variable.c:695
void rb_objspace_reachable_objects_from(VALUE obj, void(func)(VALUE, void *), void *data)
Definition: gc.c:9481
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Definition: io.c:292
size_t _fread_unlocked_r(struct _reent *, void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
struct rb_code_position_struct rb_code_position_t
double ruby_float_mod(double x, double y)
Definition: numeric.c:1207
double cos(double)
int ruby_fill_random_bytes(void *, size_t, int)
Definition: random.c:438
int pthread_rwlock_rdlock(pthread_rwlock_t *)
struct __pthread_attr_t * pthread_attr_t
long double strtold_l(const char *__restrict__, char **__restrict__, locale_t)
void ruby_debug_gc_check_func(void)
VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv)
Definition: vm_eval.c:772
VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int)
Definition: enumerator.c:537
void rb_define_protected_method(VALUE, const char *, VALUE(*)(), int)
int pthread_attr_getschedpolicy(const pthread_attr_t *, int *)
int lstat(const char *__restrict__ __path, struct stat *__restrict__ __buf)
VALUE rb_io_flush(VALUE)
Definition: io.c:1903
intmax_t _strtoimax_r(struct _reent *, const char *__restrict__, char **__restrict__, int)
VALUE rb_class_path(VALUE)
Definition: variable.c:153
char * getpass(const char *__prompt)
int sigwaitinfo(const sigset_t *, siginfo_t *)
int _fcloseall_r(struct _reent *)
int ftruncate(int __fd, off_t __length)
float jnf(int, float)
VALUE rb_str_tmp_frozen_acquire(VALUE str)
Definition: string.c:1210
VALUE rb_iterate(VALUE(*)(VALUE), VALUE, rb_block_call_func_t, VALUE)
Definition: vm_eval.c:1444
VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash)
Definition: process.c:2307
const char * rb_obj_classname(VALUE)
Definition: variable.c:289
int pthread_setschedprio(pthread_t, int)
VALUE rb_float_denominator(VALUE x)
Definition: rational.c:2116
struct __pthread_condattr_t * pthread_condattr_t
unsigned char ar_hint_t
VALUE rb_getlogin(void)
VALUE rb_objspace_gc_disable(struct rb_objspace *)
Definition: gc.c:9269
VALUE rb_ary_delete(VALUE, VALUE)
Definition: array.c:3365
const char ruby_null_device[]
Definition: file.c:6410
VALUE rb_iseq_coverage(const rb_iseq_t *iseq)
Definition: iseq.c:1086
void rb_encdb_set_unicode(int index)
Definition: encoding.c:576
unsigned long vm_offset_t
void Init_ext(void)
Definition: dmyext.c:2
_Bool rb_gvar_is_traced(const struct rb_global_entry *)
Definition: variable.c:714
double fmax(double, double)
rb_gvar_setter_t * rb_gvar_setter_function_of(const struct rb_global_entry *)
Definition: variable.c:708
struct st_table * rb_hash_tbl_raw(VALUE hash)
Definition: hash.c:1594
double drem(double, double)
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2290
void rb_gc(void)
Definition: gc.c:8695
VALUE rb_iseqw_new(const rb_iseq_t *iseq)
Definition: iseq.c:1157
void rb_ast_add_mark_object(rb_ast_t *, VALUE)
Definition: node.c:1393
void rb_threadptr_signal_raise(rb_thread_t *th, int sig)
Definition: thread.c:2323
void rb_global_variable(VALUE *)
Definition: gc.c:7128
int pthread_mutex_trylock(pthread_mutex_t *)
VALUE rb_fs
Definition: intern.h:583
float modff(float, float *)
VALUE rb_public_const_get_at(VALUE klass, ID id)
Definition: variable.c:2409
VALUE rb_float_eql(VALUE x, VALUE y)
Definition: numeric.c:1654
ssize_t __ssp_real_readlink(const char *__restrict__ __path, char *__restrict__ __buf, size_t __len) __asm__("" "readlink")
int pthread_getcpuclockid(pthread_t, clockid_t *)
struct rb_const_entry_struct rb_const_entry_t
VALUE rb_thread_create(VALUE(*)(void *), void *)
Definition: thread.c:965
int _setenv_r(struct _reent *, const char *__string, const char *__value, int __overwrite)
VALUE rb_block_proc(void)
Definition: proc.c:837
VALUE rb_ary_sort_bang(VALUE)
Definition: array.c:2777
VALUE rb_path_to_class(VALUE)
Definition: variable.c:226
int _getc_r(struct _reent *, FILE *)
VALUE rb_iseq_ibf_load_extra_data(VALUE str)
Definition: compile.c:11628
VALUE rb_stderr
VALUE rb_int_and(VALUE x, VALUE y)
Definition: numeric.c:4472
char * canonicalize_file_name(const char *)
VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE, VALUE)
Definition: thread.c:5109
int dup2(int __fildes, int __fildes2)
Definition: dup2.c:27
long int lrint(double)
int int _siprintf_r(struct _reent *, char *, const char *,...) __attribute__((__format__(__printf__
__fd_mask fd_mask
void rb_ast_mark(rb_ast_t *)
Definition: node.c:1340
size_t rb_generic_ivar_memsize(VALUE)
Definition: variable.c:1010
unsigned long vm_size_t
VALUE rb_reg_match_pre(VALUE)
Definition: re.c:1757
void * rb_xmalloc_mul_add(size_t, size_t, size_t) __attribute__((__malloc__))
Definition: gc.c:10189
__blkcnt_t blkcnt_t
VALUE rb_to_symbol_type(VALUE obj)
Definition: symbol.c:1044
VALUE rb_complex_raw(VALUE, VALUE)
Definition: complex.c:1521
int clock_setenable_attr(clockid_t clock_id, int attr)
int lchown(const char *__path, uid_t __owner, gid_t __group)
int unlink(const char *__path)
VALUE rb_iv_set(VALUE, const char *, VALUE)
Definition: variable.c:3318
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Definition: thread_sync.c:465
float logbf(float)
VALUE rb_rational_reciprocal(VALUE x)
Definition: rational.c:1887
VALUE rb_obj_is_thread(VALUE obj)
Definition: vm.c:2657
VALUE rb_output_rs
Definition: intern.h:587
int pthread_rwlock_tryrdlock(pthread_rwlock_t *)
short int __int_least16_t
long double roundl(long double)
int strcasecmp(const char *, const char *) __attribute__((__pure__))
int fputc_unlocked(int, FILE *)
void rb_fd_copy(rb_fdset_t *, const fd_set *, int)
rb_gvar_setter_t rb_str_setter
#define gets(str)
__intmax_t intmax_t
float hypotf(float, float)
double fmod(double, double)
int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int)
void rb_vm_mark(void *ptr)
Definition: vm.c:2243
int rb_backtrace_p(VALUE obj)
Definition: vm_backtrace.c:446
VALUE rb_float_abs(VALUE flt)
Definition: numeric.c:1698
char * rindex(const char *, int) __attribute__((__pure__))
int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *)
VALUE * rb_ary_ptr_use_start(VALUE ary)
Definition: array.c:226
int rb_find_file_ext_safe(VALUE *, const char *const *, int)
Definition: file.c:6284
const char * rb_objspace_data_type_name(VALUE obj)
Definition: gc.c:2445
void rb_define_module_function(VALUE, const char *, VALUE(*)(), int)
int rb_file_load_ok(const char *)
Definition: file.c:6243
int _fflush_r(struct _reent *, FILE *)
int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen)
Definition: process.c:3551
long _jrand48_r(struct _reent *, unsigned short[3])
rb_gvar_getter_t rb_gvar_undef_getter
_ssize_t __ssize_t
float fmaf(float, float, float)
VALUE rb_iseq_defined_string(enum defined_type type)
Definition: iseq.c:3033
VALUE rb_rational_abs(VALUE self)
Definition: rational.c:1255
void mjit_child_after_fork(void)
float asinf(float)
VALUE rb_ary_rotate(VALUE, long)
Definition: array.c:2617
unsigned int rb_atomic_t
void setusershell(void)
int fputs_unlocked(const char *__restrict__, FILE *__restrict__)
VALUE rb_const_get_at(VALUE, ID)
Definition: variable.c:2397
int ruby_enable_coredump
Definition: signal.c:1481
int _fputs_r(struct _reent *, const char *__restrict__, FILE *__restrict__)
long double acosl(long double)
void * memccpy(void *__restrict__, const void *__restrict__, int, size_t)
rb_gvar_marker_t rb_gvar_val_marker
float gammaf_r(float, int *)
VALUE rb_hash_new_with_size(st_index_t size)
Definition: hash.c:1529
long double atanl(long double)
VALUE rb_time_succ(VALUE)
Definition: time.c:4243
int char char int int int int int _vfiscanf_r(struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
void rb_strterm_mark(VALUE obj)
Definition: ripper.c:769
long double truncl(long double)
int rb_signal_exec(rb_thread_t *th, int sig)
Definition: signal.c:1082
void rb_vm_set_progname(VALUE filename)
Definition: vm.c:3291
VALUE rb_gc_location(VALUE)
Definition: gc.c:8127
int mkdirat(int, const char *, mode_t)
int mkostemps(char *, int, int)
char * utoa(unsigned, char *, int)
#define rb_external_str_new_cstr(str)
VALUE rb_rational_div(VALUE self, VALUE other)
Definition: rational.c:916
VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE)
VALUE rb_dbl_complex_new(double real, double imag)
Creates a Complex object.
Definition: complex.c:1561
VALUE rb_complex_abs(VALUE z)
Definition: complex.c:1161
VALUE rb_complex_real(VALUE z)
Definition: complex.c:726
rb_const_entry_t * rb_const_lookup(VALUE klass, ID id)
Definition: variable.c:3352
int sched_getcpu(void)
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p)
Definition: string.c:5815
int _mkstemps_r(struct _reent *, char *, int)
_off_t __off_t
int revoke(char *__path)
__int64_t sbintime_t
intmax_t strtoimax_l(const char *__restrict__, char **_restrict, int, locale_t)
void mjit_init(const struct mjit_options *opts)
VALUE rb_tainted_str_new(const char *, long)
Definition: string.c:896
VALUE rb_ary_replace(VALUE copy, VALUE orig)
Definition: array.c:3811
VALUE rb_find_file(VALUE)
Definition: file.c:6357
void * rb_load_file(const char *)
Definition: ruby.c:2193
__inline__ const char *__restrict__ __path
int rb_is_class_name(VALUE name)
Definition: symbol.c:1056
__int_least8_t int_least8_t
VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck)
Definition: bignum.c:4352
int pthread_mutex_destroy(pthread_mutex_t *)
VALUE rb_str_new_with_class(VALUE, const char *, long)
Definition: string.c:1298
void rb_define_const(VALUE, const char *, VALUE)
Definition: variable.c:2891
char * getenv(const char *__string)
VALUE rb_float_uminus(VALUE num)
Definition: numeric.c:1011
VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements)
Definition: vm_eval.c:1885
#define vsnprintf(str, len, fmt, ap)
int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *, const struct timespec *)
int _system_r(struct _reent *, const char *)
__gnuc_va_list va_list
VALUE rb_ary_cmp(VALUE, VALUE)
Definition: array.c:4420
#define long
void rb_st_foreach_safe(struct st_table *, int(*)(st_data_t, st_data_t, st_data_t), st_data_t)
VALUE rb_big_lt(VALUE x, VALUE y)
Definition: bignum.c:5501
int __fpclassifyf(float)
st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never)
void rb_alias(VALUE, ID, ID)
Definition: vm_method.c:1598
long int __int_least64_t
char * strtok_r(char *__restrict__, const char *__restrict__, char **__restrict__)
void rb_define_singleton_method(VALUE, const char *, VALUE(*)(), int)
VALUE rb_str_equal(VALUE str1, VALUE str2)
Definition: string.c:3267
void rb_ary_ptr_use_end(VALUE ary)
Definition: array.c:235
int getlogin_r(char *name, size_t namesize)
float logf(float)
VALUE rb_gcd_gmp(VALUE x, VALUE y)
#define rb_set_safe_level(level)
VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda)
Definition: vm.c:933
VALUE rb_equal_opt(VALUE obj1, VALUE obj2)
_ssize_t __ssp_real_read(int __fd, void *__buf, size_t __len) __asm__("" "read")
short int __int16_t
VALUE rb_gvar_get(struct rb_global_entry *)
Definition: variable.c:619
@ VM_METHOD_TYPE_ATTRSET
@ VM_METHOD_TYPE_CFUNC
@ VM_METHOD_TYPE_OPTIMIZED
@ VM_METHOD_TYPE_REFINED
@ VM_METHOD_TYPE_NOTIMPLEMENTED
@ VM_METHOD_TYPE_MISSING
@ VM_METHOD_TYPE_BMETHOD
@ VM_METHOD_TYPE_ZSUPER
@ VM_METHOD_TYPE_ALIAS
@ VM_METHOD_TYPE_UNDEF
void ruby_gc_set_params(void)
Definition: gc.c:9434
double nexttoward(double, long double)
int pthread_spin_destroy(pthread_spinlock_t *)
void rb_stdio_set_default_encoding(void)
Definition: io.c:11769
VALUE rb_str_to_inum(VALUE, int, int)
Definition: bignum.c:4268
int rb_reg_options(VALUE)
Definition: re.c:3579
void rb_iv_tbl_copy(VALUE dst, VALUE src)
Definition: variable.c:3343
size_t confstr(int __name, char *__buf, size_t __len)
return cc call
VALUE rb_vm_env_local_variables(const rb_env_t *env)
Definition: vm.c:840
VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self)
Definition: vm_eval.c:1670
int symlinkat(const char *, int, const char *)
size_t __ssp_real_confstr(int __name, char *__buf, size_t __len) __asm__("" "confstr")
void rb_objspace_set_event_hook(const rb_event_flag_t event)
Definition: gc.c:2095
VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t,...)
Definition: struct.c:418
int _fputc_unlocked_r(struct _reent *, int, FILE *)
int pthread_setspecific(pthread_key_t, const void *)
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
int pthread_attr_setinheritsched(pthread_attr_t *, int)
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp)
Definition: vm.c:2184
VALUE rb_big_remainder(VALUE x, VALUE y)
Definition: bignum.c:6119
VALUE rb_hash_freeze(VALUE)
Definition: hash.c:87
VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int)
Definition: proc.c:986
VALUE rb_backtrace_to_location_ary(VALUE obj)
Definition: vm_backtrace.c:686
uid_t geteuid(void)
Definition: win32.c:2802
int _iprintf_r(struct _reent *, const char *,...) __attribute__((__format__(__printf__
void rb_vm_check_redefinition_by_prepend(VALUE klass)
Definition: vm.c:1631
double nan(const char *)
Definition: nan.c:7
int sched_setparam(pid_t __pid, const struct sched_param *__param)
int __srget_r(struct _reent *, FILE *)
void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber)
Definition: cont.c:1134
VALUE rb_dbl_complex_new_polar_pi(double abs, double ang)
Definition: complex.c:667
int _getc_unlocked_r(struct _reent *, FILE *)
void rb_ast_update_references(rb_ast_t *)
Definition: node.c:1330
void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_)
Definition: variable.c:412
int pthread_key_delete(pthread_key_t)
VALUE rb_int_lshift(VALUE x, VALUE y)
Definition: numeric.c:4589
int int _iscanf_r(struct _reent *, const char *,...) __attribute__((__format__(__scanf__
VALUE rb_str_upto_each(VALUE, VALUE, int, int(*each)(VALUE, VALUE), VALUE)
Definition: string.c:4263
double ruby_float_step_size(double beg, double end, double unit, int excl)
Definition: numeric.c:2500
int rb_vm_add_root_module(ID id, VALUE module)
Definition: vm.c:2312
@ OPTIMIZED_METHOD_TYPE_CALL
@ OPTIMIZED_METHOD_TYPE__MAX
@ OPTIMIZED_METHOD_TYPE_BLOCK_CALL
@ OPTIMIZED_METHOD_TYPE_SEND
VALUE rb_big_size_m(VALUE big)
Definition: bignum.c:6784
void rb_thread_terminate_all(void)
Definition: thread.c:554
VALUE rb_str_split(VALUE, const char *)
Definition: string.c:8116
float scalbnf(float, int)
VALUE rb_fiber_new(rb_block_call_func_t, VALUE)
Definition: cont.c:1794
VALUE rb_objspace_gc_enable(struct rb_objspace *)
Definition: gc.c:9232
VALUE rb_file_absolute_path(VALUE, VALUE)
Definition: file.c:4093
__int32_t __blksize_t
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *, int *)
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int)
VALUE rb_to_hash_type(VALUE obj)
Definition: hash.c:1845
VALUE rb_str_times(VALUE, VALUE)
Definition: string.c:1966
const char ruby_digitmap[]
Definition: bignum.c:38
unsigned long u_long
unsigned long long rb_serial_t
int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2)
Definition: vm_method.c:1521
int _putenv_r(struct _reent *, char *__string)
rb_serial_t rb_next_class_serial(void)
Definition: vm.c:358
double copysign(double, double)
long double coshl(long double)
VALUE rb_math_exp(VALUE)
int getpeereid(int, uid_t *, gid_t *)
VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval)
Definition: vm_backtrace.c:960
#define clearerr_unlocked(p)
uintmax_t wcstoumax(const wchar_t *__restrict__, wchar_t **__restrict__, int)
VALUE rb_int_powm(int const argc, VALUE *const argv, VALUE const num)
Definition: bignum.c:7112
VALUE rb_ary_sort(VALUE)
Definition: array.c:2866
double atanh(double)
Definition: acosh.c:75
void rb_unblock_function_t(void *)
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
VALUE rb_big_divmod(VALUE, VALUE)
Definition: bignum.c:6135
int int int __snprintf_chk(char *__restrict__, size_t, int, size_t, const char *__restrict__,...) __attribute__((__format__(__printf__
int mknodat(int, const char *, mode_t, dev_t)
long double _strtold_r(struct _reent *, const char *__restrict__, char **__restrict__)
void _exit(int __status) __attribute__((__noreturn__))
mode_t umask(mode_t __mask)
void rb_ary_delete_same(VALUE, VALUE)
Definition: array.c:3396
struct mjit_options mjit_opts
Definition: mjit_worker.c:174
VALUE rb_thread_alloc(VALUE klass)
Definition: vm.c:2758
unsigned int uint
#define RHASH_AR_TABLE_SIZE_MASK
void ruby_set_script_name(VALUE name)
Sets the current script name to this value.
Definition: ruby.c:2303
int pthread_rwlock_timedrdlock(pthread_rwlock_t *, const struct timespec *)
VALUE rb_Complex(VALUE, VALUE)
Definition: complex.c:1545
int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec *rqtp, struct timespec *rmtp)
#define RSTRING_EMBED_LEN_MAX
int int int int scanf(const char *__restrict__,...) __attribute__((__format__(__scanf__
int pthread_attr_setdetachstate(pthread_attr_t *, int)
VALUE rb_ary_clear(VALUE)
Definition: array.c:3862
int int int int int int int int char char int int int int int int int int int char char int vdiprintf(int, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
const rb_iseq_t * rb_iseqw_to_iseq(VALUE iseqw)
Definition: iseq.c:1350
int pclose(FILE *)
const char * s2
VALUE rb_ary_tmp_new(long)
Definition: array.c:768
long _nrand48_r(struct _reent *, unsigned short[3])
void rb_load_protect(VALUE, int, int *)
Definition: load.c:701
struct _pthread_cleanup_handler __pthread_cleanup_handler
char * suboptarg
int _mkostemps_r(struct _reent *, char *, int, int)
int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t)
VALUE rb_proc_call_kw(VALUE, VALUE, int)
Definition: proc.c:948
#define rb_funcall(recv, mid, argc,...)
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:115
int __sprintf_chk(char *__restrict__, int, size_t, const char *__restrict__,...) __attribute__((__format__(__printf__
struct __pthread_key_t * pthread_key_t
int int int int int int _sprintf_r(struct _reent *, char *__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
VALUE rb_yield_force_blockarg(VALUE values)
Definition: vm_eval.c:1309
char * caddr_t
long int int_fast16_t
int rb_str_comparable(VALUE, VALUE)
Definition: string.c:3203
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
int VALUE v
long long int llroundf(float)
int rb_objspace_markable_object_p(VALUE obj)
Definition: gc.c:3613
#define rb_method_basic_definition_p(klass, mid)
VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE)
Definition: vm_eval.c:533
VALUE rb_ary_new(void)
Definition: array.c:723
void rb_gc_update_tbl_refs(st_table *ptr)
Definition: gc.c:7999
__gid_t gid_t
void longjmp(jmp_buf __jmpb, int __retval) __attribute__((__noreturn__))
rb_control_frame_t struct rb_calling_info const rb_callable_method_entry_t int int int local_size
VALUE rb_cstr_to_rat(const char *, int)
Definition: rational.c:2553
int fexecve(int __fd, char *const __argv[], char *const __envp[])
int int int int char * __gets_chk(char *, size_t)
void rb_thread_atfork_before_exec(void)
Definition: thread.c:4552
VALUE rb_invcmp(VALUE, VALUE)
Definition: compar.c:47
int rb_mod_method_arity(VALUE, ID)
Definition: proc.c:2644
void rb_ivar_foreach(VALUE, int(*)(ID, VALUE, st_data_t), st_data_t)
@ NOT_COMPILED_JIT_ISEQ_FUNC
@ NOT_READY_JIT_ISEQ_FUNC
@ NOT_ADDED_JIT_ISEQ_FUNC
__inline__ const void * __restrict__
void rb_last_status_set(int status, pid_t pid)
ID rb_id_encoding(void)
Definition: encoding.c:759
struct _reent * _impure_ptr
#define rb_scan_args(argc, argvp, fmt,...)
char * mkdtemp(char *)
int pthread_setaffinity_np(pthread_t, size_t, const cpu_set_t *)
__int64_t int64_t
#define RHASH_AR_TABLE_BOUND_MASK
#define RSTRING_FSTR
VALUE rb_math_sin(VALUE)
VALUE rb_io_addstr(VALUE, VALUE)
Definition: io.c:1843
VALUE rb_str2big_normal(VALUE arg, int base, int badcheck)
Definition: bignum.c:4310
double pow(double, double)
VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg, int kw_splat)
Definition: vm_eval.c:539
VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node)
Definition: compile.c:644
__uint_least16_t uint_least16_t
double acosh(double)
Definition: acosh.c:36
VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr)
Definition: vm_eval.c:2326
unsigned long _strtoul_r(struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
void rb_gc_register_address(VALUE *)
Definition: gc.c:7093
float ceilf(float)
int sighold(int)
VALUE rb_const_get_from(VALUE, ID)
Definition: variable.c:2385
VALUE rb_unnamed_parameters(int arity)
Definition: proc.c:1262
__inline__ void size_t off_t __off
float rintf(float)
int ffs(int) __attribute__((__const__))
Definition: ffs.c:6
VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv, rb_check_funcall_hook *hook, VALUE arg)
Definition: vm_eval.c:565
void rb_gc_verify_internal_consistency(void)
Definition: gc.c:6218
VALUE rb_reg_match(VALUE, VALUE)
Definition: re.c:3180
VALUE rb_complex_mul(VALUE x, VALUE y)
Definition: complex.c:872
int finitel(long double)
__uint32_t __mode_t
VALUE rb_num_coerce_bit(VALUE, VALUE, ID)
Definition: numeric.c:4431
rb_control_frame_t * rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
Definition: vm.c:553
VALUE * rb_ruby_verbose_ptr(void)
Definition: vm.c:3377
void rb_hook_list_mark(rb_hook_list_t *hooks)
Definition: vm_trace.c:53
const VALUE int n_lead
long long strtoll_l(const char *__restrict__, char **__restrict__, int, locale_t)
float frexpf(float, int *)
float cbrtf(float)
VALUE rb_complex_conjugate(VALUE z)
Definition: complex.c:1254
int rb_reserved_fd_p(int fd)
long long atoll(const char *__nptr)
@ RSTRUCT_TRANSIENT_FLAG
ID rb_intern2(const char *, long)
Definition: symbol.c:653
long double tanhl(long double)
int int int int int int int int char char int int int int int int int int int char char int int int int int int int int FILE * fdopen(int, const char *)
VALUE rb_hash_compare_by_id_p(VALUE hash)
Definition: hash.c:4267
VALUE rb_thread_shield_wait(VALUE self)
Definition: thread.c:4805
long double fabsl(long double)
uintmax_t strtoumax(const char *__restrict__, char **__restrict__, int)
VALUE rb_proc_lambda_p(VALUE)
Definition: proc.c:275
__inline__ int FILE * __fp
const char ruby_initial_load_paths[]
Definition: loadpath.c:62
int rb_public_const_defined_from(VALUE klass, ID id)
Definition: variable.c:2698
VALUE rb_rational_new(VALUE, VALUE)
Definition: rational.c:1957
void * _iconv_t
int pthread_join(pthread_t, void **)
void rb_str_tmp_frozen_release(VALUE str, VALUE tmp)
Definition: string.c:1217
struct rb_ensure_entry rb_ensure_entry_t
int char char int int int int int int int int int int int _vscanf_r(struct _reent *, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__scanf__
long long _atoll_r(struct _reent *, const char *__nptr)
FILE * _fopen_r(struct _reent *, const char *__restrict__, const char *__restrict__)
st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size)
double expm1(double)
#define rb_str_cat_cstr(str, ptr)
double logb(double)
VALUE rb_ary_to_ary(VALUE)
Definition: array.c:1853
#define RSTRING_EMBED_LEN_SHIFT
int ruby_stack_check(void)
Definition: gc.c:4687
VALUE rb_str_concat_literals(size_t, const VALUE *)
Definition: string.c:2974
VALUE rb_ivar_defined(VALUE, ID)
Definition: variable.c:1317
void rb_gc_adjust_memory_usage(ssize_t)
Definition: gc.c:10333
int daylight __asm__("_daylight")
VALUE rb_float_gt(VALUE x, VALUE y)
Definition: numeric.c:1503
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Definition: util.c:130
long mrand48(void)
VALUE rb_default_coverage(int)
Definition: thread.c:5518
VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, int min_argc, int max_argc, VALUE data2)
Definition: vm_eval.c:1501
VALUE rb_string_value(volatile VALUE *)
Definition: string.c:2175
VALUE rb_str_tmp_new(long)
Definition: string.c:1343
void rb_thread_check_ints(void)
Definition: thread.c:1361
void rb_gc_mark(VALUE)
Definition: gc.c:5228
VALUE rb_ary_reverse(VALUE)
Definition: array.c:2544
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp)
#define rb_intern(str)
int rb_num_negative_p(VALUE)
Definition: numeric.c:313
VALUE rb_big_mul_karatsuba(VALUE x, VALUE y)
Definition: bignum.c:1870
VALUE rb_yield_values2(int n, const VALUE *argv)
Definition: vm_eval.c:1271
__builtin_object_size((cc), 0) !
const rb_method_entry_t * rb_resolve_me_location(const rb_method_entry_t *, VALUE[5])
Definition: thread.c:5399
VALUE rb_get_path_check_convert(VALUE)
Definition: file.c:211
void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete
rb_serial_t ruby_vm_global_constant_state
Definition: vm.c:380
VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc)
Definition: hash.c:2242
VALUE rb_float_ceil(VALUE num, int ndigits)
Definition: numeric.c:2022
int execle(const char *__path, const char *,...)
int pthread_detach(pthread_t)
const VALUE * rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars)
Definition: vm.c:984
double rb_int_fdiv_double(VALUE x, VALUE y)
Definition: numeric.c:3733
void rb_define_readonly_variable(const char *, const VALUE *)
Definition: variable.c:505
double log10(double)
VALUE rb_reg_new(const char *, long, int)
Definition: re.c:2947
int int fscanf(FILE *__restrict__, const char *__restrict__,...) __attribute__((__format__(__scanf__
rb_control_frame_t struct rb_calling_info * calling
int mknod(const char *__path, mode_t __mode, dev_t __dev)
VALUE rb_ary_to_s(VALUE)
Definition: array.c:2453
VALUE rb_ary_at(VALUE, VALUE)
Definition: array.c:1629
short unsigned int wchar_t
VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val)
Definition: proc.c:728
void rb_thread_reset_timer_thread(void)
Definition: thread.c:4424
int char char int int _vdiprintf_r(struct _reent *, int, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_require(const char *)
Definition: load.c:1161
void flockfile(FILE *)
struct rb_scope_visi_struct rb_scope_visibility_t
void rb_iseq_trace_set_all(rb_event_flag_t turnon_events)
Definition: iseq.c:3319
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:138
__uint32_t arc4random_uniform(__uint32_t)
VALUE rb_hash_size(VALUE)
Definition: hash.c:2939
char ** environ
st_index_t st_hash_func(st_data_t)
char * ctime_r(const time_t *, char *)
VALUE rb_ary_subseq(VALUE, long, long)
Definition: array.c:1518
long long __key_t
struct __pthread_barrier_t * pthread_barrier_t
struct tm * localtime(const time_t *_timer)
VALUE rb_integer_float_cmp(VALUE x, VALUE y)
Definition: bignum.c:5325
int isinfl(long double)
char st_check_for_sizeof_st_index_t[8==(int) sizeof(st_index_t) ? 1 :-1]
int chmod(const char *__path, mode_t __mode)
#define RARRAY_EMBED_LEN_SHIFT
void rb_parser_set_options(VALUE, int, int, int, int)
Definition: ripper.c:19201
void rb_autoload_str(VALUE mod, ID id, VALUE file)
Definition: variable.c:1937
int pthread_spin_unlock(pthread_spinlock_t *)
int rb_int_positive_p(VALUE num)
Definition: numeric.c:301
int link(const char *__path1, const char *__path2)
Definition: win32.c:4961
VALUE ID VALUE old
void rb_fd_fix_cloexec(int fd)
Definition: io.c:268
float ldexpf(float, int)
long double erfl(long double)
unsigned short u_short
int _scanf_r(struct _reent *, const char *__restrict__,...) __attribute__((__format__(__scanf__
void rb_write_error(const char *)
Definition: io.c:7934
VALUE rb_getpwdiruid(void)
double floor(double)
VALUE rb_ary_new_capa(long capa)
Definition: array.c:717
size_t mbstowcs(wchar_t *__restrict__, const char *__restrict__, size_t)
__uint64_t __ino_t
unsigned long long _strtoull_r(struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
int pthread_mutex_lock(pthread_mutex_t *)
const rb_iseq_t * iseq
int rb_memcicmp(const void *, const void *, long)
Definition: re.c:80
int pthread_mutexattr_init(pthread_mutexattr_t *)
int getsubopt(char **, char *const *, char **)
VALUE rb_ary_freeze(VALUE)
Definition: array.c:648
void rb_gc_mark_values(long n, const VALUE *values)
Definition: gc.c:4731
long double cosl(long double)
VALUE rb_str_catf(VALUE, const char *,...) __attribute__((format(printf
int isatty(int __fildes)
@ VM_SVAR_FLIPFLOP_START
void RUBY_DATA_FUNC
int pthread_barrierattr_destroy(pthread_barrierattr_t *)
#define ILL_PRVREG
int int int int int int int int char char int int int int int int int int int char char int int int int viprintf(const char *, __gnuc_va_list) __attribute__((__format__(__printf__
int getdomainname(char *__name, size_t __len)
__inline__ char * __buf
void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th)
Definition: thread.c:537
VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt)
Definition: process.c:2661
float acoshf(float)
char * strchr(const char *, int)
Definition: strchr.c:8
VALUE rb_node_case_when_optimizable_literal(const NODE *const node)
Definition: compile.c:4284
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
Definition: hash.c:3910
#define FPE_FLTUND
int rb_symname_p(const char *)
Definition: symbol.c:182
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat)
Definition: vm_eval.c:1277
VALUE rb_vm_exec(rb_execution_context_t *ec, int mjit_enable_p)
pid_t fork(void)
void rb_call_end_proc(VALUE data)
Definition: eval_jump.c:11
char * strupr(char *)
VALUE rb_obj_remove_instance_variable(VALUE, VALUE)
Definition: variable.c:1634
VALUE rb_const_source_location_at(VALUE, ID)
Definition: variable.c:2467
VALUE rb_str_new_static(const char *, long)
Definition: string.c:872
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
Definition: bignum.c:3223
int pthread_condattr_setpshared(pthread_condattr_t *, int)
VALUE rb_cvar_get(VALUE, ID)
Definition: variable.c:3107
void rb_obj_info_dump(VALUE obj)
Definition: gc.c:11719
long nrand48(unsigned short[3])
int pthread_rwlock_trywrlock(pthread_rwlock_t *)
int rb_is_absolute_path(const char *)
Definition: file.c:6110
rb_control_frame_t * rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
Definition: vm.c:541
struct timeval rb_time_timeval(VALUE time)
Definition: time.c:2689
VALUE rb_parser_set_yydebug(VALUE, VALUE)
Definition: ripper.c:19494
int rb_sym_interned_p(VALUE)
struct rb_ensure_list rb_ensure_list_t
VALUE rb_mutex_unlock(VALUE mutex)
Definition: thread_sync.c:403
VALUE rb_iseq_local_variables(const rb_iseq_t *iseq)
Definition: vm.c:849
long double scalbnl(long double, int)
void rb_execarg_parent_start(VALUE execarg_obj)
Definition: process.c:2844
double exp2(double)
#define CLD_TRAPPED
void rb_fd_set(int, rb_fdset_t *)
int _getchar_r(struct _reent *)
char * __strncat_chk(char *, const char *, size_t, size_t)
int int int int int int int int char char int int int int int int int siscanf(const char *, const char *,...) __attribute__((__format__(__scanf__
int sig2str(int, char *)
const rb_method_entry_t * rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:928
int rb_fd_isset(int, const rb_fdset_t *)
struct timeval rb_time_interval(VALUE num)
Definition: time.c:2683
const char *void void void rb_sys_warning(const char *,...) __attribute__((format(printf
int rb_st_insert(st_table *, st_data_t, st_data_t)
ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id)
Definition: debug.c:115
float y1f(float)
void rb_define_class_variable(VALUE, const char *, VALUE)
Definition: variable.c:3156
double ldexp(double, int)
VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl)
Definition: numeric.c:2560
void rb_gc_writebarrier(VALUE a, VALUE b)
Definition: gc.c:6833
#define ferror(p)
VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val)
Definition: vm.c:1478
#define FPE_INTOVF
void * bsearch(const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar)
float log1pf(float)
int int int int int int int int char char int int int int int int int int int char char * vasnprintf(char *, size_t *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
#define RUBY_Qundef
VALUE rb_apply(VALUE, ID, VALUE)
Calls a method.
Definition: vm_eval.c:890
#define SI_ASYNCIO
VALUE rb_struct_members(VALUE)
Definition: struct.c:72
char * strerror_r(int, char *, size_t)
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2460
uintmax_t _wcstoumax_r(struct _reent *, const wchar_t *__restrict__, wchar_t **__restrict__, int)
int fflush_unlocked(FILE *)
const rb_iseq_t * rb_iseq_ibf_load(VALUE str)
Definition: compile.c:11600
void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self)
Definition: vm_backtrace.c:632
int st_compare_func(st_data_t, st_data_t)
int char char int _vasprintf_r(struct _reent *, char **, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_str_ellipsize(VALUE, long)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
Definition: string.c:10185
VALUE rb_num_coerce_cmp(VALUE, VALUE, ID)
Definition: numeric.c:453
VALUE rb_big_new(size_t, int)
Definition: bignum.c:3014
void rb_const_set(VALUE, ID, VALUE)
Definition: variable.c:2756
VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE *, int)
Definition: vm_eval.c:986
VALUE rb_big_modulo(VALUE, VALUE)
Definition: bignum.c:6103
int ungetc(int, FILE *)
char * getwd(char *__buf)
const char * ruby_node_name(int node)
Definition: iseq.c:2534
VALUE rb_ary_resize(VALUE ary, long len)
expands or shrinks ary to len elements.
Definition: array.c:1955
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless)
Definition: numeric.c:2529
VALUE rb_str_upto_endless_each(VALUE, int(*each)(VALUE, VALUE), VALUE)
Definition: string.c:4345
VALUE rb_hash_keys(VALUE hash)
Definition: hash.c:3409
int fseeko(FILE *, off_t, int)
int int int int int int int int char char int diprintf(int, const char *,...) __attribute__((__format__(__printf__
void * rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__))
Definition: gc.c:10203
void rb_set_end_proc(void(*)(VALUE), VALUE)
Definition: eval_jump.c:59
enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts)
Definition: numeric.c:200
void * rb_load_file_str(VALUE)
Definition: ruby.c:2200
int int _fiscanf_r(struct _reent *, FILE *, const char *,...) __attribute__((__format__(__scanf__
int sched_getparam(pid_t __pid, struct sched_param *__param)
int int int int int int int vasprintf(char **, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
__uint16_t in_port_t
int rb_str_cmp(VALUE, VALUE)
Definition: string.c:3228
double lgamma_r(double, int *)
Definition: lgamma_r.c:63
int setuid(uid_t __uid)
void rb_st_add_direct(st_table *, st_data_t, st_data_t)
VALUE rb_num2fix(VALUE)
Definition: numeric.c:3088
VALUE rb_obj_as_string_result(VALUE str, VALUE obj)
Definition: string.c:1452
char * tmpnam(char *)
int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val)
Definition: process.c:2041
void void rb_free_tmp_buffer(volatile VALUE *store)
Definition: gc.c:10290
int execlp(const char *__file, const char *,...)
int int int int int int int int char char int int int int int int int int int char char int int int int int int int vsiscanf(const char *, const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
unsigned int size
@ imemo_parser_strterm
VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq)
Definition: iseq.c:1039
float lgammaf(float)
float log10f(float)
rb_block_call_func * rb_block_call_func_t
const rb_iseq_t const int const int const int max_argc
void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena)
Definition: compile.c:9196
ssize_t __ssp_real_pread(int __fd, void *__buf, size_t __len, off_t __off) __asm__("" "pread")
void ruby_debug_counter_show_at_exit(int enable)
#define rb_float_value(v)
VALUE rb_str_subseq(VALUE, long, long)
Definition: string.c:2474
VALUE rb_proc_new(rb_block_call_func_t, VALUE)
Definition: proc.c:2991
void Init_vm_stack_canary(void)
int putw(int, FILE *)
long unsigned int size_t
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Definition: random.c:934
char * strdup(const char *) __attribute__((__malloc__)) __attribute__((__warn_unused_result__))
void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp)
Definition: vm.c:604
VALUE rb_struct_aref(VALUE, VALUE)
Definition: struct.c:1061
float remainderf(float, float)
VALUE rb_mod_remove_const(VALUE, VALUE)
Definition: variable.c:2483
const VALUE int int n_opt
unsigned int wint_t
VALUE rb_hash_delete(VALUE, VALUE)
Definition: hash.c:2344
int symlink(const char *__name1, const char *__name2)
Definition: win32.c:5212
int ruby_glob_func(const char *, VALUE, void *)
ID rb_make_internal_id(void)
Definition: symbol.c:810
int pthread_sigmask(int, const sigset_t *, sigset_t *)
float nanf(const char *)
char * initstate(unsigned, char *, size_t)
VALUE rb_math_hypot(VALUE, VALUE)
char * secure_getenv(const char *__string)
int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg)
Definition: hash.c:1442
int pthread_kill(pthread_t, int)
char * _findenv(const char *, int *)
char * addr_t
VALUE target_owner
size_t __ssp_real_mbstowcs(wchar_t *__buf, const char *__src, size_t __n) __asm__("" "mbstowcs")
__builtin_va_list __va_list
int __ssp_real_getlogin_r(char *__buf, size_t __len) __asm__("" "getlogin_r")
long long rb_big2ll(VALUE)
VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE *, int)
Definition: vm_eval.c:1039
int rb_safe_level(void)
Definition: safe.c:31
int finite(double)
Definition: finite.c:6
void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events)
Definition: iseq.c:3273
int clock_settime(clockid_t clock_id, const struct timespec *tp)
const char * rb_insns_name(int i)
Definition: compile.c:8760
float asinhf(float)
int pthread_mutex_setprioceiling(pthread_mutex_t *, int, int *)
void rb_thread_sleep_deadly(void)
Definition: thread.c:1320
VALUE rb_str_chomp_string(VALUE str, VALUE chomp)
Definition: string.c:8921
int int int int int _snprintf_r(struct _reent *, char *__restrict__, size_t, const char *__restrict__,...) __attribute__((__format__(__printf__
int pthread_getattr_np(pthread_t, pthread_attr_t *)
int at_quick_exit(void(*)(void))
VALUE rb_mod_module_exec(int, const VALUE *, VALUE)
Definition: vm_eval.c:2103
#define ILL_ILLADR
char * _fgets_r(struct _reent *, char *__restrict__, int, FILE *__restrict__)
struct rb_control_frame_struct rb_control_frame_t
int bcmp(const void *, const void *, size_t) __attribute__((__pure__))
unsigned long __fd_mask
__builtin_va_list __gnuc_va_list
int dup(int __fildes)
struct fd_set fd_set
int clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
VALUE rb_block_param_proxy
Definition: vm.c:368
VALUE rb_fstring_new(const char *ptr, long len)
Definition: string.c:396
VALUE rb_struct_initialize(VALUE, VALUE)
Definition: struct.c:659
int sigaltstack(const stack_t *__restrict__, stack_t *__restrict__)
void rb_ast_add_local_table(rb_ast_t *, ID *buf)
Definition: node.c:1219
int faccessat(int __dirfd, const char *__path, int __mode, int __flags)
VALUE rb_struct_aset(VALUE, VALUE, VALUE)
Definition: struct.c:1088
VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq)
Definition: iseq.c:1057
int int int int int int int vprintf(const char *, __gnuc_va_list) __attribute__((__format__(__printf__
int __ssp_real_getgroups(int __n, gid_t __buf[]) __asm__("" "getgroups")
struct rb_call_cache buf
void * vm_object_t
int rb_cmpint(VALUE, VALUE, VALUE)
Definition: bignum.c:2925
VALUE rb_struct_define(const char *,...)
Definition: struct.c:431
double fma(double, double, double)
int __isinfd(double)
VALUE rb_f_kill(int, const VALUE *)
Definition: signal.c:418
ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n)
VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
const rb_env_t * rb_vm_env_prev_env(const rb_env_t *env)
Definition: vm.c:796
VALUE rb_big_cmp(VALUE, VALUE)
Definition: bignum.c:5419
#define memmove(dst, src, len)
VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
Definition: vm.c:1249
VALUE rb_str_dump(VALUE)
Definition: string.c:6042
double difftime(time_t _time2, time_t _time1)
VALUE rb_f_sprintf(int, const VALUE *)
Definition: sprintf.c:198
unsigned int * rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body)
Definition: iseq.c:613
#define snprintf(str, len,...)
#define SI_TIMER
VALUE rb_int_ge(VALUE x, VALUE y)
Definition: numeric.c:4297
VALUE rb_str_append(VALUE, VALUE)
Definition: string.c:2965
void rb_thread_stop_timer_thread(void)
Definition: thread.c:4416
float exp2f(float)
__uint32_t arc4random(void)
VALUE rb_str_buf_cat_ascii(VALUE, const char *)
Definition: string.c:2926
VALUE rb_hash_delete_entry(VALUE hash, VALUE key)
Definition: hash.c:2326
const char * rb_obj_info(VALUE obj)
Definition: gc.c:11713
int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char *errmsg, size_t errmsg_buflen)
Definition: process.c:3420
unsigned int rb_genrand_int32(void)
Definition: random.c:119
VALUE rb_file_s_absolute_path(int, const VALUE *)
Definition: file.c:4100
VALUE rb_thread_shield_release(VALUE self)
Definition: thread.c:4834
int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing)
long lroundl(long double)
void ruby_init_loadpath(void)
Definition: ruby.c:582
VALUE rb_math_cosh(VALUE)
VALUE rb_mod_constants(int, const VALUE *, VALUE)
Definition: variable.c:2630
int pthread_rwlock_init(pthread_rwlock_t *, const pthread_rwlockattr_t *)
size_t rb_ast_memsize(const rb_ast_t *)
Definition: node.c:1373
int ruby_disable_gc
Definition: gc.c:1001
void rb_threadptr_signal_exit(rb_thread_t *th)
Definition: thread.c:2333
VALUE rb_str_new_frozen(VALUE)
Definition: string.c:1203
__uintptr_t uintptr_t
size_t fwrite_unlocked(const void *__restrict__, size_t _size, size_t _n, FILE *)
struct rb_hook_list_struct rb_hook_list_t
__uint32_t __uid_t
void rb_gc_mark_locations(const VALUE *, const VALUE *)
Definition: gc.c:4715
long gethostid(void)
void mjit_free_iseq(const rb_iseq_t *iseq)
void ruby_init_stack(volatile VALUE *)
st_table * rb_st_init_strcasetable(void)
const rb_iseq_t * rb_iseq_load_iseq(VALUE fname)
Definition: iseq.c:847
VALUE rb_ary_dup(VALUE)
Definition: array.c:2238
#define RARRAY_EMBED_LEN_MAX
void rb_st_free_table(st_table *)
VALUE rb_float_div(VALUE x, VALUE y)
Definition: numeric.c:1126
FILE * fopen(const char *__restrict__ _name, const char *__restrict__ _type)
rb_event_flag_t ruby_vm_event_flags
Definition: vm.c:375
int __ssp_real_wctomb(char *__buf, wchar_t __wc) __asm__("" "wctomb")
struct tm * gmtime_r(const time_t *__restrict__, struct tm *__restrict__)
Definition: win32.c:7878
#define siglongjmp(env, val)
void exit(int __status) __attribute__((__noreturn__))
VALUE rb_attr_get(VALUE, ID)
Definition: variable.c:1084
void rb_alias_variable(ID, ID)
Definition: variable.c:756
int finitef(float)
VALUE rb_vm_cbase(void)
Definition: vm.c:1425
__inline__ wchar_t __wc
VALUE rb_rational_minus(VALUE self, VALUE other)
Definition: rational.c:778
unsigned short ushort
unsigned int __uint_least32_t
int rb_thread_fd_writable(int)
Definition: thread.c:4047
void psiginfo(const siginfo_t *, const char *)
__uint32_t __gid_t
int setvbuf(FILE *__restrict__, char *__restrict__, int, size_t)
long double nearbyintl(long double)
VALUE rb_lcm(VALUE x, VALUE y)
Definition: rational.c:1925
rb_control_frame_t struct rb_calling_info const rb_callable_method_entry_t int opt_pc
int _raise_r(struct _reent *, int)
#define SEGV_ACCERR
int pthread_condattr_init(pthread_condattr_t *)
__uint32_t u_int32_t
void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
Definition: vm_dump.c:414
int getpt(void)
int rb_match_nth_defined(int nth, VALUE match)
Definition: re.c:1317
void * rb_mod_const_of(VALUE, void *)
Definition: variable.c:2576
VALUE rb_method_call_kw(int, const VALUE *, VALUE, int)
Definition: proc.c:2266
#define putchar_unlocked(_c)
struct tm * localtime_r(const time_t *__restrict__, struct tm *__restrict__)
Definition: win32.c:7902
VALUE rb_io_puts(int, const VALUE *, VALUE)
Definition: io.c:7751
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Definition: cont.c:2129
float expm1f(float)
char ruby_check_sizeof_long[8==sizeof(long) ? 1 :-1]
VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func *ifunc)
Definition: compile.c:630
char * strnstr(const char *, const char *, size_t) __attribute__((__pure__))
int stat(const char *__restrict__ __path, struct stat *__restrict__ __sbuf)
const rb_method_entry_t * rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class)
Definition: vm_method.c:942
VALUE rb_time_nano_new(time_t, long)
Definition: time.c:2533
int rb_pipe(int *pipes)
Definition: io.c:6373
#define FPE_INTDIV
void rb_str_modify_expand(VALUE, long)
Definition: string.c:2122
@ cmp_optimizable_count
st_table * rb_st_copy(st_table *)
VALUE rb_io_get_io(VALUE)
Definition: io.c:733
void abort(void) __attribute__((__noreturn__))
long strtol(const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
_off_t _ftello_r(struct _reent *, FILE *)
void __assert_func(const char *, int, const char *, const char *) __attribute__((__noreturn__))
void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq)
int rb_encdb_dummy(const char *name)
Definition: encoding.c:472
double atan(double)
_off64_t _fpos64_t
void rb_thread_atfork(void)
Definition: thread.c:4547
FILE * _funopen_r(struct _reent *, const void *__cookie, int(*__readfn)(void *__c, char *__buf, size_t __n), int(*__writefn)(void *__c, const char *__buf, size_t __n), _fpos64_t(*__seekfn)(void *__c, _fpos64_t __off, int __whence), int(*__closefn)(void *__c))
const char * rb_source_location_cstr(int *pline)
Definition: vm.c:1376
int char char int int _diprintf_r(struct _reent *, int, const char *,...) __attribute__((__format__(__printf__
struct vm_ifunc * rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc)
Definition: proc.c:699
int ptsname_r(int, char *, size_t)
int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg)
struct rb_method_bmethod_struct rb_method_bmethod_t
int rb_class_ivar_set(VALUE klass, ID vid, VALUE value)
Definition: variable.c:3327
#define ruby_safe_level_2_warning()
VALUE rb_str_buf_append(VALUE, VALUE)
Definition: string.c:2950
void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p)
Definition: vm_trace.c:362
VALUE rb_str_intern(VALUE)
Definition: symbol.c:710
int mkostemp(char *, int)
void rb_write_error2(const char *, long)
Definition: io.c:7915
VALUE rb_str_drop_bytes(VALUE, long)
Definition: string.c:4573
int rb_get_next_signal(void)
Definition: signal.c:756
int pthread_rwlock_wrlock(pthread_rwlock_t *)
int rb_stderr_tty_p(void)
Definition: io.c:7962
@ YARVINSN_setinstancevariable
@ YARVINSN_opt_aset_with
@ YARVINSN_opt_invokebuiltin_delegate
@ YARVINSN_opt_str_uminus
@ YARVINSN_trace_invokebuiltin
@ YARVINSN_opt_call_c_function
@ YARVINSN_setclassvariable
@ YARVINSN_getlocal_WC_1
@ YARVINSN_trace_branchnil
@ YARVINSN_trace_opt_regexpmatch2
@ YARVINSN_trace_opt_newarray_min
@ YARVINSN_trace_getblockparam
@ YARVINSN_trace_concatarray
@ YARVINSN_trace_opt_str_uminus
@ YARVINSN_trace_opt_minus
@ YARVINSN_trace_setblockparam
@ YARVINSN_trace_opt_succ
@ YARVINSN_setblockparam
@ YARVINSN_trace_putstring
@ YARVINSN_trace_duparray
@ YARVINSN_trace_getlocal
@ YARVINSN_trace_checktype
@ YARVINSN_putobject_INT2FIX_1_
@ YARVINSN_trace_opt_call_c_function
@ YARVINSN_opt_str_freeze
@ YARVINSN_trace_newhash
@ YARVINSN_trace_opt_plus
@ YARVINSN_trace_opt_setinlinecache
@ YARVINSN_newarraykwsplat
@ YARVINSN_trace_definemethod
@ YARVINSN_getinstancevariable
@ YARVINSN_definesmethod
@ YARVINSN_trace_setclassvariable
@ YARVINSN_trace_putself
@ YARVINSN_trace_opt_getinlinecache
@ YARVINSN_trace_getconstant
@ YARVINSN_trace_putobject
@ YARVINSN_trace_setlocal_WC_0
@ YARVINSN_trace_getlocal_WC_0
@ YARVINSN_trace_setspecial
@ YARVINSN_opt_newarray_max
@ YARVINSN_getblockparam
@ YARVINSN_putspecialobject
@ YARVINSN_trace_setconstant
@ YARVINSN_trace_opt_ltlt
@ YARVINSN_trace_checkmatch
@ YARVINSN_trace_defineclass
@ YARVINSN_trace_concatstrings
@ YARVINSN_opt_send_without_block
@ YARVINSN_trace_opt_mult
@ YARVINSN_trace_opt_length
@ YARVINSN_trace_freezestring
@ YARVINSN_trace_duphash
@ YARVINSN_trace_newarray
@ YARVINSN_trace_opt_str_freeze
@ YARVINSN_trace_opt_empty_p
@ YARVINSN_trace_reverse
@ YARVINSN_trace_getglobal
@ YARVINSN_putobject_INT2FIX_0_
@ YARVINSN_trace_putobject_INT2FIX_0_
@ YARVINSN_trace_defined
@ YARVINSN_opt_aref_with
@ YARVINSN_trace_branchif
@ YARVINSN_trace_opt_aset_with
@ YARVINSN_getlocal_WC_0
@ YARVINSN_trace_getinstancevariable
@ YARVINSN_trace_opt_aref
@ YARVINSN_trace_opt_size
@ YARVINSN_trace_definesmethod
@ YARVINSN_trace_setinstancevariable
@ YARVINSN_getclassvariable
@ YARVINSN_trace_getlocal_WC_1
@ YARVINSN_trace_invokeblock
@ YARVINSN_trace_setlocal_WC_1
@ YARVINSN_trace_setglobal
@ YARVINSN_invokebuiltin
@ YARVINSN_trace_opt_newarray_max
@ YARVINSN_trace_putspecialobject
@ YARVINSN_opt_getinlinecache
@ YARVINSN_trace_newarraykwsplat
@ YARVINSN_trace_branchunless
@ YARVINSN_trace_opt_aref_with
@ YARVINSN_trace_toregexp
@ YARVINSN_opt_case_dispatch
@ YARVINSN_trace_opt_nil_p
@ YARVINSN_opt_newarray_min
@ YARVINSN_trace_opt_and
@ YARVINSN_trace_opt_send_without_block
@ YARVINSN_trace_tostring
@ YARVINSN_setlocal_WC_1
@ YARVINSN_trace_splatarray
@ YARVINSN_trace_opt_case_dispatch
@ YARVINSN_trace_opt_invokebuiltin_delegate
@ YARVINSN_getblockparamproxy
@ YARVINSN_trace_checkkeyword
@ YARVINSN_trace_opt_neq
@ YARVINSN_setlocal_WC_0
@ YARVINSN_trace_getspecial
@ YARVINSN_trace_putobject_INT2FIX_1_
@ YARVINSN_trace_newrange
@ YARVINSN_trace_getclassvariable
@ YARVINSN_trace_opt_div
@ YARVINSN_trace_opt_aset
@ YARVINSN_trace_expandarray
@ YARVINSN_trace_opt_mod
@ YARVINSN_opt_invokebuiltin_delegate_leave
@ YARVINSN_opt_regexpmatch2
@ YARVINSN_opt_setinlinecache
@ YARVINSN_trace_opt_not
@ YARVINSN_trace_setlocal
@ YARVINSN_trace_opt_invokebuiltin_delegate_leave
@ YARVINSN_trace_adjuststack
@ YARVINSN_trace_getblockparamproxy
@ YARVINSN_concatstrings
@ YARVINSN_trace_invokesuper
int Init_enc_set_filesystem_encoding(void)
Definition: localeinit.c:119
#define rb_locale_str_new_cstr(str)
void * rb_mod_const_at(VALUE, void *)
Definition: variable.c:2563
int rb_str_hash_cmp(VALUE, VALUE)
Definition: string.c:3173
size_t strxfrm_l(char *__restrict__, const char *__restrict__, size_t, locale_t)
int pthread_attr_destroy(pthread_attr_t *)
struct rb_call_data * CALL_DATA
VALUE rb_complex_minus(VALUE x, VALUE y)
Definition: complex.c:812
int access(const char *__path, int __amode)
VALUE rb_io_print(int, const VALUE *, VALUE)
Definition: io.c:7580
char * _l64a_r(struct _reent *, long __input)
long double fmodl(long double, long double)
void * memrchr(const void *, int, size_t)
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock)
Definition: thread.c:446
long double scalblnl(long double, long)
long double log10l(long double)
VALUE rb_big_or(VALUE, VALUE)
Definition: bignum.c:6479
VALUE rb_time_utc_offset(VALUE time)
Definition: time.c:4810
void * memmem(const void *, size_t, const void *, size_t)
VALUE rb_lastline_get(void)
Definition: vm.c:1316
void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
unsigned int ruby_vm_event_local_num
Definition: vm.c:377
st_data_t st_index_t
VALUE rb_source_location(int *pline)
Definition: vm.c:1360
VALUE rb_gv_get(const char *)
Definition: variable.c:680
__int_least16_t int_least16_t
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
Definition: gc.c:2321
VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
VALUE rb_gets(void)
Definition: io.c:8906
size_t strxfrm(char *__restrict__, const char *__restrict__, size_t)
__key_t key_t
VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck)
unsigned int u_int
FILE * fopencookie(void *__cookie, const char *__mode, cookie_io_functions_t __functions)
void rb_mjit_recompile_iseq(const rb_iseq_t *iseq)
void setproctitle(const char *fmt,...)
Definition: setproctitle.c:139
double double_t
char * _mkdtemp_r(struct _reent *, char *)
VALUE rb_gcd(VALUE x, VALUE y)
Definition: rational.c:1906
int int int _siscanf_r(struct _reent *, const char *, const char *,...) __attribute__((__format__(__scanf__
VALUE rb_check_hash_type(VALUE)
Definition: hash.c:1852
VALUE rb_proc_location(VALUE self)
Definition: proc.c:1256
int pthread_once(pthread_once_t *, void(*)(void))
VALUE rb_int_minus(VALUE x, VALUE y)
Definition: numeric.c:3654
ID rb_check_id(volatile VALUE *)
Returns ID for the given name if it is interned already, or 0.
Definition: symbol.c:919
VALUE rb_thread_current(void)
Definition: thread.c:2675
unsigned short __nlink_t
void rb_threadptr_interrupt(rb_thread_t *th)
Definition: thread.c:505
ID rb_sym2id(VALUE)
Definition: symbol.c:748
int eaccess(const char *__path, int __mode)
Definition: file.c:1460
FILE * freopen(const char *__restrict__, const char *__restrict__, FILE *__restrict__)
int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child)
Disassemble a instruction Iseq -> Iseq inspect object.
Definition: iseq.c:2021
__uint_least32_t uint_least32_t
void sync(void)
VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE *, VALUE, int)
Definition: vm_eval.c:1060
VALUE rb_reg_nth_match(int, VALUE)
Definition: re.c:1714
@ RHASH_PASS_AS_KEYWORDS
@ RHASH_TRANSIENT_FLAG
rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos)
Definition: iseq.c:1774
void * ruby_process_options(int, char **)
Definition: ruby.c:2400
#define RMODULE_IS_OVERLAID
__timer_t timer_t
char * strptime(const char *__restrict__, const char *__restrict__, struct tm *__restrict__)
#define RUBY_ELTS_SHARED
int pthread_cond_destroy(pthread_cond_t *)
pthread_mutex_t rb_nativethread_lock_t
int _putc_unlocked_r(struct _reent *, int, FILE *)
int ruserok(const char *rhost, int superuser, const char *ruser, const char *luser)
int fchownat(int __dirfd, const char *__path, uid_t __owner, gid_t __group, int __flags)
VALUE rb_int_odd_p(VALUE num)
Definition: numeric.c:3227
void rb_thread_wakeup_timer_thread(int)
VALUE rb_hash_fetch(VALUE, VALUE)
Definition: hash.c:2134
int dprintf(int, const char *__restrict__,...) __attribute__((__format__(__printf__
pid_t getpid(void)
#define strcpy(dst, src)
VALUE rb_check_array_type(VALUE)
Definition: array.c:909
pid_t getppid(void)
int lockf(int __fd, int __cmd, off_t __len)
rb_ast_t * rb_parser_compile_generic(VALUE vparser, VALUE(*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line)
Definition: ripper.c:13095
int int __vsprintf_chk(char *__restrict__, int, size_t, const char *__restrict__, __va_list) __attribute__((__format__(__printf__
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Definition: io.c:419
#define feof_unlocked(p)
int int int int int int int int char char int int int int int int int int int char char int int int int int int vsiprintf(char *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
#define feof(p)
int pthread_cond_broadcast(pthread_cond_t *)
char * strcasestr(const char *, const char *)
void * valloc(size_t)
struct rb_iseq_constant_body * rb_iseq_constant_body_alloc(void)
Definition: iseq.c:433
void rb_set_coverages(VALUE, int, VALUE)
Definition: thread.c:5488
int rb_const_defined_from(VALUE, ID)
Definition: variable.c:2680
void(* _sig_func_ptr)(int)
void ruby_debug_counter_reset(void)
char * crypt(const char *__key, const char *__salt)
VALUE rb_num_coerce_relop(VALUE, VALUE, ID)
Definition: numeric.c:461
VALUE rb_big_divrem_normal(VALUE x, VALUE y)
Definition: bignum.c:2714
int rb_scan_args_set(int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, int f_var, int f_hash, int f_block, VALUE *vars[], char *fmt __attribute__((unused)), int varc __attribute__((unused)))
VALUE rb_gc_disable_no_rest(void)
Definition: gc.c:9247
__uint8_t u_int8_t
VALUE rb_reg_match2(VALUE)
Definition: re.c:3239
VALUE rb_refinement_module_get_refined_class(VALUE module)
Definition: eval.c:1481
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int)
#define rb_str_dup_frozen
int pthread_rwlock_unlock(pthread_rwlock_t *)
__dev_t dev_t
VALUE rb_proc_call(VALUE, VALUE)
Definition: proc.c:966
char * ctime(const time_t *_time)
#define RB_IO_WAIT_WRITABLE
const rb_iseq_t * rb_method_iseq(VALUE body)
Definition: proc.c:2691
VALUE rb_output_fs
Definition: intern.h:584
VALUE rb_to_symbol(VALUE name)
Definition: string.c:11156
int rb_thread_alone(void)
Definition: thread.c:3491
int pthread_tryjoin_np(pthread_t, void **)
int char char int int int int int int int int int int int int int int int int _vsprintf_r(struct _reent *, char *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
VALUE rb_str_locktmp(VALUE)
unsigned long __fsblkcnt_t
int _puts_r(struct _reent *, const char *)
int fdatasync(int __fd)
int iruserok(unsigned long raddr, int superuser, const char *ruser, const char *luser)
VALUE rb_marshal_load(VALUE)
Definition: marshal.c:2365
void rb_gc_force_recycle(VALUE)
Definition: gc.c:7027
void rb_gc_mark_movable(VALUE)
Definition: gc.c:5222
VALUE rb_eval_string_wrap(const char *, int *)
Evaluates the given string under a module binding in an isolated binding.
Definition: vm_eval.c:1769
int rb_num_to_uint(VALUE val, unsigned int *ret)
Definition: numeric.c:244
int siginterrupt(int, int)
int rb_grantpt(int fd)
Definition: signal.c:1597
void lcong48(unsigned short[7])
long double fmaxl(long double, long double)
char * __strcat_chk(char *, const char *, size_t)
void rb_define_hooked_variable(const char *, VALUE *, rb_gvar_getter_t *, rb_gvar_setter_t *)
Definition: variable.c:480
int setegid(gid_t __gid)
int int int int int int int char * _tempnam_r(struct _reent *, const char *, const char *)
unsigned int __uint32_t
VALUE rb_reg_init_str(VALUE re, VALUE s, int options)
Definition: re.c:2901
VALUE rb_each(VALUE)
Definition: vm_eval.c:1542
__blksize_t blksize_t
VALUE rb_ary_unshift(VALUE, VALUE)
Definition: array.c:1494
void rb_fd_term(rb_fdset_t *)
VALUE rb_obj_as_string(VALUE)
Definition: string.c:1440
double asinh(double)
Definition: acosh.c:52
const VALUE * argv
@ RUBY_NUM_ROUND_HALF_EVEN
@ RUBY_NUM_ROUND_HALF_DOWN
@ RUBY_NUM_ROUND_HALF_UP
@ RUBY_NUM_ROUND_DEFAULT
void rb_native_mutex_destroy(rb_nativethread_lock_t *lock)
__inline__ const char * __src
char * rb_str_to_cstr(VALUE str)
Definition: string.c:2284
void void ruby_xfree(void *)
Definition: gc.c:10183
int rb_ec_reset_raised(rb_execution_context_t *ec)
Definition: thread.c:2353
int char char int int int _dprintf_r(struct _reent *, int, const char *__restrict__,...) __attribute__((__format__(__printf__
VALUE rb_big_and(VALUE, VALUE)
Definition: bignum.c:6360
size_t _mbstowcs_r(struct _reent *, wchar_t *__restrict__, const char *__restrict__, size_t, _mbstate_t *)
rb_iseq_t * ISEQ
char * __utoa(unsigned, char *, int)
VALUE rb_fix_plus(VALUE x, VALUE y)
Definition: numeric.c:3609
int fstatat(int, const char *__restrict__, struct stat *__restrict__, int)
VALUE rb_method_entry_location(const rb_method_entry_t *me)
Definition: proc.c:2725
const VALUE * rb_vm_proc_local_ep(VALUE proc)
Definition: thread.c:648
struct sigevent sigevent_t
int mkfifo(const char *__path, mode_t __mode)
FILE * popen(const char *, const char *)
VALUE rb_get_path(VALUE)
Definition: file.c:230
_ssize_t ssize_t
int strverscmp(const char *, const char *)
VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception)
Definition: bignum.c:4246
VALUE rb_const_missing(VALUE klass, VALUE name)
Definition: variable.c:1694
uint32_t rb_event_flag_t
ssize_t cookie_write_function_t(void *__cookie, const char *__buf, size_t __n)
double cbrt(double)
Definition: cbrt.c:4
double tan(double)
VALUE rb_block_lambda(void)
Definition: proc.c:856
char * strtok(char *__restrict__, const char *__restrict__)
double sqrt(double)
int rb_arithmetic_sequence_extract(VALUE, rb_arithmetic_sequence_components_t *)
Definition: enumerator.c:3374
int nice(int __nice_value)
void rb_ary_free(VALUE)
Definition: array.c:786
unsigned alarm(unsigned __secs)
const char ruby_hexdigits[]
Definition: escape.c:5
void rb_mv_generic_ivar(VALUE src, VALUE dst)
Definition: variable.c:983
#define int
VALUE rb_ary_shift(VALUE)
Definition: array.c:1294
int int int int int int int int char char * asnprintf(char *__restrict__, size_t *__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
double y1(double)
char * _dtoa_r(struct _reent *, double, int, int, int *, int *, char **)
void rb_gc_copy_finalizer(VALUE, VALUE)
Definition: gc.c:3310
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline)
Definition: re.c:2953
#define RUBY_Qtrue
char * _strerror_r(struct _reent *, int, int, int *)
#define SIGEV_NONE
off_t ftello(FILE *)
VALUE rb_ivar_set(VALUE, ID, VALUE)
Definition: variable.c:1300
char * __ssp_real_fgets(char *__restrict__ __buf, int __len, FILE *__fp) __asm__("" "fgets")
long labs(long)
VALUE rb_ary_delete_at(VALUE, long)
Definition: array.c:3419
VALUE rb_require_safe(VALUE, int)
Definition: load.c:1128
float floorf(float)
VALUE rb_iseq_method_name(const rb_iseq_t *iseq)
Definition: iseq.c:1063
VALUE rb_yield_splat(VALUE)
Definition: vm_eval.c:1283
VALUE rb_int_divmod(VALUE x, VALUE y)
Definition: numeric.c:3968
int rb_method_boundp(VALUE, ID, int)
Definition: vm_method.c:1119
VALUE rb_iseq_disasm(const rb_iseq_t *iseq)
Definition: iseq.c:2278
char * rb_string_value_cstr(volatile VALUE *)
Definition: string.c:2291
__uint_least8_t uint_least8_t
float sinhf(float)
VALUE rb_marshal_dump(VALUE, VALUE)
Definition: marshal.c:2359
VALUE rb_iv_get(VALUE, const char *)
Definition: variable.c:3305
struct rb_method_refined_struct rb_method_refined_t
VALUE * rb_ruby_debug_ptr(void)
Definition: vm.c:3383
VALUE rb_reg_new_str(VALUE, int)
Definition: re.c:2895
void qsort_r(void *__base, size_t __nmemb, size_t __size, int(*_compar)(const void *, const void *, void *), void *__thunk)
_sig_func_ptr sig_t
const VALUE VALUE VALUE marker
void rb_scope_visibility_set(rb_method_visibility_t)
Definition: vm_method.c:1155
char * tempnam(const char *, const char *) __attribute__((__malloc__)) __attribute__((__warn_unused_result__))
int posix_openpt(int)
int timer_delete(timer_t timerid)
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt)
Definition: iseq.c:972
void rb_thread_fd_close(int)
Definition: thread.c:2385
int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func func, st_data_t arg)
Definition: hash.c:1651
int pthread_barrierattr_init(pthread_barrierattr_t *)
void rb_thread_sleep(int)
Definition: thread.c:1384
VALUE rb_yield_splat_kw(VALUE, int)
Definition: vm_eval.c:1296
#define ILL_BADSTK
rb_cref_t * rb_vm_cref_replace_with_duplicated_cref(void)
Definition: vm.c:1391
size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE)
Definition: gc.c:219
rb_ast_t * rb_parser_compile_string(VALUE, const char *, VALUE, int)
Definition: ripper.c:13054
void explicit_bzero(void *, size_t)
VALUE rb_big_uminus(VALUE x)
Definition: bignum.c:5554
int st_foreach_callback_func(st_data_t, st_data_t, st_data_t)
int pthread_barrier_destroy(pthread_barrier_t *)
void rb_thread_schedule(void)
Definition: thread.c:1407
imaxdiv_t imaxdiv(intmax_t __numer, intmax_t __denomer)
int char char int int int int _vfiprintf_r(struct _reent *, FILE *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
void rb_gc_writebarrier_remember(VALUE obj)
Definition: gc.c:6891
void rb_free_const_table(struct rb_id_table *tbl)
Definition: gc.c:2506
void rb_fiber_close(rb_fiber_t *fib)
Definition: cont.c:2071
VALUE rb_struct_alloc(VALUE, VALUE)
Definition: struct.c:724
int int int int int int int int char char int int int int int int siprintf(char *, const char *,...) __attribute__((__format__(__printf__
long long _strtoll_r(struct _reent *, const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
void Init_vm_objects(void)
Definition: vm.c:3326
signed char __int8_t
int rb_match_count(VALUE match)
Definition: re.c:1307
VALUE rb_thread_local_aset(VALUE, ID, VALUE)
Definition: thread.c:3363
void rb_undef_alloc_func(VALUE)
Definition: vm_method.c:729
struct timespec rb_time_timespec_interval(VALUE num)
Definition: time.c:2720
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
Definition: bignum.c:3215
unsigned long long strtoull(const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
VALUE rb_reg_match_last(VALUE)
Definition: re.c:1800
#define strcat(dst, src)
int execvp(const char *__file, char *const __argv[])
__int64_t __blkcnt_t
VALUE rb_range_new(VALUE, VALUE, int)
Definition: range.c:54
int rb_st_delete(st_table *, st_data_t *, st_data_t *)
VALUE rb_id_quote_unprintable(ID)
Definition: string.c:10735
st_table * rb_st_init_table(const struct st_hash_type *)
VALUE rb_ary_plus(VALUE, VALUE)
Definition: array.c:4000
int rpmatch(const char *response)
const struct kwtable * rb_reserved_word(const char *, unsigned int)
Definition: ripper.c:19383
char * _getenv_r(struct _reent *, const char *__string)
long rb_dbl_long_hash(double d)
Definition: hash.c:160
int killpg(pid_t, int)
int setpgrp(void)
int const void const char VALUE rb_iseq_eval(const rb_iseq_t *iseq)
Definition: vm.c:2163
rb_cref_t * rb_vm_cref(void)
Definition: vm.c:1384
if((__builtin_expect(!!(!me), 0)))
void rb_mem_clear(VALUE *, long)
Definition: array.c:243
rb_alloc_func_t rb_get_alloc_func(VALUE)
Definition: vm_method.c:735
VALUE rb_io_ungetbyte(VALUE, VALUE)
Definition: io.c:4280
VALUE rb_hash_aset(VALUE, VALUE, VALUE)
Definition: hash.c:2852
size_t fread(void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
void perror(const char *)
VALUE rb_gvar_getter_t(ID id, VALUE *data)
ID ruby_static_id_signo
Definition: eval.c:37
char * mktemp(char *) __attribute__((__deprecated__("the use of `mktemp' is dangerous
const rb_method_entry_t * rb_method_entry_at(VALUE obj, ID id)
Definition: vm_method.c:767
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:97
int rb_is_const_name(VALUE name)
Definition: symbol.c:1050
unsigned int __ULong
int rb_float_cmp(VALUE x, VALUE y)
Definition: numeric.c:1487
int char * _vasniprintf_r(struct _reent *, char *, size_t *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2354
int __ssp_real_ttyname_r(int __fd, char *__buf, size_t __len) __asm__("" "ttyname_r")
int int int int int int int int char char int int int int int int int int int char char int int int int int int int int vsniprintf(char *, size_t, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
int puts(const char *)
VALUE rb_big_odd_p(VALUE)
Definition: bignum.c:6831
long long strtoll(const char *__restrict__ __n, char **__restrict__ __end_PTR, int __base)
void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
int sched_get_priority_max(int __policy)
VALUE rb_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE)
Definition: vm_eval.c:1470
VALUE rb_env_clear(void)
Definition: hash.c:5628
int timer_getoverrun(timer_t timerid)
VALUE rb_complex_pow(VALUE base, VALUE exp)
Definition: complex.c:985
unsigned sleep(unsigned int __seconds)
int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp)
Definition: vm.c:2200
_Noreturn void quick_exit(int)
void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table)
Definition: builtin.c:39
long int lroundf(float)
VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval)
Definition: vm_backtrace.c:966
int rb_provided(const char *)
Definition: load.c:556
VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *)
Definition: array.c:748
#define RARRAY_EMBED_LEN_MASK
void rb_check_safe_obj(VALUE)
Definition: safe.c:136
FILE * _tmpfile_r(struct _reent *)
char * __itoa(int, char *, int)
VALUE rb_const_remove(VALUE, ID)
Definition: variable.c:2494
void * __memmove_chk(void *, void *, size_t, size_t)
int int int int int int int int char char int int int int int int int int int char char int int int int int viscanf(const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
rb_control_frame_t const VALUE * pc
void void void * ruby_xrealloc(void *, size_t) __attribute__((__returns_nonnull__)) __attribute__((alloc_size(2)))
Definition: gc.c:12038
double sin(double)
long long int llrintl(long double)
void mjit_remove_class_serial(rb_serial_t class_serial)
double gamma_r(double, int *)
VALUE rb_eval_string_protect(const char *, int *)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1737
#define rb_check_arity
VALUE rb_ary_includes(VALUE, VALUE)
Definition: array.c:4340
void rb_gc_mark_vm_stack_values(long n, const VALUE *values)
Definition: gc.c:4755
int timer_create(clockid_t clock_id, struct sigevent *__restrict__ evp, timer_t *__restrict__ timerid)
long rb_str_sublen(VALUE, long)
Definition: string.c:2463
void setkey(const char *__key)
long __suseconds_t
int ruby_cleanup(volatile int)
Destructs the VM.
Definition: eval.c:181
size_t _fwrite_r(struct _reent *, const void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
void rb_lastline_set(VALUE)
Definition: vm.c:1322
#define RB_IO_WAIT_READABLE
VALUE rb_struct_getmember(VALUE, ID)
Definition: struct.c:211
void rb_obj_call_init_kw(VALUE, int, const VALUE *, int)
Definition: eval.c:1688
int __ssp_real_getdomainname(char *__buf, size_t __len) __asm__("" "getdomainname")
char * _mktemp_r(struct _reent *, char *) __attribute__((__deprecated__("the use of `mktemp' is dangerous
VALUE rb_eval_cmd_kw(VALUE, VALUE, int)
Definition: vm_eval.c:1801
long double modfl(long double, long double *)
int _mbtowc_r(struct _reent *, wchar_t *__restrict__, const char *__restrict__, size_t, _mbstate_t *)
#define ILL_ILLTRP
int truncate(const char *, off_t __length)
VALUE rb_int_idiv(VALUE x, VALUE y)
Definition: numeric.c:3848
int int int int int int int int asiprintf(char **, const char *,...) __attribute__((__format__(__printf__
#define FPE_FLTOVF
VALUE rb_str2inum(VALUE, int)
Definition: bignum.c:4544
VALUE rb_io_binmode(VALUE)
Definition: io.c:5338
int int FILE * _open_memstream_r(struct _reent *, char **, size_t *)
unsigned long __fsfilcnt_t
void void * ruby_xcalloc(size_t, size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((alloc_size(1
@ VM_FRAME_FLAG_CFRAME_KW
@ VM_ENV_FLAG_WB_REQUIRED
@ VM_FRAME_FLAG_CFRAME_EMPTY_KW
@ VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM
VALUE rb_autoload_load(VALUE, ID)
Definition: variable.c:2226
#define RUBY_Qnil
void rb_parser_printf(struct parser_params *parser, const char *fmt,...) __attribute__((format(printf
VALUE rb_big2str(VALUE, int)
Definition: bignum.c:5091
VALUE rb_big_mul_balance(VALUE x, VALUE y)
Definition: bignum.c:1689
int pthread_attr_setschedparam(pthread_attr_t *, const struct sched_param *)
void * ruby_mimmalloc(size_t size) __attribute__((__malloc__))
Definition: gc.c:10220
int fgetc_unlocked(FILE *)
float y0f(float)
int pthread_condattr_getpshared(const pthread_condattr_t *, int *)
struct __pthread_mutex_t * pthread_mutex_t
rb_gvar_getter_t * rb_gvar_getter_function_of(const struct rb_global_entry *)
Definition: variable.c:702
#define FPE_FLTRES
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock)
Definition: thread.c:428
int rb_get_coverage_mode(void)
Definition: thread.c:5482
VALUE rb_ary_rassoc(VALUE, VALUE)
Definition: array.c:4189
VALUE rb_time_timespec_new(const struct timespec *, int)
Returns a time object with UTC/localtime/fixed offset.
Definition: time.c:2544
struct rb_global_vm_lock_struct rb_global_vm_lock_t
VALUE rb_get_values_at(VALUE, long, int, const VALUE *, VALUE(*)(VALUE, long))
Definition: array.c:3106
#define rb_data_object_wrap
VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body)
VALUE rb_int128t2big(__int128 n)
float erfcf(float)
intmax_t wcstoimax(const wchar_t *__restrict__, wchar_t **__restrict__, int)
int pthread_getschedparam(pthread_t, int *, struct sched_param *)
size_t strnlen(const char *, size_t)
__useconds_t useconds_t
long unsigned int __cpu_mask
unsigned long __sigset_t
int int int int int int int int char char int int int int int int int int sniprintf(char *, size_t, const char *,...) __attribute__((__format__(__printf__
ID rb_id_attrset(ID)
Definition: symbol.c:98
void rewind(FILE *)
long unsigned int __uint64_t
clock_t clock(void)
#define rb_utf8_str_new(str, len)
VALUE rb_reg_new_ary(VALUE ary, int options)
Definition: re.c:2927
char * fgets_unlocked(char *__restrict__, int, FILE *__restrict__)
VALUE rb_blocking_function_t(void *)
void rb_mark_set(struct st_table *)
Definition: gc.c:4814
int rb_find_file_ext(VALUE *, const char *const *)
Definition: file.c:6291
int euidaccess(const char *__path, int __mode)
int flsl(long) __attribute__((__const__))
VALUE * rb_iseq_original_iseq(const rb_iseq_t *iseq)
Definition: compile.c:778
float nexttowardf(float, long double)
int str2sig(const char *__restrict__, int *__restrict__)
VALUE rb_big_abs(VALUE x)
Definition: bignum.c:6762
struct __locale_t * locale_t
size_t rb_ary_memsize(VALUE)
Definition: array.c:816
int setlinebuf(FILE *)
@ VM_DEFINECLASS_TYPE_CLASS
@ VM_DEFINECLASS_TYPE_MASK
@ VM_DEFINECLASS_TYPE_MODULE
@ VM_DEFINECLASS_TYPE_SINGLETON_CLASS
void _Exit(int __status) __attribute__((__noreturn__))
VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int)
Definition: proc.c:2296
FILE * _freopen_r(struct _reent *, const char *__restrict__, const char *__restrict__, FILE *__restrict__)
void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval)
Definition: vm_trace.c:1262
int rb_cloexec_dup(int oldfd)
Definition: io.c:318
int atexit(void(*__func)(void))
void rb_call_inits(void)
Definition: inits.c:19
VALUE rb_gvar_set(struct rb_global_entry *, VALUE)
Definition: variable.c:654
int char char int int int int int int int _vfscanf_r(struct _reent *, FILE *__restrict__, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__scanf__
#define rb_data_object_make
VALUE rb_ary_behead(VALUE, long)
Definition: array.c:1369
const char * ruby_signal_name(int)
Definition: signal.c:310
int grantpt(int)
VALUE rb_attr_delete(VALUE, ID)
Definition: variable.c:1126
float tanhf(float)
VALUE rb_sym_to_proc(VALUE sym)
Definition: proc.c:1312
int fcloseall(void)
void ruby_sig_finalize(void)
Definition: signal.c:1470
void rb_mark_hash(struct st_table *)
Definition: gc.c:4878
int pthread_attr_setstack(pthread_attr_t *, void *, size_t)
void * rb_register_sigaltstack(void)
rb_iseq_t * rb_iseq_new_top(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent)
Definition: iseq.c:769
int _remove_r(struct _reent *, const char *)
VALUE rb_home_dir_of(VALUE user, VALUE result)
Definition: file.c:3536
float copysignf(float, float)
void ruby_default_signal(int)
Definition: signal.c:402
void rb_define_method_id(VALUE, ID, VALUE(*)(), int)
__inline__ size_t __size
int rand(void)
VALUE rb_f_global_variables(void)
Definition: variable.c:728
VALUE rb_str_dup(VALUE)
Definition: string.c:1516
double asin(double)
void rb_big_resize(VALUE big, size_t len)
Definition: bignum.c:2989
VALUE rb_sprintf(const char *,...) __attribute__((format(printf
unsigned char u_char
VALUE rb_file_expand_path(VALUE, VALUE)
Definition: file.c:4039
ssize_t __getdelim(char **, size_t *, int, FILE *)
#define RVALUE_EMBED_LEN_MAX
VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int), VALUE, VALUE)
Definition: thread.c:5074
VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *)
Definition: enumerator.c:525
VALUE rb_binding_new(void)
Definition: proc.c:364
float coshf(float)
int putc(int, FILE *)
st_index_t rb_str_hash(VALUE)
Definition: string.c:3163
int renameat2(int, const char *, int, const char *, unsigned int)
int __isnand(double)
VALUE rb_warning_string(const char *fmt,...) __attribute__((format(printf
void mjit_cont_free(struct mjit_cont *cont)
long double sinhl(long double)
int int int int _sniprintf_r(struct _reent *, char *, size_t, const char *,...) __attribute__((__format__(__printf__
int sigaddset(sigset_t *, const int)
VALUE rb_get_path_no_checksafe(VALUE)
Definition: file.c:224
int _getchar_unlocked_r(struct _reent *)
int select(int __n, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout)
unsigned long ID
float atoff(const char *__nptr)
rb_control_frame_t * __attribute__((__fastcall__)) *rb_insn_func_t)(rb_execution_context_t *
int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *)
void mjit_add_class_serial(rb_serial_t class_serial)
size_t _fread_r(struct _reent *, void *__restrict__, size_t _size, size_t _n, FILE *__restrict__)
VALUE rb_struct_define_under(VALUE, const char *,...)
Definition: struct.c:446
long double acoshl(long double)
VALUE rb_mod_remove_cvar(VALUE, VALUE)
Definition: variable.c:3284
int char char * _asnprintf_r(struct _reent *, char *__restrict__, size_t *__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
int chown(const char *__path, uid_t __owner, gid_t __group)
int _fscanf_r(struct _reent *, FILE *__restrict__, const char *__restrict__,...) __attribute__((__format__(__scanf__
VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags)
Definition: bignum.c:4041
void rb_vm_trap_exit(rb_vm_t *vm)
Definition: signal.c:1060
int mblen(const char *, size_t)
int chdir(const char *__path)
VALUE rb_reg_alloc(void)
Definition: re.c:2889
void _perror_r(struct _reent *, const char *)
__nlink_t nlink_t
VALUE rb_yield(VALUE)
Definition: vm_eval.c:1237
rb_event_flag_t ruby_vm_event_enabled_global_flags
Definition: vm.c:376
int rb_keyword_given_p(void)
Definition: eval.c:911
void arc4random_buf(void *, size_t)
void rb_match_unbusy(VALUE)
Definition: re.c:1301
int rb_signal_buff_size(void)
Definition: signal.c:726
const char *void rb_warning(const char *,...) __attribute__((format(printf
VALUE rb_struct_lookup(VALUE s, VALUE idx)
Definition: struct.c:1101
VALUE rb_get_path_check_to_string(VALUE)
Definition: file.c:196
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
Definition: marshal.c:134
struct rb_iseq_location_struct rb_iseq_location_t
VALUE rb_obj_is_mutex(VALUE obj)
Definition: thread_sync.c:131
VALUE rb_eval_cmd(VALUE, VALUE, int)
Definition: vm_eval.c:1824
double exp(double)
VALUE rb_wb_protected_newobj_of(VALUE, VALUE)
Definition: gc.c:2294
size_t st_index_t h
#define rb_fstring_cstr(str)
void setprogname(const char *)
#define ILL_COPROC
char * __strcpy_chk(char *, const char *, size_t)
rb_ast_t * rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line)
Definition: ripper.c:13060
int sched_get_priority_min(int __policy)
long int lrintf(float)
int _mkstemp_r(struct _reent *, char *)
#define rb_ary_new_from_args(n,...)
int pthread_attr_getstacksize(const pthread_attr_t *, size_t *)
VALUE ID id
long strtol_l(const char *__restrict__, char **__restrict__, int, locale_t)
VALUE rb_hash_clear(VALUE)
Definition: hash.c:2769
const rb_iseq_t const VALUE exc
VALUE rb_proc_times(VALUE)
int tcsetpgrp(int __fildes, pid_t __pgrp_id)
int char char int _asprintf_r(struct _reent *, char **__restrict__, const char *__restrict__,...) __attribute__((__format__(__printf__
__mode_t mode_t
void rb_objspace_free(struct rb_objspace *)
Definition: gc.c:1615
long double floorl(long double)
VALUE rb_float_minus(VALUE x, VALUE y)
Definition: numeric.c:1048
int pthread_equal(pthread_t, pthread_t)
rb_gvar_setter_t rb_gvar_undef_setter
void mjit_mark(void)
#define __size_t
VALUE rb_big_mul_normal(VALUE x, VALUE y)
Definition: bignum.c:1561
VALUE rb_big_plus(VALUE, VALUE)
Definition: bignum.c:5824
void rb_thread_execute_interrupts(VALUE th)
Definition: thread.c:2283
rb_gvar_getter_t rb_gvar_val_getter
ID rb_intern_str(VALUE str)
Definition: symbol.c:666
int vdprintf(int, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg)
Definition: vm.c:2302
void Init_BareVM(void)
Definition: vm.c:3303
const rb_callable_method_entry_t * rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class)
Definition: vm_method.c:415
void rb_define_method(VALUE, const char *, VALUE(*)(), int)
VALUE rb_public_const_get_from(VALUE klass, ID id)
Definition: variable.c:2403
VALUE rb_autoload_p(VALUE, ID)
Definition: variable.c:2285
char * fgets(char *__restrict__, int, FILE *__restrict__)
long sysconf(int __name)
void Init_File(void)
Definition: file.c:6456
size_t __ssp_real_fread(void *__restrict__ __ptr, size_t __size, size_t __n, FILE *__restrict__ __fp) __asm__("" "fread")
#define rb_tainted_str_new_cstr(str)
long long llabs(long long)
VALUE rb_str_length(VALUE)
Definition: string.c:1843
int clearenv(void)
int getdtablesize(void)
void rb_clear_method_cache_by_class(VALUE)
Definition: vm_method.c:93
int ruby_native_thread_p(void)
Definition: thread.c:5276
VALUE rb_get_expanded_load_path(void)
Definition: load.c:97
void rb_fd_zero(rb_fdset_t *)
rb_method_definition_t * rb_method_definition_create(rb_method_type_t type, ID mid)
Definition: vm_method.c:348
int pthread_setname_np(pthread_t, const char *) __attribute__((__nonnull__(2)))
double _erand48_r(struct _reent *, unsigned short[3])
unsigned long __clockid_t
int unlinkat(int, const char *, int)
float fmaxf(float, float)
struct __pthread_t * pthread_t
VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n)
Definition: vm_backtrace.c:720
int rb_encdb_alias(const char *alias, const char *orig)
Definition: encoding.c:565
long _atol_r(struct _reent *, const char *__nptr)
VALUE(* rb_alloc_func_t)(VALUE)
rb_serial_t ruby_vm_global_method_state
Definition: vm.c:379
int pthread_mutexattr_destroy(pthread_mutexattr_t *)
float j1f(float)
char * strptime_l(const char *__restrict__, const char *__restrict__, struct tm *__restrict__, locale_t)
int pthread_yield(void)
double erf(double)
Definition: erf.c:71
int execve(const char *__path, char *const __argv[], char *const __envp[])
VALUE rb_iseq_realpath(const rb_iseq_t *iseq)
Definition: iseq.c:1033
VALUE rb_stdout
char * ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve)
st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me)
Definition: vm_method.c:1592
void free(void *)
int fputs(const char *__restrict__, FILE *__restrict__)
int sigprocmask(int, const sigset_t *, sigset_t *)
void rb_syswait(pid_t pid)
VALUE rb_make_backtrace(void)
Definition: vm_backtrace.c:872
void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line)
Definition: vm_trace.c:1252
VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
void rb_backref_set(VALUE)
Definition: vm.c:1310
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:119
VALUE rb_str_opt_plus(VALUE, VALUE)
Definition: string.c:1925
int rb_encdb_replicate(const char *alias, const char *orig)
Definition: encoding.c:450
void * __memcpy_chk(void *, const void *, size_t, size_t)
VALUE rb_current_realfilepath(void)
Definition: vm_eval.c:2462
struct st_table * rb_ivar_generic_ivtbl(void)
Definition: variable.c:803
double scalbn(double, int)
int rb_backtrace_iter_func(void *, VALUE, int, VALUE)
void __ssp_real_explicit_bzero(void *__buf, size_t __len) __asm__("" "explicit_bzero")
void rb_cv_set(VALUE, const char *, VALUE)
Definition: variable.c:3142
int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval)
Definition: iseq.c:3262
void pthread_testcancel(void)
VALUE rb_hash_new(void)
Definition: hash.c:1523
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:306
size_t __ssp_real_wcstombs(char *__buf, const wchar_t *__src, size_t __len) __asm__("" "wcstombs")
void rb_backtrace(void)
Definition: vm_backtrace.c:829
int char char int int int int int int int int int int _vprintf_r(struct _reent *, const char *__restrict__, __gnuc_va_list) __attribute__((__format__(__printf__
void rb_execution_context_update(const rb_execution_context_t *ec)
Definition: vm.c:2474
void funlockfile(FILE *)
void rb_ast_delete_node(rb_ast_t *, NODE *n)
Definition: node.c:1227
VALUE rb_rational_canonicalize(VALUE x)
Definition: rational.c:2046
int daemon(int nochdir, int noclose)
int pthread_attr_setscope(pthread_attr_t *, int)
int rb_block_min_max_arity(int *max)
Definition: proc.c:1178
VALUE rb_struct_new(VALUE,...)
Definition: struct.c:730
#define stpncpy(dst, src, len)
int _rename_r(struct _reent *, const char *_old, const char *_new)
void _srand48_r(struct _reent *, long)
VALUE rb_mod_name(VALUE)
Definition: variable.c:102
@ VM_CHECKMATCH_TYPE_RESCUE
@ VM_CHECKMATCH_TYPE_CASE
@ VM_CHECKMATCH_TYPE_WHEN
void qsort(void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar)
int rb_uv_to_utf8(char[6], unsigned long)
Definition: pack.c:1651
void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE)
Definition: st.c:2379
ssize_t pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset)
float pow10f(float)
VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv)
Definition: cont.c:2117
void rb_execution_context_mark(const rb_execution_context_t *ec)
Definition: vm.c:2502
#define rb_str_new_cstr(str)
int int FILE * _fmemopen_r(struct _reent *, void *__restrict__, size_t, const char *__restrict__)
size_t rb_gc_count(void)
Definition: gc.c:8727
struct rb_mjit_compile_info * rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body)
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict)
Definition: file.c:4430
long double erfcl(long double)
struct mjit_cont * mjit_cont_new(rb_execution_context_t *ec)
struct rb_cref_struct rb_cref_t
int int int int int int int int char char int int int int int int int int int char char int int int vfiscanf(FILE *, const char *, __gnuc_va_list) __attribute__((__format__(__scanf__
VALUE VALUE rb_vsprintf(const char *, va_list)
Definition: sprintf.c:1191
struct iseq_catch_table_entry entries[]
void * rb_parser_realloc(struct parser_params *, void *, size_t)
Definition: ripper.c:19563
char * getcwd(char *__buf, size_t __size)
st_table * rb_st_init_numtable(void)
VALUE rb_rational_den(VALUE rat)
Definition: rational.c:1978
long int __int64_t
const char * rb_class2name(VALUE)
Definition: variable.c:280
int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line)
Definition: iseq.c:3206
VALUE rb_str_succ(VALUE)
Definition: string.c:4090
int cookie_seek_function_t(void *__cookie, _off64_t *__off, int __whence)
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd)
Definition: thread.c:1594
struct rb_call_info * CALL_INFO
double j0(double)
VALUE rb_sym_intern_ascii(const char *ptr, long len)
Definition: symbol.c:1032
st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never)
int mbtowc(wchar_t *__restrict__, const char *__restrict__, size_t)
float fdimf(float, float)
long fpathconf(int __fd, int __name)
VALUE rb_rational_mul(VALUE self, VALUE other)
Definition: rational.c:874
VALUE rb_search_class_path(VALUE)
Definition: variable.c:175
void rb_ary_store(VALUE, long, VALUE)
Definition: array.c:1079
VALUE rb_catch_obj(VALUE, rb_block_call_func_t, VALUE)
Definition: vm_eval.c:2332
VALUE rb_funcallv_public(VALUE, ID, int, const VALUE *)
Calls a method.
Definition: vm_eval.c:980
#define ILL_ILLOPN
int rb_sourceline(void)
Definition: vm.c:1346
int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *)
int rb_is_local_name(VALUE name)
Definition: symbol.c:1068
long double fdiml(long double, long double)
void rb_st_clear(st_table *)
__loff_t loff_t
void rb_timespec_now(struct timespec *)
Definition: time.c:1873
int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval)
Definition: hash.c:2017
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock)
Definition: thread.c:434
long double lgammal(long double)
char * strerror_l(int, locale_t)
void rb_postponed_job_flush(rb_vm_t *vm)
Definition: vm_trace.c:1662
int pthread_rwlock_timedwrlock(pthread_rwlock_t *, const struct timespec *)
void rb_reset_coverages(void)
Definition: thread.c:5503
VALUE rb_usascii_str_new_static(const char *, long)
Definition: string.c:878
long lrand48(void)
VALUE rb_mutex_lock(VALUE mutex)
Definition: thread_sync.c:333
size_t ruby_stack_length(VALUE **)
Definition: gc.c:4647
VALUE rb_int_plus(VALUE x, VALUE y)
Definition: numeric.c:3615
st_table * rb_init_identtable(void)
Definition: hash.c:4286
int int int int int int int int char char int int int int int int int int int char * vasniprintf(char *, size_t *, const char *, __gnuc_va_list) __attribute__((__format__(__printf__
_ssize_t write(int __fd, const void *__buf, size_t __nbyte)
VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat)
Definition: vm_eval.c:265
VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck)
Definition: bignum.c:4274
char * getlogin(void)
Definition: win32.c:911
__uint16_t u_int16_t
int pthread_timedjoin_np(pthread_t, void **, const struct timespec *)
#define ILL_PRVOPC
void swab(const void *__restrict__, void *__restrict__, ssize_t)
VALUE rb_obj_instance_variables(VALUE)
Definition: variable.c:1579
rb_method_entry_t * rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def)
Definition: vm_method.c:397
VALUE rb_int_gt(VALUE x, VALUE y)
Definition: numeric.c:4257
long double logl(long double)
VALUE rb_numeric_quo(VALUE x, VALUE y)
Definition: rational.c:2026
int sigaction(int, const struct sigaction *, struct sigaction *)
VALUE rb_f_require(VALUE, VALUE)
Definition: load.c:853
VALUE rb_call_super(int, const VALUE *)
Definition: vm_eval.c:306
VALUE rb_ary_assoc(VALUE, VALUE)
Definition: array.c:4156
VALUE rb_big_divrem_gmp(VALUE x, VALUE y)
float atanf(float)
VALUE rb_ary_aref1(VALUE ary, VALUE i)
Definition: array.c:1595
double drand48(void)
long signed int _ssize_t
void ruby_set_stack_size(size_t)
void __cygwin_lock_fini(_LOCK_T *)
int setdtablesize(int)
#define FPE_FLTDIV
off_t lseek(int __fildes, off_t __offset, int __whence)
VALUE rb_int_succ(VALUE num)
Definition: numeric.c:3326
#define SI_USER
VALUE rb_big_le(VALUE x, VALUE y)
Definition: bignum.c:5507
long jrand48(unsigned short[3])
int sched_setaffinity(pid_t, size_t, const cpu_set_t *)
int _wctomb_r(struct _reent *, char *, wchar_t, _mbstate_t *)
unsigned long rb_num_t
int mkdir(const char *_path, mode_t __mode)
double log(double)
VALUE rb_ary_entry(VALUE, long)
Definition: array.c:1512
int * __signgam(void)
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj)
Definition: variable.c:3022
signed char int_fast8_t
int fflush(FILE *)
int rb_const_defined(VALUE, ID)
Definition: variable.c:2686
long double logbl(long double)
#define CLD_CONTINUED
unsigned short * _seed48_r(struct _reent *, unsigned short[3])
int pthread_getconcurrency(void)
void mjit_gc_start_hook(void)
int rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp)
int ruby_safe_level_2_error(void) __attribute__((error("$SAFE
float pow10l(float)
_ssize_t read(int __fd, void *__buf, size_t __nbyte)
char * ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve)
char * strndup(const char *, size_t) __attribute__((__malloc__)) __attribute__((__warn_unused_result__))
void * rb_parser_load_file(VALUE parser, VALUE name)
Definition: ruby.c:2206
rb_gvar_getter_t rb_gvar_var_getter
void rb_thread_start_timer_thread(void)
Definition: thread.c:4430
#define getchar_unlocked()
pthread_t rb_nativethread_id_t
VALUE rb_file_dirname(VALUE fname)
Definition: file.c:4666
#define RSTRING_EMBED_LEN_MASK
#define stpcpy(dst, src)
double jn(int, double)
VALUE mjit_resume(void)
long jmp_buf[32]
VALUE rb_struct_s_keyword_init(VALUE klass)
Definition: struct.c:52
int pthread_continue(pthread_t)
struct rb_method_alias_struct rb_method_alias_t
NODE * ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node)
Definition: debug.c:125
int gethostname(char *__name, size_t __len)
int fls(int) __attribute__((__const__))
void * rawmemchr(const void *, int)
#define SI_MESGQ
VALUE rb_proc_alloc(VALUE klass)
Definition: proc.c:145
VALUE rb_complex_imag(VALUE z)
Definition: complex.c:743
void _tzset_r(struct _reent *)
char * asctime_r(const struct tm *__restrict__, char *__restrict__)
long double tgammal(long double)
#define CLD_DUMPED
ID rb_to_id(VALUE)
Definition: string.c:11146
int pthread_condattr_getclock(const pthread_condattr_t *, clockid_t *)
VALUE mjit_pause(_Bool wait_p)
VALUE rb_int_mul(VALUE x, VALUE y)
Definition: numeric.c:3704
void * ruby_xmalloc(size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__((alloc_size(1)))
Definition: gc.c:12008
int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t)
void rb_vm_inc_const_missing_count(void)
Definition: vm.c:386
int isnanl(long double)
int rb_dvar_defined(ID, const struct rb_iseq_struct *)
ID ruby_static_id_status
int rresvport(int *__alport)
void rb_mark_tbl_no_pin(struct st_table *)
Definition: gc.c:5027
struct rb_objspace * rb_objspace_alloc(void)
Definition: gc.c:1600
char * strsep(char **, const char *)
int sigpause(int) __asm__("" "__xpg_sigpause")
VALUE rb_default_home_dir(VALUE result)
Definition: file.c:3576
VALUE rb_default_rs
Definition: intern.h:586
float exp10f(float)
_sig_func_ptr sigset(int, _sig_func_ptr)
VALUE rb_data_object_zalloc(VALUE, size_t, RUBY_DATA_FUNC, RUBY_DATA_FUNC)
void rb_set_safe_level_force(int)
Definition: safe.c:38
ruby_robject_flags
Definition: ruby.h:915
void rb_secure_update(VALUE)
Definition: safe.c:116
long rb_num2long(VALUE)
Definition: numeric.c:2854
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
VALUE rb_float_new_in_heap(double)
Definition: numeric.c:895
ruby_rarray_flags
Definition: ruby.h:1027
unsigned short rb_fix2ushort(VALUE)
Definition: numeric.c:3074
unsigned long rb_num2ulong(VALUE)
Definition: numeric.c:2923
ruby_rvalue_flags
Definition: ruby.h:909
short rb_fix2short(VALUE)
Definition: numeric.c:3055
ruby_rstring_flags
Definition: ruby.h:977
short rb_num2short(VALUE)
Definition: numeric.c:3046
ruby_fl_type
Definition: ruby.h:841
ruby_rmodule_flags
Definition: ruby.h:954
unsigned short rb_num2ushort(VALUE)
Definition: numeric.c:3064
void rb_insecure_operation(void)
Definition: safe.c:122
rb_atomic_t cnt[RUBY_NSIG]
Definition: signal.c:503
#define f
st_index_t rb_st_hash_start(st_index_t h)
Definition: st.c:2069
char * sys_errlist[]
int sys_nerr
#define const
Definition: strftime.c:103
size_t rb_str_capacity(VALUE str)
Definition: string.c:712
_ssize_t(* _read)(struct _reent *, void *, char *, size_t)
_ssize_t(* _write)(struct _reent *, void *, const char *, size_t)
_fpos64_t(* _seek64)(struct _reent *, void *, _fpos64_t, int)
unsigned char * _up
unsigned char _nbuf[1]
int(* _close)(struct _reent *, void *)
unsigned char * _p
_fpos_t(* _seek)(struct _reent *, void *, _fpos_t, int)
struct _reent * _data
unsigned char _ubuf[3]
unsigned char _ubuf[3]
struct __sbuf _lb
_ssize_t(* _read)(struct _reent *, void *, char *, size_t)
unsigned char * _p
_fpos_t(* _seek)(struct _reent *, void *, _fpos_t, int)
struct __sbuf _bf
unsigned char * _up
struct __sbuf _ub
unsigned char _nbuf[1]
_ssize_t(* _write)(struct _reent *, void *, const char *, size_t)
struct _reent * _data
int(* _close)(struct _reent *, void *)
unsigned char * _base
struct _Bigint * _next
void(* _fns[32])(void)
struct _atexit * _next
struct _uc_xmmreg xmm[16]
__uint32_t padding[24]
struct _uc_fpxreg st[8]
struct _glue * _next
struct _pthread_cleanup_handler * next
unsigned short _add
unsigned short _mult[3]
unsigned short _seed[3]
struct _rand48 _r48
struct _reent::@8::@9 _reent
_mbstate_t _wcrtomb_state
_mbstate_t _mbrlen_state
struct __tm _localtime_buf
struct _glue __sglue
_mbstate_t _mblen_state
unsigned int _unused_rand
_mbstate_t _mbtowc_state
union _reent::@8 _new
_mbstate_t _wctomb_state
unsigned int _nmalloc[30]
_mbstate_t _wcsrtombs_state
struct _atexit _atexit0
__extension__ unsigned long long _rand_next
struct _Bigint * _p5s
_mbstate_t _mbrtowc_state
struct _Bigint * _result
void(* __cleanup)(struct _reent *)
struct __locale_t * _locale
_mbstate_t _mbsrtowcs_state
struct _Bigint ** _freelist
struct _atexit * _atexit
struct _reent::@8::@10 _unused
unsigned char * _nextf[30]
void(** _sig_func)(int)
__uint16_t significand[4]
const VALUE v2
void(* func)(void)
const VALUE v1
const VALUE value
union MEMO::@33 u3
Definition: ruby.h:1048
unsigned int * digits
struct RBasic basic
union RBignum::@27 as
struct RBignum::@27::@28 heap
unsigned int ary[(8 *RVALUE_EMBED_LEN_MAX/4)]
rb_classext_t * ptr
rb_serial_t class_serial
struct RBasic basic
struct RBasic basic
Definition: ruby.h:1139
Definition: ruby.h:1134
struct RBasic basic
struct RBasic basic
struct ar_table_struct * ar
ar_hint_t ary[8]
union RHash::@29 as
const VALUE ifnone
union RHash::@30 ar_hint
rb_code_location_t nd_loc
struct rb_args_info * args
union RNode::@39 u2
struct rb_ary_pattern_info * apinfo
union RNode::@40 u3
struct RNode * node
struct rb_global_entry * entry
union RNode::@38 u1
Definition: ruby.h:922
Definition: ruby.h:1112
Definition: ruby.h:988
struct RStruct::@31::@32 heap
struct RBasic basic
const VALUE * ptr
const VALUE ary[RSTRUCT_EMBED_LEN_MAX]
union RStruct::@31 as
const struct rb_call_info_kw_arg * kw_arg
const unsigned char * bin
cookie_read_function_t * read
cookie_seek_function_t * seek
cookie_write_function_t * write
cookie_close_function_t * close
__fd_mask __fds_bits[(((64)+((((int) sizeof(__fd_mask) *8)) - 1))/(((int) sizeof(__fd_mask) *8)))]
catch_type
@ CATCH_TYPE_BREAK
rb_iseq_t * iseq
unsigned int cont
enum iseq_catch_table_entry::catch_type type
unsigned int start
unsigned int end
unsigned int sp
struct iseq_compile_data_storage * next
struct iseq_compile_data_ensure_node_stack * ensure_node_stack
const struct rb_builtin_function * builtin_function_table
const rb_compile_option_t * option
struct iseq_compile_data_storage * storage_current
const rb_iseq_t * current_block
struct iseq_compile_data::@60 node
struct iseq_compile_data_storage * storage_head
struct rb_id_table * ivar_cache_table
struct iseq_label_data * start_label
struct iseq_label_data * end_label
struct iseq_label_data * redo_label
const rb_cref_t * ic_cref
rb_serial_t ic_serial
VALUE value
size_t index
rb_serial_t ic_serial
int line_no
rb_event_flag_t events
struct timespec it_interval
struct timespec it_value
Definition: lex.c:34
struct list_node n
struct list_node * next
struct list_node * prev
long long int quot
long long int rem
long double __max_align_ld __attribute__((__aligned__(__alignof__(long double))))
long long __max_align_ll __attribute__((__aligned__(__alignof__(long long))))
struct native_thread_data_struct::@43 cond
union native_thread_data_struct::@42 node
Definition: gc.c:90
node_buffer_t * node_buffer
struct rb_at_exit_list * next
rb_vm_at_exit_func * func
unsigned short first_lineno
const struct rb_block block
union rb_block::@54 as
struct rb_captured_block captured
enum rb_block_type type
enum method_missing_reason method_missing_reason
const struct rb_callable_method_entry_struct * me
rb_serial_t class_serial[(64 - sizeof(rb_serial_t) - sizeof(struct rb_callable_method_entry_struct *) - sizeof(uintptr_t) - sizeof(enum method_missing_reason) - sizeof(VALUE(*)(struct rb_execution_context_struct *e, struct rb_control_frame_struct *, struct rb_calling_info *, const struct rb_call_data *)))/sizeof(rb_serial_t)]
union rb_call_cache::@37 aux
VALUE(* call)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
struct rb_call_info ci
struct rb_call_cache cc
struct rb_call_info_kw_arg * kw_arg
ID called_id
VALUE flags
struct rb_method_definition_struct *const def
const VALUE defined_class
const VALUE owner
const struct vm_ifunc * ifunc
union rb_captured_block::@53 code
rb_subclass_entry_t ** parent_subclasses
rb_subclass_entry_t ** module_subclasses
In the case that this is an ICLASS, module_subclasses points to the link in the module's subclasses l...
struct st_table * iv_index_tbl
struct rb_id_table * m_tbl
struct rb_id_table * const_tbl
rb_subclass_entry_t * subclasses
struct rb_id_table * callable_m_tbl
VALUE value
rb_const_flag_t flag
VALUE file
int line
CREF (Class REFerence)
const rb_scope_visibility_t scope_visi
struct rb_cref_struct * next
VALUE(* e_proc)(VALUE)
VALUE marker
VALUE data2
struct rb_ensure_entry entry
struct rb_ensure_list * next
struct rb_execarg::@34::@36 cmd
union rb_execarg::@34 invoke
struct waitpid_state * waitpid_state
struct rb_execarg::@34::@35 sh
enum method_missing_reason method_missing_reason
struct rb_thread_struct * thread_ptr
struct rb_execution_context_struct::@55 machine
struct rb_vm_protect_tag * protect_tag
struct rb_trace_arg_struct * trace_arg
ID id
struct rb_global_variable * var
rb_nativethread_cond_t switch_wait_cond
const struct rb_thread_struct * owner
rb_nativethread_cond_t switch_cond
const struct rb_thread_struct * timer
struct rb_event_hook_struct * hooks
struct rb_imemo_tmpbuf_struct * next
Definition: io.h:66
const struct iseq_insn_info_entry * body
struct rb_iseq_constant_body::iseq_insn_info insns_info
enum rb_iseq_constant_body::iseq_type type
struct rb_iseq_constant_body::@45 param
union iseq_inline_storage_entry * is_entries
const struct rb_iseq_constant_body::@45::rb_iseq_param_keyword * keyword
VALUE(* jit_func)(struct rb_execution_context_struct *, struct rb_control_frame_struct *)
struct rb_iseq_constant_body::@45::@47 flags
struct rb_call_data * call_data
struct iseq_catch_table * catch_table
const struct rb_iseq_struct * parent_iseq
struct rb_iseq_constant_body::@46 variable
struct rb_iseq_struct * local_iseq
struct rb_mjit_unit * jit_unit
void(* func)(rb_iseq_t *, struct iseq_link_anchor *, const void *)
struct rb_hook_list_struct * local_hooks
struct rb_iseq_constant_body * body
struct iseq_compile_data * compile_data
union rb_iseq_struct::@48 aux
struct rb_iseq_struct::@48::@49 loader
rb_event_flag_t global_trace_events
struct rb_iseq_struct::@48::@50 exec
struct rb_call_info_with_kwarg ci_kw
struct rb_method_entry_struct * original_me
struct rb_hook_list_struct * hooks
VALUE(* invoker)(VALUE recv, int argc, const VALUE *argv, VALUE(*func)())
enum method_optimized_type optimize_type
union rb_method_definition_struct::@41 body
struct rb_method_definition_struct *const def
ID called_id
VALUE flags
VALUE defined_class
VALUE owner
rb_iseq_t * iseqptr
iseq pointer, should be separated from iseqval
rb_cref_t * cref
class reference, should be marked
struct rb_method_entry_struct * orig_me
struct rb_objspace::@145 flags
unsigned int is_from_method
rb_method_visibility_t method_visi
rb_subclass_entry_t * next
VALUE klass
struct rb_thread_list_struct * next
struct rb_thread_struct * th
rb_execution_context_t * ec
native_thread_data_t native_thread_data
struct rb_calling_info * calling
unsigned int pending_interrupt_queue_checked
enum rb_thread_status status
rb_nativethread_id_t thread_id
rb_nativethread_lock_t interrupt_lock
struct rb_mutex_struct * keeping_mutexes
rb_thread_list_t * join_list
const rb_control_frame_t * cfp
rb_execution_context_t * ec
rb_unblock_function_t * func
struct rb_vm_protect_tag * prev
struct st_table * loaded_features_index
struct rb_objspace * objspace
rb_at_exit_list * at_exit
rb_global_vm_lock_t gvl
const struct rb_thread_struct * running_thread
struct st_table * ensure_rollback_table
struct st_table * loading_table
short redefined_flag[BOP_LAST_]
rb_nativethread_lock_t waitpid_lock
struct rb_thread_struct * main_thread
struct list_head waiting_fds
const struct rb_builtin_function * builtin_function_table
rb_hook_list_t global_hooks
struct list_head waiting_pids
struct list_head workqueue
struct rb_postponed_job_struct * postponed_job_buffer
const VALUE special_exceptions[ruby_special_error_count]
struct rb_vm_struct::@51 trap_list
struct rb_vm_struct::@52 default_params
struct list_head waiting_grps
unsigned int thread_report_on_exception
rb_nativethread_lock_t workqueue_lock
unsigned int thread_abort_on_exception
struct list_head living_threads
struct rb_vm_tag * prev
enum ruby_tag_type state
void(* sa_sigaction)(int, siginfo_t *, void *)
_sig_func_ptr sa_handler
void(* sigev_notify_function)(sigval_t)
pthread_attr_t * sigev_notify_attributes
unsigned int si_overrun
st_index_t(* hash)(st_data_t)
int(* compare)(st_data_t, st_data_t)
Definition: st.c:136
unsigned char bin_power
st_table_entry * entries
unsigned int rebuilds_num
st_index_t entries_bound
unsigned char entry_power
const struct st_hash_type * type
unsigned char size_ind
st_index_t entries_start
timestruc_t st_mtim
blksize_t st_blksize
timestruc_t st_atim
timestruc_t st_birthtim
timestruc_t st_ctim
const char * tm_zone
IFUNC (Internal FUNCtion)
struct vm_ifunc_argc argc
rb_block_call_func_t func
SVAR (Special VARiable)
const VALUE lastline
const VALUE cref_or_me
class reference or rb_method_entry_t
const struct rb_control_frame_struct * catch_frame
int rb_is_global_id(ID id)
Definition: symbol.c:866
int rb_is_instance_id(ID id)
Definition: symbol.c:872
int rb_is_junk_id(ID id)
Definition: symbol.c:890
int rb_is_const_id(ID id)
Definition: symbol.c:854
int rb_is_attrset_sym(VALUE sym)
Definition: symbol.c:902
int rb_is_class_id(ID id)
Definition: symbol.c:860
int rb_is_attrset_id(ID id)
Definition: symbol.c:878
int rb_is_local_id(ID id)
Definition: symbol.c:884
int rb_is_const_sym(VALUE sym)
Definition: symbol.c:896
Definition: dtoa.c:290
struct iseq_inline_storage_entry::@44 once
struct iseq_inline_iv_cache_entry iv_cache
VALUE value
struct rb_thread_struct * running_thread
struct iseq_inline_cache_entry cache
MJIT_FUNC_EXPORTED void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id)
Definition: variable.c:2307
VALUE rb_mod_const_missing(VALUE klass, VALUE name)
Definition: variable.c:1739
void rb_iter_break(void)
Definition: vm.c:1546
void rb_vm_jump_tag_but_local_jump(int state)
Definition: vm.c:1510
VALUE rb_vm_top_self(void)
Definition: vm.c:3349
MJIT_FUNC_EXPORTED void rb_vm_localjump_error(const char *mesg, VALUE value, int reason)
Definition: vm.c:1471
st_table * rb_vm_fstring_table(void)
Definition: vm.c:3394
void rb_iter_break_value(VALUE val)
Definition: vm.c:1552
MJIT_FUNC_EXPORTED int rb_dtrace_setup(rb_execution_context_t *ec, VALUE klass, ID id, struct ruby_dtrace_method_hook_args *args)
Definition: vm.c:392
MJIT_FUNC_EXPORTED const rb_callable_method_entry_t * rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me)
Definition: vm_method.c:996
rb_control_frame_t *FUNC_FASTCALL rb_insn_func_t(rb_execution_context_t *, rb_control_frame_t *)
Definition: vm_core.h:1143
void rb_throw(const char *tag, VALUE val)
Definition: vm_eval.c:2220
void rb_throw_obj(VALUE tag, VALUE value)
Definition: vm_eval.c:2195
rb_control_frame_t *FUNC_FASTCALL() rb_vm_opt_struct_aset(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
MJIT_STATIC void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
Definition: vm_insnhelper.c:67
MJIT_STATIC void rb_error_arity(int argc, int min, int max)
rb_control_frame_t *FUNC_FASTCALL() rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
MJIT_STATIC bool rb_simple_iseq_p(const rb_iseq_t *iseq)
MJIT_FUNC_EXPORTED void rb_vm_search_method_slowpath(struct rb_call_data *cd, VALUE klass)
bool rb_method_basic_definition_p_with_cc(struct rb_call_data *cd, VALUE klass, ID mid)
Definition: vm_method.c:2074
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Definition: vm_method.c:120
#define env