w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

vm.c
Go to the documentation of this file.
1 /*
2 ** vm.c - virtual machine for mruby
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #include <stddef.h>
8 #include <stdarg.h>
9 #ifndef MRB_NO_FLOAT
10 #include <math.h>
11 #endif
12 #include <mruby.h>
13 #include <mruby/array.h>
14 #include <mruby/class.h>
15 #include <mruby/hash.h>
16 #include <mruby/irep.h>
17 #include <mruby/numeric.h>
18 #include <mruby/proc.h>
19 #include <mruby/range.h>
20 #include <mruby/string.h>
21 #include <mruby/variable.h>
22 #include <mruby/error.h>
23 #include <mruby/opcode.h>
24 #include "value_array.h"
25 #include <mruby/throw.h>
26 #include <mruby/dump.h>
27 #include <mruby/presym.h>
28 
29 #ifdef MRB_NO_STDIO
30 #if defined(__cplusplus)
31 extern "C" {
32 #endif
33 void abort(void);
34 #if defined(__cplusplus)
35 } /* extern "C" { */
36 #endif
37 #endif
38 
39 #define STACK_INIT_SIZE 128
40 #define CALLINFO_INIT_SIZE 32
41 
42 /* Define amount of linear stack growth. */
43 #ifndef MRB_STACK_GROWTH
44 #define MRB_STACK_GROWTH 128
45 #endif
46 
47 /* Maximum mrb_funcall() depth. Should be set lower on memory constrained systems. */
48 #ifndef MRB_FUNCALL_DEPTH_MAX
49 #define MRB_FUNCALL_DEPTH_MAX 512
50 #endif
51 
52 /* Maximum stack depth. Should be set lower on memory constrained systems.
53 The value below allows about 60000 recursive calls in the simplest case. */
54 #ifndef MRB_STACK_MAX
55 #define MRB_STACK_MAX (0x40000 - MRB_STACK_GROWTH)
56 #endif
57 
58 #ifdef VM_DEBUG
59 # define DEBUG(x) (x)
60 #else
61 # define DEBUG(x)
62 #endif
63 
64 
65 #ifndef MRB_GC_FIXED_ARENA
66 static void
68 {
69  mrb_gc *gc = &mrb->gc;
70  int capa = gc->arena_capa;
71 
72  if (idx < capa / 4) {
73  capa >>= 2;
74  if (capa < MRB_GC_ARENA_SIZE) {
75  capa = MRB_GC_ARENA_SIZE;
76  }
77  if (capa != gc->arena_capa) {
78  gc->arena = (struct RBasic**)mrb_realloc(mrb, gc->arena, sizeof(struct RBasic*)*capa);
79  gc->arena_capa = capa;
80  }
81  }
82 }
83 #else
84 #define mrb_gc_arena_shrink(mrb,idx)
85 #endif
86 
87 #define CALL_MAXARGS 127
88 
90 
91 static inline void
92 stack_clear(mrb_value *from, size_t count)
93 {
94 #ifdef MRB_NAN_BOXING
95  while (count-- > 0) {
96  SET_NIL_VALUE(*from);
97  from++;
98  }
99 #else
100  memset(from, 0, sizeof(mrb_value)*count);
101 #endif
102 }
103 
104 static inline void
106 {
107  memcpy(dst, src, sizeof(mrb_value)*size);
108 }
109 
110 static void
112 {
113  struct mrb_context *c = mrb->c;
114 
115  /* mrb_assert(mrb->stack == NULL); */
116  c->stbase = (mrb_value *)mrb_calloc(mrb, STACK_INIT_SIZE, sizeof(mrb_value));
117  c->stend = c->stbase + STACK_INIT_SIZE;
118 
119  /* mrb_assert(ci == NULL); */
120  c->cibase = (mrb_callinfo *)mrb_calloc(mrb, CALLINFO_INIT_SIZE, sizeof(mrb_callinfo));
121  c->ciend = c->cibase + CALLINFO_INIT_SIZE;
122  c->ci = c->cibase;
123  c->ci->u.target_class = mrb->object_class;
124  c->ci->stack = c->stbase;
125 }
126 
127 static inline void
128 envadjust(mrb_state *mrb, mrb_value *oldbase, mrb_value *newbase, size_t oldsize)
129 {
130  mrb_callinfo *ci = mrb->c->cibase;
131 
132  if (newbase == oldbase) return;
133  while (ci <= mrb->c->ci) {
134  struct REnv *e = mrb_vm_ci_env(ci);
135  mrb_value *st;
136 
137  if (e && MRB_ENV_ONSTACK_P(e) &&
138  (st = e->stack) && oldbase <= st && st < oldbase+oldsize) {
139  ptrdiff_t off = e->stack - oldbase;
140 
141  e->stack = newbase + off;
142  }
143 
144  if (ci->proc && MRB_PROC_ENV_P(ci->proc) && e != MRB_PROC_ENV(ci->proc)) {
145  e = MRB_PROC_ENV(ci->proc);
146 
147  if (e && MRB_ENV_ONSTACK_P(e) &&
148  (st = e->stack) && oldbase <= st && st < oldbase+oldsize) {
149  ptrdiff_t off = e->stack - oldbase;
150 
151  e->stack = newbase + off;
152  }
153  }
154 
155  ci->stack = newbase + (ci->stack - oldbase);
156  ci++;
157  }
158 }
159 
160 /** def rec ; $deep =+ 1 ; if $deep > 1000 ; return 0 ; end ; rec ; end */
161 
162 static void
164 {
165  mrb_value *oldbase = mrb->c->stbase;
166  mrb_value *newstack;
167  size_t oldsize = mrb->c->stend - mrb->c->stbase;
168  size_t size = oldsize;
169  size_t off = mrb->c->ci->stack ? mrb->c->stend - mrb->c->ci->stack : 0;
170 
171  if (off > size) size = off;
172 #ifdef MRB_STACK_EXTEND_DOUBLING
173  if ((size_t)room <= size)
174  size *= 2;
175  else
176  size += room;
177 #else
178  /* Use linear stack growth.
179  It is slightly slower than doubling the stack space,
180  but it saves memory on small devices. */
181  if (room <= MRB_STACK_GROWTH)
183  else
184  size += room;
185 #endif
186 
187  newstack = (mrb_value *)mrb_realloc_simple(mrb, mrb->c->stbase, sizeof(mrb_value) * size);
188  if (newstack == NULL) {
190  }
191  stack_clear(&(newstack[oldsize]), size - oldsize);
192  envadjust(mrb, oldbase, newstack, oldsize);
193  mrb->c->stbase = newstack;
194  mrb->c->stend = mrb->c->stbase + size;
195 
196  /* Raise an exception if the new stack size will be too large,
197  to prevent infinite recursion. However, do this only after resizing the stack, so mrb_raise has stack space to work with. */
198  if (size > MRB_STACK_MAX) {
200  }
201 }
202 
203 MRB_API void
205 {
206  if (!mrb->c->ci->stack || mrb->c->ci->stack + room >= mrb->c->stend) {
207  stack_extend_alloc(mrb, room);
208  }
209 }
210 
211 static inline struct REnv*
213 {
214  const struct RProc *proc = mrb->c->ci->proc;
215  struct REnv *e;
216 
217  while (up--) {
218  proc = proc->upper;
219  if (!proc) return NULL;
220  }
221  e = MRB_PROC_ENV(proc);
222  if (e) return e; /* proc has enclosed env */
223  else {
224  mrb_callinfo *ci = mrb->c->ci;
225  mrb_callinfo *cb = mrb->c->cibase;
226 
227  while (cb <= ci) {
228  if (ci->proc == proc) {
229  return mrb_vm_ci_env(ci);
230  }
231  ci--;
232  }
233  }
234  return NULL;
235 }
236 
237 static inline const struct RProc*
238 top_proc(mrb_state *mrb, const struct RProc *proc)
239 {
240  while (proc->upper) {
242  return proc;
243  proc = proc->upper;
244  }
245  return proc;
246 }
247 
248 #define CI_ACC_SKIP -1
249 #define CI_ACC_DIRECT -2
250 #define CI_ACC_RESUMED -3
251 
252 static inline mrb_callinfo*
253 cipush(mrb_state *mrb, mrb_int push_stacks, mrb_int acc,
254  struct RClass *target_class, const struct RProc *proc, mrb_sym mid, mrb_int argc)
255 {
256  struct mrb_context *c = mrb->c;
257  mrb_callinfo *ci = c->ci;
258 
259  if (ci + 1 == c->ciend) {
260  ptrdiff_t size = ci - c->cibase;
261 
262  c->cibase = (mrb_callinfo *)mrb_realloc(mrb, c->cibase, sizeof(mrb_callinfo)*size*2);
263  c->ci = c->cibase + size;
264  c->ciend = c->cibase + size * 2;
265  }
266  ci = ++c->ci;
267  ci->mid = mid;
269  ci->stack = ci[-1].stack + push_stacks;
270  ci->argc = (int16_t)argc;
271  ci->acc = (int16_t)acc;
272  ci->u.target_class = target_class;
273 
274  return ci;
275 }
276 
277 void
279 {
280  if (e == NULL) return;
281  else {
282  size_t len = (size_t)MRB_ENV_LEN(e);
283  mrb_value *p;
284 
285  if (!MRB_ENV_ONSTACK_P(e)) return;
286  if (e->cxt != mrb->c) return;
287  if (e == mrb_vm_ci_env(mrb->c->cibase)) return; /* for mirb */
288  p = (mrb_value *)mrb_malloc(mrb, sizeof(mrb_value)*len);
289  if (len > 0) {
290  stack_copy(p, e->stack, len);
291  }
292  e->stack = p;
293  MRB_ENV_CLOSE(e);
294  mrb_write_barrier(mrb, (struct RBasic *)e);
295  }
296 }
297 
298 static inline mrb_callinfo*
300 {
301  struct mrb_context *c = mrb->c;
302  struct REnv *env = mrb_vm_ci_env(c->ci);
303 
304  c->ci--;
305  if (env) mrb_env_unshare(mrb, env);
306  return c->ci;
307 }
308 
309 void mrb_exc_set(mrb_state *mrb, mrb_value exc);
310 static mrb_value mrb_run(mrb_state *mrb, const struct RProc* proc, mrb_value self);
311 
312 #ifndef MRB_FUNCALL_ARGC_MAX
313 #define MRB_FUNCALL_ARGC_MAX 16
314 #endif
315 
317 mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, mrb_int argc, ...)
318 {
320  va_list ap;
321  mrb_int i;
323 
324  if (argc > MRB_FUNCALL_ARGC_MAX) {
325  mrb_raise(mrb, E_ARGUMENT_ERROR, "Too long arguments. (limit=" MRB_STRINGIZE(MRB_FUNCALL_ARGC_MAX) ")");
326  }
327 
328  va_start(ap, argc);
329  for (i = 0; i < argc; i++) {
330  argv[i] = va_arg(ap, mrb_value);
331  }
332  va_end(ap);
333  return mrb_funcall_argv(mrb, self, mid, argc, argv);
334 }
335 
338 {
340  va_list ap;
341  mrb_int i;
342 
343  if (argc > MRB_FUNCALL_ARGC_MAX) {
344  mrb_raise(mrb, E_ARGUMENT_ERROR, "Too long arguments. (limit=" MRB_STRINGIZE(MRB_FUNCALL_ARGC_MAX) ")");
345  }
346 
347  va_start(ap, argc);
348  for (i = 0; i < argc; i++) {
349  argv[i] = va_arg(ap, mrb_value);
350  }
351  va_end(ap);
352  return mrb_funcall_argv(mrb, self, mid, argc, argv);
353 }
354 
355 static mrb_int
357 {
358  const struct RProc *p;
359  mrb_int n = 0;
360 
361  if (!ci) return 3;
362  p = ci->proc;
363  if (!p) {
364  if (ci->argc < 0) return 3;
365  return ci->argc+2;
366  }
367  if (!MRB_PROC_CFUNC_P(p) && p->body.irep) {
368  n = p->body.irep->nregs;
369  }
370  if (ci->argc < 0) {
371  if (n < 3) n = 3; /* self + args + blk */
372  }
373  if (ci->argc > n) {
374  n = ci->argc + 2; /* self + blk */
375  }
376  return n;
377 }
378 
381 {
382  mrb_value val;
383  int ai = mrb_gc_arena_save(mrb);
384 
385  if (!mrb->jmp) {
386  struct mrb_jmpbuf c_jmp;
387  ptrdiff_t nth_ci = mrb->c->ci - mrb->c->cibase;
388 
389  MRB_TRY(&c_jmp) {
390  mrb->jmp = &c_jmp;
391  /* recursive call */
392  val = mrb_funcall_with_block(mrb, self, mid, argc, argv, blk);
393  mrb->jmp = 0;
394  }
395  MRB_CATCH(&c_jmp) { /* error */
396  while (nth_ci < (mrb->c->ci - mrb->c->cibase)) {
397  cipop(mrb);
398  }
399  mrb->jmp = 0;
400  val = mrb_obj_value(mrb->exc);
401  }
402  MRB_END_EXC(&c_jmp);
403  mrb->jmp = 0;
404  }
405  else {
406  mrb_method_t m;
407  struct RClass *c;
408  mrb_callinfo *ci;
409  mrb_int n = ci_nregs(mrb->c->ci);
410  ptrdiff_t voff = -1;
411 
412  if (!mrb->c->stbase) {
413  stack_init(mrb);
414  }
415  if (argc < 0) {
416  mrb_raisef(mrb, E_ARGUMENT_ERROR, "negative argc for funcall (%i)", argc);
417  }
418  c = mrb_class(mrb, self);
419  m = mrb_method_search_vm(mrb, &c, mid);
420  if (MRB_METHOD_UNDEF_P(m)) {
421  mrb_sym missing = MRB_SYM(method_missing);
423  m = mrb_method_search_vm(mrb, &c, missing);
424  if (MRB_METHOD_UNDEF_P(m)) {
425  mrb_method_missing(mrb, mid, self, args);
426  }
428  mrb_stack_extend(mrb, n+2);
429  mrb->c->ci->stack[n+1] = args;
430  argc = -1;
431  }
432  if (mrb->c->ci - mrb->c->cibase > MRB_FUNCALL_DEPTH_MAX) {
434  }
435  ci = cipush(mrb, n, 0, c, NULL, mid, argc);
436  if (argc < 0) argc = 1;
437  if (mrb->c->stbase <= argv && argv < mrb->c->stend) {
438  voff = argv - mrb->c->stbase;
439  }
440  if (argc >= CALL_MAXARGS) {
442 
443  mrb->c->ci->stack[1] = args;
444  ci->argc = -1;
445  argc = 1;
446  }
447  mrb_stack_extend(mrb, argc + 2);
448  if (MRB_METHOD_PROC_P(m)) {
449  struct RProc *p = MRB_METHOD_PROC(m);
450 
451  mrb_vm_ci_proc_set(ci, p);
452  if (!MRB_PROC_CFUNC_P(p)) {
453  mrb_stack_extend(mrb, p->body.irep->nregs + argc);
454  }
455  }
456  if (voff >= 0) {
457  argv = mrb->c->stbase + voff;
458  }
459  mrb->c->ci->stack[0] = self;
460  if (ci->argc > 0) {
461  stack_copy(mrb->c->ci->stack+1, argv, argc);
462  }
463  mrb->c->ci->stack[argc+1] = blk;
464 
465  if (MRB_METHOD_CFUNC_P(m)) {
466  ci->acc = CI_ACC_DIRECT;
467  val = MRB_METHOD_CFUNC(m)(mrb, self);
468  cipop(mrb);
469  }
470  else {
471  ci->acc = CI_ACC_SKIP;
472  val = mrb_run(mrb, MRB_METHOD_PROC(m), self);
473  }
474  }
475  mrb_gc_arena_restore(mrb, ai);
476  mrb_gc_protect(mrb, val);
477  return val;
478 }
479 
482 {
483  return mrb_funcall_with_block(mrb, self, mid, argc, argv, mrb_nil_value());
484 }
485 
486 mrb_value
488 {
489  mrb_callinfo *ci = mrb->c->ci;
490  mrb_int keep, nregs;
491 
492  mrb->c->ci->stack[0] = self;
493  mrb_vm_ci_proc_set(ci, p);
494  if (MRB_PROC_CFUNC_P(p)) {
495  return MRB_PROC_CFUNC(p)(mrb, self);
496  }
497  nregs = p->body.irep->nregs;
498  if (ci->argc < 0) keep = 3;
499  else keep = ci->argc + 2;
500  if (nregs < keep) {
501  mrb_stack_extend(mrb, keep);
502  }
503  else {
504  mrb_stack_extend(mrb, nregs);
505  stack_clear(mrb->c->ci->stack+keep, nregs-keep);
506  }
507 
508  cipush(mrb, 0, 0, NULL, NULL, 0, 0);
509 
510  return self;
511 }
512 
513 /* 15.3.1.3.4 */
514 /* 15.3.1.3.44 */
515 /*
516  * call-seq:
517  * obj.send(symbol [, args...]) -> obj
518  * obj.__send__(symbol [, args...]) -> obj
519  *
520  * Invokes the method identified by _symbol_, passing it any
521  * arguments specified. You can use <code>__send__</code> if the name
522  * +send+ clashes with an existing method in _obj_.
523  *
524  * class Klass
525  * def hello(*args)
526  * "Hello " + args.join(' ')
527  * end
528  * end
529  * k = Klass.new
530  * k.send :hello, "gentle", "readers" #=> "Hello gentle readers"
531  */
532 mrb_value
534 {
535  mrb_sym name;
536  mrb_value block, *regs;
537  const mrb_value *argv;
538  mrb_int argc, i, len;
539  mrb_method_t m;
540  struct RClass *c;
541  mrb_callinfo *ci;
542 
543  mrb_get_args(mrb, "n*&", &name, &argv, &argc, &block);
544  ci = mrb->c->ci;
545  if (ci->acc < 0) {
546  funcall:
547  return mrb_funcall_with_block(mrb, self, name, argc, argv, block);
548  }
549 
550  c = mrb_class(mrb, self);
551  m = mrb_method_search_vm(mrb, &c, name);
552  if (MRB_METHOD_UNDEF_P(m)) { /* call method_mising */
553  goto funcall;
554  }
555 
556  ci->mid = name;
557  ci->u.target_class = c;
558  regs = mrb->c->ci->stack+1;
559  /* remove first symbol from arguments */
560  if (ci->argc >= 0) {
561  for (i=0,len=ci->argc; i<len; i++) {
562  regs[i] = regs[i+1];
563  }
564  ci->argc--;
565  }
566  else { /* variable length arguments */
567  regs[0] = mrb_ary_subseq(mrb, regs[0], 1, RARRAY_LEN(regs[0]) - 1);
568  }
569 
570  if (MRB_METHOD_CFUNC_P(m)) {
571  if (MRB_METHOD_PROC_P(m)) {
573  }
574  return MRB_METHOD_CFUNC(m)(mrb, self);
575  }
576  return mrb_exec_irep(mrb, self, MRB_METHOD_PROC(m));
577 }
578 
579 static mrb_value
580 eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
581 {
582  struct RProc *p;
583  mrb_callinfo *ci;
584  int nregs;
585 
586  if (mrb_nil_p(blk)) {
587  mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
588  }
589  ci = mrb->c->ci;
590  if (ci->acc == CI_ACC_DIRECT) {
591  return mrb_yield_with_class(mrb, blk, 1, &self, self, c);
592  }
593  ci->u.target_class = c;
594  p = mrb_proc_ptr(blk);
595  mrb_vm_ci_proc_set(ci, p);
596  ci->argc = 1;
597  ci->mid = ci[-1].mid;
598  if (MRB_PROC_CFUNC_P(p)) {
599  mrb_stack_extend(mrb, 3);
600  mrb->c->ci->stack[0] = self;
601  mrb->c->ci->stack[1] = self;
602  mrb->c->ci->stack[2] = mrb_nil_value();
603  return MRB_PROC_CFUNC(p)(mrb, self);
604  }
605  nregs = p->body.irep->nregs;
606  if (nregs < 3) nregs = 3;
607  mrb_stack_extend(mrb, nregs);
608  mrb->c->ci->stack[0] = self;
609  mrb->c->ci->stack[1] = self;
610  stack_clear(mrb->c->ci->stack+2, nregs-2);
611  ci = cipush(mrb, 0, 0, NULL, NULL, 0, 0);
612 
613  return self;
614 }
615 
616 /* 15.2.2.4.35 */
617 /*
618  * call-seq:
619  * mod.class_eval {| | block } -> obj
620  * mod.module_eval {| | block } -> obj
621  *
622  * Evaluates block in the context of _mod_. This can
623  * be used to add methods to a class. <code>module_eval</code> returns
624  * the result of evaluating its argument.
625  */
626 mrb_value
628 {
629  mrb_value a, b;
630 
631  if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
632  mrb_raise(mrb, E_NOTIMP_ERROR, "module_eval/class_eval with string not implemented");
633  }
634  return eval_under(mrb, mod, b, mrb_class_ptr(mod));
635 }
636 
637 /* 15.3.1.3.18 */
638 /*
639  * call-seq:
640  * obj.instance_eval {| | block } -> obj
641  *
642  * Evaluates the given block,within the context of the receiver (_obj_).
643  * In order to set the context, the variable +self+ is set to _obj_ while
644  * the code is executing, giving the code access to _obj_'s
645  * instance variables. In the version of <code>instance_eval</code>
646  * that takes a +String+, the optional second and third
647  * parameters supply a filename and starting line number that are used
648  * when reporting compilation errors.
649  *
650  * class KlassWithSecret
651  * def initialize
652  * @secret = 99
653  * end
654  * end
655  * k = KlassWithSecret.new
656  * k.instance_eval { @secret } #=> 99
657  */
658 mrb_value
660 {
661  mrb_value a, b;
662 
663  if (mrb_get_args(mrb, "|S&", &a, &b) == 1) {
664  mrb_raise(mrb, E_NOTIMP_ERROR, "instance_eval with string not implemented");
665  }
666  return eval_under(mrb, self, b, mrb_singleton_class_ptr(mrb, self));
667 }
668 
671 {
672  struct RProc *p;
673  mrb_sym mid = mrb->c->ci->mid;
674  mrb_callinfo *ci;
675  mrb_value val;
676  mrb_int n;
677 
678  if (mrb_nil_p(b)) {
679  mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
680  }
681  ci = mrb->c->ci;
682  n = ci_nregs(ci);
683  if (ci - mrb->c->cibase > MRB_FUNCALL_DEPTH_MAX) {
685  }
686  p = mrb_proc_ptr(b);
687  ci = cipush(mrb, n, CI_ACC_SKIP, c, p, mid, 0 /* dummy */);
688  if (argc >= CALL_MAXARGS) {
689  ci->argc = -1;
690  n = 3;
691  }
692  else {
693  ci->argc = (int)argc;
694  n = argc + 2;
695  }
696  mrb_stack_extend(mrb, n);
697  mrb->c->ci->stack[0] = self;
698  if (ci->argc < 0) {
699  mrb->c->ci->stack[1] = mrb_ary_new_from_values(mrb, argc, argv);
700  argc = 1;
701  }
702  else if (argc > 0) {
703  stack_copy(mrb->c->ci->stack+1, argv, argc);
704  }
705  mrb->c->ci->stack[argc+1] = mrb_nil_value();
706 
707  if (MRB_PROC_CFUNC_P(p)) {
708  val = MRB_PROC_CFUNC(p)(mrb, self);
709  cipop(mrb);
710  }
711  else {
712  val = mrb_run(mrb, p, self);
713  }
714  return val;
715 }
716 
719 {
720  struct RProc *p = mrb_proc_ptr(b);
721 
723 }
724 
727 {
728  struct RProc *p = mrb_proc_ptr(b);
729 
730  return mrb_yield_with_class(mrb, b, 1, &arg, MRB_PROC_ENV(p)->stack[0], MRB_PROC_TARGET_CLASS(p));
731 }
732 
733 mrb_value
735 {
736  struct RProc *p;
737  mrb_callinfo *ci;
738 
739  if (mrb_nil_p(b)) {
740  mrb_raise(mrb, E_ARGUMENT_ERROR, "no block given");
741  }
742  if (!mrb_proc_p(b)) {
743  mrb_raise(mrb, E_TYPE_ERROR, "not a block");
744  }
745 
746  p = mrb_proc_ptr(b);
747  ci = mrb->c->ci;
748 
749  mrb_stack_extend(mrb, 3);
750  mrb->c->ci->stack[1] = mrb_ary_new_from_values(mrb, argc, argv);
751  mrb->c->ci->stack[2] = mrb_nil_value();
752  ci->argc = -1;
753  return mrb_exec_irep(mrb, self, p);
754 }
755 
756 static struct RBreak*
758 {
759  struct RBreak *brk;
760 
761  brk = (struct RBreak*)mrb_obj_alloc(mrb, MRB_TT_BREAK, NULL);
762  mrb_break_proc_set(brk, p);
763  mrb_break_value_set(brk, val);
764  mrb_break_tag_set(brk, tag);
765 
766  return brk;
767 }
768 
769 #define MRB_CATCH_FILTER_RESCUE (UINT32_C(1) << MRB_CATCH_RESCUE)
770 #define MRB_CATCH_FILTER_ENSURE (UINT32_C(1) << MRB_CATCH_ENSURE)
771 #define MRB_CATCH_FILTER_ALL (MRB_CATCH_FILTER_RESCUE | MRB_CATCH_FILTER_ENSURE)
772 
773 static const struct mrb_irep_catch_handler *
775 {
776  const mrb_irep *irep;
777  ptrdiff_t xpc;
778  size_t cnt;
779  const struct mrb_irep_catch_handler *e;
780 
781 /* The comparison operators use `>` and `<=` because pc already points to the next instruction */
782 #define catch_cover_p(pc, beg, end) ((pc) > (ptrdiff_t)(beg) && (pc) <= (ptrdiff_t)(end))
783 
784  if (ci->proc == NULL || MRB_PROC_CFUNC_P(ci->proc)) return NULL;
785  irep = ci->proc->body.irep;
786  if (irep->clen < 1) return NULL;
787  xpc = pc - irep->iseq;
788  /* If it retry at the top level, pc will be 0, so check with -1 as the start position */
789  mrb_assert(catch_cover_p(xpc, -1, irep->ilen));
790  if (!catch_cover_p(xpc, -1, irep->ilen)) return NULL;
791 
792  /* Currently uses a simple linear search to avoid processing complexity. */
793  cnt = irep->clen;
794  e = mrb_irep_catch_handler_table(irep) + cnt - 1;
795  for (; cnt > 0; cnt --, e --) {
796  if (((UINT32_C(1) << e->type) & filter) &&
798  return e;
799  }
800  }
801 
802 #undef catch_cover_p
803 
804  return NULL;
805 }
806 
807 typedef enum {
812 
813 static void
815 {
816  char kind_str[3][7] = { "return", "break", "yield" };
817  char kind_str_len[] = { 6, 5, 5 };
818  static const char lead[] = "unexpected ";
819  mrb_value msg;
820  mrb_value exc;
821 
822  msg = mrb_str_new_capa(mrb, sizeof(lead) + 7);
823  mrb_str_cat(mrb, msg, lead, sizeof(lead) - 1);
824  mrb_str_cat(mrb, msg, kind_str[kind], kind_str_len[kind]);
826  mrb_exc_set(mrb, exc);
827 }
828 
829 static void
831 {
832  mrb_value exc;
833  mrb_value str;
834  mrb_int argc = mrb->c->ci->argc;
835 
836  if (argc < 0) {
837  mrb_value args = mrb->c->ci->stack[1];
838  if (mrb_array_p(args)) {
839  argc = RARRAY_LEN(args);
840  }
841  }
842  if (mrb->c->ci->mid) {
843  str = mrb_format(mrb, "'%n': wrong number of arguments (%i for %i)",
844  mrb->c->ci->mid, argc, num);
845  }
846  else {
847  str = mrb_format(mrb, "wrong number of arguments (%i for %i)", argc, num);
848  }
849  exc = mrb_exc_new_str(mrb, E_ARGUMENT_ERROR, str);
850  mrb_exc_set(mrb, exc);
851 }
852 
853 static mrb_bool
855 {
856  return (brk != NULL && brk->tt == MRB_TT_BREAK) ? TRUE : FALSE;
857 }
858 
859 static void
861 {
862  if (break_tag_p((struct RBreak*)mrb->exc, tag)) {
863  mrb_break_tag_set((struct RBreak*)mrb->exc, tag);
864  }
865  else {
866  mrb->exc = (struct RObject*)break_new(mrb, tag, proc, val);
867  }
868 }
869 
870 #define THROW_TAGGED_BREAK(mrb, tag, proc, val) \
871  do { \
872  prepare_tagged_break(mrb, tag, proc, val); \
873  goto L_CATCH_TAGGED_BREAK; \
874  } while (0)
875 
876 #define UNWIND_ENSURE(mrb, ci, pc, tag, proc, val) \
877  do { \
878  ch = catch_handler_find(mrb, ci, pc, MRB_CATCH_FILTER_ENSURE); \
879  if (ch) { \
880  THROW_TAGGED_BREAK(mrb, tag, proc, val); \
881  } \
882  } while (0)
883 
884 /*
885  * CHECKPOINT_RESTORE(tag) {
886  * This part is executed when jumping by the same "tag" of RBreak (it is not executed the first time).
887  * Write the code required (initialization of variables, etc.) for the subsequent processing.
888  * }
889  * CHECKPOINT_MAIN(tag) {
890  * This part is always executed.
891  * }
892  * CHECKPOINT_END(tag);
893  *
894  * ...
895  *
896  * // Jump to CHECKPOINT_RESTORE with the same "tag".
897  * goto CHECKPOINT_LABEL_MAKE(tag);
898  */
899 
900 #define CHECKPOINT_LABEL_MAKE(tag) L_CHECKPOINT_ ## tag
901 
902 #define CHECKPOINT_RESTORE(tag) \
903  do { \
904  if (FALSE) { \
905  CHECKPOINT_LABEL_MAKE(tag): \
906  do {
907 
908 #define CHECKPOINT_MAIN(tag) \
909  } while (0); \
910  } \
911  do {
912 
913 #define CHECKPOINT_END(tag) \
914  } while (0); \
915  } while (0)
916 
917 #ifdef MRB_USE_DEBUG_HOOK
918 #define CODE_FETCH_HOOK(mrb, irep, pc, regs) if ((mrb)->code_fetch_hook) (mrb)->code_fetch_hook((mrb), (irep), (pc), (regs));
919 #else
920 #define CODE_FETCH_HOOK(mrb, irep, pc, regs)
921 #endif
922 
923 #ifdef MRB_BYTECODE_DECODE_OPTION
924 #define BYTECODE_DECODER(x) ((mrb)->bytecode_decoder)?(mrb)->bytecode_decoder((mrb), (x)):(x)
925 #else
926 #define BYTECODE_DECODER(x) (x)
927 #endif
928 
929 #ifndef MRB_NO_DIRECT_THREADING
930 #if defined __GNUC__ || defined __clang__ || defined __INTEL_COMPILER
931 #define DIRECT_THREADED
932 #endif
933 #endif /* ifndef MRB_NO_DIRECT_THREADING */
934 
935 #ifndef DIRECT_THREADED
936 
937 #define INIT_DISPATCH for (;;) { insn = BYTECODE_DECODER(*pc); CODE_FETCH_HOOK(mrb, irep, pc, regs); switch (insn) {
938 #define CASE(insn,ops) case insn: pc++; FETCH_ ## ops (); mrb->c->ci->pc = pc;
939 #define NEXT goto L_END_DISPATCH
940 #define JUMP NEXT
941 #define END_DISPATCH L_END_DISPATCH:;}}
942 
943 #else
944 
945 #define INIT_DISPATCH JUMP; return mrb_nil_value();
946 #define CASE(insn,ops) L_ ## insn: pc++; FETCH_ ## ops (); mrb->c->ci->pc = pc;
947 #define NEXT insn=BYTECODE_DECODER(*pc); CODE_FETCH_HOOK(mrb, irep, pc, regs); goto *optable[insn]
948 #define JUMP NEXT
949 
950 #define END_DISPATCH
951 
952 #endif
953 
955 mrb_vm_run(mrb_state *mrb, const struct RProc *proc, mrb_value self, mrb_int stack_keep)
956 {
957  const mrb_irep *irep = proc->body.irep;
959  struct mrb_context *c = mrb->c;
960  ptrdiff_t cioff = c->ci - c->cibase;
961  mrb_int nregs = irep->nregs;
962 
963  if (!c->stbase) {
964  stack_init(mrb);
965  }
966  if (stack_keep > nregs)
967  nregs = stack_keep;
968  mrb_stack_extend(mrb, nregs);
969  stack_clear(c->ci->stack + stack_keep, nregs - stack_keep);
970  c->ci->stack[0] = self;
971  result = mrb_vm_exec(mrb, proc, irep->iseq);
972  if (mrb->c != c) {
973  if (mrb->c->fib) {
974  mrb_write_barrier(mrb, (struct RBasic*)mrb->c->fib);
975  }
976  mrb->c = c;
977  }
978  else if (c->ci - c->cibase > cioff) {
979  c->ci = c->cibase + cioff;
980  }
981  return result;
982 }
983 
984 static mrb_bool
986 {
987  if (!mrb_vm_ci_target_class(mrb->c->ci)) {
988  mrb_value exc = mrb_exc_new_lit(mrb, E_TYPE_ERROR, "no target class or module");
989  mrb_exc_set(mrb, exc);
990  return FALSE;
991  }
992  return TRUE;
993 }
994 
995 void mrb_hash_check_kdict(mrb_state *mrb, mrb_value self);
996 
998 mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc)
999 {
1000  /* mrb_assert(MRB_PROC_CFUNC_P(proc)) */
1001  const mrb_irep *irep = proc->body.irep;
1002  const mrb_pool_value *pool = irep->pool;
1003  const mrb_sym *syms = irep->syms;
1004  mrb_code insn;
1005  int ai = mrb_gc_arena_save(mrb);
1006  struct mrb_jmpbuf *prev_jmp = mrb->jmp;
1007  struct mrb_jmpbuf c_jmp;
1008  uint32_t a;
1009  uint16_t b;
1010  uint16_t c;
1011  mrb_sym mid;
1012  const struct mrb_irep_catch_handler *ch;
1013 
1014 #ifdef DIRECT_THREADED
1015  static void *optable[] = {
1016 #define OPCODE(x,_) &&L_OP_ ## x,
1017 #include "mruby/ops.h"
1018 #undef OPCODE
1019  };
1020 #endif
1021 
1022  mrb_bool exc_catched = FALSE;
1023 RETRY_TRY_BLOCK:
1024 
1025  MRB_TRY(&c_jmp) {
1026 
1027  if (exc_catched) {
1028  exc_catched = FALSE;
1029  mrb_gc_arena_restore(mrb, ai);
1030  if (mrb->exc && mrb->exc->tt == MRB_TT_BREAK)
1031  goto L_BREAK;
1032  goto L_RAISE;
1033  }
1034  mrb->jmp = &c_jmp;
1035  mrb_vm_ci_proc_set(mrb->c->ci, proc);
1036 
1037 #define regs (mrb->c->ci->stack)
1038  INIT_DISPATCH {
1039  CASE(OP_NOP, Z) {
1040  /* do nothing */
1041  NEXT;
1042  }
1043 
1044  CASE(OP_MOVE, BB) {
1045  regs[a] = regs[b];
1046  NEXT;
1047  }
1048 
1049  CASE(OP_LOADL16, BS) {
1050  goto op_loadl;
1051  }
1052  CASE(OP_LOADL, BB) {
1053  op_loadl:
1054  switch (pool[b].tt) { /* number */
1055  case IREP_TT_INT32:
1056  regs[a] = mrb_int_value(mrb, (mrb_int)pool[b].u.i32);
1057  break;
1058  case IREP_TT_INT64:
1059 #if defined(MRB_INT64)
1060  regs[a] = mrb_int_value(mrb, (mrb_int)pool[b].u.i64);
1061  break;
1062 #else
1063 #if defined(MRB_64BIT)
1064  if (INT32_MIN <= pool[b].u.i64 && pool[b].u.i64 <= INT32_MAX) {
1065  regs[a] = mrb_int_value(mrb, (mrb_int)pool[b].u.i64);
1066  break;
1067  }
1068 #endif
1069  goto L_INT_OVERFLOW;
1070 #endif
1071 #ifndef MRB_NO_FLOAT
1072  case IREP_TT_FLOAT:
1073  regs[a] = mrb_float_value(mrb, pool[b].u.f);
1074  break;
1075 #endif
1076  default:
1077  /* should not happen (tt:string) */
1078  regs[a] = mrb_nil_value();
1079  break;
1080  }
1081  NEXT;
1082  }
1083 
1084  CASE(OP_LOADI, BB) {
1085  SET_FIXNUM_VALUE(regs[a], b);
1086  NEXT;
1087  }
1088 
1089  CASE(OP_LOADINEG, BB) {
1090  SET_FIXNUM_VALUE(regs[a], -b);
1091  NEXT;
1092  }
1093 
1094  CASE(OP_LOADI__1,B) goto L_LOADI;
1095  CASE(OP_LOADI_0,B) goto L_LOADI;
1096  CASE(OP_LOADI_1,B) goto L_LOADI;
1097  CASE(OP_LOADI_2,B) goto L_LOADI;
1098  CASE(OP_LOADI_3,B) goto L_LOADI;
1099  CASE(OP_LOADI_4,B) goto L_LOADI;
1100  CASE(OP_LOADI_5,B) goto L_LOADI;
1101  CASE(OP_LOADI_6,B) goto L_LOADI;
1102  CASE(OP_LOADI_7, B) {
1103  L_LOADI:
1104  SET_FIXNUM_VALUE(regs[a], (mrb_int)insn - (mrb_int)OP_LOADI_0);
1105  NEXT;
1106  }
1107 
1108  CASE(OP_LOADI16, BS) {
1110  NEXT;
1111  }
1112 
1113  CASE(OP_LOADI32, BSS) {
1114  SET_INT_VALUE(mrb, regs[a], (int32_t)(((uint32_t)b<<16)+c));
1115  NEXT;
1116  }
1117 
1118  CASE(OP_LOADSYM, BB) {
1119  SET_SYM_VALUE(regs[a], syms[b]);
1120  NEXT;
1121  }
1122 
1123  CASE(OP_LOADSYM16, BS) {
1124  SET_SYM_VALUE(regs[a], syms[b]);
1125  NEXT;
1126  }
1127 
1128  CASE(OP_LOADNIL, B) {
1129  SET_NIL_VALUE(regs[a]);
1130  NEXT;
1131  }
1132 
1133  CASE(OP_LOADSELF, B) {
1134  regs[a] = regs[0];
1135  NEXT;
1136  }
1137 
1138  CASE(OP_LOADT, B) {
1139  SET_TRUE_VALUE(regs[a]);
1140  NEXT;
1141  }
1142 
1143  CASE(OP_LOADF, B) {
1145  NEXT;
1146  }
1147 
1148  CASE(OP_GETGV, BB) {
1149  mrb_value val = mrb_gv_get(mrb, syms[b]);
1150  regs[a] = val;
1151  NEXT;
1152  }
1153 
1154  CASE(OP_SETGV, BB) {
1155  mrb_gv_set(mrb, syms[b], regs[a]);
1156  NEXT;
1157  }
1158 
1159  CASE(OP_GETSV, BB) {
1160  mrb_value val = mrb_vm_special_get(mrb, syms[b]);
1161  regs[a] = val;
1162  NEXT;
1163  }
1164 
1165  CASE(OP_SETSV, BB) {
1166  mrb_vm_special_set(mrb, syms[b], regs[a]);
1167  NEXT;
1168  }
1169 
1170  CASE(OP_GETIV, BB) {
1171  regs[a] = mrb_iv_get(mrb, regs[0], syms[b]);
1172  NEXT;
1173  }
1174 
1175  CASE(OP_SETIV, BB) {
1176  mrb_iv_set(mrb, regs[0], syms[b], regs[a]);
1177  NEXT;
1178  }
1179 
1180  CASE(OP_GETCV, BB) {
1181  mrb_value val;
1182  val = mrb_vm_cv_get(mrb, syms[b]);
1183  regs[a] = val;
1184  NEXT;
1185  }
1186 
1187  CASE(OP_SETCV, BB) {
1188  mrb_vm_cv_set(mrb, syms[b], regs[a]);
1189  NEXT;
1190  }
1191 
1192  CASE(OP_GETCONST, BB) {
1193  mrb_value val;
1194  mrb_sym sym = syms[b];
1195 
1196  val = mrb_vm_const_get(mrb, sym);
1197  regs[a] = val;
1198  NEXT;
1199  }
1200 
1201  CASE(OP_SETCONST, BB) {
1202  mrb_vm_const_set(mrb, syms[b], regs[a]);
1203  NEXT;
1204  }
1205 
1206  CASE(OP_GETMCNST, BB) {
1207  mrb_value val;
1208 
1209  val = mrb_const_get(mrb, regs[a], syms[b]);
1210  regs[a] = val;
1211  NEXT;
1212  }
1213 
1214  CASE(OP_SETMCNST, BB) {
1215  mrb_const_set(mrb, regs[a+1], syms[b], regs[a]);
1216  NEXT;
1217  }
1218 
1219  CASE(OP_GETUPVAR, BBB) {
1220  mrb_value *regs_a = regs + a;
1221  struct REnv *e = uvenv(mrb, c);
1222 
1223  if (e && b < MRB_ENV_LEN(e)) {
1224  *regs_a = e->stack[b];
1225  }
1226  else {
1227  *regs_a = mrb_nil_value();
1228  }
1229  NEXT;
1230  }
1231 
1232  CASE(OP_SETUPVAR, BBB) {
1233  struct REnv *e = uvenv(mrb, c);
1234 
1235  if (e) {
1236  mrb_value *regs_a = regs + a;
1237 
1238  if (b < MRB_ENV_LEN(e)) {
1239  e->stack[b] = *regs_a;
1240  mrb_write_barrier(mrb, (struct RBasic*)e);
1241  }
1242  }
1243  NEXT;
1244  }
1245 
1246  CASE(OP_JMP, S) {
1247  pc += (int16_t)a;
1248  JUMP;
1249  }
1250  CASE(OP_JMPIF, BS) {
1251  if (mrb_test(regs[a])) {
1252  pc += (int16_t)b;
1253  JUMP;
1254  }
1255  NEXT;
1256  }
1257  CASE(OP_JMPNOT, BS) {
1258  if (!mrb_test(regs[a])) {
1259  pc += (int16_t)b;
1260  JUMP;
1261  }
1262  NEXT;
1263  }
1264  CASE(OP_JMPNIL, BS) {
1265  if (mrb_nil_p(regs[a])) {
1266  pc += (int16_t)b;
1267  JUMP;
1268  }
1269  NEXT;
1270  }
1271 
1272  CASE(OP_JMPUW, S) {
1273  a = (uint32_t)((pc - irep->iseq) + (int16_t)a);
1275  struct RBreak *brk = (struct RBreak*)mrb->exc;
1279  mrb_assert(a >= 0 && a < irep->ilen);
1280  }
1283  if (ch) {
1284  /* avoiding a jump from a catch handler into the same handler */
1287  }
1288  }
1289  }
1291 
1292  mrb->exc = NULL; /* clear break object */
1293  pc = irep->iseq + a;
1294  JUMP;
1295  }
1296 
1297  CASE(OP_EXCEPT, B) {
1298  mrb_value exc;
1299 
1300  if (mrb->exc == NULL) {
1301  exc = mrb_nil_value();
1302  }
1303  else {
1304  switch (mrb->exc->tt) {
1305  case MRB_TT_BREAK:
1306  case MRB_TT_EXCEPTION:
1307  exc = mrb_obj_value(mrb->exc);
1308  break;
1309  default:
1310  mrb_assert(!"bad mrb_type");
1311  exc = mrb_nil_value();
1312  break;
1313  }
1314  mrb->exc = NULL;
1315  }
1316  regs[a] = exc;
1317  NEXT;
1318  }
1319  CASE(OP_RESCUE, BB) {
1320  mrb_value exc = regs[a]; /* exc on stack */
1321  mrb_value e = regs[b];
1322  struct RClass *ec;
1323 
1324  switch (mrb_type(e)) {
1325  case MRB_TT_CLASS:
1326  case MRB_TT_MODULE:
1327  break;
1328  default:
1329  {
1330  mrb_value exc;
1331 
1332  exc = mrb_exc_new_lit(mrb, E_TYPE_ERROR,
1333  "class or module required for rescue clause");
1334  mrb_exc_set(mrb, exc);
1335  goto L_RAISE;
1336  }
1337  }
1338  ec = mrb_class_ptr(e);
1339  regs[b] = mrb_bool_value(mrb_obj_is_kind_of(mrb, exc, ec));
1340  NEXT;
1341  }
1342 
1343  CASE(OP_RAISEIF, B) {
1344  mrb_value exc = regs[a];
1345  if (mrb_break_p(exc)) {
1346  mrb->exc = mrb_obj_ptr(exc);
1347  goto L_BREAK;
1348  }
1349  mrb_exc_set(mrb, exc);
1350  if (mrb->exc) {
1351  goto L_RAISE;
1352  }
1353  NEXT;
1354  }
1355 
1356  CASE(OP_SENDV, BB) {
1357  c = CALL_MAXARGS;
1358  goto L_SEND;
1359  };
1360 
1361  CASE(OP_SENDVB, BB) {
1362  c = CALL_MAXARGS;
1363  goto L_SENDB;
1364  };
1365 
1366  CASE(OP_SEND, BBB)
1367  L_SEND:
1368  {
1369  /* push nil after arguments */
1370  int bidx = (c == CALL_MAXARGS) ? a+2 : a+c+1;
1371  SET_NIL_VALUE(regs[bidx]);
1372  goto L_SENDB;
1373  };
1374  L_SEND_SYM:
1375  {
1376  /* push nil after arguments */
1377  int bidx = (c == CALL_MAXARGS) ? a+2 : a+c+1;
1378  SET_NIL_VALUE(regs[bidx]);
1379  goto L_SENDB_SYM;
1380  };
1381 
1382  CASE(OP_SENDB, BBB)
1383  L_SENDB:
1384  mid = syms[b];
1385  L_SENDB_SYM:
1386  {
1387  mrb_int argc = (c == CALL_MAXARGS) ? -1 : c;
1388  mrb_int bidx = (argc < 0) ? a+2 : a+c+1;
1389  mrb_method_t m;
1390  struct RClass *cls;
1391  mrb_callinfo *ci = mrb->c->ci;
1392  mrb_value recv, blk;
1393 
1394  mrb_assert(bidx < irep->nregs);
1395 
1396  recv = regs[a];
1397  blk = regs[bidx];
1398  if (!mrb_nil_p(blk) && !mrb_proc_p(blk)) {
1399  blk = mrb_type_convert(mrb, blk, MRB_TT_PROC, MRB_SYM(to_proc));
1400  /* The stack might have been reallocated during mrb_type_convert(),
1401  see #3622 */
1402  regs[bidx] = blk;
1403  }
1404  cls = mrb_class(mrb, recv);
1405  m = mrb_method_search_vm(mrb, &cls, mid);
1406  if (MRB_METHOD_UNDEF_P(m)) {
1407  mrb_sym missing = MRB_SYM(method_missing);
1408  m = mrb_method_search_vm(mrb, &cls, missing);
1409  if (MRB_METHOD_UNDEF_P(m) || (missing == mrb->c->ci->mid && mrb_obj_eq(mrb, regs[0], recv))) {
1410  mrb_value args = (argc < 0) ? regs[a+1] : mrb_ary_new_from_values(mrb, c, regs+a+1);
1411  mrb_method_missing(mrb, mid, recv, args);
1412  }
1413  if (argc >= 0) {
1414  if (a+2 >= irep->nregs) {
1415  mrb_stack_extend(mrb, a+3);
1416  }
1417  regs[a+1] = mrb_ary_new_from_values(mrb, c, regs+a+1);
1418  regs[a+2] = blk;
1419  argc = -1;
1420  }
1421  mrb_ary_unshift(mrb, regs[a+1], mrb_symbol_value(mid));
1422  mid = missing;
1423  }
1424 
1425  /* push callinfo */
1426  ci = cipush(mrb, a, a, cls, NULL, mid, argc);
1427 
1428  if (MRB_METHOD_CFUNC_P(m)) {
1429  if (MRB_METHOD_PROC_P(m)) {
1430  struct RProc *p = MRB_METHOD_PROC(m);
1431 
1432  mrb_vm_ci_proc_set(ci, p);
1433  recv = p->body.func(mrb, recv);
1434  }
1435  else if (MRB_METHOD_NOARG_P(m) &&
1436  (argc > 0 || (argc == -1 && RARRAY_LEN(regs[1]) != 0))) {
1437  argnum_error(mrb, 0);
1438  goto L_RAISE;
1439  }
1440  else {
1441  recv = MRB_METHOD_FUNC(m)(mrb, recv);
1442  }
1443  mrb_gc_arena_restore(mrb, ai);
1444  mrb_gc_arena_shrink(mrb, ai);
1445  if (mrb->exc) goto L_RAISE;
1446  ci = mrb->c->ci;
1447  if (mrb_proc_p(blk)) {
1448  struct RProc *p = mrb_proc_ptr(blk);
1449  if (p && !MRB_PROC_STRICT_P(p) && MRB_PROC_ENV(p) == mrb_vm_ci_env(&ci[-1])) {
1450  p->flags |= MRB_PROC_ORPHAN;
1451  }
1452  }
1453  if (!ci->u.target_class) { /* return from context modifying method (resume/yield) */
1454  if (ci->acc == CI_ACC_RESUMED) {
1455  mrb->jmp = prev_jmp;
1456  return recv;
1457  }
1458  else {
1459  mrb_assert(!MRB_PROC_CFUNC_P(ci[-1].proc));
1460  proc = ci[-1].proc;
1461  irep = proc->body.irep;
1462  pool = irep->pool;
1463  syms = irep->syms;
1464  }
1465  }
1466  mrb->c->ci->stack[0] = recv;
1467  /* pop stackpos */
1468  ci = cipop(mrb);
1469  pc = ci->pc;
1470  JUMP;
1471  }
1472  else {
1473  /* setup environment for calling method */
1475  irep = proc->body.irep;
1476  pool = irep->pool;
1477  syms = irep->syms;
1478  mrb_stack_extend(mrb, (argc < 0 && irep->nregs < 3) ? 3 : irep->nregs);
1479  pc = irep->iseq;
1480  JUMP;
1481  }
1482  }
1483 
1484  CASE(OP_CALL, Z) {
1485  mrb_callinfo *ci;
1486  mrb_value recv = mrb->c->ci->stack[0];
1487  struct RProc *m = mrb_proc_ptr(recv);
1488 
1489  /* replace callinfo */
1490  ci = mrb->c->ci;
1492  mrb_vm_ci_proc_set(ci, m);
1493  if (MRB_PROC_ENV_P(m)) {
1494  ci->mid = MRB_PROC_ENV(m)->mid;
1495  }
1496 
1497  /* prepare stack */
1498  if (MRB_PROC_CFUNC_P(m)) {
1499  recv = MRB_PROC_CFUNC(m)(mrb, recv);
1500  mrb_gc_arena_restore(mrb, ai);
1501  mrb_gc_arena_shrink(mrb, ai);
1502  if (mrb->exc) goto L_RAISE;
1503  /* pop stackpos */
1504  ci = cipop(mrb);
1505  pc = ci->pc;
1506  regs[ci[1].acc] = recv;
1507  irep = mrb->c->ci->proc->body.irep;
1508  pool = irep->pool;
1509  syms = irep->syms;
1510  JUMP;
1511  }
1512  else {
1513  /* setup environment for calling method */
1514  proc = m;
1515  irep = m->body.irep;
1516  if (!irep) {
1517  mrb->c->ci->stack[0] = mrb_nil_value();
1518  a = 0;
1519  c = OP_R_NORMAL;
1520  goto L_RETURN;
1521  }
1522  pool = irep->pool;
1523  syms = irep->syms;
1524  mrb_stack_extend(mrb, irep->nregs);
1525  if (ci->argc < 0) {
1526  if (irep->nregs > 3) {
1527  stack_clear(regs+3, irep->nregs-3);
1528  }
1529  }
1530  else if (ci->argc+2 < irep->nregs) {
1531  stack_clear(regs+ci->argc+2, irep->nregs-ci->argc-2);
1532  }
1533  if (MRB_PROC_ENV_P(m)) {
1534  regs[0] = MRB_PROC_ENV(m)->stack[0];
1535  }
1536  pc = irep->iseq;
1537  JUMP;
1538  }
1539  }
1540 
1541  CASE(OP_SUPER, BB) {
1542  mrb_int argc = (b == CALL_MAXARGS) ? -1 : b;
1543  int bidx = (argc < 0) ? a+2 : a+b+1;
1544  mrb_method_t m;
1545  struct RClass *cls;
1546  mrb_callinfo *ci = mrb->c->ci;
1547  mrb_value recv, blk;
1548  const struct RProc *p = ci->proc;
1549  mrb_sym mid = ci->mid;
1550  struct RClass* target_class = MRB_PROC_TARGET_CLASS(p);
1551 
1552  if (MRB_PROC_ENV_P(p) && p->e.env->mid && p->e.env->mid != mid) { /* alias support */
1553  mid = p->e.env->mid; /* restore old mid */
1554  }
1555  mrb_assert(bidx < irep->nregs);
1556 
1557  if (mid == 0 || !target_class) {
1558  mrb_value exc = mrb_exc_new_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method");
1559  mrb_exc_set(mrb, exc);
1560  goto L_RAISE;
1561  }
1562  if (target_class->flags & MRB_FL_CLASS_IS_PREPENDED) {
1563  target_class = mrb_vm_ci_target_class(ci);
1564  }
1565  else if (target_class->tt == MRB_TT_MODULE) {
1566  target_class = mrb_vm_ci_target_class(ci);
1567  if (target_class->tt != MRB_TT_ICLASS) {
1568  mrb_value exc = mrb_exc_new_lit(mrb, E_RUNTIME_ERROR, "superclass info lost [mruby limitations]");
1569  mrb_exc_set(mrb, exc);
1570  goto L_RAISE;
1571  }
1572  }
1573  recv = regs[0];
1574  if (!mrb_obj_is_kind_of(mrb, recv, target_class)) {
1576  "self has wrong type to call super in this context");
1577  mrb_exc_set(mrb, exc);
1578  goto L_RAISE;
1579  }
1580  blk = regs[bidx];
1581  if (!mrb_nil_p(blk) && !mrb_proc_p(blk)) {
1582  blk = mrb_type_convert(mrb, blk, MRB_TT_PROC, MRB_SYM(to_proc));
1583  /* The stack or ci stack might have been reallocated during
1584  mrb_type_convert(), see #3622 and #3784 */
1585  regs[bidx] = blk;
1586  ci = mrb->c->ci;
1587  }
1588  cls = target_class->super;
1589  m = mrb_method_search_vm(mrb, &cls, mid);
1590  if (MRB_METHOD_UNDEF_P(m)) {
1591  mrb_sym missing = MRB_SYM(method_missing);
1592 
1593  if (mid != missing) {
1594  cls = mrb_class(mrb, recv);
1595  }
1596  m = mrb_method_search_vm(mrb, &cls, missing);
1597  if (MRB_METHOD_UNDEF_P(m)) {
1598  mrb_value args = (argc < 0) ? regs[a+1] : mrb_ary_new_from_values(mrb, b, regs+a+1);
1599  mrb_method_missing(mrb, mid, recv, args);
1600  }
1601  mid = missing;
1602  if (argc >= 0) {
1603  if (a+2 >= irep->nregs) {
1604  mrb_stack_extend(mrb, a+3);
1605  }
1606  regs[a+1] = mrb_ary_new_from_values(mrb, b, regs+a+1);
1607  regs[a+2] = blk;
1608  argc = -1;
1609  }
1610  mrb_ary_unshift(mrb, regs[a+1], mrb_symbol_value(ci->mid));
1611  }
1612 
1613  /* push callinfo */
1614  ci = cipush(mrb, a, 0, cls, NULL, mid, argc);
1615 
1616  /* prepare stack */
1617  mrb->c->ci->stack[0] = recv;
1618 
1619  if (MRB_METHOD_CFUNC_P(m)) {
1620  mrb_value v;
1621 
1622  if (MRB_METHOD_PROC_P(m)) {
1624  }
1625  v = MRB_METHOD_CFUNC(m)(mrb, recv);
1626  mrb_gc_arena_restore(mrb, ai);
1627  if (mrb->exc) goto L_RAISE;
1628  ci = mrb->c->ci;
1630  if (!mrb_vm_ci_target_class(ci)) { /* return from context modifying method (resume/yield) */
1631  if (ci->acc == CI_ACC_RESUMED) {
1632  mrb->jmp = prev_jmp;
1633  return v;
1634  }
1635  else {
1636  mrb_assert(!MRB_PROC_CFUNC_P(ci[-1].proc));
1637  proc = ci[-1].proc;
1638  irep = proc->body.irep;
1639  pool = irep->pool;
1640  syms = irep->syms;
1641  }
1642  }
1643  mrb->c->ci->stack[0] = v;
1644  ci = cipop(mrb);
1645  pc = ci->pc;
1646  JUMP;
1647  }
1648  else {
1649  /* fill callinfo */
1650  ci->acc = a;
1651 
1652  /* setup environment for calling method */
1654  irep = proc->body.irep;
1655  pool = irep->pool;
1656  syms = irep->syms;
1657  mrb_stack_extend(mrb, (argc < 0 && irep->nregs < 3) ? 3 : irep->nregs);
1658  pc = irep->iseq;
1659  JUMP;
1660  }
1661  }
1662 
1663  CASE(OP_ARGARY, BS) {
1664  mrb_int m1 = (b>>11)&0x3f;
1665  mrb_int r = (b>>10)&0x1;
1666  mrb_int m2 = (b>>5)&0x1f;
1667  mrb_int kd = (b>>4)&0x1;
1668  mrb_int lv = (b>>0)&0xf;
1669  mrb_value *stack;
1670 
1671  if (mrb->c->ci->mid == 0 || mrb_vm_ci_target_class(mrb->c->ci) == NULL) {
1672  mrb_value exc;
1673 
1674  L_NOSUPER:
1675  exc = mrb_exc_new_lit(mrb, E_NOMETHOD_ERROR, "super called outside of method");
1676  mrb_exc_set(mrb, exc);
1677  goto L_RAISE;
1678  }
1679  if (lv == 0) stack = regs + 1;
1680  else {
1681  struct REnv *e = uvenv(mrb, lv-1);
1682  if (!e) goto L_NOSUPER;
1683  if (MRB_ENV_LEN(e) <= m1+r+m2+kd+1)
1684  goto L_NOSUPER;
1685  stack = e->stack + 1;
1686  }
1687  if (r == 0) {
1688  regs[a] = mrb_ary_new_from_values(mrb, m1+m2+kd, stack);
1689  }
1690  else {
1691  mrb_value *pp = NULL;
1692  struct RArray *rest;
1693  mrb_int len = 0;
1694 
1695  if (mrb_array_p(stack[m1])) {
1696  struct RArray *ary = mrb_ary_ptr(stack[m1]);
1697 
1698  pp = ARY_PTR(ary);
1699  len = ARY_LEN(ary);
1700  }
1701  regs[a] = mrb_ary_new_capa(mrb, m1+len+m2+kd);
1702  rest = mrb_ary_ptr(regs[a]);
1703  if (m1 > 0) {
1704  stack_copy(ARY_PTR(rest), stack, m1);
1705  }
1706  if (len > 0) {
1707  stack_copy(ARY_PTR(rest)+m1, pp, len);
1708  }
1709  if (m2 > 0) {
1710  stack_copy(ARY_PTR(rest)+m1+len, stack+m1+1, m2);
1711  }
1712  if (kd) {
1713  stack_copy(ARY_PTR(rest)+m1+len+m2, stack+m1+m2+1, kd);
1714  }
1715  ARY_SET_LEN(rest, m1+len+m2+kd);
1716  }
1717  regs[a+1] = stack[m1+r+m2];
1718  mrb_gc_arena_restore(mrb, ai);
1719  NEXT;
1720  }
1721 
1722  CASE(OP_ENTER, W) {
1723  mrb_int m1 = MRB_ASPEC_REQ(a);
1724  mrb_int o = MRB_ASPEC_OPT(a);
1726  mrb_int m2 = MRB_ASPEC_POST(a);
1727  mrb_int kd = (MRB_ASPEC_KEY(a) > 0 || MRB_ASPEC_KDICT(a))? 1 : 0;
1728  /* unused
1729  int b = MRB_ASPEC_BLOCK(a);
1730  */
1731  mrb_int argc = mrb->c->ci->argc;
1732  mrb_value *argv = regs+1;
1733  mrb_value * const argv0 = argv;
1734  mrb_int const len = m1 + o + r + m2;
1735  mrb_int const blk_pos = len + kd + 1;
1736  mrb_value *blk = &argv[argc < 0 ? 1 : argc];
1737  mrb_value kdict = mrb_nil_value();
1738  mrb_int kargs = kd;
1739 
1740  /* arguments is passed with Array */
1741  if (argc < 0) {
1742  struct RArray *ary = mrb_ary_ptr(regs[1]);
1743  argv = ARY_PTR(ary);
1744  argc = (int)ARY_LEN(ary);
1745  mrb_gc_protect(mrb, regs[1]);
1746  }
1747 
1748  /* strict argument check */
1749  if (mrb->c->ci->proc && MRB_PROC_STRICT_P(mrb->c->ci->proc)) {
1750  if (argc < m1 + m2 || (r == 0 && argc > len + kd)) {
1751  argnum_error(mrb, m1+m2);
1752  goto L_RAISE;
1753  }
1754  }
1755  /* extract first argument array to arguments */
1756  else if (len > 1 && argc == 1 && mrb_array_p(argv[0])) {
1757  mrb_gc_protect(mrb, argv[0]);
1758  argc = (int)RARRAY_LEN(argv[0]);
1759  argv = RARRAY_PTR(argv[0]);
1760  }
1761 
1762  if (kd) {
1763  /* check last arguments is hash if method takes keyword arguments */
1764  if (argc == m1+m2) {
1765  kdict = mrb_hash_new(mrb);
1766  kargs = 0;
1767  }
1768  else {
1769  if (argv && argc > 0 && mrb_hash_p(argv[argc-1])) {
1770  kdict = argv[argc-1];
1771  mrb_hash_check_kdict(mrb, kdict);
1772  }
1773  else if (r || argc <= m1+m2+o
1774  || !(mrb->c->ci->proc && MRB_PROC_STRICT_P(mrb->c->ci->proc))) {
1775  kdict = mrb_hash_new(mrb);
1776  kargs = 0;
1777  }
1778  else {
1779  argnum_error(mrb, m1+m2);
1780  goto L_RAISE;
1781  }
1782  if (MRB_ASPEC_KEY(a) > 0) {
1783  kdict = mrb_hash_dup(mrb, kdict);
1784  }
1785  }
1786  }
1787 
1788  /* no rest arguments */
1789  if (argc-kargs < len) {
1790  mrb_int mlen = m2;
1791  if (argc < m1+m2) {
1792  mlen = m1 < argc ? argc - m1 : 0;
1793  }
1794  regs[blk_pos] = *blk; /* move block */
1795  if (kd) regs[len + 1] = kdict;
1796 
1797  /* copy mandatory and optional arguments */
1798  if (argv0 != argv && argv) {
1799  value_move(&regs[1], argv, argc-mlen); /* m1 + o */
1800  }
1801  if (argc < m1) {
1802  stack_clear(&regs[argc+1], m1-argc);
1803  }
1804  /* copy post mandatory arguments */
1805  if (mlen) {
1806  value_move(&regs[len-m2+1], &argv[argc-mlen], mlen);
1807  }
1808  if (mlen < m2) {
1809  stack_clear(&regs[len-m2+mlen+1], m2-mlen);
1810  }
1811  /* initialize rest arguments with empty Array */
1812  if (r) {
1813  regs[m1+o+1] = mrb_ary_new_capa(mrb, 0);
1814  }
1815  /* skip initializer of passed arguments */
1816  if (o > 0 && argc-kargs > m1+m2)
1817  pc += (argc - kargs - m1 - m2)*3;
1818  }
1819  else {
1820  mrb_int rnum = 0;
1821  if (argv0 != argv) {
1822  regs[blk_pos] = *blk; /* move block */
1823  if (kd) regs[len + 1] = kdict;
1824  value_move(&regs[1], argv, m1+o);
1825  }
1826  if (r) {
1827  mrb_value ary;
1828 
1829  rnum = argc-m1-o-m2-kargs;
1830  ary = mrb_ary_new_from_values(mrb, rnum, argv+m1+o);
1831  regs[m1+o+1] = ary;
1832  }
1833  if (m2) {
1834  if (argc-m2 > m1) {
1835  value_move(&regs[m1+o+r+1], &argv[m1+o+rnum], m2);
1836  }
1837  }
1838  if (argv0 == argv) {
1839  regs[blk_pos] = *blk; /* move block */
1840  if (kd) regs[len + 1] = kdict;
1841  }
1842  pc += o*3;
1843  }
1844 
1845  /* format arguments for generated code */
1846  mrb->c->ci->argc = (int16_t)(len + kd);
1847 
1848  /* clear local (but non-argument) variables */
1849  if (irep->nlocals-blk_pos-1 > 0) {
1850  stack_clear(&regs[blk_pos+1], irep->nlocals-blk_pos-1);
1851  }
1852  JUMP;
1853  }
1854 
1855  CASE(OP_KARG, BB) {
1856  mrb_value k = mrb_symbol_value(syms[b]);
1857  mrb_value kdict = regs[mrb->c->ci->argc];
1858 
1859  if (!mrb_hash_p(kdict) || !mrb_hash_key_p(mrb, kdict, k)) {
1860  mrb_value str = mrb_format(mrb, "missing keyword: %v", k);
1862  goto L_RAISE;
1863  }
1864  regs[a] = mrb_hash_get(mrb, kdict, k);
1865  mrb_hash_delete_key(mrb, kdict, k);
1866  NEXT;
1867  }
1868 
1869  CASE(OP_KEY_P, BB) {
1870  mrb_value k = mrb_symbol_value(syms[b]);
1871  mrb_value kdict = regs[mrb->c->ci->argc];
1872  mrb_bool key_p = FALSE;
1873 
1874  if (mrb_hash_p(kdict)) {
1875  key_p = mrb_hash_key_p(mrb, kdict, k);
1876  }
1877  regs[a] = mrb_bool_value(key_p);
1878  NEXT;
1879  }
1880 
1881  CASE(OP_KEYEND, Z) {
1882  mrb_value kdict = regs[mrb->c->ci->argc];
1883 
1884  if (mrb_hash_p(kdict) && !mrb_hash_empty_p(mrb, kdict)) {
1885  mrb_value keys = mrb_hash_keys(mrb, kdict);
1886  mrb_value key1 = RARRAY_PTR(keys)[0];
1887  mrb_value str = mrb_format(mrb, "unknown keyword: %v", key1);
1889  goto L_RAISE;
1890  }
1891  NEXT;
1892  }
1893 
1894  CASE(OP_BREAK, B) {
1895  c = OP_R_BREAK;
1896  goto L_RETURN;
1897  }
1898  CASE(OP_RETURN_BLK, B) {
1899  c = OP_R_RETURN;
1900  goto L_RETURN;
1901  }
1902  CASE(OP_RETURN, B)
1903  c = OP_R_NORMAL;
1904  L_RETURN:
1905  {
1906  mrb_callinfo *ci;
1907 
1908  ci = mrb->c->ci;
1909  if (ci->mid) {
1910  mrb_value blk;
1911 
1912  if (ci->argc < 0) {
1913  blk = regs[2];
1914  }
1915  else {
1916  blk = regs[ci->argc+1];
1917  }
1918  if (mrb_proc_p(blk)) {
1919  struct RProc *p = mrb_proc_ptr(blk);
1920 
1921  if (!MRB_PROC_STRICT_P(p) &&
1922  ci > mrb->c->cibase && MRB_PROC_ENV(p) == mrb_vm_ci_env(&ci[-1])) {
1923  p->flags |= MRB_PROC_ORPHAN;
1924  }
1925  }
1926  }
1927 
1928  if (mrb->exc) {
1929  L_RAISE:
1930  ci = mrb->c->ci;
1931  if (ci == mrb->c->cibase) {
1933  if (ch == NULL) goto L_FTOP;
1934  goto L_CATCH;
1935  }
1936  while ((ch = catch_handler_find(mrb, ci, pc, MRB_CATCH_FILTER_ALL)) == NULL) {
1937  ci = cipop(mrb);
1938  if (ci[1].acc == CI_ACC_SKIP && prev_jmp) {
1939  mrb->jmp = prev_jmp;
1940  MRB_THROW(prev_jmp);
1941  }
1942  pc = ci[0].pc;
1943  if (ci == mrb->c->cibase) {
1945  if (ch == NULL) {
1946  L_FTOP: /* fiber top */
1947  if (mrb->c == mrb->root_c) {
1948  mrb->c->ci->stack = mrb->c->stbase;
1949  goto L_STOP;
1950  }
1951  else {
1952  struct mrb_context *c = mrb->c;
1953 
1954  c->status = MRB_FIBER_TERMINATED;
1955  mrb->c = c->prev;
1956  c->prev = NULL;
1957  goto L_RAISE;
1958  }
1959  }
1960  break;
1961  }
1962  }
1963  L_CATCH:
1964  if (ch == NULL) goto L_STOP;
1965  if (FALSE) {
1966  L_CATCH_TAGGED_BREAK: /* from THROW_TAGGED_BREAK() or UNWIND_ENSURE() */
1967  ci = mrb->c->ci;
1968  }
1969  proc = ci->proc;
1970  irep = proc->body.irep;
1971  pool = irep->pool;
1972  syms = irep->syms;
1973  mrb_stack_extend(mrb, irep->nregs);
1974  pc = irep->iseq + mrb_irep_catch_handler_unpack(ch->target);
1975  }
1976  else {
1977  mrb_int acc;
1978  mrb_value v;
1979 
1980  ci = mrb->c->ci;
1981  v = regs[a];
1982  mrb_gc_protect(mrb, v);
1983  switch (c) {
1984  case OP_R_RETURN:
1985  /* Fall through to OP_R_NORMAL otherwise */
1986  if (ci->acc >=0 && MRB_PROC_ENV_P(proc) && !MRB_PROC_STRICT_P(proc)) {
1987  const struct RProc *dst;
1988  mrb_callinfo *cibase;
1989  cibase = mrb->c->cibase;
1990  dst = top_proc(mrb, proc);
1991 
1992  if (MRB_PROC_ENV_P(dst)) {
1993  struct REnv *e = MRB_PROC_ENV(dst);
1994 
1995  if (!MRB_ENV_ONSTACK_P(e) || (e->cxt && e->cxt != mrb->c)) {
1997  goto L_RAISE;
1998  }
1999  }
2000  /* check jump destination */
2001  while (cibase <= ci && ci->proc != dst) {
2002  if (ci->acc < 0) { /* jump cross C boudary */
2004  goto L_RAISE;
2005  }
2006  ci--;
2007  }
2008  if (ci <= cibase) { /* no jump destination */
2010  goto L_RAISE;
2011  }
2012  ci = mrb->c->ci;
2013  while (cibase <= ci && ci->proc != dst) {
2015  cibase = mrb->c->cibase;
2016  dst = top_proc(mrb, proc);
2017  }
2020  }
2022  ci = cipop(mrb);
2023  pc = ci->pc;
2024  }
2025  proc = ci->proc;
2026  mrb->exc = NULL; /* clear break object */
2027  break;
2028  }
2029  /* fallthrough */
2030  case OP_R_NORMAL:
2031  NORMAL_RETURN:
2032  if (ci == mrb->c->cibase) {
2033  struct mrb_context *c;
2034  c = mrb->c;
2035 
2036  if (!c->prev) { /* toplevel return */
2037  regs[irep->nlocals] = v;
2039  }
2040  if (!c->vmexec && c->prev->ci == c->prev->cibase) {
2041  mrb_value exc = mrb_exc_new_lit(mrb, E_FIBER_ERROR, "double resume");
2042  mrb_exc_set(mrb, exc);
2043  goto L_RAISE;
2044  }
2046  c = mrb->c;
2047  }
2050  }
2052  /* automatic yield at the end */
2053  c->status = MRB_FIBER_TERMINATED;
2054  mrb->c = c->prev;
2055  mrb->c->status = MRB_FIBER_RUNNING;
2056  c->prev = NULL;
2057  if (c->vmexec) {
2058  mrb_gc_arena_restore(mrb, ai);
2059  c->vmexec = FALSE;
2060  mrb->jmp = prev_jmp;
2061  return v;
2062  }
2063  ci = mrb->c->ci;
2064  }
2066  /* do nothing */
2067  }
2070  }
2072  mrb->exc = NULL; /* clear break object */
2073  break;
2074  case OP_R_BREAK:
2075  if (MRB_PROC_STRICT_P(proc)) goto NORMAL_RETURN;
2076  if (MRB_PROC_ORPHAN_P(proc)) {
2077  mrb_value exc;
2078 
2079  L_BREAK_ERROR:
2081  "break from proc-closure");
2082  mrb_exc_set(mrb, exc);
2083  goto L_RAISE;
2084  }
2086  goto L_BREAK_ERROR;
2087  }
2088  else {
2089  struct REnv *e = MRB_PROC_ENV(proc);
2090 
2091  if (e->cxt != mrb->c) {
2092  goto L_BREAK_ERROR;
2093  }
2094  }
2096  /* do nothing */
2097  }
2099  UNWIND_ENSURE(mrb, ci, pc, RBREAK_TAG_BREAK, proc, v);
2100  }
2102  /* break from fiber block */
2103  if (ci == mrb->c->cibase && ci->pc) {
2104  struct mrb_context *c = mrb->c;
2105 
2106  mrb->c = c->prev;
2107  c->prev = NULL;
2108  ci = mrb->c->ci;
2109  }
2110  if (ci->acc < 0) {
2111  ci = cipop(mrb);
2112  mrb_gc_arena_restore(mrb, ai);
2113  mrb->c->vmexec = FALSE;
2114  mrb->exc = (struct RObject*)break_new(mrb, RBREAK_TAG_BREAK, proc, v);
2115  mrb->jmp = prev_jmp;
2116  MRB_THROW(prev_jmp);
2117  }
2118  if (FALSE) {
2119  struct RBreak *brk;
2120 
2121  L_BREAK:
2122  brk = (struct RBreak*)mrb->exc;
2123  proc = mrb_break_proc_get(brk);
2124  v = mrb_break_value_get(brk);
2125  ci = mrb->c->ci;
2126 
2127  switch (mrb_break_tag_get(brk)) {
2128 #define DISPATCH_CHECKPOINTS(n, i) case n: goto CHECKPOINT_LABEL_MAKE(n);
2130 #undef DISPATCH_CHECKPOINTS
2131  default:
2132  mrb_assert(!"wrong break tag");
2133  }
2134  }
2135  while (mrb->c->cibase < ci && ci[-1].proc != proc->upper) {
2136  if (ci[-1].acc == CI_ACC_SKIP) {
2137  goto L_BREAK_ERROR;
2138  }
2140  /* do nothing */
2141  }
2144  }
2146  ci = cipop(mrb);
2147  pc = ci->pc;
2148  }
2150  /* do nothing */
2151  }
2154  }
2156  if (ci == mrb->c->cibase) {
2157  goto L_BREAK_ERROR;
2158  }
2159  mrb->exc = NULL; /* clear break object */
2160  break;
2161  default:
2162  /* cannot happen */
2163  break;
2164  }
2165  mrb_assert(ci == mrb->c->ci);
2166  mrb_assert(mrb->exc == NULL);
2167 
2168  if (mrb->c->vmexec && !mrb_vm_ci_target_class(ci)) {
2169  mrb_gc_arena_restore(mrb, ai);
2170  mrb->c->vmexec = FALSE;
2171  mrb->jmp = prev_jmp;
2172  return v;
2173  }
2174  acc = ci->acc;
2175  ci = cipop(mrb);
2176  if (acc == CI_ACC_SKIP || acc == CI_ACC_DIRECT) {
2177  mrb_gc_arena_restore(mrb, ai);
2178  mrb->jmp = prev_jmp;
2179  return v;
2180  }
2181  pc = ci[0].pc;
2182  DEBUG(fprintf(stderr, "from :%s\n", mrb_sym_name(mrb, ci->mid)));
2183  proc = mrb->c->ci->proc;
2184  irep = proc->body.irep;
2185  pool = irep->pool;
2186  syms = irep->syms;
2187 
2188  regs[acc] = v;
2189  mrb_gc_arena_restore(mrb, ai);
2190  }
2191  JUMP;
2192  }
2193 
2194  CASE(OP_BLKPUSH, BS) {
2195  int m1 = (b>>11)&0x3f;
2196  int r = (b>>10)&0x1;
2197  int m2 = (b>>5)&0x1f;
2198  int kd = (b>>4)&0x1;
2199  int lv = (b>>0)&0xf;
2200  mrb_value *stack;
2201 
2202  if (lv == 0) stack = regs + 1;
2203  else {
2204  struct REnv *e = uvenv(mrb, lv-1);
2205  if (!e || (!MRB_ENV_ONSTACK_P(e) && e->mid == 0) ||
2206  MRB_ENV_LEN(e) <= m1+r+m2+1) {
2208  goto L_RAISE;
2209  }
2210  stack = e->stack + 1;
2211  }
2212  if (mrb_nil_p(stack[m1+r+m2])) {
2214  goto L_RAISE;
2215  }
2216  regs[a] = stack[m1+r+m2+kd];
2217  NEXT;
2218  }
2219 
2220  L_INT_OVERFLOW:
2221  {
2222  mrb_value exc = mrb_exc_new_lit(mrb, E_RANGE_ERROR, "integer overflow");
2223  mrb_exc_set(mrb, exc);
2224  }
2225  goto L_RAISE;
2226 
2227 #define TYPES2(a,b) ((((uint16_t)(a))<<8)|(((uint16_t)(b))&0xff))
2228 #define OP_MATH(op_name) \
2229  /* need to check if op is overridden */ \
2230  switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) { \
2231  OP_MATH_CASE_INTEGER(op_name); \
2232  OP_MATH_CASE_FLOAT(op_name, integer, float); \
2233  OP_MATH_CASE_FLOAT(op_name, float, integer); \
2234  OP_MATH_CASE_FLOAT(op_name, float, float); \
2235  OP_MATH_CASE_STRING_##op_name(); \
2236  default: \
2237  c = 1; \
2238  mid = MRB_OPSYM(op_name); \
2239  goto L_SEND_SYM; \
2240  } \
2241  NEXT;
2242 #define OP_MATH_CASE_INTEGER(op_name) \
2243  case TYPES2(MRB_TT_INTEGER, MRB_TT_INTEGER): \
2244  { \
2245  mrb_int x = mrb_integer(regs[a]), y = mrb_integer(regs[a+1]), z; \
2246  if (mrb_int_##op_name##_overflow(x, y, &z)) \
2247  OP_MATH_OVERFLOW_INT(); \
2248  else \
2249  SET_INT_VALUE(mrb,regs[a], z); \
2250  } \
2251  break
2252 #ifdef MRB_NO_FLOAT
2253 #define OP_MATH_CASE_FLOAT(op_name, t1, t2) (void)0
2254 #else
2255 #define OP_MATH_CASE_FLOAT(op_name, t1, t2) \
2256  case TYPES2(OP_MATH_TT_##t1, OP_MATH_TT_##t2): \
2257  { \
2258  mrb_float z = mrb_##t1(regs[a]) OP_MATH_OP_##op_name mrb_##t2(regs[a+1]); \
2259  SET_FLOAT_VALUE(mrb, regs[a], z); \
2260  } \
2261  break
2262 #endif
2263 #define OP_MATH_OVERFLOW_INT() goto L_INT_OVERFLOW
2264 #define OP_MATH_CASE_STRING_add() \
2265  case TYPES2(MRB_TT_STRING, MRB_TT_STRING): \
2266  regs[a] = mrb_str_plus(mrb, regs[a], regs[a+1]); \
2267  mrb_gc_arena_restore(mrb, ai); \
2268  break
2269 #define OP_MATH_CASE_STRING_sub() (void)0
2270 #define OP_MATH_CASE_STRING_mul() (void)0
2271 #define OP_MATH_OP_add +
2272 #define OP_MATH_OP_sub -
2273 #define OP_MATH_OP_mul *
2274 #define OP_MATH_TT_integer MRB_TT_INTEGER
2275 #define OP_MATH_TT_float MRB_TT_FLOAT
2276 
2277  CASE(OP_ADD, B) {
2278  OP_MATH(add);
2279  }
2280 
2281  CASE(OP_SUB, B) {
2282  OP_MATH(sub);
2283  }
2284 
2285  CASE(OP_MUL, B) {
2286  OP_MATH(mul);
2287  }
2288 
2289  CASE(OP_DIV, B) {
2291 #ifndef MRB_NO_FLOAT
2293  mrb_float x, y, f;
2294 #endif
2295 
2296  /* need to check if op is overridden */
2297  switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {
2299  {
2300  mrb_int x = mrb_integer(regs[a]);
2301  mrb_int y = mrb_integer(regs[a+1]);
2302  mrb_int div = mrb_num_div_int(mrb, x, y);
2303  SET_INT_VALUE(mrb, regs[a], div);
2304  }
2305  NEXT;
2306 #ifndef MRB_NO_FLOAT
2308  x = (mrb_float)mrb_integer(regs[a]);
2309  y = mrb_float(regs[a+1]);
2310  break;
2312  x = mrb_float(regs[a]);
2313  y = (mrb_float)mrb_integer(regs[a+1]);
2314  break;
2316  x = mrb_float(regs[a]);
2317  y = mrb_float(regs[a+1]);
2318  break;
2319 #endif
2320  default:
2321  c = 1;
2322  mid = MRB_OPSYM(div);
2323  goto L_SEND_SYM;
2324  }
2325 
2326 #ifndef MRB_NO_FLOAT
2327  f = mrb_num_div_flo(mrb, x, y);
2328  SET_FLOAT_VALUE(mrb, regs[a], f);
2329 #endif
2330  NEXT;
2331  }
2332 
2333 #define OP_MATHI(op_name) \
2334  /* need to check if op is overridden */ \
2335  switch (mrb_type(regs[a])) { \
2336  OP_MATHI_CASE_INTEGER(op_name); \
2337  OP_MATHI_CASE_FLOAT(op_name); \
2338  default: \
2339  SET_INT_VALUE(mrb,regs[a+1], b); \
2340  c = 1; \
2341  mid = MRB_OPSYM(op_name); \
2342  goto L_SEND_SYM; \
2343  } \
2344  NEXT;
2345 #define OP_MATHI_CASE_INTEGER(op_name) \
2346  case MRB_TT_INTEGER: \
2347  { \
2348  mrb_int x = mrb_integer(regs[a]), y = (mrb_int)b, z; \
2349  if (mrb_int_##op_name##_overflow(x, y, &z)) \
2350  OP_MATH_OVERFLOW_INT(); \
2351  else \
2352  SET_INT_VALUE(mrb,regs[a], z); \
2353  } \
2354  break
2355 #ifdef MRB_NO_FLOAT
2356 #define OP_MATHI_CASE_FLOAT(op_name) (void)0
2357 #else
2358 #define OP_MATHI_CASE_FLOAT(op_name) \
2359  case MRB_TT_FLOAT: \
2360  { \
2361  mrb_float z = mrb_float(regs[a]) OP_MATH_OP_##op_name b; \
2362  SET_FLOAT_VALUE(mrb, regs[a], z); \
2363  } \
2364  break
2365 #endif
2366 
2367  CASE(OP_ADDI, BB) {
2368  OP_MATHI(add);
2369  }
2370 
2371  CASE(OP_SUBI, BB) {
2372  OP_MATHI(sub);
2373  }
2374 
2375 #define OP_CMP_BODY(op,v1,v2) (v1(regs[a]) op v2(regs[a+1]))
2376 
2377 #ifdef MRB_NO_FLOAT
2378 #define OP_CMP(op,sym) do {\
2379  int result;\
2380  /* need to check if - is overridden */\
2381  switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {\
2382  case TYPES2(MRB_TT_INTEGER,MRB_TT_INTEGER):\
2383  result = OP_CMP_BODY(op,mrb_fixnum,mrb_fixnum);\
2384  break;\
2385  default:\
2386  c = 1;\
2387  mid = MRB_OPSYM(sym);\
2388  goto L_SEND_SYM;\
2389  }\
2390  if (result) {\
2391  SET_TRUE_VALUE(regs[a]);\
2392  }\
2393  else {\
2394  SET_FALSE_VALUE(regs[a]);\
2395  }\
2396 } while(0)
2397 #else
2398 #define OP_CMP(op, sym) do {\
2399  int result;\
2400  /* need to check if - is overridden */\
2401  switch (TYPES2(mrb_type(regs[a]),mrb_type(regs[a+1]))) {\
2402  case TYPES2(MRB_TT_INTEGER,MRB_TT_INTEGER):\
2403  result = OP_CMP_BODY(op,mrb_fixnum,mrb_fixnum);\
2404  break;\
2405  case TYPES2(MRB_TT_INTEGER,MRB_TT_FLOAT):\
2406  result = OP_CMP_BODY(op,mrb_fixnum,mrb_float);\
2407  break;\
2408  case TYPES2(MRB_TT_FLOAT,MRB_TT_INTEGER):\
2409  result = OP_CMP_BODY(op,mrb_float,mrb_fixnum);\
2410  break;\
2411  case TYPES2(MRB_TT_FLOAT,MRB_TT_FLOAT):\
2412  result = OP_CMP_BODY(op,mrb_float,mrb_float);\
2413  break;\
2414  default:\
2415  c = 1;\
2416  mid = MRB_OPSYM(sym);\
2417  goto L_SEND_SYM;\
2418  }\
2419  if (result) {\
2420  SET_TRUE_VALUE(regs[a]);\
2421  }\
2422  else {\
2423  SET_FALSE_VALUE(regs[a]);\
2424  }\
2425 } while(0)
2426 #endif
2427 
2428  CASE(OP_EQ, B) {
2429  if (mrb_obj_eq(mrb, regs[a], regs[a+1])) {
2430  SET_TRUE_VALUE(regs[a]);
2431  }
2432  else {
2433  OP_CMP(==,eq);
2434  }
2435  NEXT;
2436  }
2437 
2438  CASE(OP_LT, B) {
2439  OP_CMP(<,lt);
2440  NEXT;
2441  }
2442 
2443  CASE(OP_LE, B) {
2444  OP_CMP(<=,le);
2445  NEXT;
2446  }
2447 
2448  CASE(OP_GT, B) {
2449  OP_CMP(>,gt);
2450  NEXT;
2451  }
2452 
2453  CASE(OP_GE, B) {
2454  OP_CMP(>=,ge);
2455  NEXT;
2456  }
2457 
2458  CASE(OP_ARRAY, BB) {
2460  regs[a] = v;
2461  mrb_gc_arena_restore(mrb, ai);
2462  NEXT;
2463  }
2464  CASE(OP_ARRAY2, BBB) {
2466  regs[a] = v;
2467  mrb_gc_arena_restore(mrb, ai);
2468  NEXT;
2469  }
2470 
2471  CASE(OP_ARYCAT, B) {
2472  mrb_value splat = mrb_ary_splat(mrb, regs[a+1]);
2473  if (mrb_nil_p(regs[a])) {
2474  regs[a] = splat;
2475  }
2476  else {
2477  mrb_ary_concat(mrb, regs[a], splat);
2478  }
2479  mrb_gc_arena_restore(mrb, ai);
2480  NEXT;
2481  }
2482 
2483  CASE(OP_ARYPUSH, B) {
2484  mrb_ary_push(mrb, regs[a], regs[a+1]);
2485  NEXT;
2486  }
2487 
2488  CASE(OP_ARYDUP, B) {
2489  mrb_value ary = regs[a];
2490  if (mrb_array_p(ary)) {
2491  ary = mrb_ary_new_from_values(mrb, RARRAY_LEN(ary), RARRAY_PTR(ary));
2492  }
2493  else {
2494  ary = mrb_ary_new_from_values(mrb, 1, &ary);
2495  }
2496  regs[a] = ary;
2497  NEXT;
2498  }
2499 
2500  CASE(OP_AREF, BBB) {
2501  mrb_value v = regs[b];
2502 
2503  if (!mrb_array_p(v)) {
2504  if (c == 0) {
2505  regs[a] = v;
2506  }
2507  else {
2508  SET_NIL_VALUE(regs[a]);
2509  }
2510  }
2511  else {
2512  v = mrb_ary_ref(mrb, v, c);
2513  regs[a] = v;
2514  }
2515  NEXT;
2516  }
2517 
2518  CASE(OP_ASET, BBB) {
2519  mrb_ary_set(mrb, regs[b], c, regs[a]);
2520  NEXT;
2521  }
2522 
2523  CASE(OP_APOST, BBB) {
2524  mrb_value v = regs[a];
2525  int pre = b;
2526  int post = c;
2527  struct RArray *ary;
2528  int len, idx;
2529 
2530  if (!mrb_array_p(v)) {
2531  v = mrb_ary_new_from_values(mrb, 1, &regs[a]);
2532  }
2533  ary = mrb_ary_ptr(v);
2534  len = (int)ARY_LEN(ary);
2535  if (len > pre + post) {
2537  regs[a++] = v;
2538  while (post--) {
2539  regs[a++] = ARY_PTR(ary)[len-post-1];
2540  }
2541  }
2542  else {
2543  v = mrb_ary_new_capa(mrb, 0);
2544  regs[a++] = v;
2545  for (idx=0; idx+pre<len; idx++) {
2546  regs[a+idx] = ARY_PTR(ary)[pre+idx];
2547  }
2548  while (idx < post) {
2549  SET_NIL_VALUE(regs[a+idx]);
2550  idx++;
2551  }
2552  }
2553  mrb_gc_arena_restore(mrb, ai);
2554  NEXT;
2555  }
2556 
2557  CASE(OP_INTERN, B) {
2558  mrb_sym sym = mrb_intern_str(mrb, regs[a]);
2559 
2560  regs[a] = mrb_symbol_value(sym);
2561  mrb_gc_arena_restore(mrb, ai);
2562  NEXT;
2563  }
2564 
2565  CASE(OP_STRING16, BS) {
2566  goto op_string;
2567  }
2568  CASE(OP_STRING, BB) {
2569  size_t len;
2570  op_string:
2571  len = pool[b].tt >> 2;
2572  if (pool[b].tt & IREP_TT_SFLAG) {
2573  regs[a] = mrb_str_new_static(mrb, pool[b].u.str, len);
2574  }
2575  else {
2576  regs[a] = mrb_str_new(mrb, pool[b].u.str, len);
2577  }
2578  mrb_gc_arena_restore(mrb, ai);
2579  NEXT;
2580  }
2581 
2582  CASE(OP_STRCAT, B) {
2583  mrb_str_concat(mrb, regs[a], regs[a+1]);
2584  NEXT;
2585  }
2586 
2587  CASE(OP_HASH, BB) {
2589  int i;
2590  int lim = a+b*2;
2591 
2592  for (i=a; i<lim; i+=2) {
2593  mrb_hash_set(mrb, hash, regs[i], regs[i+1]);
2594  }
2595  regs[a] = hash;
2596  mrb_gc_arena_restore(mrb, ai);
2597  NEXT;
2598  }
2599 
2600  CASE(OP_HASHADD, BB) {
2601  mrb_value hash;
2602  int i;
2603  int lim = a+b*2+1;
2604 
2605  hash = mrb_ensure_hash_type(mrb, regs[a]);
2606  for (i=a+1; i<lim; i+=2) {
2607  mrb_hash_set(mrb, hash, regs[i], regs[i+1]);
2608  }
2609  mrb_gc_arena_restore(mrb, ai);
2610  NEXT;
2611  }
2612  CASE(OP_HASHCAT, B) {
2614 
2615  mrb_hash_merge(mrb, hash, regs[a+1]);
2616  mrb_gc_arena_restore(mrb, ai);
2617  NEXT;
2618  }
2619 
2620  CASE(OP_LAMBDA, BB)
2621  c = OP_L_LAMBDA;
2622  L_MAKE_LAMBDA:
2623  {
2624  struct RProc *p;
2625  const mrb_irep *nirep = irep->reps[b];
2626 
2627  if (c & OP_L_CAPTURE) {
2628  p = mrb_closure_new(mrb, nirep);
2629  }
2630  else {
2631  p = mrb_proc_new(mrb, nirep);
2632  p->flags |= MRB_PROC_SCOPE;
2633  }
2634  if (c & OP_L_STRICT) p->flags |= MRB_PROC_STRICT;
2635  regs[a] = mrb_obj_value(p);
2636  mrb_gc_arena_restore(mrb, ai);
2637  NEXT;
2638  }
2639  CASE(OP_BLOCK, BB) {
2640  c = OP_L_BLOCK;
2641  goto L_MAKE_LAMBDA;
2642  }
2643  CASE(OP_METHOD, BB) {
2644  c = OP_L_METHOD;
2645  goto L_MAKE_LAMBDA;
2646  }
2647  CASE(OP_LAMBDA16, BS) {
2648  c = OP_L_LAMBDA;
2649  goto L_MAKE_LAMBDA;
2650  }
2651  CASE(OP_BLOCK16, BS) {
2652  c = OP_L_BLOCK;
2653  goto L_MAKE_LAMBDA;
2654  }
2655  CASE(OP_METHOD16, BS) {
2656  c = OP_L_METHOD;
2657  goto L_MAKE_LAMBDA;
2658  }
2659 
2660  CASE(OP_RANGE_INC, B) {
2661  mrb_value val = mrb_range_new(mrb, regs[a], regs[a+1], FALSE);
2662  regs[a] = val;
2663  mrb_gc_arena_restore(mrb, ai);
2664  NEXT;
2665  }
2666 
2667  CASE(OP_RANGE_EXC, B) {
2668  mrb_value val = mrb_range_new(mrb, regs[a], regs[a+1], TRUE);
2669  regs[a] = val;
2670  mrb_gc_arena_restore(mrb, ai);
2671  NEXT;
2672  }
2673 
2674  CASE(OP_OCLASS, B) {
2675  regs[a] = mrb_obj_value(mrb->object_class);
2676  NEXT;
2677  }
2678 
2679  CASE(OP_CLASS, BB) {
2680  struct RClass *c = 0, *baseclass;
2681  mrb_value base, super;
2682  mrb_sym id = syms[b];
2683 
2684  base = regs[a];
2685  super = regs[a+1];
2686  if (mrb_nil_p(base)) {
2687  baseclass = MRB_PROC_TARGET_CLASS(mrb->c->ci->proc);
2688  if (!baseclass) baseclass = mrb->object_class;
2689  base = mrb_obj_value(baseclass);
2690  }
2691  c = mrb_vm_define_class(mrb, base, super, id);
2692  regs[a] = mrb_obj_value(c);
2693  mrb_gc_arena_restore(mrb, ai);
2694  NEXT;
2695  }
2696 
2697  CASE(OP_MODULE, BB) {
2698  struct RClass *cls = 0, *baseclass;
2699  mrb_value base;
2700  mrb_sym id = syms[b];
2701 
2702  base = regs[a];
2703  if (mrb_nil_p(base)) {
2704  baseclass = MRB_PROC_TARGET_CLASS(mrb->c->ci->proc);
2705  if (!baseclass) baseclass = mrb->object_class;
2706  base = mrb_obj_value(baseclass);
2707  }
2708  cls = mrb_vm_define_module(mrb, base, id);
2709  regs[a] = mrb_obj_value(cls);
2710  mrb_gc_arena_restore(mrb, ai);
2711  NEXT;
2712  }
2713 
2714  CASE(OP_EXEC16, BS)
2715  goto L_EXEC;
2716  CASE(OP_EXEC, BB)
2717  L_EXEC:
2718  {
2719  mrb_value recv = regs[a];
2720  struct RProc *p;
2721  const mrb_irep *nirep = irep->reps[b];
2722 
2723  /* prepare closure */
2724  p = mrb_proc_new(mrb, nirep);
2725  p->c = NULL;
2726  mrb_field_write_barrier(mrb, (struct RBasic*)p, (struct RBasic*)proc);
2728  p->flags |= MRB_PROC_SCOPE;
2729 
2730  /* prepare call stack */
2731  cipush(mrb, a, a, mrb_class_ptr(recv), p, 0, 0);
2732 
2733  irep = p->body.irep;
2734  pool = irep->pool;
2735  syms = irep->syms;
2736  mrb_stack_extend(mrb, irep->nregs);
2737  stack_clear(regs+1, irep->nregs-1);
2738  pc = irep->iseq;
2739  JUMP;
2740  }
2741 
2742  CASE(OP_DEF, BB) {
2743  struct RClass *target = mrb_class_ptr(regs[a]);
2744  struct RProc *p = mrb_proc_ptr(regs[a+1]);
2745  mrb_method_t m;
2746 
2748  mrb_define_method_raw(mrb, target, syms[b], m);
2749  mrb_gc_arena_restore(mrb, ai);
2750  NEXT;
2751  }
2752 
2753  CASE(OP_SCLASS, B) {
2754  regs[a] = mrb_singleton_class(mrb, regs[a]);
2755  mrb_gc_arena_restore(mrb, ai);
2756  NEXT;
2757  }
2758 
2759  CASE(OP_TCLASS, B) {
2760  if (!check_target_class(mrb)) goto L_RAISE;
2762  NEXT;
2763  }
2764 
2765  CASE(OP_ALIAS, BB) {
2766  struct RClass *target;
2767 
2768  if (!check_target_class(mrb)) goto L_RAISE;
2769  target = mrb_vm_ci_target_class(mrb->c->ci);
2770  mrb_alias_method(mrb, target, syms[a], syms[b]);
2771  NEXT;
2772  }
2773  CASE(OP_UNDEF, B) {
2774  struct RClass *target;
2775 
2776  if (!check_target_class(mrb)) goto L_RAISE;
2777  target = mrb_vm_ci_target_class(mrb->c->ci);
2778  mrb_undef_method_id(mrb, target, syms[a]);
2779  NEXT;
2780  }
2781 
2782  CASE(OP_DEBUG, Z) {
2783  FETCH_BBB();
2784 #ifdef MRB_USE_DEBUG_HOOK
2785  mrb->debug_op_hook(mrb, irep, pc, regs);
2786 #else
2787 #ifndef MRB_NO_STDIO
2788  printf("OP_DEBUG %d %d %d\n", a, b, c);
2789 #else
2790  abort();
2791 #endif
2792 #endif
2793  NEXT;
2794  }
2795 
2796  CASE(OP_ERR, B) {
2797  size_t len = pool[a].tt >> 2;
2798  mrb_value exc;
2799 
2800  mrb_assert((pool[a].tt&IREP_TT_NFLAG)==0);
2801  exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, pool[a].u.str, len);
2802  mrb_exc_set(mrb, exc);
2803  goto L_RAISE;
2804  }
2805 
2806  CASE(OP_SENDVK, BB) { /* not yet implemented */
2807  NEXT;
2808  }
2809 
2810  CASE(OP_STOP, Z) {
2811  /* stop VM */
2813  /* do nothing */
2814  }
2817  }
2819  L_STOP:
2820  mrb->jmp = prev_jmp;
2821  if (mrb->exc) {
2822  mrb_assert(mrb->exc->tt == MRB_TT_EXCEPTION);
2823  return mrb_obj_value(mrb->exc);
2824  }
2825  return regs[irep->nlocals];
2826  }
2827  }
2828  END_DISPATCH;
2829 #undef regs
2830  }
2831  MRB_CATCH(&c_jmp) {
2832  mrb_callinfo *ci = mrb->c->ci;
2833  while (ci > mrb->c->cibase && ci->acc == CI_ACC_DIRECT) {
2834  ci = cipop(mrb);
2835  }
2836  exc_catched = TRUE;
2837  pc = ci->pc;
2838  goto RETRY_TRY_BLOCK;
2839  }
2840  MRB_END_EXC(&c_jmp);
2841 }
2842 
2844 mrb_run(mrb_state *mrb, const struct RProc *proc, mrb_value self)
2845 {
2846  if (mrb->c->ci->argc < 0) {
2847  return mrb_vm_run(mrb, proc, self, 3); /* receiver, args and block) */
2848  }
2849  else {
2850  return mrb_vm_run(mrb, proc, self, mrb->c->ci->argc + 2); /* argc + 2 (receiver and block) */
2851  }
2852 }
2853 
2855 mrb_top_run(mrb_state *mrb, const struct RProc *proc, mrb_value self, mrb_int stack_keep)
2856 {
2857  mrb_value v;
2858 
2859  if (!mrb->c->cibase) {
2860  return mrb_vm_run(mrb, proc, self, stack_keep);
2861  }
2862  if (mrb->c->ci == mrb->c->cibase) {
2863  mrb_vm_ci_env_set(mrb->c->ci, NULL);
2864  return mrb_vm_run(mrb, proc, self, stack_keep);
2865  }
2866  cipush(mrb, 0, CI_ACC_SKIP, mrb->object_class, NULL, 0, 0);
2867  v = mrb_vm_run(mrb, proc, self, stack_keep);
2868 
2869  return v;
2870 }
2871 
2872 #if defined(MRB_USE_CXX_EXCEPTION) && defined(__cplusplus)
2873 # if !defined(MRB_USE_CXX_ABI)
2874 } /* end of extern "C" */
2875 # endif
2876 mrb_int mrb_jmpbuf::jmpbuf_id = 0;
2877 # if !defined(MRB_USE_CXX_ABI)
2878 extern "C" {
2879 # endif
2880 #endif
return _Result< 0 ? -1 :_Result;} #line 1069 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnwprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1091 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, va_list _ArgList) { return _vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1108 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format, va_list _ArgList) { return _vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1133 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1179 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1196 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __vswprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1212 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf(wchar_t *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1227 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1243 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1264 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1281 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1283 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1312 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, va_list _ArgList) { return _vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1347 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_l(_Format,((void *) 0), _ArgList);} #line 1361 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vswprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1380 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vscwprintf_p(wchar_t const *const _Format, va_list _ArgList) { return _vscwprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1394 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl __swprintf_l(wchar_t *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1414 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1435 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf(wchar_t *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__vswprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1454 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1474 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "__swprintf_l_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __swprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vswprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl __vswprintf_l(wchar_t *_Buffer, wchar_t const *_Format, _locale_t _Locale, va_list _Args);__declspec(deprecated("This function or variable may be unsafe. Consider using " "swprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swprintf(wchar_t *_Buffer, wchar_t const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vswprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vswprintf(wchar_t *_Buffer, wchar_t const *_Format, va_list _Args);__inline int __cdecl _swprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1511 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1532 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1534 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1562 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_p(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1582 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1603 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swprintf_c(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1623 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwprintf_l(wchar_t *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1646 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf(wchar_t *_Buffer, size_t _BufferCount, wchar_t const *_Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1668 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s_l(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwprintf_s(wchar_t *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1711 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1737 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1755 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p_l(wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1774 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _scwprintf_p(wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscwprintf_p_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1792 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #pragma warning(push) #pragma warning(disable:4141 6054) #pragma warning(pop) #line 1856 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" int __cdecl __stdio_common_vswscanf(unsigned __int64 _Options, wchar_t const *_Buffer, size_t _BufferCount, wchar_t const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vswscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1897 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf(wchar_t const *_Buffer, wchar_t const *_Format, va_list _ArgList) { return _vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vswscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl vswscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format, va_list _ArgList) { return _vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 1947 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 1949 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1976 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _vsnwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vswscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);} #line 1995 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_swscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _swscanf_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2015 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "swscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl swscanf(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2034 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _swscanf_s_l(wchar_t const *const _Buffer, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2054 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl swscanf_s(wchar_t const *const _Buffer, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vswscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" #line 2077 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2100 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snwscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snwscanf(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2122 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s_l(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2143 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __inline int __cdecl _snwscanf_s(wchar_t const *const _Buffer, size_t const _BufferCount, wchar_t const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnwscanf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2163 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstdio.h" __pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) typedef __int64 fpos_t;errno_t __cdecl _get_stream_buffer_pointers(FILE *_Stream, char ***_Base, char ***_Pointer, int **_Count);errno_t __cdecl clearerr_s(FILE *_Stream);errno_t __cdecl fopen_s(FILE **_Stream, char const *_FileName, char const *_Mode);size_t __cdecl fread_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);errno_t __cdecl freopen_s(FILE **_Stream, char const *_FileName, char const *_Mode, FILE *_OldStream);char *__cdecl gets_s(char *_Buffer, rsize_t _Size);errno_t __cdecl tmpfile_s(FILE **_Stream);errno_t __cdecl tmpnam_s(char *_Buffer, rsize_t _Size);#line 145 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl clearerr(FILE *_Stream);int __cdecl fclose(FILE *_Stream);int __cdecl _fcloseall(void);FILE *__cdecl _fdopen(int _FileHandle, char const *_Mode);int __cdecl feof(FILE *_Stream);int __cdecl ferror(FILE *_Stream);int __cdecl fflush(FILE *_Stream);int __cdecl fgetc(FILE *_Stream);int __cdecl _fgetchar(void);int __cdecl fgetpos(FILE *_Stream, fpos_t *_Position);char *__cdecl fgets(char *_Buffer, int _MaxCount, FILE *_Stream);int __cdecl _fileno(FILE *_Stream);int __cdecl _flushall(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "fopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl fopen(char const *_FileName, char const *_Mode);int __cdecl fputc(int _Character, FILE *_Stream);int __cdecl _fputchar(int _Character);int __cdecl fputs(char const *_Buffer, FILE *_Stream);size_t __cdecl fread(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);__declspec(deprecated("This function or variable may be unsafe. Consider using " "freopen_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl freopen(char const *_FileName, char const *_Mode, FILE *_Stream);FILE *__cdecl _fsopen(char const *_FileName, char const *_Mode, int _ShFlag);int __cdecl fsetpos(FILE *_Stream, fpos_t const *_Position);int __cdecl fseek(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl ftell(FILE *_Stream);__int64 __cdecl _ftelli64(FILE *_Stream);size_t __cdecl fwrite(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl getc(FILE *_Stream);int __cdecl getchar(void);int __cdecl _getmaxstdio(void);int __cdecl _getw(FILE *_Stream);void __cdecl perror(char const *_ErrorMessage);int __cdecl _pclose(FILE *_Stream);FILE *__cdecl _popen(char const *_Command, char const *_Mode);#line 344 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl putc(int _Character, FILE *_Stream);int __cdecl putchar(int _Character);int __cdecl puts(char const *_Buffer);int __cdecl _putw(int _Word, FILE *_Stream);int __cdecl remove(char const *_FileName);int __cdecl rename(char const *_OldFileName, char const *_NewFileName);int __cdecl _unlink(char const *_FileName);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_unlink" ". See online help for details.")) int __cdecl unlink(char const *_FileName);#line 391 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" void __cdecl rewind(FILE *_Stream);int __cdecl _rmtmp(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "setvbuf" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) void __cdecl setbuf(FILE *_Stream, char *_Buffer);int __cdecl _setmaxstdio(int _Maximum);int __cdecl setvbuf(FILE *_Stream, char *_Buffer, int _Mode, size_t _Size);__declspec(allocator) char *__cdecl _tempnam(char const *_DirectoryName, char const *_FilePrefix);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpfile_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) FILE *__cdecl tmpfile(void);__declspec(deprecated("This function or variable may be unsafe. Consider using " "tmpnam_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl tmpnam(char *_Buffer);int __cdecl ungetc(int _Character, FILE *_Stream);void __cdecl _lock_file(FILE *_Stream);void __cdecl _unlock_file(FILE *_Stream);int __cdecl _fclose_nolock(FILE *_Stream);int __cdecl _fflush_nolock(FILE *_Stream);int __cdecl _fgetc_nolock(FILE *_Stream);int __cdecl _fputc_nolock(int _Character, FILE *_Stream);size_t __cdecl _fread_nolock(void *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);size_t __cdecl _fread_nolock_s(void *_Buffer, size_t _BufferSize, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _fseek_nolock(FILE *_Stream, long _Offset, int _Origin);int __cdecl _fseeki64_nolock(FILE *_Stream, __int64 _Offset, int _Origin);long __cdecl _ftell_nolock(FILE *_Stream);__int64 __cdecl _ftelli64_nolock(FILE *_Stream);size_t __cdecl _fwrite_nolock(void const *_Buffer, size_t _ElementSize, size_t _ElementCount, FILE *_Stream);int __cdecl _getc_nolock(FILE *_Stream);int __cdecl _putc_nolock(int _Character, FILE *_Stream);int __cdecl _ungetc_nolock(int _Character, FILE *_Stream);int *__cdecl __p__commode(void);#line 596 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfprintf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_s(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vfprintf_p(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vfprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 648 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 662 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_s((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 677 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfprintf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 693 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 695 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfprintf_p((*__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList);} #line 710 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfprintf_p(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);} #line 724 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 738 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf(char const *const _Format, va_list _ArgList) { return _vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 751 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 765 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vprintf_s(char const *const _Format, va_list _ArgList) { return _vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 780 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);} #line 796 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vprintf_p(char const *const _Format, va_list _ArgList) { return _vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);} #line 809 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 828 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 846 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl _set_printf_count_output(int _Value);int __cdecl _get_printf_count_output(void);__inline int __cdecl _fprintf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 871 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fprintf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 891 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 893 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 912 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fprintf_p(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 930 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 948 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 965 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 983 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl printf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_s_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1002 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1004 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1022 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _printf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfprintf_p_l((__acrt_iob_func(1)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1039 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vfscanf(unsigned __int64 _Options, FILE *_Stream, char const *_Format, _locale_t _Locale, va_list _Arglist);__inline int __cdecl _vfscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options()), _Stream, _Format, _Locale, _ArgList);} #line 1070 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1084 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vfscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vfscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Stream, _Format, _Locale, _ArgList);} #line 1101 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vfscanf_s(FILE *const _Stream, char const *const _Format, va_list _ArgList) { return _vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);} #line 1118 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1120 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1134 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf(char const *const _Format, va_list _ArgList) { return _vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1147 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscanf_s_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);} #line 1161 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vscanf_s(char const *const _Format, va_list _ArgList) { return _vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);} #line 1176 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1178 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_fscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _fscanf_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1197 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "fscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl fscanf(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1215 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _fscanf_s_l(FILE *const _Stream, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1234 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl fscanf_s(FILE *const _Stream, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l(_Stream, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1254 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_scanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _scanf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1274 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "scanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl scanf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1291 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scanf_s_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1309 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl scanf_s(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vfscanf_s_l((__acrt_iob_func(0)), _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1328 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1330 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsprintf(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsnprintf_s(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, size_t _MaxCount, char const *_Format, _locale_t _Locale, va_list _ArgList);int __cdecl __stdio_common_vsprintf_p(unsigned __int64 _Options, char *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsnprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1399 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1415 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);return _Result< 0 ? -1 :_Result;} #line 1446 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _vsprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 1462 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl vsprintf(char *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsnprintf_l(_Buffer,(size_t) -1, _Format,((void *) 0), _ArgList);} #line 1477 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1498 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1516 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1526 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1547 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1563 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsnprintf_s((*__local_stdio_printf_options()), _Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1585 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1602 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsnprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);} #line 1630 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1641 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1659 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf(char const *const _Format, va_list _ArgList) { return _vscprintf_l(_Format,((void *) 0), _ArgList);} #line 1672 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p_l(char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf_p((*__local_stdio_printf_options())|(1ULL<< 1),((void *) 0), 0, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1690 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vscprintf_p(char const *const _Format, va_list _ArgList) { return _vscprintf_p_l(_Format,((void *) 0), _ArgList);} #line 1703 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { int const _Result=__stdio_common_vsprintf((*__local_stdio_printf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);return _Result< 0 ? -1 :_Result;} #line 1723 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsnprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format, va_list _ArgList) { return _vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);} #line 1739 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sprintf_l(char *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1761 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf(char *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1782 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl sprintf(char *_Buffer, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "vsprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl vsprintf(char *_Buffer, char const *_Format, va_list _Args);__inline int __cdecl _sprintf_s_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1810 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sprintf_s(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_s_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1832 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 1834 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1862 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sprintf_p(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsprintf_p_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1882 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snprintf_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1905 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1936 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf(_Buffer, _BufferCount, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1956 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _snprintf(char *_Buffer, size_t _BufferCount, char const *_Format,...);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_vsnprintf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) int __cdecl _vsnprintf(char *_Buffer, size_t _BufferCount, char const *_Format, va_list _Args);__inline int __cdecl _snprintf_c_l(char *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 1986 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_c(char *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_c_l(_Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2006 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s_l(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2028 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snprintf_s(char *const _Buffer, size_t const _BufferCount, size_t const _MaxCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsnprintf_s_l(_Buffer, _BufferCount, _MaxCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2049 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2075 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_l(_Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2092 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p_l(char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p_l(_Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2110 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _scprintf_p(char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vscprintf_p(_Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2127 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" int __cdecl __stdio_common_vsscanf(unsigned __int64 _Options, char const *_Buffer, size_t _BufferCount, char const *_Format, _locale_t _Locale, va_list _ArgList);__inline int __cdecl _vsscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2158 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl vsscanf(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2172 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _vsscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale, va_list _ArgList) { return __stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer,(size_t) -1, _Format, _Locale, _ArgList);} #line 2189 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __inline int __cdecl vsscanf_s(char const *const _Buffer, char const *const _Format, va_list _ArgList) { return _vsscanf_s_l(_Buffer, _Format,((void *) 0), _ArgList);} #line 2208 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) #line 2219 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_sscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _sscanf_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2238 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "sscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl sscanf(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_l(_Buffer, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2256 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _sscanf_s_l(char const *const _Buffer, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=_vsscanf_s_l(_Buffer, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2275 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl sscanf_s(char const *const _Buffer, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=vsscanf_s(_Buffer, _Format, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2297 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #line 2299 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(push) #pragma warning(disable:6530) __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2326 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "_snscanf_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) __inline int __cdecl _snscanf(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options()), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2349 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s_l(char const *const _Buffer, size_t const _BufferCount, char const *const _Format, _locale_t const _Locale,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Locale))+((sizeof(_Locale)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2374 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" __inline int __cdecl _snscanf_s(char const *const _Buffer, size_t const _BufferCount, char const *const _Format,...) { int _Result;va_list _ArgList;((void)(_ArgList=(va_list)(&(_Format))+((sizeof(_Format)+sizeof(int) - 1) &~(sizeof(int) - 1)))) ;_Result=__stdio_common_vsscanf((*__local_stdio_scanf_options())|(1ULL<< 0), _Buffer, _BufferCount, _Format,((void *) 0), _ArgList);((void)(_ArgList=(va_list) 0)) ;return _Result;} #line 2397 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h" #pragma warning(pop) __declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_tempnam" ". See online help for details.")) char *__cdecl tempnam(char const *_Directory, char const *_FilePrefix);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fcloseall" ". See online help for details.")) int __cdecl fcloseall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fdopen" ". See online help for details.")) FILE *__cdecl fdopen(int _FileHandle, char const *_Format);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fgetchar" ". See online help for details.")) int __cdecl fgetchar(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fileno" ". See online help for details.")) int __cdecl fileno(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_flushall" ". See online help for details.")) int __cdecl flushall(void);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_fputchar" ". See online help for details.")) int __cdecl fputchar(int _Ch);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_getw" ". See online help for details.")) int __cdecl getw(FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_putw" ". See online help for details.")) int __cdecl putw(int _Ch, FILE *_Stream);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_rmtmp" ". See online help for details.")) int __cdecl rmtmp(void);#line 2441 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\stdio.h"__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma once#pragma once#pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int *__cdecl _errno(void);errno_t __cdecl _set_errno(int _Value);errno_t __cdecl _get_errno(int *_Value);unsigned long *__cdecl __doserrno(void);errno_t __cdecl _set_doserrno(unsigned long _Value);errno_t __cdecl _get_doserrno(unsigned long *_Value);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) void *__cdecl memchr(void const *_Buf, int _Val, size_t _MaxCount);int __cdecl memcmp(void const *_Buf1, void const *_Buf2, size_t _Size);void *__cdecl memcpy(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memmove(void *_Dst, void const *_Src, size_t _Size);void *__cdecl memset(void *_Dst, int _Val, size_t _Size);char *__cdecl strchr(char const *_Str, int _Val);char *__cdecl strrchr(char const *_Str, int _Ch);char *__cdecl strstr(char const *_Str, char const *_SubStr);wchar_t *__cdecl wcschr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsrchr(wchar_t const *_Str, wchar_t _Ch);wchar_t *__cdecl wcsstr(wchar_t const *_Str, wchar_t const *_SubStr);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) static __inline errno_t __cdecl memcpy_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;if(_Source==((void *) 0)||_DestinationSize< _SourceSize) { memset(_Destination, 0, _DestinationSize);{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;return 22 ;} memcpy(_Destination, _Source, _SourceSize);return 0;} static __inline errno_t __cdecl memmove_s(void *const _Destination, rsize_t const _DestinationSize, void const *const _Source, rsize_t const _SourceSize) { if(_SourceSize==0) { return 0;} { int _Expr_val=!!(_Destination !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_Source !=((void *) 0));if(!(_Expr_val)) {(*_errno())=22;_invalid_parameter_noinfo();return 22;} } ;{ int _Expr_val=!!(_DestinationSize >=_SourceSize);if(!(_Expr_val)) {(*_errno())=34;_invalid_parameter_noinfo();return 34;} } ;memmove(_Destination, _Source, _SourceSize);return 0;}#pragma warning(pop) __pragma(pack(pop))#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) int __cdecl _memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);int __cdecl _memicmp_l(void const *_Buf1, void const *_Buf2, size_t _Size, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memccpy" ". See online help for details.")) void *__cdecl memccpy(void *_Dst, void const *_Src, int _Val, size_t _Size);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_memicmp" ". See online help for details.")) int __cdecl memicmp(void const *_Buf1, void const *_Buf2, size_t _Size);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl wcscat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcscpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source);errno_t __cdecl wcsncat_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);errno_t __cdecl wcsncpy_s(wchar_t *_Destination, rsize_t _SizeInWords, wchar_t const *_Source, rsize_t _MaxCount);wchar_t *__cdecl wcstok_s(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);__declspec(allocator) wchar_t *__cdecl _wcsdup(wchar_t const *_String);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscat(wchar_t *_Destination, wchar_t const *_Source);int __cdecl wcscmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcscpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcscpy(wchar_t *_Destination, wchar_t const *_Source);size_t __cdecl wcscspn(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcslen(wchar_t const *_String);size_t __cdecl wcsnlen(wchar_t const *_Source, size_t _MaxCount);static __inline size_t __cdecl wcsnlen_s(wchar_t const *_Source, size_t _MaxCount) { return(_Source==0) ? 0 :wcsnlen(_Source, _MaxCount);}__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncat(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);int __cdecl wcsncmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcsncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcsncpy(wchar_t *_Destination, wchar_t const *_Source, size_t _Count);wchar_t *__cdecl wcspbrk(wchar_t const *_String, wchar_t const *_Control);size_t __cdecl wcsspn(wchar_t const *_String, wchar_t const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl wcstok(wchar_t *_String, wchar_t const *_Delimiter, wchar_t **_Context);#line 237 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\corecrt_wstring.h" __declspec(deprecated("This function or variable may be unsafe. Consider using " "wcstok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) static __inline wchar_t *__cdecl _wcstok(wchar_t *const _String, wchar_t const *const _Delimiter) { return wcstok(_String, _Delimiter, 0);} __declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcserror(int _ErrorNumber);errno_t __cdecl _wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, int _ErrorNumber);__declspec(deprecated("This function or variable may be unsafe. Consider using " "__wcserror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl __wcserror(wchar_t const *_String);errno_t __cdecl __wcserror_s(wchar_t *_Buffer, size_t _SizeInWords, wchar_t const *_ErrorMessage);int __cdecl _wcsicmp(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicmp_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicmp_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);errno_t __cdecl _wcsnset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);wchar_t *__cdecl _wcsrev(wchar_t *_String);errno_t __cdecl _wcsset_s(wchar_t *_Destination, size_t _SizeInWords, wchar_t _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsset(wchar_t *_String, wchar_t _Value);errno_t __cdecl _wcslwr_s(wchar_t *_String, size_t _SizeInWords);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr(wchar_t *_String);errno_t __cdecl _wcslwr_s_l(wchar_t *_String, size_t _SizeInWords, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcslwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcslwr_l(wchar_t *_String, _locale_t _Locale);errno_t __cdecl _wcsupr_s(wchar_t *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr(wchar_t *_String);errno_t __cdecl _wcsupr_s_l(wchar_t *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_wcsupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) wchar_t *__cdecl _wcsupr_l(wchar_t *_String, _locale_t _Locale);size_t __cdecl wcsxfrm(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount);size_t __cdecl _wcsxfrm_l(wchar_t *_Destination, wchar_t const *_Source, size_t _MaxCount, _locale_t _Locale);int __cdecl wcscoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcscoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsicoll(wchar_t const *_String1, wchar_t const *_String2);int __cdecl _wcsicoll_l(wchar_t const *_String1, wchar_t const *_String2, _locale_t _Locale);int __cdecl _wcsncoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsncoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _wcsnicoll(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);int __cdecl _wcsnicoll_l(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsdup" ". See online help for details.")) wchar_t *__cdecl wcsdup(wchar_t const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicmp" ". See online help for details.")) int __cdecl wcsicmp(wchar_t const *_String1, wchar_t const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnicmp" ". See online help for details.")) int __cdecl wcsnicmp(wchar_t const *_String1, wchar_t const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsnset" ". See online help for details.")) wchar_t *__cdecl wcsnset(wchar_t *_String, wchar_t _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsrev" ". See online help for details.")) wchar_t *__cdecl wcsrev(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsset" ". See online help for details.")) wchar_t *__cdecl wcsset(wchar_t *_String, wchar_t _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcslwr" ". See online help for details.")) wchar_t *__cdecl wcslwr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsupr" ". See online help for details.")) wchar_t *__cdecl wcsupr(wchar_t *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_wcsicoll" ". See online help for details.")) int __cdecl wcsicoll(wchar_t const *_String1, wchar_t const *_String2);__pragma(pack(pop))#pragma warning(pop) #pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) __pragma(pack(push, 8)) errno_t __cdecl strcpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strcat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source);errno_t __cdecl strerror_s(char *_Buffer, size_t _SizeInBytes, int _ErrorNumber);errno_t __cdecl strncat_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);errno_t __cdecl strncpy_s(char *_Destination, rsize_t _SizeInBytes, char const *_Source, rsize_t _MaxCount);char *__cdecl strtok_s(char *_String, char const *_Delimiter, char **_Context);void *__cdecl _memccpy(void *_Dst, void const *_Src, int _Val, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcat(char *_Destination, char const *_Source);int __cdecl strcmp(char const *_Str1, char const *_Str2);int __cdecl _strcmpi(char const *_String1, char const *_String2);int __cdecl strcoll(char const *_String1, char const *_String2);int __cdecl _strcoll_l(char const *_String1, char const *_String2, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strcpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strcpy(char *_Destination, char const *_Source);size_t __cdecl strcspn(char const *_Str, char const *_Control);__declspec(allocator) char *__cdecl _strdup(char const *_Source);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strerror(char const *_ErrorMessage);errno_t __cdecl _strerror_s(char *_Buffer, size_t _SizeInBytes, char const *_ErrorMessage);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strerror_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strerror(int _ErrorMessage);int __cdecl _stricmp(char const *_String1, char const *_String2);int __cdecl _stricoll(char const *_String1, char const *_String2);int __cdecl _stricoll_l(char const *_String1, char const *_String2, _locale_t _Locale);int __cdecl _stricmp_l(char const *_String1, char const *_String2, _locale_t _Locale);size_t __cdecl strlen(char const *_Str);errno_t __cdecl _strlwr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr(char *_String);errno_t __cdecl _strlwr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strlwr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strlwr_l(char *_String, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncat_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncat(char *_Destination, char const *_Source, size_t _Count);int __cdecl strncmp(char const *_Str1, char const *_Str2, size_t _MaxCount);int __cdecl _strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicmp_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strnicoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strnicoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);int __cdecl _strncoll(char const *_String1, char const *_String2, size_t _MaxCount);int __cdecl _strncoll_l(char const *_String1, char const *_String2, size_t _MaxCount, _locale_t _Locale);size_t __cdecl __strncnt(char const *_String, size_t _Count);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strncpy_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strncpy(char *_Destination, char const *_Source, size_t _Count);size_t __cdecl strnlen(char const *_String, size_t _MaxCount);static __inline size_t __cdecl strnlen_s(char const *_String, size_t _MaxCount) { return _String==0 ? 0 :strnlen(_String, _MaxCount);} errno_t __cdecl _strnset_s(char *_String, size_t _SizeInBytes, int _Value, size_t _MaxCount);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strnset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strnset(char *_Destination, int _Value, size_t _Count);char *__cdecl strpbrk(char const *_Str, char const *_Control);char *__cdecl _strrev(char *_Str);errno_t __cdecl _strset_s(char *_Destination, size_t _DestinationSize, int _Value);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strset_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strset(char *_Destination, int _Value);size_t __cdecl strspn(char const *_Str, char const *_Control);__declspec(deprecated("This function or variable may be unsafe. Consider using " "strtok_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl strtok(char *_String, char const *_Delimiter);errno_t __cdecl _strupr_s(char *_String, size_t _Size);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr(char *_String);errno_t __cdecl _strupr_s_l(char *_String, size_t _Size, _locale_t _Locale);__declspec(deprecated("This function or variable may be unsafe. Consider using " "_strupr_s_l" " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. " "See online help for details.")) char *__cdecl _strupr_l(char *_String, _locale_t _Locale);size_t __cdecl strxfrm(char *_Destination, char const *_Source, size_t _MaxCount);size_t __cdecl _strxfrm_l(char *_Destination, char const *_Source, size_t _MaxCount, _locale_t _Locale);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strdup" ". See online help for details.")) char *__cdecl strdup(char const *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strcmpi" ". See online help for details.")) int __cdecl strcmpi(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_stricmp" ". See online help for details.")) int __cdecl stricmp(char const *_String1, char const *_String2);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strlwr" ". See online help for details.")) char *__cdecl strlwr(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnicmp" ". See online help for details.")) int __cdecl strnicmp(char const *_String1, char const *_String2, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strnset" ". See online help for details.")) char *__cdecl strnset(char *_String, int _Value, size_t _MaxCount);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strrev" ". See online help for details.")) char *__cdecl strrev(char *_String);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strset" ". See online help for details.")) char *__cdecl strset(char *_String, int _Value);__declspec(deprecated("The POSIX name for this item is deprecated. Instead, use the ISO C " "and C++ conformant name: " "_strupr" ". See online help for details.")) char *__cdecl strupr(char *_String);__pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4514 4820) __pragma(pack(push, 8)) __pragma(pack(pop))#pragma warning(pop) #pragma once#pragma warning(push)#pragma warning(disable:4324 4514 4574 4710 4793 4820 4995 4996 28719 28726 28727) typedef unsigned short _ino_t;typedef _ino_t ino_t;#line 24 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef unsigned int _dev_t;typedef _dev_t dev_t;#line 36 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h" typedef long _off_t;typedef _off_t off_t;#line 48 "C:/Program Files (x86)/Windows Kits/10/include/10.0.19041.0/ucrt\\sys/types.h"#pragma warning(pop) typedef char *sds;#pragma pack(push, 1) struct sdshdr5 { unsigned char flags;char buf[];};struct sdshdr8 { uint8_t len;uint8_t alloc;unsigned char flags;char buf[];};struct sdshdr16 { uint16_t len;uint16_t alloc;unsigned char flags;char buf[];};struct sdshdr32 { uint32_t len;uint32_t alloc;unsigned char flags;char buf[];};struct sdshdr64 { uint64_t len;uint64_t alloc;unsigned char flags;char buf[];};#pragma pack(pop) static inline size_t sdslen(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :return((flags) >> 3) ;case 1 :return((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len;case 2 :return((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len;case 3 :return((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) ->len;case 4 :return((struct sdshdr64 *)((s) -(sizeof(struct sdshdr64)))) ->len;} return 0;}static inline size_t sdsavail(const sds s) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ return 0;} case 1 :{ struct sdshdr8 *sh=(void *)((s) -(sizeof(struct sdshdr8)));;return sh->alloc - sh->len;} case 2 :{ struct sdshdr16 *sh=(void *)((s) -(sizeof(struct sdshdr16)));;return sh->alloc - sh->len;} case 3 :{ struct sdshdr32 *sh=(void *)((s) -(sizeof(struct sdshdr32)));;return sh->alloc - sh->len;} case 4 :{ struct sdshdr64 *sh=(void *)((s) -(sizeof(struct sdshdr64)));;return sh->alloc - sh->len;} } return 0;}static inline void sdssetlen(sds s, size_t newlen) { unsigned char flags=s[-1];switch(flags &7) { case 0 :{ unsigned char *fp=((unsigned char *) s) - 1;*fp=0|(newlen<< 3);} break;case 1 :((struct sdshdr8 *)((s) -(sizeof(struct sdshdr8)))) ->len=(uint8_t) newlen;break;case 2 :((struct sdshdr16 *)((s) -(sizeof(struct sdshdr16)))) ->len=(uint16_t) newlen;break;case 3 :((struct sdshdr32 *)((s) -(sizeof(struct sdshdr32)))) -> len
Definition: CPAL.d:15583
div_t __cdecl div(int _Numerator, int _Denominator)
int ptrdiff_t
Definition: CPAL.d:3845
#define count(a)
Definition: aptex-macros.h:781
#define name
#define hash
Definition: aptex.h:388
double mod(double, int)
Definition: axohelp.c:326
#define SET_INT_VALUE(mrb, r, n)
Definition: boxing_nan.h:118
#define SET_SYM_VALUE(r, v)
Definition: boxing_nan.h:120
#define SET_FLOAT_VALUE(mrb, r, v)
Definition: boxing_nan.h:102
#define SET_TRUE_VALUE(r)
Definition: boxing_nan.h:116
#define SET_NIL_VALUE(r)
Definition: boxing_nan.h:114
#define SET_FALSE_VALUE(r)
Definition: boxing_nan.h:115
#define mrb_integer(o)
Definition: boxing_nan.h:71
#define SET_FIXNUM_VALUE(r, n)
Definition: boxing_nan.h:119
#define mrb_break_p(o)
Definition: boxing_word.h:169
#define mrb_integer_p(o)
Definition: boxing_word.h:139
#define mrb_array_p(o)
Definition: boxing_word.h:152
#define mrb_nil_p(o)
Definition: boxing_word.h:146
#define mrb_hash_p(o)
Definition: boxing_word.h:154
#define mrb_proc_p(o)
Definition: boxing_word.h:163
MRB_INLINE enum mrb_vtype mrb_type(mrb_value o)
Definition: boxing_word.h:195
void mrb_define_method_raw(mrb_state *, struct RClass *, mrb_sym, mrb_method_t)
Definition: class.c:725
mrb_method_t mrb_method_search_vm(mrb_state *, struct RClass **, mrb_sym)
Definition: class.c:1730
#define MRB_FL_CLASS_IS_PREPENDED
Definition: class.h:61
struct RClass * mrb_vm_define_class(mrb_state *, mrb_value, mrb_value, mrb_sym)
Definition: class.c:556
#define mrb_class_ptr(v)
Definition: class.h:24
void mrb_alias_method(mrb_state *, struct RClass *c, mrb_sym a, mrb_sym b)
Definition: class.c:2192
static struct RClass * mrb_class(mrb_state *mrb, mrb_value v)
Definition: class.h:27
struct RClass * mrb_vm_define_module(mrb_state *, mrb_value, mrb_sym)
Definition: class.c:454
Definition: Endian.h:81
#define n
Definition: t4ht.c:1290
#define BSS
#define BBB
#define b
Definition: jpegint.h:372
#define ap
@ pre
Definition: ctie-k.c:71
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define MRB_OPSYM(name)
Definition: disable.h:14
#define MRB_SYM(name)
Definition: disable.h:20
long pc
Definition: disdvi.c:114
#define W
Definition: dtl.h:141
int v
Definition: dviconv.c:10
int printf()
integer voff
Definition: dvips.c:122
#define MRB_GC_ARENA_SIZE
Definition: gc.h:28
mpz_t * f
Definition: gen-fib.c:34
mpz_t pp
Definition: gen-psqr.c:108
#define c(n)
Definition: gpos-common.c:150
#define a(n)
Definition: gpos-common.c:148
int base
Definition: gsftopk.c:1502
#define ec
Definition: gsftopk.c:502
#define memcpy(d, s, n)
Definition: gsftopk.c:64
int kind
Definition: image.c:8980
#define OP_L_BLOCK
Definition: opcode.h:20
#define OP_R_RETURN
Definition: opcode.h:24
#define OP_L_CAPTURE
Definition: opcode.h:17
#define FETCH_BBB()
Definition: opcode.h:37
#define OP_L_LAMBDA
Definition: opcode.h:19
#define OP_L_METHOD
Definition: opcode.h:18
#define OP_R_BREAK
Definition: opcode.h:23
#define OP_L_STRICT
Definition: opcode.h:16
#define OP_R_NORMAL
Definition: opcode.h:22
#define IREP_TT_NFLAG
Definition: irep.h:26
#define IREP_TT_SFLAG
Definition: irep.h:27
@ IREP_TT_INT32
Definition: irep.h:21
@ IREP_TT_FLOAT
Definition: irep.h:23
@ IREP_TT_INT64
Definition: irep.h:22
static const struct mrb_irep_catch_handler * mrb_irep_catch_handler_table(const struct mrb_irep *irep)
Definition: irep.h:132
#define mrb_irep_catch_handler_unpack(v)
Definition: irep.h:143
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific f u
Definition: afcover.h:88
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
FT_UInt idx
Definition: cffcmap.c:135
kerning y
Definition: ttdriver.c:212
#define INT32_MAX
Definition: stdint.h:137
#define UINT32_C(val)
Definition: stdint.h:237
signed short int16_t
Definition: stdint.h:76
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
#define INT32_MIN
Definition: stdint.h:136
signed int int32_t
Definition: stdint.h:77
static const char argv0[]
Definition: webpng.c:25
int num
Definition: disdvi.c:621
int acc
Definition: exvar.h:3
#define fprintf
Definition: mendex.h:64
#define BS
Definition: nkf.c:70
char args[100]
Definition: fixwrites.c:7
void abort()
#define target(code, i)
Definition: lpeg.c:1165
#define size_t
Definition: glob.c:257
mrb_value mrb_str_new_static(mrb_state *mrb, const char *p, size_t len)
Definition: string.c:221
mrb_bool mrb_obj_is_kind_of(mrb_state *mrb, mrb_value obj, struct RClass *c)
Definition: object.c:485
mrb_sym mrb_intern_str(mrb_state *, mrb_value)
Definition: symbol.c:251
void * mrb_calloc(mrb_state *, size_t, size_t)
Definition: gc.c:268
#define E_TYPE_ERROR
Definition: mruby.h:1308
struct RBasic * mrb_obj_alloc(mrb_state *, enum mrb_vtype, struct RClass *)
Definition: gc.c:535
#define E_LOCALJUMP_ERROR
Definition: mruby.h:1317
void mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt,...)
Definition: error.c:400
void mrb_gc_protect(mrb_state *mrb, mrb_value obj)
Definition: gc.c:471
#define E_RANGE_ERROR
Definition: mruby.h:1312
void mrb_exc_raise(mrb_state *mrb, mrb_value exc)
Definition: error.c:199
void mrb_write_barrier(mrb_state *, struct RBasic *)
Definition: gc.c:1374
void * mrb_realloc(mrb_state *, void *, size_t)
Definition: gc.c:238
uint8_t mrb_code
Definition: mruby.h:122
static void mrb_gc_arena_restore(mrb_state *mrb, int idx)
Definition: mruby.h:1239
static int mrb_gc_arena_save(mrb_state *mrb)
Definition: mruby.h:1233
mrb_value mrb_format(mrb_state *mrb, const char *format,...)
Definition: error.c:372
@ MRB_FIBER_TERMINATED
Definition: mruby.h:170
@ MRB_FIBER_RUNNING
Definition: mruby.h:166
#define E_NOTIMP_ERROR
Definition: mruby.h:1320
void * mrb_realloc_simple(mrb_state *, void *, size_t)
Definition: gc.c:224
#define mrb_assert(p)
Definition: mruby.h:65
mrb_int mrb_get_args(mrb_state *mrb, mrb_args_format format,...)
Definition: class.c:891
void mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg)
Definition: error.c:214
mrb_value mrb_str_new(mrb_state *mrb, const char *p, size_t len)
Definition: string.c:197
#define E_RUNTIME_ERROR
Definition: mruby.h:1307
#define E_FIBER_ERROR
Definition: mruby.h:1391
void mrb_field_write_barrier(mrb_state *, struct RBasic *, struct RBasic *)
Definition: gc.c:1345
mrb_value mrb_singleton_class(mrb_state *mrb, mrb_value val)
Definition: class.c:1657
void * mrb_malloc(mrb_state *, size_t)
Definition: gc.c:256
uintptr_t mrb_method_t
Definition: mruby.h:206
mrb_bool mrb_obj_eq(mrb_state *mrb, mrb_value a, mrb_value b)
Definition: object.c:15
void mrb_undef_method_id(mrb_state *, struct RClass *, mrb_sym)
Definition: class.c:2287
struct RClass * mrb_singleton_class_ptr(mrb_state *mrb, mrb_value val)
Definition: class.c:1630
mrb_value mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len)
Definition: error.c:22
const char * mrb_sym_name(mrb_state *, mrb_sym)
Definition: symbol.c:616
mrb_value mrb_type_convert(mrb_state *mrb, mrb_value val, enum mrb_vtype type, mrb_sym method)
Definition: object.c:373
#define E_NOMETHOD_ERROR
Definition: mruby.h:1314
#define E_ARGUMENT_ERROR
Definition: mruby.h:1310
float x
Definition: cordic.py:15
dictionary off
Definition: fc-lang.py:226
char msg[512]
Definition: nsfix.c:80
mrb_int mrb_num_div_int(mrb_state *mrb, mrb_int x, mrb_int y)
Definition: numeric.c:123
mrb_float mrb_num_div_flo(mrb_state *mrb, mrb_float x, mrb_float y)
Definition: numeric.c:238
#define BB
Definition: nup.c:18
#define mrb_obj_ptr(v)
Definition: object.h:34
struct _proc * proc
Definition: obx.h:95
int k
Definition: otp-parser.c:70
static struct opdef optable[]
Definition: picttoppm.c:300
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF PF lsl PF PF PF else PF lsl PF add
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF sub
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst st
static int cnt
Definition: pkout.c:166
logical rest[4800]
Definition: pmxab.c:91
static int filter
Definition: pnmtopng.c:113
#define B(x, y)
#define Z
Definition: ppmforge.c:75
static int size
Definition: ppmlabel.c:24
int r
Definition: ppmqvga.c:68
bstring c int memset(void *s, int c, int length)
#define cb(n)
#define RARRAY_LEN(a)
Definition: array.h:70
#define ARY_LEN(a)
Definition: array.h:68
#define ARY_SET_LEN(a, n)
Definition: array.h:72
#define mrb_ary_ptr(v)
Definition: array.h:49
mrb_value mrb_ary_ref(mrb_state *mrb, mrb_value ary, mrb_int n)
Definition: array.c:657
#define RARRAY_PTR(a)
Definition: array.h:71
mrb_value mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)
Definition: array.c:94
#define ARY_PTR(a)
Definition: array.h:69
mrb_value mrb_ary_new_capa(mrb_state *, mrb_int)
Definition: array.c:46
void mrb_ary_concat(mrb_state *mrb, mrb_value self, mrb_value other)
Definition: array.c:321
void mrb_ary_push(mrb_state *mrb, mrb_value array, mrb_value value)
Definition: array.c:495
void mrb_ary_set(mrb_state *mrb, mrb_value ary, mrb_int n, mrb_value val)
Definition: array.c:670
mrb_value mrb_ary_splat(mrb_state *mrb, mrb_value value)
Definition: array.c:1082
mrb_value mrb_ary_unshift(mrb_state *mrb, mrb_value self, mrb_value item)
Definition: array.c:587
mrb_value mrb_ary_subseq(mrb_state *mrb, mrb_value ary, mrb_int beg, mrb_int len)
Definition: array.c:817
#define MRB_API
Definition: common.h:73
static uint32_t mrb_break_tag_get(struct RBreak *brk)
Definition: error.h:90
static void mrb_break_tag_set(struct RBreak *brk, uint32_t tag)
Definition: error.h:96
#define RBREAK_TAG_FOREACH(f)
Definition: error.h:70
@ RBREAK_TAG_RETURN
Definition: error.h:82
@ RBREAK_TAG_JUMP
Definition: error.h:82
@ RBREAK_TAG_RETURN_TOPLEVEL
Definition: error.h:82
@ RBREAK_TAG_RETURN_BLOCK
Definition: error.h:82
@ RBREAK_TAG_BREAK
Definition: error.h:82
@ RBREAK_TAG_BREAK_INTARGET
Definition: error.h:82
@ RBREAK_TAG_BREAK_UPPER
Definition: error.h:82
@ RBREAK_TAG_STOP
Definition: error.h:82
#define mrb_break_proc_set(brk, p)
Definition: error.h:68
#define mrb_break_proc_get(brk)
Definition: error.h:67
#define mrb_exc_new_lit(mrb, c, lit)
Definition: error.h:26
static mrb_value mrb_break_value_get(struct RBreak *brk)
Definition: error.h:52
static void mrb_break_value_set(struct RBreak *brk, mrb_value val)
Definition: error.h:60
mrb_value mrb_exc_new_str(mrb_state *mrb, struct RClass *c, mrb_value str)
Definition: error.c:29
void mrb_hash_merge(mrb_state *mrb, mrb_value hash1, mrb_value hash2)
Definition: hash.c:1694
mrb_value mrb_ensure_hash_type(mrb_state *mrb, mrb_value hash)
Definition: object.c:639
mrb_value mrb_hash_new_capa(mrb_state *mrb, mrb_int capa)
Definition: hash.c:1082
mrb_value mrb_hash_keys(mrb_state *mrb, mrb_value hash)
Definition: hash.c:1595
void mrb_hash_set(mrb_state *mrb, mrb_value hash, mrb_value key, mrb_value val)
Definition: hash.c:1205
mrb_value mrb_hash_dup(mrb_state *mrb, mrb_value hash)
Definition: hash.c:1165
mrb_value mrb_hash_new(mrb_state *mrb)
Definition: hash.c:1071
mrb_bool mrb_hash_key_p(mrb_state *mrb, mrb_value hash, mrb_value key)
Definition: hash.c:1649
mrb_value mrb_hash_delete_key(mrb_state *mrb, mrb_value hash, mrb_value key)
Definition: hash.c:1431
mrb_value mrb_hash_get(mrb_state *mrb, mrb_value hash, mrb_value key)
Definition: hash.c:1175
mrb_bool mrb_hash_empty_p(mrb_state *mrb, mrb_value self)
Definition: hash.c:1560
#define mrb_intern_cstr(mrb, name)
Definition: scanning.h:14
#define MRB_METHOD_CFUNC_P(m)
Definition: proc.h:131
#define MRB_METHOD_CFUNC(m)
Definition: proc.h:132
#define MRB_PROC_SCOPE
Definition: proc.h:84
static void mrb_vm_ci_proc_set(mrb_callinfo *ci, const struct RProc *p)
Definition: proc.h:140
#define MRB_ENV_LEN(e)
Definition: proc.h:27
#define MRB_ASPEC_REST(a)
Definition: proc.h:57
#define MRB_METHOD_PROC(m)
Definition: proc.h:114
#define mrb_proc_ptr(v)
Definition: proc.h:87
#define MRB_ASPEC_REQ(a)
Definition: proc.h:55
#define MRB_PROC_TARGET_CLASS(p)
Definition: proc.h:73
#define MRB_METHOD_NOARG_P(m)
Definition: proc.h:108
static struct RClass * mrb_vm_ci_target_class(const mrb_callinfo *ci)
Definition: proc.h:147
#define MRB_PROC_SET_TARGET_CLASS(p, tc)
Definition: proc.h:74
#define MRB_PROC_ORPHAN
Definition: proc.h:68
#define MRB_METHOD_FUNC(m)
Definition: proc.h:110
#define MRB_PROC_ENV_P(p)
Definition: proc.h:71
#define MRB_METHOD_UNDEF_P(m)
Definition: proc.h:115
#define MRB_PROC_CFUNC_P(p)
Definition: proc.h:64
static struct REnv * mrb_vm_ci_env(const mrb_callinfo *ci)
Definition: proc.h:172
#define MRB_ENV_ONSTACK_P(e)
Definition: proc.h:35
struct RProc * mrb_proc_new(mrb_state *, const mrb_irep *)
Definition: proc.c:37
#define MRB_PROC_CFUNC(p)
Definition: proc.h:65
#define MRB_ENV_CLOSE(e)
Definition: proc.h:31
#define MRB_METHOD_FROM_PROC(m, pr)
Definition: proc.h:112
#define MRB_PROC_SCOPE_P(p)
Definition: proc.h:85
#define MRB_ASPEC_KEY(a)
Definition: proc.h:59
static void mrb_vm_ci_env_set(mrb_callinfo *ci, struct REnv *e)
Definition: proc.h:183
#define MRB_METHOD_PROC_P(m)
Definition: proc.h:113
#define MRB_ASPEC_KDICT(a)
Definition: proc.h:60
#define MRB_PROC_ORPHAN_P(p)
Definition: proc.h:69
struct RProc * mrb_closure_new(mrb_state *, const mrb_irep *)
Definition: proc.c:109
#define MRB_ASPEC_OPT(a)
Definition: proc.h:56
#define MRB_PROC_STRICT
Definition: proc.h:66
#define MRB_PROC_ENV(p)
Definition: proc.h:72
#define MRB_ASPEC_POST(a)
Definition: proc.h:58
#define MRB_PROC_STRICT_P(p)
Definition: proc.h:67
void mrb_vm_cv_set(mrb_state *, mrb_sym, mrb_value)
Definition: variable.c:741
void mrb_const_set(mrb_state *, mrb_value, mrb_sym, mrb_value)
Definition: variable.c:837
mrb_value mrb_vm_cv_get(mrb_state *, mrb_sym)
Definition: variable.c:726
mrb_value mrb_vm_const_get(mrb_state *, mrb_sym)
Definition: variable.c:801
mrb_value mrb_vm_special_get(mrb_state *, mrb_sym)
Definition: variable.c:282
mrb_value mrb_iv_get(mrb_state *mrb, mrb_value obj, mrb_sym sym)
Definition: variable.c:320
void mrb_gv_set(mrb_state *mrb, mrb_sym sym, mrb_value val)
Definition: variable.c:940
mrb_value mrb_const_get(mrb_state *, mrb_value, mrb_sym)
Definition: variable.c:794
void mrb_vm_special_set(mrb_state *, mrb_sym, mrb_value)
Definition: variable.c:288
mrb_value mrb_gv_get(mrb_state *mrb, mrb_sym sym)
Definition: variable.c:930
void mrb_vm_const_set(mrb_state *, mrb_sym, mrb_value)
Definition: variable.c:847
void mrb_iv_set(mrb_state *mrb, mrb_value obj, mrb_sym sym, mrb_value v)
Definition: variable.c:389
#define MRB_STRINGIZE(expr)
Definition: version.h:25
#define gt(L)
Definition: minilua.c:415
@ OP_CALL
Definition: lopcodes.h:216
@ OP_EQ
Definition: lopcodes.h:209
@ OP_LOADNIL
Definition: lopcodes.h:175
@ OP_SUB
Definition: lopcodes.h:190
@ OP_DIV
Definition: lopcodes.h:194
@ OP_LT
Definition: lopcodes.h:210
@ OP_ADD
Definition: lopcodes.h:189
@ OP_MUL
Definition: lopcodes.h:191
@ OP_LE
Definition: lopcodes.h:211
@ OP_RETURN
Definition: lopcodes.h:218
@ OP_MOVE
Definition: lopcodes.h:171
@ OP_JMP
Definition: lopcodes.h:208
mrb_value mrb_range_new(mrb_state *mrb, mrb_value start, mrb_value end, mrb_bool exclude)
Definition: range.c:396
#define str(s)
Definition: sh6.c:399
ShellFileEnvironment e
Definition: sh6.c:388
#define uint32_t
Definition: stdint.in.h:168
#define int16_t
Definition: stdint.in.h:160
mrb_value mrb_str_cat(mrb_state *mrb, mrb_value str, const char *ptr, size_t len)
Definition: string.c:2669
mrb_value mrb_str_new_capa(mrb_state *mrb, size_t capa)
Definition: string.c:160
void mrb_str_concat(mrb_state *mrb, mrb_value self, mrb_value other)
Definition: string.c:863
Definition: array.h:32
mrb_value ary[((mrb_int)(sizeof(void *) *3/sizeof(mrb_value)))]
Definition: array.h:44
Definition: object.h:19
Definition: error.h:45
Definition: class.h:17
struct RClass * super
Definition: class.h:21
Definition: proc.h:18
mrb_sym mid
Definition: proc.h:22
Definition: object.h:30
enum mrb_vtype tt
Definition: object.h:31
Definition: proc.h:41
union RProc::@1663 body
const mrb_irep * irep
Definition: proc.h:44
struct RClass * target_class
Definition: proc.h:49
Definition: obx.h:103
Definition: usprintf.c:39
Definition: sh.h:1689
Definition: psspecial.c:52
mrb_sym mid
Definition: mruby.h:152
union mrb_callinfo::@1650 u
mrb_value * stack
Definition: mruby.h:156
int16_t acc
Definition: mruby.h:154
int16_t argc
Definition: mruby.h:153
const mrb_code * pc
Definition: mruby.h:157
const struct RProc * proc
Definition: mruby.h:155
struct RClass * target_class
Definition: mruby.h:160
mrb_callinfo * cibase
Definition: mruby.h:179
mrb_bool vmexec
Definition: mruby.h:182
enum mrb_fiber_state status
Definition: mruby.h:181
mrb_value * stbase
Definition: mruby.h:176
struct RFiber * fib
Definition: mruby.h:183
mrb_callinfo * ci
Definition: mruby.h:178
mrb_value * stend
Definition: mruby.h:176
Definition: gc.h:58
Definition: irep.h:56
uint16_t nregs
Definition: irep.h:58
uint16_t nlocals
Definition: irep.h:57
const mrb_code * iseq
Definition: irep.h:62
uint32_t ilen
Definition: irep.h:76
const mrb_sym * syms
Definition: irep.h:69
uint16_t clen
Definition: irep.h:59
const mrb_pool_value * pool
Definition: irep.h:68
const struct mrb_irep *const * reps
Definition: irep.h:70
mrb_gc gc
Definition: mruby.h:261
struct RObject * stack_err
Definition: mruby.h:287
struct mrb_context * c
Definition: mruby.h:235
struct RClass * object_class
Definition: mruby.h:242
struct RObject * exc
Definition: mruby.h:239
struct mrb_jmpbuf * jmp
Definition: mruby.h:230
struct mrb_context * root_c
Definition: mruby.h:236
Definition: texview.c:48
Definition: ttf.h:449
Definition: stemdb.c:56
Definition: spc_misc.c:56
Definition: xmlparse.c:179
Definition: strexpr.c:21
ch
Definition: t4ht.c:1443
up
Definition: tex4ht.c:2558
val
Definition: tex4ht.c:3227
m
Definition: tex4ht.c:3990
return() int(((double) *(font_tbl[cur_fnt].wtbl+(int)(*(font_tbl[cur_fnt].char_wi+(int)(ch - font_tbl[cur_fnt].char_f)% 256)))/(double)(1L<< 20)) *(double) font_tbl[cur_fnt].scale)
#define stack
Definition: stack.c:10
#define MRB_THROW(buf)
Definition: throw.h:50
#define MRB_CATCH(buf)
Definition: throw.h:47
#define MRB_TRY(buf)
Definition: throw.h:46
#define MRB_END_EXC(buf)
Definition: throw.h:48
int keep
Definition: ttf2pfb.c:115
@ S
Definition: ubidiimp.h:53
#define mrb_test(o)
Definition: value.h:265
int32_t mrb_int
Definition: value.h:35
static mrb_value mrb_nil_value(void)
Definition: value.h:332
static mrb_value mrb_bool_value(mrb_bool boolean)
Definition: value.h:360
static mrb_value mrb_float_value(struct mrb_state *mrb, mrb_float f)
Definition: value.h:273
double mrb_float
Definition: value.h:85
@ MRB_TT_EXCEPTION
Definition: value.h:126
@ MRB_TT_BREAK
Definition: value.h:131
@ MRB_TT_CLASS
Definition: value.h:117
@ MRB_TT_MODULE
Definition: value.h:118
@ MRB_TT_ICLASS
Definition: value.h:119
@ MRB_TT_FLOAT
Definition: value.h:110
@ MRB_TT_PROC
Definition: value.h:121
@ MRB_TT_INTEGER
Definition: value.h:111
static mrb_value mrb_fixnum_value(mrb_int i)
Definition: value.h:301
static mrb_value mrb_symbol_value(mrb_sym i)
Definition: value.h:309
static mrb_value mrb_int_value(struct mrb_state *mrb, mrb_int i)
Definition: value.h:294
static mrb_value mrb_obj_value(void *p)
Definition: value.h:317
static void value_move(mrb_value *s1, const mrb_value *s2, size_t n)
Definition: value_array.h:7
#define va_start(pvar)
Definition: varargs.h:30
#define va_arg(pvar, type)
Definition: varargs.h:35
#define va_end(pvar)
Definition: varargs.h:38
char * va_list
Definition: varargs.h:22
static void stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
Definition: vm.c:105
mrb_value mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc, const mrb_value *argv, mrb_value blk)
Definition: vm.c:380
#define catch_cover_p(pc, beg, end)
#define UNWIND_ENSURE(mrb, ci, pc, tag, proc, val)
Definition: vm.c:876
static mrb_value eval_under(mrb_state *mrb, mrb_value self, mrb_value blk, struct RClass *c)
Definition: vm.c:580
mrb_value mrb_vm_run(mrb_state *mrb, const struct RProc *proc, mrb_value self, mrb_int stack_keep)
Definition: vm.c:955
mrb_value mrb_funcall_id(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc,...)
Definition: vm.c:337
#define CASE(insn, ops)
Definition: vm.c:938
#define regs
mrb_value mrb_f_send(mrb_state *mrb, mrb_value self)
Definition: vm.c:533
static struct REnv * uvenv(mrb_state *mrb, mrb_int up)
Definition: vm.c:212
mrb_value mrb_funcall_argv(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc, const mrb_value *argv)
Definition: vm.c:481
static struct RBreak * break_new(mrb_state *mrb, uint32_t tag, const struct RProc *p, mrb_value val)
Definition: vm.c:757
#define NEXT
Definition: vm.c:939
#define OP_MATHI(op_name)
static void stack_clear(mrb_value *from, size_t count)
Definition: vm.c:92
static mrb_int ci_nregs(mrb_callinfo *ci)
Definition: vm.c:356
static mrb_bool break_tag_p(struct RBreak *brk, uint32_t tag)
Definition: vm.c:854
#define STACK_INIT_SIZE
Definition: vm.c:39
#define DEBUG(x)
Definition: vm.c:61
#define DISPATCH_CHECKPOINTS(n, i)
mrb_value mrb_yield_argv(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv)
Definition: vm.c:718
void mrb_exc_set(mrb_state *mrb, mrb_value exc)
Definition: error.c:171
#define CI_ACC_SKIP
Definition: vm.c:248
#define CHECKPOINT_END(tag)
Definition: vm.c:913
static void prepare_tagged_break(mrb_state *mrb, uint32_t tag, const struct RProc *proc, mrb_value val)
Definition: vm.c:860
#define MRB_FUNCALL_DEPTH_MAX
Definition: vm.c:49
mrb_value mrb_mod_module_eval(mrb_state *mrb, mrb_value mod)
Definition: vm.c:627
void mrb_method_missing(mrb_state *mrb, mrb_sym name, mrb_value self, mrb_value args)
Definition: kernel.c:485
#define CHECKPOINT_LABEL_MAKE(tag)
Definition: vm.c:900
#define CI_ACC_RESUMED
Definition: vm.c:250
#define CALL_MAXARGS
Definition: vm.c:87
#define MRB_STACK_GROWTH
Definition: vm.c:44
mrb_value mrb_funcall(mrb_state *mrb, mrb_value self, const char *name, mrb_int argc,...)
Definition: vm.c:317
static mrb_callinfo * cipush(mrb_state *mrb, mrb_int push_stacks, mrb_int acc, struct RClass *target_class, const struct RProc *proc, mrb_sym mid, mrb_int argc)
Definition: vm.c:253
mrb_value mrb_top_run(mrb_state *mrb, const struct RProc *proc, mrb_value self, mrb_int stack_keep)
Definition: vm.c:2854
#define INIT_DISPATCH
Definition: vm.c:937
static mrb_value mrb_run(mrb_state *mrb, const struct RProc *proc, mrb_value self)
Definition: vm.c:2843
static mrb_callinfo * cipop(mrb_state *mrb)
Definition: vm.c:299
#define CI_ACC_DIRECT
Definition: vm.c:249
static void stack_extend_alloc(mrb_state *mrb, mrb_int room)
Definition: vm.c:163
static void mrb_gc_arena_shrink(mrb_state *mrb, int idx)
Definition: vm.c:67
static mrb_bool check_target_class(mrb_state *mrb)
Definition: vm.c:985
#define MRB_FUNCALL_ARGC_MAX
Definition: vm.c:313
#define MRB_CATCH_FILTER_ENSURE
Definition: vm.c:770
#define CHECKPOINT_RESTORE(tag)
Definition: vm.c:902
#define OP_CMP(op, sym)
mrb_value mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc)
Definition: vm.c:998
#define CHECKPOINT_MAIN(tag)
Definition: vm.c:908
static void localjump_error(mrb_state *mrb, localjump_error_kind kind)
Definition: vm.c:814
mrb_value mrb_yield(mrb_state *mrb, mrb_value b, mrb_value arg)
Definition: vm.c:726
static void argnum_error(mrb_state *mrb, mrb_int num)
Definition: vm.c:830
static void stack_init(mrb_state *mrb)
Definition: vm.c:111
mrb_value mrb_yield_cont(mrb_state *mrb, mrb_value b, mrb_value self, mrb_int argc, const mrb_value *argv)
Definition: vm.c:734
#define END_DISPATCH
Definition: vm.c:941
mrb_value mrb_obj_instance_eval(mrb_state *mrb, mrb_value self)
Definition: vm.c:659
mrb_value mrb_yield_with_class(mrb_state *mrb, mrb_value b, mrb_int argc, const mrb_value *argv, mrb_value self, struct RClass *c)
Definition: vm.c:670
#define MRB_CATCH_FILTER_ALL
Definition: vm.c:771
localjump_error_kind
Definition: vm.c:807
@ LOCALJUMP_ERROR_BREAK
Definition: vm.c:809
@ LOCALJUMP_ERROR_RETURN
Definition: vm.c:808
@ LOCALJUMP_ERROR_YIELD
Definition: vm.c:810
void mrb_env_unshare(mrb_state *mrb, struct REnv *e)
Definition: vm.c:278
#define OP_MATH(op_name)
void mrb_hash_check_kdict(mrb_state *mrb, mrb_value self)
Definition: hash.c:1156
#define JUMP
Definition: vm.c:940
static void envadjust(mrb_state *mrb, mrb_value *oldbase, mrb_value *newbase, size_t oldsize)
Definition: vm.c:128
mrb_value mrb_exec_irep(mrb_state *mrb, mrb_value self, struct RProc *p)
Definition: vm.c:487
#define CALLINFO_INIT_SIZE
Definition: vm.c:40
void mrb_stack_extend(mrb_state *mrb, mrb_int room)
Definition: vm.c:204
static const struct mrb_irep_catch_handler * catch_handler_find(mrb_state *mrb, mrb_callinfo *ci, const mrb_code *pc, uint32_t filter)
Definition: vm.c:774
#define THROW_TAGGED_BREAK(mrb, tag, proc, val)
Definition: vm.c:870
#define TYPES2(a, b)
#define MRB_STACK_MAX
Definition: vm.c:55
static const struct RProc * top_proc(mrb_state *mrb, const struct RProc *proc)
Definition: vm.c:238
#define argv
Definition: xmain.c:270
#define argc
Definition: xmain.c:269
#define sym(x)
Definition: y.tab.c:133