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)  

lj_crecord.c
Go to the documentation of this file.
1 /*
2 ** Trace recorder for C data operations.
3 ** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
4 */
5 
6 #define lj_ffrecord_c
7 #define LUA_CORE
8 
9 #include "lj_obj.h"
10 
11 #if LJ_HASJIT && LJ_HASFFI
12 
13 #include "lj_err.h"
14 #include "lj_tab.h"
15 #include "lj_frame.h"
16 #include "lj_ctype.h"
17 #include "lj_cdata.h"
18 #include "lj_cparse.h"
19 #include "lj_cconv.h"
20 #include "lj_carith.h"
21 #include "lj_clib.h"
22 #include "lj_ccall.h"
23 #include "lj_ff.h"
24 #include "lj_ir.h"
25 #include "lj_jit.h"
26 #include "lj_ircall.h"
27 #include "lj_iropt.h"
28 #include "lj_trace.h"
29 #include "lj_record.h"
30 #include "lj_ffrecord.h"
31 #include "lj_snap.h"
32 #include "lj_crecord.h"
33 #include "lj_dispatch.h"
34 #include "lj_strfmt.h"
35 
36 /* Some local macros to save typing. Undef'd at the end. */
37 #define IR(ref) (&J->cur.ir[(ref)])
38 
39 /* Pass IR on to next optimization in chain (FOLD). */
40 #define emitir(ot, a, b) (lj_ir_set(J, (ot), (a), (b)), lj_opt_fold(J))
41 
42 #define emitconv(a, dt, st, flags) \
43  emitir(IRT(IR_CONV, (dt)), (a), (st)|((dt) << 5)|(flags))
44 
45 /* -- C type checks ------------------------------------------------------- */
46 
48 {
49  GCcdata *cd;
50  TRef trtypeid;
51  if (!tref_iscdata(tr))
52  lj_trace_err(J, LJ_TRERR_BADTYPE);
53  cd = cdataV(o);
54  /* Specialize to the CTypeID. */
55  trtypeid = emitir(IRT(IR_FLOAD, IRT_U16), tr, IRFL_CDATA_CTYPEID);
56  emitir(IRTG(IR_EQ, IRT_INT), trtypeid, lj_ir_kint(J, (int32_t)cd->ctypeid));
57  return cd;
58 }
59 
60 /* Specialize to the CTypeID held by a cdata constructor. */
62 {
63  CTypeID id;
65  id = *(CTypeID *)cdataptr(cd);
67  emitir(IRTG(IR_EQ, IRT_INT), tr, lj_ir_kint(J, (int32_t)id));
68  return id;
69 }
70 
72 {
73  if (tref_isstr(tr)) {
74  GCstr *s = strV(o);
75  CPState cp;
76  CTypeID oldtop;
77  /* Specialize to the string containing the C type declaration. */
78  emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, s));
79  cp.L = J->L;
80  cp.cts = ctype_ctsG(J2G(J));
81  oldtop = cp.cts->top;
82  cp.srcname = strdata(s);
83  cp.p = strdata(s);
84  cp.param = NULL;
86  if (lj_cparse(&cp) || cp.cts->top > oldtop) /* Avoid new struct defs. */
87  lj_trace_err(J, LJ_TRERR_BADTYPE);
88  return cp.val.id;
89  } else {
90  GCcdata *cd = argv2cdata(J, tr, o);
91  return cd->ctypeid == CTID_CTYPEID ? crec_constructor(J, cd, tr) :
92  cd->ctypeid;
93  }
94 }
95 
96 /* Convert CType to IRType (if possible). */
97 static IRType crec_ct2irt(CTState *cts, CType *ct)
98 {
99  if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
100  if (LJ_LIKELY(ctype_isnum(ct->info))) {
101  if ((ct->info & CTF_FP)) {
102  if (ct->size == sizeof(double))
103  return IRT_NUM;
104  else if (ct->size == sizeof(float))
105  return IRT_FLOAT;
106  } else {
107  uint32_t b = lj_fls(ct->size);
108  if (b <= 3)
109  return IRT_I8 + 2*b + ((ct->info & CTF_UNSIGNED) ? 1 : 0);
110  }
111  } else if (ctype_isptr(ct->info)) {
112  return (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32;
113  } else if (ctype_iscomplex(ct->info)) {
114  if (ct->size == 2*sizeof(double))
115  return IRT_NUM;
116  else if (ct->size == 2*sizeof(float))
117  return IRT_FLOAT;
118  }
119  return IRT_CDATA;
120 }
121 
122 /* -- Optimized memory fill and copy -------------------------------------- */
123 
124 /* Maximum length and unroll of inlined copy/fill. */
125 #define CREC_COPY_MAXUNROLL 16
126 #define CREC_COPY_MAXLEN 128
127 
128 #define CREC_FILL_MAXUNROLL 16
129 
130 /* Number of windowed registers used for optimized memory copy. */
131 #if LJ_TARGET_X86
132 #define CREC_COPY_REGWIN 2
133 #elif LJ_TARGET_PPC || LJ_TARGET_MIPS
134 #define CREC_COPY_REGWIN 8
135 #else
136 #define CREC_COPY_REGWIN 4
137 #endif
138 
139 /* List of memory offsets for copy/fill. */
140 typedef struct CRecMemList {
141  CTSize ofs; /* Offset in bytes. */
142  IRType tp; /* Type of load/store. */
143  TRef trofs; /* TRef of interned offset. */
144  TRef trval; /* TRef of load value. */
146 
147 /* Generate copy list for element-wise struct copy. */
149 {
150  CTypeID fid = ct->sib;
151  MSize mlp = 0;
152  while (fid) {
153  CType *df = ctype_get(cts, fid);
154  fid = df->sib;
155  if (ctype_isfield(df->info)) {
156  CType *cct;
157  IRType tp;
158  if (!gcref(df->name)) continue; /* Ignore unnamed fields. */
159  cct = ctype_rawchild(cts, df); /* Field type. */
160  tp = crec_ct2irt(cts, cct);
161  if (tp == IRT_CDATA) return 0; /* NYI: aggregates. */
162  if (mlp >= CREC_COPY_MAXUNROLL) return 0;
163  ml[mlp].ofs = df->size;
164  ml[mlp].tp = tp;
165  mlp++;
166  if (ctype_iscomplex(cct->info)) {
167  if (mlp >= CREC_COPY_MAXUNROLL) return 0;
168  ml[mlp].ofs = df->size + (cct->size >> 1);
169  ml[mlp].tp = tp;
170  mlp++;
171  }
172  } else if (!ctype_isconstval(df->info)) {
173  /* NYI: bitfields and sub-structures. */
174  return 0;
175  }
176  }
177  return mlp;
178 }
179 
180 /* Generate unrolled copy list, from highest to lowest step size/alignment. */
182  IRType tp)
183 {
184  CTSize ofs = 0;
185  MSize mlp = 0;
186  if (tp == IRT_CDATA) tp = IRT_U8 + 2*lj_fls(step);
187  do {
188  while (ofs + step <= len) {
189  if (mlp >= CREC_COPY_MAXUNROLL) return 0;
190  ml[mlp].ofs = ofs;
191  ml[mlp].tp = tp;
192  mlp++;
193  ofs += step;
194  }
195  step >>= 1;
196  tp -= 2;
197  } while (ofs < len);
198  return mlp;
199 }
200 
201 /*
202 ** Emit copy list with windowed loads/stores.
203 ** LJ_TARGET_UNALIGNED: may emit unaligned loads/stores (not marked as such).
204 */
205 static void crec_copy_emit(jit_State *J, CRecMemList *ml, MSize mlp,
206  TRef trdst, TRef trsrc)
207 {
208  MSize i, j, rwin = 0;
209  for (i = 0, j = 0; i < mlp; ) {
210  TRef trofs = lj_ir_kintp(J, ml[i].ofs);
211  TRef trsptr = emitir(IRT(IR_ADD, IRT_PTR), trsrc, trofs);
212  ml[i].trval = emitir(IRT(IR_XLOAD, ml[i].tp), trsptr, 0);
213  ml[i].trofs = trofs;
214  i++;
215  rwin += (LJ_SOFTFP && ml[i].tp == IRT_NUM) ? 2 : 1;
216  if (rwin >= CREC_COPY_REGWIN || i >= mlp) { /* Flush buffered stores. */
217  rwin = 0;
218  for ( ; j < i; j++) {
219  TRef trdptr = emitir(IRT(IR_ADD, IRT_PTR), trdst, ml[j].trofs);
220  emitir(IRT(IR_XSTORE, ml[j].tp), trdptr, ml[j].trval);
221  }
222  }
223  }
224 }
225 
226 /* Optimized memory copy. */
227 static void crec_copy(jit_State *J, TRef trdst, TRef trsrc, TRef trlen,
228  CType *ct)
229 {
230  if (tref_isk(trlen)) { /* Length must be constant. */
232  MSize mlp = 0;
233  CTSize step = 1, len = (CTSize)IR(tref_ref(trlen))->i;
234  IRType tp = IRT_CDATA;
235  int needxbar = 0;
236  if (len == 0) return; /* Shortcut. */
237  if (len > CREC_COPY_MAXLEN) goto fallback;
238  if (ct) {
239  CTState *cts = ctype_ctsG(J2G(J));
241  if (ctype_isarray(ct->info)) {
242  CType *cct = ctype_rawchild(cts, ct);
243  tp = crec_ct2irt(cts, cct);
244  if (tp == IRT_CDATA) goto rawcopy;
246  lua_assert((len & (step-1)) == 0);
247  } else if ((ct->info & CTF_UNION)) {
248  step = (1u << ctype_align(ct->info));
249  goto rawcopy;
250  } else {
251  mlp = crec_copy_struct(ml, cts, ct);
252  goto emitcopy;
253  }
254  } else {
255  rawcopy:
256  needxbar = 1;
258  step = CTSIZE_PTR;
259  }
260  mlp = crec_copy_unroll(ml, len, step, tp);
261  emitcopy:
262  if (mlp) {
263  crec_copy_emit(J, ml, mlp, trdst, trsrc);
264  if (needxbar)
265  emitir(IRT(IR_XBAR, IRT_NIL), 0, 0);
266  return;
267  }
268  }
269 fallback:
270  /* Call memcpy. Always needs a barrier to disable alias analysis. */
271  lj_ir_call(J, IRCALL_memcpy, trdst, trsrc, trlen);
272  emitir(IRT(IR_XBAR, IRT_NIL), 0, 0);
273 }
274 
275 /* Generate unrolled fill list, from highest to lowest step size/alignment. */
277 {
278  CTSize ofs = 0;
279  MSize mlp = 0;
280  IRType tp = IRT_U8 + 2*lj_fls(step);
281  do {
282  while (ofs + step <= len) {
283  if (mlp >= CREC_COPY_MAXUNROLL) return 0;
284  ml[mlp].ofs = ofs;
285  ml[mlp].tp = tp;
286  mlp++;
287  ofs += step;
288  }
289  step >>= 1;
290  tp -= 2;
291  } while (ofs < len);
292  return mlp;
293 }
294 
295 /*
296 ** Emit stores for fill list.
297 ** LJ_TARGET_UNALIGNED: may emit unaligned stores (not marked as such).
298 */
299 static void crec_fill_emit(jit_State *J, CRecMemList *ml, MSize mlp,
300  TRef trdst, TRef trfill)
301 {
302  MSize i;
303  for (i = 0; i < mlp; i++) {
304  TRef trofs = lj_ir_kintp(J, ml[i].ofs);
305  TRef trdptr = emitir(IRT(IR_ADD, IRT_PTR), trdst, trofs);
306  emitir(IRT(IR_XSTORE, ml[i].tp), trdptr, trfill);
307  }
308 }
309 
310 /* Optimized memory fill. */
311 static void crec_fill(jit_State *J, TRef trdst, TRef trlen, TRef trfill,
312  CTSize step)
313 {
314  if (tref_isk(trlen)) { /* Length must be constant. */
316  MSize mlp;
317  CTSize len = (CTSize)IR(tref_ref(trlen))->i;
318  if (len == 0) return; /* Shortcut. */
320  step = CTSIZE_PTR;
321  if (step * CREC_FILL_MAXUNROLL < len) goto fallback;
322  mlp = crec_fill_unroll(ml, len, step);
323  if (!mlp) goto fallback;
324  if (tref_isk(trfill) || ml[0].tp != IRT_U8)
325  trfill = emitconv(trfill, IRT_INT, IRT_U8, 0);
326  if (ml[0].tp != IRT_U8) { /* Scatter U8 to U16/U32/U64. */
327  if (CTSIZE_PTR == 8 && ml[0].tp == IRT_U64) {
328  if (tref_isk(trfill)) /* Pointless on x64 with zero-extended regs. */
329  trfill = emitconv(trfill, IRT_U64, IRT_U32, 0);
330  trfill = emitir(IRT(IR_MUL, IRT_U64), trfill,
331  lj_ir_kint64(J, U64x(01010101,01010101)));
332  } else {
333  trfill = emitir(IRTI(IR_MUL), trfill,
334  lj_ir_kint(J, ml[0].tp == IRT_U16 ? 0x0101 : 0x01010101));
335  }
336  }
337  crec_fill_emit(J, ml, mlp, trdst, trfill);
338  } else {
339 fallback:
340  /* Call memset. Always needs a barrier to disable alias analysis. */
341  lj_ir_call(J, IRCALL_memset, trdst, trfill, trlen); /* Note: arg order! */
342  }
343  emitir(IRT(IR_XBAR, IRT_NIL), 0, 0);
344 }
345 
346 /* -- Convert C type to C type -------------------------------------------- */
347 
348 /*
349 ** This code mirrors the code in lj_cconv.c. It performs the same steps
350 ** for the trace recorder that lj_cconv.c does for the interpreter.
351 **
352 ** One major difference is that we can get away with much fewer checks
353 ** here. E.g. checks for casts, constness or correct types can often be
354 ** omitted, even if they might fail. The interpreter subsequently throws
355 ** an error, which aborts the trace.
356 **
357 ** All operations are specialized to their C types, so the on-trace
358 ** outcome must be the same as the outcome in the interpreter. If the
359 ** interpreter doesn't throw an error, then the trace is correct, too.
360 ** Care must be taken not to generate invalid (temporary) IR or to
361 ** trigger asserts.
362 */
363 
364 /* Determine whether a passed number or cdata number is non-zero. */
365 static int crec_isnonzero(CType *s, void *p)
366 {
367  if (p == (void *)0)
368  return 0;
369  if (p == (void *)1)
370  return 1;
371  if ((s->info & CTF_FP)) {
372  if (s->size == sizeof(float))
373  return (*(float *)p != 0);
374  else
375  return (*(double *)p != 0);
376  } else {
377  if (s->size == 1)
378  return (*(uint8_t *)p != 0);
379  else if (s->size == 2)
380  return (*(uint16_t *)p != 0);
381  else if (s->size == 4)
382  return (*(uint32_t *)p != 0);
383  else
384  return (*(uint64_t *)p != 0);
385  }
386 }
387 
389  void *svisnz)
390 {
391  IRType dt = crec_ct2irt(ctype_ctsG(J2G(J)), d);
393  CTSize dsize = d->size, ssize = s->size;
394  CTInfo dinfo = d->info, sinfo = s->info;
395 
397  goto err_conv;
398 
399  /*
400  ** Note: Unlike lj_cconv_ct_ct(), sp holds the _value_ of pointers and
401  ** numbers up to 8 bytes. Otherwise sp holds a pointer.
402  */
403 
404  switch (cconv_idx2(dinfo, sinfo)) {
405  /* Destination is a bool. */
406  case CCX(B, B):
407  goto xstore; /* Source operand is already normalized. */
408  case CCX(B, I):
409  case CCX(B, F):
410  if (st != IRT_CDATA) {
411  /* Specialize to the result of a comparison against 0. */
412  TRef zero = (st == IRT_NUM || st == IRT_FLOAT) ? lj_ir_knum(J, 0) :
413  (st == IRT_I64 || st == IRT_U64) ? lj_ir_kint64(J, 0) :
414  lj_ir_kint(J, 0);
415  int isnz = crec_isnonzero(s, svisnz);
416  emitir(IRTG(isnz ? IR_NE : IR_EQ, st), sp, zero);
417  sp = lj_ir_kint(J, isnz);
418  goto xstore;
419  }
420  goto err_nyi;
421 
422  /* Destination is an integer. */
423  case CCX(I, B):
424  case CCX(I, I):
425  conv_I_I:
426  if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi;
427  /* Extend 32 to 64 bit integer. */
428  if (dsize == 8 && ssize < 8 && !(LJ_64 && (sinfo & CTF_UNSIGNED)))
429  sp = emitconv(sp, dt, ssize < 4 ? IRT_INT : st,
430  (sinfo & CTF_UNSIGNED) ? 0 : IRCONV_SEXT);
431  else if (dsize < 8 && ssize == 8) /* Truncate from 64 bit integer. */
432  sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, st, 0);
433  else if (st == IRT_INT)
435  xstore:
436  if (dt == IRT_I64 || dt == IRT_U64) lj_needsplit(J);
437  if (dp == 0) return sp;
438  emitir(IRT(IR_XSTORE, dt), dp, sp);
439  break;
440  case CCX(I, C):
441  sp = emitir(IRT(IR_XLOAD, st), sp, 0); /* Load re. */
442  /* fallthrough */
443  case CCX(I, F):
444  if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi;
445  sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, st, IRCONV_ANY);
446  goto xstore;
447  case CCX(I, P):
448  case CCX(I, A):
449  sinfo = CTINFO(CT_NUM, CTF_UNSIGNED);
450  ssize = CTSIZE_PTR;
451  st = IRT_UINTP;
452  if (((dsize ^ ssize) & 8) == 0) { /* Must insert no-op type conversion. */
453  sp = emitconv(sp, dsize < 4 ? IRT_INT : dt, IRT_PTR, 0);
454  goto xstore;
455  }
456  goto conv_I_I;
457 
458  /* Destination is a floating-point number. */
459  case CCX(F, B):
460  case CCX(F, I):
461  conv_F_I:
462  if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi;
463  sp = emitconv(sp, dt, ssize < 4 ? IRT_INT : st, 0);
464  goto xstore;
465  case CCX(F, C):
466  sp = emitir(IRT(IR_XLOAD, st), sp, 0); /* Load re. */
467  /* fallthrough */
468  case CCX(F, F):
469  conv_F_F:
470  if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi;
471  if (dt != st) sp = emitconv(sp, dt, st, 0);
472  goto xstore;
473 
474  /* Destination is a complex number. */
475  case CCX(C, I):
476  case CCX(C, F):
477  { /* Clear im. */
478  TRef ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, (dsize >> 1)));
479  emitir(IRT(IR_XSTORE, dt), ptr, lj_ir_knum(J, 0));
480  }
481  /* Convert to re. */
482  if ((sinfo & CTF_FP)) goto conv_F_F; else goto conv_F_I;
483 
484  case CCX(C, C):
485  if (dt == IRT_CDATA || st == IRT_CDATA) goto err_nyi;
486  {
487  TRef re, im, ptr;
488  re = emitir(IRT(IR_XLOAD, st), sp, 0);
489  ptr = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, (ssize >> 1)));
490  im = emitir(IRT(IR_XLOAD, st), ptr, 0);
491  if (dt != st) {
492  re = emitconv(re, dt, st, 0);
493  im = emitconv(im, dt, st, 0);
494  }
495  emitir(IRT(IR_XSTORE, dt), dp, re);
496  ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, (dsize >> 1)));
497  emitir(IRT(IR_XSTORE, dt), ptr, im);
498  }
499  break;
500 
501  /* Destination is a vector. */
502  case CCX(V, I):
503  case CCX(V, F):
504  case CCX(V, C):
505  case CCX(V, V):
506  goto err_nyi;
507 
508  /* Destination is a pointer. */
509  case CCX(P, P):
510  case CCX(P, A):
511  case CCX(P, S):
512  /* There are only 32 bit pointers/addresses on 32 bit machines.
513  ** Also ok on x64, since all 32 bit ops clear the upper part of the reg.
514  */
515  goto xstore;
516  case CCX(P, I):
517  if (st == IRT_CDATA) goto err_nyi;
518  if (!LJ_64 && ssize == 8) /* Truncate from 64 bit integer. */
519  sp = emitconv(sp, IRT_U32, st, 0);
520  goto xstore;
521  case CCX(P, F):
522  if (st == IRT_CDATA) goto err_nyi;
523  /* The signed conversion is cheaper. x64 really has 47 bit pointers. */
524  sp = emitconv(sp, (LJ_64 && dsize == 8) ? IRT_I64 : IRT_U32,
525  st, IRCONV_ANY);
526  goto xstore;
527 
528  /* Destination is an array. */
529  case CCX(A, A):
530  /* Destination is a struct/union. */
531  case CCX(S, S):
532  if (dp == 0) goto err_conv;
533  crec_copy(J, dp, sp, lj_ir_kint(J, dsize), d);
534  break;
535 
536  default:
537  err_conv:
538  err_nyi:
539  lj_trace_err(J, LJ_TRERR_NYICONV);
540  break;
541  }
542  return 0;
543 }
544 
545 /* -- Convert C type to TValue (load) ------------------------------------- */
546 
548 {
549  CTState *cts = ctype_ctsG(J2G(J));
550  IRType t = crec_ct2irt(cts, s);
551  CTInfo sinfo = s->info;
552  if (ctype_isnum(sinfo)) {
553  TRef tr;
554  if (t == IRT_CDATA)
555  goto err_nyi; /* NYI: copyval of >64 bit integers. */
556  tr = emitir(IRT(IR_XLOAD, t), sp, 0);
557  if (t == IRT_FLOAT || t == IRT_U32) { /* Keep uint32_t/float as numbers. */
558  return emitconv(tr, IRT_NUM, t, 0);
559  } else if (t == IRT_I64 || t == IRT_U64) { /* Box 64 bit integer. */
560  sp = tr;
561  lj_needsplit(J);
562  } else if ((sinfo & CTF_BOOL)) {
563  /* Assume not equal to zero. Fixup and emit pending guard later. */
564  lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0));
565  J->postproc = LJ_POST_FIXGUARD;
566  return TREF_TRUE;
567  } else {
568  return tr;
569  }
570  } else if (ctype_isptr(sinfo) || ctype_isenum(sinfo)) {
571  sp = emitir(IRT(IR_XLOAD, t), sp, 0); /* Box pointers and enums. */
572  } else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) {
573  cts->L = J->L;
574  sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */
575  } else if (ctype_iscomplex(sinfo)) { /* Unbox/box complex. */
576  ptrdiff_t esz = (ptrdiff_t)(s->size >> 1);
577  TRef ptr, tr1, tr2, dp;
579  tr1 = emitir(IRT(IR_XLOAD, t), sp, 0);
580  ptr = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, esz));
581  tr2 = emitir(IRT(IR_XLOAD, t), ptr, 0);
582  ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, sizeof(GCcdata)));
583  emitir(IRT(IR_XSTORE, t), ptr, tr1);
584  ptr = emitir(IRT(IR_ADD, IRT_PTR), dp, lj_ir_kintp(J, sizeof(GCcdata)+esz));
585  emitir(IRT(IR_XSTORE, t), ptr, tr2);
586  return dp;
587  } else {
588  /* NYI: copyval of vectors. */
589  err_nyi:
590  lj_trace_err(J, LJ_TRERR_NYICONV);
591  }
592  /* Box pointer, ref, enum or 64 bit integer. */
593  return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, sid), sp);
594 }
595 
596 /* -- Convert TValue to C type (store) ------------------------------------ */
597 
599 {
600  CTState *cts = ctype_ctsG(J2G(J));
602  void *svisnz = 0;
603  CType *s;
604  if (LJ_LIKELY(tref_isinteger(sp))) {
605  sid = CTID_INT32;
606  svisnz = (void *)(intptr_t)(tvisint(sval)?(intV(sval)!=0):!tviszero(sval));
607  } else if (tref_isnum(sp)) {
608  sid = CTID_DOUBLE;
609  svisnz = (void *)(intptr_t)(tvisint(sval)?(intV(sval)!=0):!tviszero(sval));
610  } else if (tref_isbool(sp)) {
611  sp = lj_ir_kint(J, tref_istrue(sp) ? 1 : 0);
612  sid = CTID_BOOL;
613  } else if (tref_isnil(sp)) {
614  sp = lj_ir_kptr(J, NULL);
615  } else if (tref_isudata(sp)) {
616  GCudata *ud = udataV(sval);
617  if (ud->udtype == UDTYPE_IO_FILE) {
621  } else {
622  sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCudata)));
623  }
624  } else if (tref_isstr(sp)) {
625  if (ctype_isenum(d->info)) { /* Match string against enum constant. */
626  GCstr *str = strV(sval);
627  CTSize ofs;
628  CType *cct = lj_ctype_getfield(cts, d, str, &ofs);
629  /* Specialize to the name of the enum constant. */
631  if (cct && ctype_isconstval(cct->info)) {
632  lua_assert(ctype_child(cts, cct)->size == 4);
633  svisnz = (void *)(intptr_t)(ofs != 0);
634  sp = lj_ir_kint(J, (int32_t)ofs);
635  sid = ctype_cid(cct->info);
636  } /* else: interpreter will throw. */
637  } else if (ctype_isrefarray(d->info)) { /* Copy string to array. */
638  lj_trace_err(J, LJ_TRERR_BADTYPE); /* NYI */
639  } else { /* Otherwise pass the string data as a const char[]. */
640  /* Don't use STRREF. It folds with SNEW, which loses the trailing NUL. */
641  sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCstr)));
642  sid = CTID_A_CCHAR;
643  }
644  } else if (tref_islightud(sp)) {
645 #if LJ_64
646  sp = emitir(IRT(IR_BAND, IRT_P64), sp,
647  lj_ir_kint64(J, U64x(00007fff,ffffffff)));
648 #endif
649  } else { /* NYI: tref_istab(sp). */
650  IRType t;
651  sid = argv2cdata(J, sp, sval)->ctypeid;
652  s = ctype_raw(cts, sid);
653  svisnz = cdataptr(cdataV(sval));
654  if (ctype_isfunc(s->info)) {
656  s = ctype_get(cts, sid);
657  t = IRT_PTR;
658  } else {
659  t = crec_ct2irt(cts, s);
660  }
661  if (ctype_isptr(s->info)) {
663  if (ctype_isref(s->info)) {
664  svisnz = *(void **)svisnz;
665  s = ctype_rawchild(cts, s);
666  if (ctype_isenum(s->info)) s = ctype_child(cts, s);
667  t = crec_ct2irt(cts, s);
668  } else {
669  goto doconv;
670  }
671  } else if (t == IRT_I64 || t == IRT_U64) {
673  lj_needsplit(J);
674  goto doconv;
675  } else if (t == IRT_INT || t == IRT_U32) {
676  if (ctype_isenum(s->info)) s = ctype_child(cts, s);
678  goto doconv;
679  } else {
680  sp = emitir(IRT(IR_ADD, IRT_PTR), sp, lj_ir_kintp(J, sizeof(GCcdata)));
681  }
682  if (ctype_isnum(s->info) && t != IRT_CDATA)
683  sp = emitir(IRT(IR_XLOAD, t), sp, 0); /* Load number value. */
684  goto doconv;
685  }
686  s = ctype_get(cts, sid);
687 doconv:
688  if (ctype_isenum(d->info)) d = ctype_child(cts, d);
689  return crec_ct_ct(J, d, s, dp, sp, svisnz);
690 }
691 
692 /* -- C data metamethods -------------------------------------------------- */
693 
694 /* This would be rather difficult in FOLD, so do it here:
695 ** (base+k)+(idx*sz)+ofs ==> (base+idx*sz)+(ofs+k)
696 ** (base+(idx+k)*sz)+ofs ==> (base+idx*sz)+(ofs+k*sz)
697 */
699 {
700  IRIns *ir = IR(tref_ref(tr));
701  if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && irref_isk(ir->op2) &&
702  (ir->o == IR_ADD || ir->o == IR_ADDOV || ir->o == IR_SUBOV)) {
703  IRIns *irk = IR(ir->op2);
704  ptrdiff_t k;
705  if (LJ_64 && irk->o == IR_KINT64)
706  k = (ptrdiff_t)ir_kint64(irk)->u64 * sz;
707  else
708  k = (ptrdiff_t)irk->i * sz;
709  if (ir->o == IR_SUBOV) *ofsp -= k; else *ofsp += k;
710  tr = ir->op1; /* Not a TRef, but the caller doesn't care. */
711  }
712  return tr;
713 }
714 
715 /* Tailcall to function. */
717 {
718  TRef kfunc = lj_ir_kfunc(J, funcV(tv));
719 #if LJ_FR2
720  J->base[-2] = kfunc;
721  J->base[-1] = TREF_FRAME;
722 #else
723  J->base[-1] = kfunc | TREF_FRAME;
724 #endif
725  rd->nres = -1; /* Pending tailcall. */
726 }
727 
728 /* Record ctype __index/__newindex metamethods. */
729 static void crec_index_meta(jit_State *J, CTState *cts, CType *ct,
730  RecordFFData *rd)
731 {
732  CTypeID id = ctype_typeid(cts, ct);
733  cTValue *tv = lj_ctype_meta(cts, id, rd->data ? MM_newindex : MM_index);
734  if (!tv)
735  lj_trace_err(J, LJ_TRERR_BADTYPE);
736  if (tvisfunc(tv)) {
737  crec_tailcall(J, rd, tv);
738  } else if (rd->data == 0 && tvistab(tv) && tref_isstr(J->base[1])) {
739  /* Specialize to result of __index lookup. */
740  cTValue *o = lj_tab_get(J->L, tabV(tv), &rd->argv[1]);
741  J->base[0] = lj_record_constify(J, o);
742  if (!J->base[0])
743  lj_trace_err(J, LJ_TRERR_BADTYPE);
744  /* Always specialize to the key. */
745  emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, strV(&rd->argv[1])));
746  } else {
747  /* NYI: resolving of non-function metamethods. */
748  /* NYI: non-string keys for __index table. */
749  /* NYI: stores to __newindex table. */
750  lj_trace_err(J, LJ_TRERR_BADTYPE);
751  }
752 }
753 
754 /* Record bitfield load/store. */
756 {
757  IRType t = IRT_I8 + 2*lj_fls(ctype_bitcsz(info)) + ((info&CTF_UNSIGNED)?1:0);
758  TRef tr = emitir(IRT(IR_XLOAD, t), ptr, 0);
759  CTSize pos = ctype_bitpos(info), bsz = ctype_bitbsz(info), shift = 32 - bsz;
760  lua_assert(t <= IRT_U32); /* NYI: 64 bit bitfields. */
761  if (rd->data == 0) { /* __index metamethod. */
762  if ((info & CTF_BOOL)) {
763  tr = emitir(IRTI(IR_BAND), tr, lj_ir_kint(J, (int32_t)((1u << pos))));
764  /* Assume not equal to zero. Fixup and emit pending guard later. */
765  lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0));
766  J->postproc = LJ_POST_FIXGUARD;
767  tr = TREF_TRUE;
768  } else if (!(info & CTF_UNSIGNED)) {
769  tr = emitir(IRTI(IR_BSHL), tr, lj_ir_kint(J, shift - pos));
770  tr = emitir(IRTI(IR_BSAR), tr, lj_ir_kint(J, shift));
771  } else {
772  lua_assert(bsz < 32); /* Full-size fields cannot end up here. */
773  tr = emitir(IRTI(IR_BSHR), tr, lj_ir_kint(J, pos));
774  tr = emitir(IRTI(IR_BAND), tr, lj_ir_kint(J, (int32_t)((1u << bsz)-1)));
775  /* We can omit the U32 to NUM conversion, since bsz < 32. */
776  }
777  J->base[0] = tr;
778  } else { /* __newindex metamethod. */
779  CTState *cts = ctype_ctsG(J2G(J));
780  CType *ct = ctype_get(cts,
781  (info & CTF_BOOL) ? CTID_BOOL :
783  int32_t mask = (int32_t)(((1u << bsz)-1) << pos);
784  TRef sp = crec_ct_tv(J, ct, 0, J->base[2], &rd->argv[2]);
786  /* Use of the target type avoids forwarding conversions. */
787  sp = emitir(IRT(IR_BAND, t), sp, lj_ir_kint(J, mask));
788  tr = emitir(IRT(IR_BAND, t), tr, lj_ir_kint(J, (int32_t)~mask));
789  tr = emitir(IRT(IR_BOR, t), tr, sp);
790  emitir(IRT(IR_XSTORE, t), ptr, tr);
791  rd->nres = 0;
792  J->needsnap = 1;
793  }
794 }
795 
797 {
798  TRef idx, ptr = J->base[0];
799  ptrdiff_t ofs = sizeof(GCcdata);
800  GCcdata *cd = argv2cdata(J, ptr, &rd->argv[0]);
801  CTState *cts = ctype_ctsG(J2G(J));
802  CType *ct = ctype_raw(cts, cd->ctypeid);
803  CTypeID sid = 0;
804 
805  /* Resolve pointer or reference for cdata object. */
806  if (ctype_isptr(ct->info)) {
807  IRType t = (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32;
808  if (ctype_isref(ct->info)) ct = ctype_rawchild(cts, ct);
810  ofs = 0;
811  ptr = crec_reassoc_ofs(J, ptr, &ofs, 1);
812  }
813 
814 again:
815  idx = J->base[1];
816  if (tref_isnumber(idx)) {
818  if (ctype_ispointer(ct->info)) {
819  CTSize sz;
820  integer_key:
821  if ((ct->info & CTF_COMPLEX))
823  sz = lj_ctype_size(cts, (sid = ctype_cid(ct->info)));
824  idx = crec_reassoc_ofs(J, idx, &ofs, sz);
825 #if LJ_TARGET_ARM || LJ_TARGET_PPC
826  /* Hoist base add to allow fusion of index/shift into operands. */
827  if (LJ_LIKELY(J->flags & JIT_F_OPT_LOOP) && ofs
828 #if LJ_TARGET_ARM
829  && (sz == 1 || sz == 4)
830 #endif
831  ) {
833  ofs = 0;
834  }
835 #endif
837  ptr = emitir(IRT(IR_ADD, IRT_PTR), idx, ptr);
838  }
839  } else if (tref_iscdata(idx)) {
840  GCcdata *cdk = cdataV(&rd->argv[1]);
841  CType *ctk = ctype_raw(cts, cdk->ctypeid);
842  IRType t = crec_ct2irt(cts, ctk);
843  if (ctype_ispointer(ct->info) && t >= IRT_I8 && t <= IRT_U64) {
844  if (ctk->size == 8) {
846  } else if (ctk->size == 4) {
848  } else {
850  lj_ir_kintp(J, sizeof(GCcdata)));
851  idx = emitir(IRT(IR_XLOAD, t), idx, 0);
852  }
853  if (LJ_64 && ctk->size < sizeof(intptr_t) && !(ctk->info & CTF_UNSIGNED))
855  if (!LJ_64 && ctk->size > sizeof(intptr_t)) {
856  idx = emitconv(idx, IRT_INTP, t, 0);
857  lj_needsplit(J);
858  }
859  goto integer_key;
860  }
861  } else if (tref_isstr(idx)) {
862  GCstr *name = strV(&rd->argv[1]);
863  if (cd && cd->ctypeid == CTID_CTYPEID)
864  ct = ctype_raw(cts, crec_constructor(J, cd, ptr));
865  if (ctype_isstruct(ct->info)) {
866  CTSize fofs;
867  CType *fct;
868  fct = lj_ctype_getfield(cts, ct, name, &fofs);
869  if (fct) {
870  ofs += (ptrdiff_t)fofs;
871  /* Always specialize to the field name. */
873  if (ctype_isconstval(fct->info)) {
874  if (fct->size >= 0x80000000u &&
875  (ctype_child(cts, fct)->info & CTF_UNSIGNED)) {
876  J->base[0] = lj_ir_knum(J, (lua_Number)(uint32_t)fct->size);
877  return;
878  }
879  J->base[0] = lj_ir_kint(J, (int32_t)fct->size);
880  return; /* Interpreter will throw for newindex. */
881  } else if (ctype_isbitfield(fct->info)) {
882  if (ofs)
884  crec_index_bf(J, rd, ptr, fct->info);
885  return;
886  } else {
888  sid = ctype_cid(fct->info);
889  }
890  }
891  } else if (ctype_iscomplex(ct->info)) {
892  if (name->len == 2 &&
893  ((strdata(name)[0] == 'r' && strdata(name)[1] == 'e') ||
894  (strdata(name)[0] == 'i' && strdata(name)[1] == 'm'))) {
895  /* Always specialize to the field name. */
897  if (strdata(name)[0] == 'i') ofs += (ct->size >> 1);
898  sid = ctype_cid(ct->info);
899  }
900  }
901  }
902  if (!sid) {
903  if (ctype_isptr(ct->info)) { /* Automatically perform '->'. */
904  CType *cct = ctype_rawchild(cts, ct);
905  if (ctype_isstruct(cct->info)) {
906  ct = cct;
907  cd = NULL;
908  if (tref_isstr(idx)) goto again;
909  }
910  }
911  crec_index_meta(J, cts, ct, rd);
912  return;
913  }
914 
915  if (ofs)
917 
918  /* Resolve reference for field. */
919  ct = ctype_get(cts, sid);
920  if (ctype_isref(ct->info)) {
921  ptr = emitir(IRT(IR_XLOAD, IRT_PTR), ptr, 0);
922  sid = ctype_cid(ct->info);
923  ct = ctype_get(cts, sid);
924  }
925 
926  while (ctype_isattrib(ct->info))
927  ct = ctype_child(cts, ct); /* Skip attributes. */
928 
929  if (rd->data == 0) { /* __index metamethod. */
930  J->base[0] = crec_tv_ct(J, ct, sid, ptr);
931  } else { /* __newindex metamethod. */
932  rd->nres = 0;
933  J->needsnap = 1;
934  crec_ct_tv(J, ct, ptr, J->base[2], &rd->argv[2]);
935  }
936 }
937 
938 /* Record setting a finalizer. */
939 static void crec_finalizer(jit_State *J, TRef trcd, TRef trfin, cTValue *fin)
940 {
941  if (tvisgcv(fin)) {
942  if (!trfin) trfin = lj_ir_kptr(J, gcval(fin));
943  } else if (tvisnil(fin)) {
944  trfin = lj_ir_kptr(J, NULL);
945  } else {
946  lj_trace_err(J, LJ_TRERR_BADTYPE);
947  }
949  trfin, lj_ir_kint(J, (int32_t)itype(fin)));
950  J->needsnap = 1;
951 }
952 
953 /* Record cdata allocation. */
954 static void crec_alloc(jit_State *J, RecordFFData *rd, CTypeID id)
955 {
956  CTState *cts = ctype_ctsG(J2G(J));
957  CTSize sz;
958  CTInfo info = lj_ctype_info(cts, id, &sz);
959  CType *d = ctype_raw(cts, id);
960  TRef trcd, trid = lj_ir_kint(J, id);
961  cTValue *fin;
962  /* Use special instruction to box pointer or 32/64 bit integer. */
963  if (ctype_isptr(info) || (ctype_isinteger(info) && (sz == 4 || sz == 8))) {
964  TRef sp = J->base[1] ? crec_ct_tv(J, d, 0, J->base[1], &rd->argv[1]) :
966  sz == 4 ? lj_ir_kint(J, 0) :
967  (lj_needsplit(J), lj_ir_kint64(J, 0));
968  J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), trid, sp);
969  return;
970  } else {
971  TRef trsz = TREF_NIL;
972  if ((info & CTF_VLA)) { /* Calculate VLA/VLS size at runtime. */
973  CTSize sz0, sz1;
974  if (!J->base[1] || J->base[2])
975  lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: init VLA/VLS. */
976  trsz = crec_ct_tv(J, ctype_get(cts, CTID_INT32), 0,
977  J->base[1], &rd->argv[1]);
978  sz0 = lj_ctype_vlsize(cts, d, 0);
979  sz1 = lj_ctype_vlsize(cts, d, 1);
980  trsz = emitir(IRTGI(IR_MULOV), trsz, lj_ir_kint(J, (int32_t)(sz1-sz0)));
981  trsz = emitir(IRTGI(IR_ADDOV), trsz, lj_ir_kint(J, (int32_t)sz0));
982  J->base[1] = 0; /* Simplify logic below. */
983  } else if (ctype_align(info) > CT_MEMALIGN) {
984  trsz = lj_ir_kint(J, sz);
985  }
986  trcd = emitir(IRTG(IR_CNEW, IRT_CDATA), trid, trsz);
987  if (sz > 128 || (info & CTF_VLA)) {
988  TRef dp;
989  CTSize align;
990  special: /* Only handle bulk zero-fill for large/VLA/VLS types. */
991  if (J->base[1])
992  lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: init large/VLA/VLS types. */
993  dp = emitir(IRT(IR_ADD, IRT_PTR), trcd, lj_ir_kintp(J, sizeof(GCcdata)));
994  if (trsz == TREF_NIL) trsz = lj_ir_kint(J, sz);
997  crec_fill(J, dp, trsz, lj_ir_kint(J, 0), (1u << align));
998  } else if (J->base[1] && !J->base[2] &&
999  !lj_cconv_multi_init(cts, d, &rd->argv[1])) {
1000  goto single_init;
1001  } else if (ctype_isarray(d->info)) {
1002  CType *dc = ctype_rawchild(cts, d); /* Array element type. */
1003  CTSize ofs, esize = dc->size;
1004  TRef sp = 0;
1005  TValue tv;
1006  TValue *sval = &tv;
1007  MSize i;
1008  tv.u64 = 0;
1009  if (!(ctype_isnum(dc->info) || ctype_isptr(dc->info)) ||
1010  esize * CREC_FILL_MAXUNROLL < sz)
1011  goto special;
1012  for (i = 1, ofs = 0; ofs < sz; ofs += esize) {
1013  TRef dp = emitir(IRT(IR_ADD, IRT_PTR), trcd,
1014  lj_ir_kintp(J, ofs + sizeof(GCcdata)));
1015  if (J->base[i]) {
1016  sp = J->base[i];
1017  sval = &rd->argv[i];
1018  i++;
1019  } else if (i != 2) {
1020  sp = ctype_isnum(dc->info) ? lj_ir_kint(J, 0) : TREF_NIL;
1021  }
1022  crec_ct_tv(J, dc, dp, sp, sval);
1023  }
1024  } else if (ctype_isstruct(d->info)) {
1025  CTypeID fid = d->sib;
1026  MSize i = 1;
1027  while (fid) {
1028  CType *df = ctype_get(cts, fid);
1029  fid = df->sib;
1030  if (ctype_isfield(df->info)) {
1031  CType *dc;
1032  TRef sp, dp;
1033  TValue tv;
1034  TValue *sval = &tv;
1035  setintV(&tv, 0);
1036  if (!gcref(df->name)) continue; /* Ignore unnamed fields. */
1037  dc = ctype_rawchild(cts, df); /* Field type. */
1038  if (!(ctype_isnum(dc->info) || ctype_isptr(dc->info) ||
1039  ctype_isenum(dc->info)))
1040  lj_trace_err(J, LJ_TRERR_NYICONV); /* NYI: init aggregates. */
1041  if (J->base[i]) {
1042  sp = J->base[i];
1043  sval = &rd->argv[i];
1044  i++;
1045  } else {
1046  sp = ctype_isptr(dc->info) ? TREF_NIL : lj_ir_kint(J, 0);
1047  }
1048  dp = emitir(IRT(IR_ADD, IRT_PTR), trcd,
1049  lj_ir_kintp(J, df->size + sizeof(GCcdata)));
1050  crec_ct_tv(J, dc, dp, sp, sval);
1051  } else if (!ctype_isconstval(df->info)) {
1052  /* NYI: init bitfields and sub-structures. */
1053  lj_trace_err(J, LJ_TRERR_NYICONV);
1054  }
1055  }
1056  } else {
1057  TRef dp;
1058  single_init:
1059  dp = emitir(IRT(IR_ADD, IRT_PTR), trcd, lj_ir_kintp(J, sizeof(GCcdata)));
1060  if (J->base[1]) {
1061  crec_ct_tv(J, d, dp, J->base[1], &rd->argv[1]);
1062  } else {
1063  TValue tv;
1064  tv.u64 = 0;
1065  crec_ct_tv(J, d, dp, lj_ir_kint(J, 0), &tv);
1066  }
1067  }
1068  }
1069  J->base[0] = trcd;
1070  /* Handle __gc metamethod. */
1071  fin = lj_ctype_meta(cts, id, MM_gc);
1072  if (fin)
1073  crec_finalizer(J, trcd, 0, fin);
1074 }
1075 
1076 /* Record argument conversions. */
1078  CTState *cts, CType *ct)
1079 {
1081  CTypeID fid;
1082  MSize i, n;
1083  TRef tr, *base;
1084  cTValue *o;
1085 #if LJ_TARGET_X86
1086 #if LJ_ABI_WIN
1087  TRef *arg0 = NULL, *arg1 = NULL;
1088 #endif
1089  int ngpr = 0;
1090  if (ctype_cconv(ct->info) == CTCC_THISCALL)
1091  ngpr = 1;
1092  else if (ctype_cconv(ct->info) == CTCC_FASTCALL)
1093  ngpr = 2;
1094 #endif
1095 
1096  /* Skip initial attributes. */
1097  fid = ct->sib;
1098  while (fid) {
1099  CType *ctf = ctype_get(cts, fid);
1100  if (!ctype_isattrib(ctf->info)) break;
1101  fid = ctf->sib;
1102  }
1103  args[0] = TREF_NIL;
1104  for (n = 0, base = J->base+1, o = rd->argv+1; *base; n++, base++, o++) {
1105  CTypeID did;
1106  CType *d;
1107 
1108  if (n >= CCI_NARGS_MAX)
1109  lj_trace_err(J, LJ_TRERR_NYICALL);
1110 
1111  if (fid) { /* Get argument type from field. */
1112  CType *ctf = ctype_get(cts, fid);
1113  fid = ctf->sib;
1114  lua_assert(ctype_isfield(ctf->info));
1115  did = ctype_cid(ctf->info);
1116  } else {
1117  if (!(ct->info & CTF_VARARG))
1118  lj_trace_err(J, LJ_TRERR_NYICALL); /* Too many arguments. */
1119  did = lj_ccall_ctid_vararg(cts, o); /* Infer vararg type. */
1120  }
1121  d = ctype_raw(cts, did);
1122  if (!(ctype_isnum(d->info) || ctype_isptr(d->info) ||
1123  ctype_isenum(d->info)))
1124  lj_trace_err(J, LJ_TRERR_NYICALL);
1125  tr = crec_ct_tv(J, d, 0, *base, o);
1126  if (ctype_isinteger_or_bool(d->info)) {
1127  if (d->size < 4) {
1128  if ((d->info & CTF_UNSIGNED))
1129  tr = emitconv(tr, IRT_INT, d->size==1 ? IRT_U8 : IRT_U16, 0);
1130  else
1131  tr = emitconv(tr, IRT_INT, d->size==1 ? IRT_I8 : IRT_I16,IRCONV_SEXT);
1132  }
1133  } else if (LJ_SOFTFP && ctype_isfp(d->info) && d->size > 4) {
1134  lj_needsplit(J);
1135  }
1136 #if LJ_TARGET_X86
1137  /* 64 bit args must not end up in registers for fastcall/thiscall. */
1138 #if LJ_ABI_WIN
1139  if (!ctype_isfp(d->info)) {
1140  /* Sigh, the Windows/x86 ABI allows reordering across 64 bit args. */
1141  if (tref_typerange(tr, IRT_I64, IRT_U64)) {
1142  if (ngpr) {
1143  arg0 = &args[n]; args[n++] = TREF_NIL; ngpr--;
1144  if (ngpr) {
1145  arg1 = &args[n]; args[n++] = TREF_NIL; ngpr--;
1146  }
1147  }
1148  } else {
1149  if (arg0) { *arg0 = tr; arg0 = NULL; n--; continue; }
1150  if (arg1) { *arg1 = tr; arg1 = NULL; n--; continue; }
1151  if (ngpr) ngpr--;
1152  }
1153  }
1154 #else
1155  if (!ctype_isfp(d->info) && ngpr) {
1156  if (tref_typerange(tr, IRT_I64, IRT_U64)) {
1157  /* No reordering for other x86 ABIs. Simply add alignment args. */
1158  do { args[n++] = TREF_NIL; } while (--ngpr);
1159  } else {
1160  ngpr--;
1161  }
1162  }
1163 #endif
1164 #endif
1165  args[n] = tr;
1166  }
1167  tr = args[0];
1168  for (i = 1; i < n; i++)
1169  tr = emitir(IRT(IR_CARG, IRT_NIL), tr, args[i]);
1170  return tr;
1171 }
1172 
1173 /* Create a snapshot for the caller, simulating a 'false' return value. */
1175 {
1176  lua_State *L = J->L;
1177  TValue *base = L->base, *top = L->top;
1178  const BCIns *pc = J->pc;
1179  TRef ftr = J->base[-1-LJ_FR2];
1180  ptrdiff_t delta;
1181  if (!frame_islua(base-1) || J->framedepth <= 0)
1182  lj_trace_err(J, LJ_TRERR_NYICALL);
1183  J->pc = frame_pc(base-1); delta = 1+LJ_FR2+bc_a(J->pc[-1]);
1184  L->top = base; L->base = base - delta;
1185  J->base[-1-LJ_FR2] = TREF_FALSE;
1186  J->base -= delta; J->baseslot -= (BCReg)delta;
1187  J->maxslot = (BCReg)delta-LJ_FR2; J->framedepth--;
1188  lj_snap_add(J);
1189  L->base = base; L->top = top;
1190  J->framedepth++; J->maxslot = 1;
1191  J->base += delta; J->baseslot += (BCReg)delta;
1192  J->base[-1-LJ_FR2] = ftr; J->pc = pc;
1193 }
1194 
1195 /* Record function call. */
1196 static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd)
1197 {
1198  CTState *cts = ctype_ctsG(J2G(J));
1199  CType *ct = ctype_raw(cts, cd->ctypeid);
1200  IRType tp = IRT_PTR;
1201  if (ctype_isptr(ct->info)) {
1202  tp = (LJ_64 && ct->size == 8) ? IRT_P64 : IRT_P32;
1203  ct = ctype_rawchild(cts, ct);
1204  }
1205  if (ctype_isfunc(ct->info)) {
1206  TRef func = emitir(IRT(IR_FLOAD, tp), J->base[0], IRFL_CDATA_PTR);
1207  CType *ctr = ctype_rawchild(cts, ct);
1208  IRType t = crec_ct2irt(cts, ctr);
1209  TRef tr;
1210  TValue tv;
1211  /* Check for blacklisted C functions that might call a callback. */
1212  setlightudV(&tv,
1213  cdata_getptr(cdataptr(cd), (LJ_64 && tp == IRT_P64) ? 8 : 4));
1214  if (tvistrue(lj_tab_get(J->L, cts->miscmap, &tv)))
1215  lj_trace_err(J, LJ_TRERR_BLACKL);
1216  if (ctype_isvoid(ctr->info)) {
1217  t = IRT_NIL;
1218  rd->nres = 0;
1219  } else if (!(ctype_isnum(ctr->info) || ctype_isptr(ctr->info) ||
1220  ctype_isenum(ctr->info)) || t == IRT_CDATA) {
1221  lj_trace_err(J, LJ_TRERR_NYICALL);
1222  }
1223  if ((ct->info & CTF_VARARG)
1224 #if LJ_TARGET_X86
1225  || ctype_cconv(ct->info) != CTCC_CDECL
1226 #endif
1227  )
1229  lj_ir_kint(J, ctype_typeid(cts, ct)));
1230  tr = emitir(IRT(IR_CALLXS, t), crec_call_args(J, rd, cts, ct), func);
1231  if (ctype_isbool(ctr->info)) {
1232  if (frame_islua(J->L->base-1) && bc_b(frame_pc(J->L->base-1)[-1]) == 1) {
1233  /* Don't check result if ignored. */
1234  tr = TREF_NIL;
1235  } else {
1237 #if LJ_TARGET_X86ORX64
1238  /* Note: only the x86/x64 backend supports U8 and only for EQ(tr, 0). */
1239  lj_ir_set(J, IRTG(IR_NE, IRT_U8), tr, lj_ir_kint(J, 0));
1240 #else
1241  lj_ir_set(J, IRTGI(IR_NE), tr, lj_ir_kint(J, 0));
1242 #endif
1243  J->postproc = LJ_POST_FIXGUARDSNAP;
1244  tr = TREF_TRUE;
1245  }
1246  } else if (t == IRT_PTR || (LJ_64 && t == IRT_P32) ||
1247  t == IRT_I64 || t == IRT_U64 || ctype_isenum(ctr->info)) {
1248  TRef trid = lj_ir_kint(J, ctype_cid(ct->info));
1249  tr = emitir(IRTG(IR_CNEWI, IRT_CDATA), trid, tr);
1250  if (t == IRT_I64 || t == IRT_U64) lj_needsplit(J);
1251  } else if (t == IRT_FLOAT || t == IRT_U32) {
1252  tr = emitconv(tr, IRT_NUM, t, 0);
1253  } else if (t == IRT_I8 || t == IRT_I16) {
1254  tr = emitconv(tr, IRT_INT, t, IRCONV_SEXT);
1255  } else if (t == IRT_U8 || t == IRT_U16) {
1256  tr = emitconv(tr, IRT_INT, t, 0);
1257  }
1258  J->base[0] = tr;
1259  J->needsnap = 1;
1260  return 1;
1261  }
1262  return 0;
1263 }
1264 
1266 {
1267  CTState *cts = ctype_ctsG(J2G(J));
1268  GCcdata *cd = argv2cdata(J, J->base[0], &rd->argv[0]);
1269  CTypeID id = cd->ctypeid;
1270  CType *ct;
1271  cTValue *tv;
1272  MMS mm = MM_call;
1273  if (id == CTID_CTYPEID) {
1274  id = crec_constructor(J, cd, J->base[0]);
1275  mm = MM_new;
1276  } else if (crec_call(J, rd, cd)) {
1277  return;
1278  }
1279  /* Record ctype __call/__new metamethod. */
1280  ct = ctype_raw(cts, id);
1281  tv = lj_ctype_meta(cts, ctype_isptr(ct->info) ? ctype_cid(ct->info) : id, mm);
1282  if (tv) {
1283  if (tvisfunc(tv)) {
1284  crec_tailcall(J, rd, tv);
1285  return;
1286  }
1287  } else if (mm == MM_new) {
1288  crec_alloc(J, rd, id);
1289  return;
1290  }
1291  /* No metamethod or NYI: non-function metamethods. */
1292  lj_trace_err(J, LJ_TRERR_BADTYPE);
1293 }
1294 
1296 {
1297  if (sp[0] && sp[1] && ctype_isnum(s[0]->info) && ctype_isnum(s[1]->info)) {
1298  IRType dt;
1299  CTypeID id;
1300  TRef tr;
1301  MSize i;
1302  IROp op;
1303  lj_needsplit(J);
1304  if (((s[0]->info & CTF_UNSIGNED) && s[0]->size == 8) ||
1305  ((s[1]->info & CTF_UNSIGNED) && s[1]->size == 8)) {
1306  dt = IRT_U64; id = CTID_UINT64;
1307  } else {
1308  dt = IRT_I64; id = CTID_INT64;
1309  if (mm < MM_add &&
1310  !((s[0]->info | s[1]->info) & CTF_FP) &&
1311  s[0]->size == 4 && s[1]->size == 4) { /* Try to narrow comparison. */
1312  if (!((s[0]->info ^ s[1]->info) & CTF_UNSIGNED) ||
1313  (tref_isk(sp[1]) && IR(tref_ref(sp[1]))->i >= 0)) {
1314  dt = (s[0]->info & CTF_UNSIGNED) ? IRT_U32 : IRT_INT;
1315  goto comp;
1316  } else if (tref_isk(sp[0]) && IR(tref_ref(sp[0]))->i >= 0) {
1317  dt = (s[1]->info & CTF_UNSIGNED) ? IRT_U32 : IRT_INT;
1318  goto comp;
1319  }
1320  }
1321  }
1322  for (i = 0; i < 2; i++) {
1323  IRType st = tref_type(sp[i]);
1324  if (st == IRT_NUM || st == IRT_FLOAT)
1325  sp[i] = emitconv(sp[i], dt, st, IRCONV_ANY);
1326  else if (!(st == IRT_I64 || st == IRT_U64))
1327  sp[i] = emitconv(sp[i], dt, IRT_INT,
1328  (s[i]->info & CTF_UNSIGNED) ? 0 : IRCONV_SEXT);
1329  }
1330  if (mm < MM_add) {
1331  comp:
1332  /* Assume true comparison. Fixup and emit pending guard later. */
1333  if (mm == MM_eq) {
1334  op = IR_EQ;
1335  } else {
1336  op = mm == MM_lt ? IR_LT : IR_LE;
1337  if (dt == IRT_U32 || dt == IRT_U64)
1338  op += (IR_ULT-IR_LT);
1339  }
1340  lj_ir_set(J, IRTG(op, dt), sp[0], sp[1]);
1341  J->postproc = LJ_POST_FIXGUARD;
1342  return TREF_TRUE;
1343  } else {
1344  tr = emitir(IRT(mm+(int)IR_ADD-(int)MM_add, dt), sp[0], sp[1]);
1345  }
1346  return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);
1347  }
1348  return 0;
1349 }
1350 
1352 {
1353  CTState *cts = ctype_ctsG(J2G(J));
1354  CType *ctp = s[0];
1355  if (!(sp[0] && sp[1])) return 0;
1356  if (ctype_isptr(ctp->info) || ctype_isrefarray(ctp->info)) {
1357  if ((mm == MM_sub || mm == MM_eq || mm == MM_lt || mm == MM_le) &&
1358  (ctype_isptr(s[1]->info) || ctype_isrefarray(s[1]->info))) {
1359  if (mm == MM_sub) { /* Pointer difference. */
1360  TRef tr;
1361  CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info));
1362  if (sz == 0 || (sz & (sz-1)) != 0)
1363  return 0; /* NYI: integer division. */
1364  tr = emitir(IRT(IR_SUB, IRT_INTP), sp[0], sp[1]);
1365  tr = emitir(IRT(IR_BSAR, IRT_INTP), tr, lj_ir_kint(J, lj_fls(sz)));
1366 #if LJ_64
1367  tr = emitconv(tr, IRT_NUM, IRT_INTP, 0);
1368 #endif
1369  return tr;
1370  } else { /* Pointer comparison (unsigned). */
1371  /* Assume true comparison. Fixup and emit pending guard later. */
1372  IROp op = mm == MM_eq ? IR_EQ : mm == MM_lt ? IR_ULT : IR_ULE;
1373  lj_ir_set(J, IRTG(op, IRT_PTR), sp[0], sp[1]);
1374  J->postproc = LJ_POST_FIXGUARD;
1375  return TREF_TRUE;
1376  }
1377  }
1378  if (!((mm == MM_add || mm == MM_sub) && ctype_isnum(s[1]->info)))
1379  return 0;
1380  } else if (mm == MM_add && ctype_isnum(ctp->info) &&
1381  (ctype_isptr(s[1]->info) || ctype_isrefarray(s[1]->info))) {
1382  TRef tr = sp[0]; sp[0] = sp[1]; sp[1] = tr; /* Swap pointer and index. */
1383  ctp = s[1];
1384  } else {
1385  return 0;
1386  }
1387  {
1388  TRef tr = sp[1];
1389  IRType t = tref_type(tr);
1390  CTSize sz = lj_ctype_size(cts, ctype_cid(ctp->info));
1391  CTypeID id;
1392 #if LJ_64
1393  if (t == IRT_NUM || t == IRT_FLOAT)
1394  tr = emitconv(tr, IRT_INTP, t, IRCONV_ANY);
1395  else if (!(t == IRT_I64 || t == IRT_U64))
1396  tr = emitconv(tr, IRT_INTP, IRT_INT,
1397  ((t - IRT_I8) & 1) ? 0 : IRCONV_SEXT);
1398 #else
1399  if (!tref_typerange(sp[1], IRT_I8, IRT_U32)) {
1400  tr = emitconv(tr, IRT_INTP, t,
1401  (t == IRT_NUM || t == IRT_FLOAT) ? IRCONV_ANY : 0);
1402  }
1403 #endif
1404  tr = emitir(IRT(IR_MUL, IRT_INTP), tr, lj_ir_kintp(J, sz));
1405  tr = emitir(IRT(mm+(int)IR_ADD-(int)MM_add, IRT_PTR), sp[0], tr);
1407  CTSIZE_PTR);
1408  return emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);
1409  }
1410 }
1411 
1412 /* Record ctype arithmetic metamethods. */
1414  RecordFFData *rd)
1415 {
1416  cTValue *tv = NULL;
1417  if (J->base[0]) {
1418  if (tviscdata(&rd->argv[0])) {
1419  CTypeID id = argv2cdata(J, J->base[0], &rd->argv[0])->ctypeid;
1420  CType *ct = ctype_raw(cts, id);
1421  if (ctype_isptr(ct->info)) id = ctype_cid(ct->info);
1422  tv = lj_ctype_meta(cts, id, (MMS)rd->data);
1423  }
1424  if (!tv && J->base[1] && tviscdata(&rd->argv[1])) {
1425  CTypeID id = argv2cdata(J, J->base[1], &rd->argv[1])->ctypeid;
1426  CType *ct = ctype_raw(cts, id);
1427  if (ctype_isptr(ct->info)) id = ctype_cid(ct->info);
1428  tv = lj_ctype_meta(cts, id, (MMS)rd->data);
1429  }
1430  }
1431  if (tv) {
1432  if (tvisfunc(tv)) {
1433  crec_tailcall(J, rd, tv);
1434  return 0;
1435  } /* NYI: non-function metamethods. */
1436  } else if ((MMS)rd->data == MM_eq) { /* Fallback cdata pointer comparison. */
1437  if (sp[0] && sp[1] && ctype_isnum(s[0]->info) == ctype_isnum(s[1]->info)) {
1438  /* Assume true comparison. Fixup and emit pending guard later. */
1439  lj_ir_set(J, IRTG(IR_EQ, IRT_PTR), sp[0], sp[1]);
1440  J->postproc = LJ_POST_FIXGUARD;
1441  return TREF_TRUE;
1442  } else {
1443  return TREF_FALSE;
1444  }
1445  }
1446  lj_trace_err(J, LJ_TRERR_BADTYPE);
1447  return 0;
1448 }
1449 
1451 {
1452  CTState *cts = ctype_ctsG(J2G(J));
1453  TRef sp[2];
1454  CType *s[2];
1455  MSize i;
1456  for (i = 0; i < 2; i++) {
1457  TRef tr = J->base[i];
1458  CType *ct = ctype_get(cts, CTID_DOUBLE);
1459  if (!tr) {
1460  lj_trace_err(J, LJ_TRERR_BADTYPE);
1461  } else if (tref_iscdata(tr)) {
1462  CTypeID id = argv2cdata(J, tr, &rd->argv[i])->ctypeid;
1463  IRType t;
1464  ct = ctype_raw(cts, id);
1465  t = crec_ct2irt(cts, ct);
1466  if (ctype_isptr(ct->info)) { /* Resolve pointer or reference. */
1467  tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_PTR);
1468  if (ctype_isref(ct->info)) {
1469  ct = ctype_rawchild(cts, ct);
1470  t = crec_ct2irt(cts, ct);
1471  }
1472  } else if (t == IRT_I64 || t == IRT_U64) {
1473  tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_INT64);
1474  lj_needsplit(J);
1475  goto ok;
1476  } else if (t == IRT_INT || t == IRT_U32) {
1477  tr = emitir(IRT(IR_FLOAD, t), tr, IRFL_CDATA_INT);
1478  if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
1479  goto ok;
1480  } else if (ctype_isfunc(ct->info)) {
1481  tr = emitir(IRT(IR_FLOAD, IRT_PTR), tr, IRFL_CDATA_PTR);
1482  ct = ctype_get(cts,
1484  goto ok;
1485  } else {
1486  tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCcdata)));
1487  }
1488  if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
1489  if (ctype_isnum(ct->info)) {
1490  if (t == IRT_CDATA) {
1491  tr = 0;
1492  } else {
1493  if (t == IRT_I64 || t == IRT_U64) lj_needsplit(J);
1494  tr = emitir(IRT(IR_XLOAD, t), tr, 0);
1495  }
1496  }
1497  } else if (tref_isnil(tr)) {
1498  tr = lj_ir_kptr(J, NULL);
1499  ct = ctype_get(cts, CTID_P_VOID);
1500  } else if (tref_isinteger(tr)) {
1501  ct = ctype_get(cts, CTID_INT32);
1502  } else if (tref_isstr(tr)) {
1503  TRef tr2 = J->base[1-i];
1504  CTypeID id = argv2cdata(J, tr2, &rd->argv[1-i])->ctypeid;
1505  ct = ctype_raw(cts, id);
1506  if (ctype_isenum(ct->info)) { /* Match string against enum constant. */
1507  GCstr *str = strV(&rd->argv[i]);
1508  CTSize ofs;
1509  CType *cct = lj_ctype_getfield(cts, ct, str, &ofs);
1510  if (cct && ctype_isconstval(cct->info)) {
1511  /* Specialize to the name of the enum constant. */
1512  emitir(IRTG(IR_EQ, IRT_STR), tr, lj_ir_kstr(J, str));
1513  ct = ctype_child(cts, cct);
1514  tr = lj_ir_kint(J, (int32_t)ofs);
1515  } else { /* Interpreter will throw or return false. */
1516  ct = ctype_get(cts, CTID_P_VOID);
1517  }
1518  } else if (ctype_isptr(ct->info)) {
1519  tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCstr)));
1520  } else {
1521  ct = ctype_get(cts, CTID_P_VOID);
1522  }
1523  } else if (!tref_isnum(tr)) {
1524  tr = 0;
1525  ct = ctype_get(cts, CTID_P_VOID);
1526  }
1527  ok:
1528  s[i] = ct;
1529  sp[i] = tr;
1530  }
1531  {
1532  TRef tr;
1533  if (!(tr = crec_arith_int64(J, sp, s, (MMS)rd->data)) &&
1534  !(tr = crec_arith_ptr(J, sp, s, (MMS)rd->data)) &&
1535  !(tr = crec_arith_meta(J, sp, s, cts, rd)))
1536  return;
1537  J->base[0] = tr;
1538  /* Fixup cdata comparisons, too. Avoids some cdata escapes. */
1539  if (J->postproc == LJ_POST_FIXGUARD && frame_iscont(J->L->base-1) &&
1540  !irt_isguard(J->guardemit)) {
1541  const BCIns *pc = frame_contpc(J->L->base-1) - 1;
1542  if (bc_op(*pc) <= BC_ISNEP) {
1543  J2G(J)->tmptv.u64 = (uint64_t)(uintptr_t)pc;
1544  J->postproc = LJ_POST_FIXCOMP;
1545  }
1546  }
1547  }
1548 }
1549 
1550 /* -- C library namespace metamethods ------------------------------------- */
1551 
1553 {
1554  CTState *cts = ctype_ctsG(J2G(J));
1555  if (tref_isudata(J->base[0]) && tref_isstr(J->base[1]) &&
1556  udataV(&rd->argv[0])->udtype == UDTYPE_FFI_CLIB) {
1557  CLibrary *cl = (CLibrary *)uddata(udataV(&rd->argv[0]));
1558  GCstr *name = strV(&rd->argv[1]);
1559  CType *ct;
1560  CTypeID id = lj_ctype_getname(cts, &ct, name, CLNS_INDEX);
1561  cTValue *tv = lj_tab_getstr(cl->cache, name);
1562  rd->nres = rd->data;
1563  if (id && tv && !tvisnil(tv)) {
1564  /* Specialize to the symbol name and make the result a constant. */
1565  emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, name));
1566  if (ctype_isconstval(ct->info)) {
1567  if (ct->size >= 0x80000000u &&
1568  (ctype_child(cts, ct)->info & CTF_UNSIGNED))
1569  J->base[0] = lj_ir_knum(J, (lua_Number)(uint32_t)ct->size);
1570  else
1571  J->base[0] = lj_ir_kint(J, (int32_t)ct->size);
1572  } else if (ctype_isextern(ct->info)) {
1573  CTypeID sid = ctype_cid(ct->info);
1574  void *sp = *(void **)cdataptr(cdataV(tv));
1575  TRef ptr;
1576  ct = ctype_raw(cts, sid);
1577  if (LJ_64 && !checkptr32(sp))
1578  ptr = lj_ir_kintp(J, (uintptr_t)sp);
1579  else
1580  ptr = lj_ir_kptr(J, sp);
1581  if (rd->data) {
1582  J->base[0] = crec_tv_ct(J, ct, sid, ptr);
1583  } else {
1584  J->needsnap = 1;
1585  crec_ct_tv(J, ct, ptr, J->base[2], &rd->argv[2]);
1586  }
1587  } else {
1588  J->base[0] = lj_ir_kgc(J, obj2gco(cdataV(tv)), IRT_CDATA);
1589  }
1590  } else {
1591  lj_trace_err(J, LJ_TRERR_NOCACHE);
1592  }
1593  } /* else: interpreter will throw. */
1594 }
1595 
1596 /* -- FFI library functions ----------------------------------------------- */
1597 
1598 static TRef crec_toint(jit_State *J, CTState *cts, TRef sp, TValue *sval)
1599 {
1600  return crec_ct_tv(J, ctype_get(cts, CTID_INT32), 0, sp, sval);
1601 }
1602 
1604 {
1605  crec_alloc(J, rd, argv2ctype(J, J->base[0], &rd->argv[0]));
1606 }
1607 
1609 {
1610  UNUSED(rd);
1611  if (J->base[0])
1612  lj_trace_err(J, LJ_TRERR_NYICALL);
1613  J->base[0] = lj_ir_call(J, IRCALL_lj_vm_errno);
1614 }
1615 
1617 {
1618  CTState *cts = ctype_ctsG(J2G(J));
1619  TRef tr = J->base[0];
1620  if (tr) {
1621  TRef trlen = J->base[1];
1622  if (!tref_isnil(trlen)) {
1623  trlen = crec_toint(J, cts, trlen, &rd->argv[1]);
1624  tr = crec_ct_tv(J, ctype_get(cts, CTID_P_CVOID), 0, tr, &rd->argv[0]);
1625  } else {
1626  tr = crec_ct_tv(J, ctype_get(cts, CTID_P_CCHAR), 0, tr, &rd->argv[0]);
1627  trlen = lj_ir_call(J, IRCALL_strlen, tr);
1628  }
1629  J->base[0] = emitir(IRT(IR_XSNEW, IRT_STR), tr, trlen);
1630  } /* else: interpreter will throw. */
1631 }
1632 
1634 {
1635  CTState *cts = ctype_ctsG(J2G(J));
1636  TRef trdst = J->base[0], trsrc = J->base[1], trlen = J->base[2];
1637  if (trdst && trsrc && (trlen || tref_isstr(trsrc))) {
1638  trdst = crec_ct_tv(J, ctype_get(cts, CTID_P_VOID), 0, trdst, &rd->argv[0]);
1639  trsrc = crec_ct_tv(J, ctype_get(cts, CTID_P_CVOID), 0, trsrc, &rd->argv[1]);
1640  if (trlen) {
1641  trlen = crec_toint(J, cts, trlen, &rd->argv[2]);
1642  } else {
1643  trlen = emitir(IRTI(IR_FLOAD), J->base[1], IRFL_STR_LEN);
1644  trlen = emitir(IRTI(IR_ADD), trlen, lj_ir_kint(J, 1));
1645  }
1646  rd->nres = 0;
1647  crec_copy(J, trdst, trsrc, trlen, NULL);
1648  } /* else: interpreter will throw. */
1649 }
1650 
1652 {
1653  CTState *cts = ctype_ctsG(J2G(J));
1654  TRef trdst = J->base[0], trlen = J->base[1], trfill = J->base[2];
1655  if (trdst && trlen) {
1656  CTSize step = 1;
1657  if (tviscdata(&rd->argv[0])) { /* Get alignment of original destination. */
1658  CTSize sz;
1659  CType *ct = ctype_raw(cts, cdataV(&rd->argv[0])->ctypeid);
1660  if (ctype_isptr(ct->info))
1661  ct = ctype_rawchild(cts, ct);
1662  step = (1u<<ctype_align(lj_ctype_info(cts, ctype_typeid(cts, ct), &sz)));
1663  }
1664  trdst = crec_ct_tv(J, ctype_get(cts, CTID_P_VOID), 0, trdst, &rd->argv[0]);
1665  trlen = crec_toint(J, cts, trlen, &rd->argv[1]);
1666  if (trfill)
1667  trfill = crec_toint(J, cts, trfill, &rd->argv[2]);
1668  else
1669  trfill = lj_ir_kint(J, 0);
1670  rd->nres = 0;
1671  crec_fill(J, trdst, trlen, trfill, step);
1672  } /* else: interpreter will throw. */
1673 }
1674 
1676 {
1677  if (tref_iscdata(J->base[0])) {
1678  TRef trid = lj_ir_kint(J, argv2ctype(J, J->base[0], &rd->argv[0]));
1679  J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA),
1680  lj_ir_kint(J, CTID_CTYPEID), trid);
1681  } else {
1682  setfuncV(J->L, &J->errinfo, J->fn);
1683  lj_trace_err_info(J, LJ_TRERR_NYIFFU);
1684  }
1685 }
1686 
1688 {
1689  argv2ctype(J, J->base[0], &rd->argv[0]);
1690  if (tref_iscdata(J->base[1])) {
1691  argv2ctype(J, J->base[1], &rd->argv[1]);
1692  J->postproc = LJ_POST_FIXBOOL;
1693  J->base[0] = TREF_TRUE;
1694  } else {
1695  J->base[0] = TREF_FALSE;
1696  }
1697 }
1698 
1700 {
1701  if (tref_isstr(J->base[0])) {
1702  /* Specialize to the ABI string to make the boolean result a constant. */
1703  emitir(IRTG(IR_EQ, IRT_STR), J->base[0], lj_ir_kstr(J, strV(&rd->argv[0])));
1704  J->postproc = LJ_POST_FIXBOOL;
1705  J->base[0] = TREF_TRUE;
1706  } else {
1707  lj_trace_err(J, LJ_TRERR_BADTYPE);
1708  }
1709 }
1710 
1711 /* Record ffi.sizeof(), ffi.alignof(), ffi.offsetof(). */
1713 {
1714  CTypeID id = argv2ctype(J, J->base[0], &rd->argv[0]);
1715  if (rd->data == FF_ffi_sizeof) {
1716  CType *ct = lj_ctype_rawref(ctype_ctsG(J2G(J)), id);
1717  if (ctype_isvltype(ct->info))
1718  lj_trace_err(J, LJ_TRERR_BADTYPE);
1719  } else if (rd->data == FF_ffi_offsetof) { /* Specialize to the field name. */
1720  if (!tref_isstr(J->base[1]))
1721  lj_trace_err(J, LJ_TRERR_BADTYPE);
1722  emitir(IRTG(IR_EQ, IRT_STR), J->base[1], lj_ir_kstr(J, strV(&rd->argv[1])));
1723  rd->nres = 3; /* Just in case. */
1724  }
1725  J->postproc = LJ_POST_FIXCONST;
1726  J->base[0] = J->base[1] = J->base[2] = TREF_NIL;
1727 }
1728 
1730 {
1731  argv2cdata(J, J->base[0], &rd->argv[0]);
1732  if (!J->base[1])
1733  lj_trace_err(J, LJ_TRERR_BADTYPE);
1734  crec_finalizer(J, J->base[0], J->base[1], &rd->argv[1]);
1735 }
1736 
1737 /* -- 64 bit bit.* library functions -------------------------------------- */
1738 
1739 /* Determine bit operation type from argument type. */
1741 {
1742  if (tviscdata(tv)) {
1743  CType *ct = lj_ctype_rawref(cts, cdataV(tv)->ctypeid);
1744  if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
1745  if ((ct->info & (CTMASK_NUM|CTF_BOOL|CTF_FP|CTF_UNSIGNED)) ==
1746  CTINFO(CT_NUM, CTF_UNSIGNED) && ct->size == 8)
1747  return CTID_UINT64; /* Use uint64_t, since it has the highest rank. */
1748  return CTID_INT64; /* Otherwise use int64_t. */
1749  }
1750  return 0; /* Use regular 32 bit ops. */
1751 }
1752 
1754 {
1755  CTState *cts = ctype_ctsG(J2G(J));
1756  TRef tr = crec_ct_tv(J, ctype_get(cts, CTID_INT64), 0,
1757  J->base[0], &rd->argv[0]);
1758  if (!tref_isinteger(tr))
1759  tr = emitconv(tr, IRT_INT, tref_type(tr), 0);
1760  J->base[0] = tr;
1761 }
1762 
1764 {
1765  CTState *cts = ctype_ctsG(J2G(J));
1766  CTypeID id = crec_bit64_type(cts, &rd->argv[0]);
1767  if (id) {
1768  TRef tr = crec_ct_tv(J, ctype_get(cts, id), 0, J->base[0], &rd->argv[0]);
1769  tr = emitir(IRT(rd->data, id-CTID_INT64+IRT_I64), tr, 0);
1770  J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);
1771  return 1;
1772  }
1773  return 0;
1774 }
1775 
1777 {
1778  CTState *cts = ctype_ctsG(J2G(J));
1779  CTypeID id = 0;
1780  MSize i;
1781  for (i = 0; J->base[i] != 0; i++) {
1782  CTypeID aid = crec_bit64_type(cts, &rd->argv[i]);
1783  if (id < aid) id = aid; /* Determine highest type rank of all arguments. */
1784  }
1785  if (id) {
1786  CType *ct = ctype_get(cts, id);
1787  uint32_t ot = IRT(rd->data, id-CTID_INT64+IRT_I64);
1788  TRef tr = crec_ct_tv(J, ct, 0, J->base[0], &rd->argv[0]);
1789  for (i = 1; J->base[i] != 0; i++) {
1790  TRef tr2 = crec_ct_tv(J, ct, 0, J->base[i], &rd->argv[i]);
1791  tr = emitir(ot, tr, tr2);
1792  }
1793  J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);
1794  return 1;
1795  }
1796  return 0;
1797 }
1798 
1800 {
1801  CTState *cts = ctype_ctsG(J2G(J));
1802  CTypeID id;
1803  TRef tsh = 0;
1804  if (J->base[0] && tref_iscdata(J->base[1])) {
1805  tsh = crec_ct_tv(J, ctype_get(cts, CTID_INT64), 0,
1806  J->base[1], &rd->argv[1]);
1807  if (!tref_isinteger(tsh))
1808  tsh = emitconv(tsh, IRT_INT, tref_type(tsh), 0);
1809  J->base[1] = tsh;
1810  }
1811  id = crec_bit64_type(cts, &rd->argv[0]);
1812  if (id) {
1813  TRef tr = crec_ct_tv(J, ctype_get(cts, id), 0, J->base[0], &rd->argv[0]);
1814  uint32_t op = rd->data;
1815  if (!tsh) tsh = lj_opt_narrow_tobit(J, J->base[1]);
1816  if (!(op < IR_BROL ? LJ_TARGET_MASKSHIFT : LJ_TARGET_MASKROT) &&
1817  !tref_isk(tsh))
1818  tsh = emitir(IRTI(IR_BAND), tsh, lj_ir_kint(J, 63));
1819 #ifdef LJ_TARGET_UNIFYROT
1820  if (op == (LJ_TARGET_UNIFYROT == 1 ? IR_BROR : IR_BROL)) {
1821  op = LJ_TARGET_UNIFYROT == 1 ? IR_BROL : IR_BROR;
1822  tsh = emitir(IRTI(IR_NEG), tsh, tsh);
1823  }
1824 #endif
1825  tr = emitir(IRT(op, id-CTID_INT64+IRT_I64), tr, tsh);
1826  J->base[0] = emitir(IRTG(IR_CNEWI, IRT_CDATA), lj_ir_kint(J, id), tr);
1827  return 1;
1828  }
1829  return 0;
1830 }
1831 
1833 {
1834  CTState *cts = ctype_ctsG(J2G(J));
1835  CTypeID id = crec_bit64_type(cts, &rd->argv[0]);
1836  TRef tr, trsf = J->base[1];
1838  int32_t n;
1839  if (trsf) {
1840  CTypeID id2 = 0;
1841  n = (int32_t)lj_carith_check64(J->L, 2, &id2);
1842  if (id2)
1843  trsf = crec_ct_tv(J, ctype_get(cts, CTID_INT32), 0, trsf, &rd->argv[1]);
1844  else
1845  trsf = lj_opt_narrow_tobit(J, trsf);
1846  emitir(IRTGI(IR_EQ), trsf, lj_ir_kint(J, n)); /* Specialize to n. */
1847  } else {
1848  n = id ? 16 : 8;
1849  }
1850  if (n < 0) { n = -n; sf |= STRFMT_F_UPPER; }
1851  sf |= ((SFormat)((n+1)&255) << STRFMT_SH_PREC);
1852  if (id) {
1853  tr = crec_ct_tv(J, ctype_get(cts, id), 0, J->base[0], &rd->argv[0]);
1854  if (n < 16)
1855  tr = emitir(IRT(IR_BAND, IRT_U64), tr,
1856  lj_ir_kint64(J, ((uint64_t)1 << 4*n)-1));
1857  } else {
1858  tr = lj_opt_narrow_tobit(J, J->base[0]);
1859  if (n < 8)
1860  tr = emitir(IRTI(IR_BAND), tr, lj_ir_kint(J, (int32_t)((1u << 4*n)-1)));
1861  tr = emitconv(tr, IRT_U64, IRT_INT, 0); /* No sign-extension. */
1862  lj_needsplit(J);
1863  }
1865 }
1866 
1867 /* -- Miscellaneous library functions ------------------------------------- */
1868 
1870 {
1871  CTState *cts = ctype_ctsG(J2G(J));
1872  CType *d, *ct = lj_ctype_rawref(cts, cdataV(&rd->argv[0])->ctypeid);
1873  if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
1874  if (ctype_isnum(ct->info) || ctype_iscomplex(ct->info)) {
1875  if (ctype_isinteger_or_bool(ct->info) && ct->size <= 4 &&
1876  !(ct->size == 4 && (ct->info & CTF_UNSIGNED)))
1877  d = ctype_get(cts, CTID_INT32);
1878  else
1879  d = ctype_get(cts, CTID_DOUBLE);
1880  J->base[0] = crec_ct_tv(J, d, 0, J->base[0], &rd->argv[0]);
1881  } else {
1882  J->base[0] = TREF_NIL;
1883  }
1884 }
1885 
1886 #undef IR
1887 #undef emitir
1888 #undef emitconv
1889 
1890 #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
int ptrdiff_t
Definition: CPAL.d:3845
cp
Definition: action.c:1035
#define C
Definition: afm2pl.c:546
#define name
static void step(struct edge *edge)
#define n
Definition: t4ht.c:1290
#define b
Definition: jpegint.h:372
#define special
Definition: devnag.c:330
long pc
Definition: disdvi.c:114
int dinfo()
Definition: dt2dv.c:867
static int id
Definition: bifont.c:66
#define info
Definition: dviinfo.c:42
#define shift
Definition: exp3.c:154
int ot
Definition: fcweight.c:26
#define A
Definition: fmt.h:35
#define tp
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
paragraph P
#define d(n)
Definition: gpos-common.c:151
int base
Definition: gsftopk.c:1502
static FILE * fin
Definition: hpcdtoppm.c:133
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p
Definition: afcover.h:72
small capitals from c petite p scientific i
Definition: afcover.h:80
#define F(x, y, z)
Definition: md5.c:51
#define I(x, y, z)
Definition: md5.c:55
FT_UInt sid
Definition: cffcmap.c:138
FT_UInt idx
Definition: cffcmap.c:135
int int double double double char double char * top
Definition: gdfx.h:19
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
unsigned int uintptr_t
Definition: stdint.h:119
signed int intptr_t
Definition: stdint.h:118
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
unsigned __int64 uint64_t
Definition: stdint.h:90
const int * pos
Definition: combiners.h:905
static luaL_Reg func[]
Definition: except.c:32
#define UNUSED
Definition: makeint.h:237
#define align(x, k)
Definition: obcommon.h:49
int k
Definition: otp-parser.c:70
static int delta
Definition: pbmtolj.c:36
static int sz
Definition: pdftocairo.cc:114
#define V
Definition: pgmcrater.c:68
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld endif[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
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 ptr
#define zero
#define B(x, y)
static int size
Definition: ppmlabel.c:24
#define arg1(arg)
int ofs
Definition: buildvm_libbc.h:45
#define mask(n)
Definition: lbitlib.c:93
#define LJ_TARGET_UNALIGNED
Definition: lj_arch.h:537
#define LJ_64
Definition: lj_arch.h:533
#define LJ_FR2
Definition: lj_arch.h:476
#define LJ_SOFTFP
Definition: lj_arch.h:514
#define bc_op(i)
Definition: lj_bc.h:34
#define bc_b(i)
Definition: lj_bc.h:36
#define bc_a(i)
Definition: lj_bc.h:35
@ BC_ISNEP
Definition: lj_bc.h:202
uint64_t lj_carith_check64(lua_State *L, int narg, CTypeID *id)
Definition: lj_carith.c:310
CTypeID lj_ccall_ctid_vararg(CTState *cts, cTValue *o)
Definition: lj_ccall.c:879
int lj_cconv_multi_init(CTState *cts, CType *d, TValue *o)
Definition: lj_cconv.c:727
#define cconv_idx2(dinfo, sinfo)
Definition: lj_cconv.h:40
#define CCX(dst, src)
Definition: lj_cconv.h:43
static LJ_AINLINE void * cdata_getptr(void *p, CTSize sz)
Definition: lj_cdata.h:16
#define CLNS_INDEX
Definition: lj_clib.h:14
int lj_cparse(CPState *cp)
Definition: lj_cparse.c:1877
#define CPARSE_MODE_NOIMPLICIT
Definition: lj_cparse.h:25
#define CPARSE_MODE_ABSTRACT
Definition: lj_cparse.h:22
TRef recff_bit64_tohex(jit_State *J, RecordFFData *rd, TRef hdr)
Definition: lj_crecord.c:1832
void recff_ffi_typeof(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1675
void recff_ffi_abi(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1699
void lj_crecord_tonumber(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1869
int recff_bit64_unary(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1763
void recff_clib_index(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1552
void recff_cdata_index(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:796
int recff_bit64_nary(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1776
void recff_ffi_copy(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1633
void recff_ffi_istype(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1687
void recff_ffi_new(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1603
void recff_ffi_gc(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1729
void recff_cdata_arith(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1450
void recff_cdata_call(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1265
struct CRecMemList CRecMemList
void recff_ffi_xof(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1712
void recff_ffi_fill(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1651
void recff_ffi_string(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1616
int recff_bit64_shift(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1799
void recff_ffi_errno(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1608
void recff_bit64_tobit(jit_State *J, RecordFFData *rd)
Definition: lj_crecord.c:1753
CTypeID lj_ctype_intern(CTState *cts, CTInfo info, CTSize size)
Definition: lj_ctype.c:176
CTSize lj_ctype_size(CTState *cts, CTypeID id)
Definition: lj_ctype.c:275
CTypeID lj_ctype_getname(CTState *cts, CType **ctp, GCstr *name, uint32_t tmask)
Definition: lj_ctype.c:219
CTSize lj_ctype_vlsize(CTState *cts, CType *ct, CTSize nelem)
Definition: lj_ctype.c:282
cTValue * lj_ctype_meta(CTState *cts, CTypeID id, MMS mm)
Definition: lj_ctype.c:331
CType * lj_ctype_rawref(CTState *cts, CTypeID id)
Definition: lj_ctype.c:266
CTInfo lj_ctype_info(CTState *cts, CTypeID id, CTSize *szp)
Definition: lj_ctype.c:305
#define CTSIZE_PTR
Definition: lj_ctype.h:251
static LJ_AINLINE CType * ctype_child(CTState *cts, CType *ct)
Definition: lj_ctype.h:405
#define ctype_isconstval(info)
Definition: lj_ctype.h:213
#define ctype_bitbsz(info)
Definition: lj_ctype.h:195
#define CT_MEMALIGN
Definition: lj_ctype.h:261
#define CTINFO_REF(ref)
Definition: lj_ctype.h:258
#define CTF_VLA
Definition: lj_ctype.h:70
static LJ_AINLINE CType * ctype_rawchild(CTState *cts, CType *ct)
Definition: lj_ctype.h:421
@ CTCC_THISCALL
Definition: lj_ctype.h:121
@ CTCC_FASTCALL
Definition: lj_ctype.h:121
@ CTCC_CDECL
Definition: lj_ctype.h:121
#define ctype_isfunc(info)
Definition: lj_ctype.h:207
#define ctype_isvoid(info)
Definition: lj_ctype.h:203
#define ctype_isarray(info)
Definition: lj_ctype.h:205
#define ctype_bitpos(info)
Definition: lj_ctype.h:194
#define ctype_isinteger_or_bool(info)
Definition: lj_ctype.h:220
#define ctype_align(info)
Definition: lj_ctype.h:192
#define ctype_iscomplex(info)
Definition: lj_ctype.h:236
#define ctype_isattrib(info)
Definition: lj_ctype.h:210
static LJ_AINLINE CType * ctype_get(CTState *cts, CTypeID id)
Definition: lj_ctype.h:396
#define ctype_typeid(cts, ct)
Definition: lj_ctype.h:402
#define ctype_type(info)
Definition: lj_ctype.h:190
uint32_t CTypeID
Definition: lj_ctype.h:139
static LJ_AINLINE CType * ctype_raw(CTState *cts, CTypeID id)
Definition: lj_ctype.h:413
#define ctype_isbitfield(info)
Definition: lj_ctype.h:212
#define ctype_isbool(info)
Definition: lj_ctype.h:222
#define CTINFO(ct, flags)
Definition: lj_ctype.h:186
#define CTF_UNSIGNED
Definition: lj_ctype.h:68
#define ctype_cid(info)
Definition: lj_ctype.h:191
#define CTF_UNION
Definition: lj_ctype.h:74
#define ctype_ispointer(info)
Definition: lj_ctype.h:227
#define ctype_isenum(info)
Definition: lj_ctype.h:208
uint32_t CTSize
Definition: lj_ctype.h:138
#define CTMASK_NUM
Definition: lj_ctype.h:90
#define ctype_isref(info)
Definition: lj_ctype.h:229
#define CTF_COMPLEX
Definition: lj_ctype.h:73
#define ctype_isextern(info)
Definition: lj_ctype.h:214
#define ctype_isstruct(info)
Definition: lj_ctype.h:206
uint32_t CTInfo
Definition: lj_ctype.h:137
#define ctype_isfield(info)
Definition: lj_ctype.h:211
#define ctype_isrefarray(info)
Definition: lj_ctype.h:232
#define ctype_ctsG(g)
Definition: lj_ctype.h:372
#define lj_ctype_getfield(cts, ct, name, ofs)
Definition: lj_ctype.h:442
#define ctype_isinteger(info)
Definition: lj_ctype.h:218
@ CTID_A_CCHAR
Definition: lj_ctype.h:303
@ CTID_UINT64
Definition: lj_ctype.h:303
@ CTID_INT32
Definition: lj_ctype.h:303
@ CTID_P_CCHAR
Definition: lj_ctype.h:303
@ CTID_DOUBLE
Definition: lj_ctype.h:303
@ CTID_BOOL
Definition: lj_ctype.h:303
@ CTID_UINT32
Definition: lj_ctype.h:303
@ CTID_P_CVOID
Definition: lj_ctype.h:303
@ CTID_INT64
Definition: lj_ctype.h:303
@ CTID_CTYPEID
Definition: lj_ctype.h:303
@ CTID_P_VOID
Definition: lj_ctype.h:303
#define ctype_bitcsz(info)
Definition: lj_ctype.h:196
#define CTF_BOOL
Definition: lj_ctype.h:64
#define ctype_isptr(info)
Definition: lj_ctype.h:204
#define ctype_isfp(info)
Definition: lj_ctype.h:224
@ CT_NUM
Definition: lj_ctype.h:19
@ CT_PTR
Definition: lj_ctype.h:21
@ CT_MAYCONVERT
Definition: lj_ctype.h:23
#define CTF_VARARG
Definition: lj_ctype.h:75
#define ctype_isvltype(info)
Definition: lj_ctype.h:239
#define ctype_isnum(info)
Definition: lj_ctype.h:202
#define CTF_FP
Definition: lj_ctype.h:65
#define ctype_cconv(info)
Definition: lj_ctype.h:199
#define CTALIGN_PTR
Definition: lj_ctype.h:252
#define U64x(hi, lo)
Definition: lj_def.h:95
#define LJ_LIKELY(x)
Definition: lj_def.h:323
#define checkptr32(x)
Definition: lj_def.h:108
#define LJ_FASTCALL
Definition: lj_def.h:314
#define J2G(J)
Definition: lj_dispatch.h:107
#define frame_iscont(f)
Definition: lj_frame.h:79
#define frame_islua(f)
Definition: lj_frame.h:77
#define frame_pc(f)
Definition: lj_frame.h:69
#define frame_contpc(f)
Definition: lj_frame.h:93
TRef lj_ir_kgc(jit_State *J, GCobj *o, IRType t)
Definition: lj_ir.c:273
const uint8_t lj_ir_type_size[IRT__MAX+1]
Definition: lj_ir.c:51
TRef lj_ir_kint64(jit_State *J, uint64_t u64)
Definition: lj_ir.c:240
TRef lj_ir_call(jit_State *J, IRCallID id,...)
Definition: lj_ir.c:127
TRef lj_ir_kint(jit_State *J, int32_t k)
Definition: lj_ir.c:194
#define tref_isk(tr)
Definition: lj_ir.h:508
#define tref_isnum(tr)
Definition: lj_ir.h:497
#define IRTGI(o)
Definition: lj_ir.h:344
#define TREF_FALSE
Definition: lj_ir.h:513
#define irt_isguard(t)
Definition: lj_ir.h:422
#define tref_isnumber(tr)
Definition: lj_ir.h:504
@ IRFL_UDATA_UDTYPE
Definition: lj_ir.h:214
@ IRFL_CDATA_INT64
Definition: lj_ir.h:214
@ IRFL_STR_LEN
Definition: lj_ir.h:214
@ IRFL_CDATA_INT
Definition: lj_ir.h:214
@ IRFL_CDATA_PTR
Definition: lj_ir.h:214
@ IRFL_CDATA_CTYPEID
Definition: lj_ir.h:214
@ IRFL_UDATA_FILE
Definition: lj_ir.h:214
#define tref_isbool(tr)
Definition: lj_ir.h:500
#define IRT(o, t)
Definition: lj_ir.h:340
#define tref_type(tr)
Definition: lj_ir.h:483
#define irref_isk(ref)
Definition: lj_ir.h:463
#define tref_isudata(tr)
Definition: lj_ir.h:496
#define TREF_NIL
Definition: lj_ir.h:512
#define tref_ref(tr)
Definition: lj_ir.h:481
#define tref_isinteger(tr)
Definition: lj_ir.h:503
#define tref_typerange(tr, first, last)
Definition: lj_ir.h:484
IRType
Definition: lj_ir.h:313
@ IRT_UINTP
Definition: lj_ir.h:323
@ IRT_P64
Definition: lj_ir.h:315
@ IRT_STR
Definition: lj_ir.h:315
@ IRT_INT
Definition: lj_ir.h:315
@ IRT_PTR
Definition: lj_ir.h:319
@ IRT_U32
Definition: lj_ir.h:315
@ IRT_NUM
Definition: lj_ir.h:315
@ IRT_FLOAT
Definition: lj_ir.h:315
@ IRT_I8
Definition: lj_ir.h:315
@ IRT_INTP
Definition: lj_ir.h:322
@ IRT_U16
Definition: lj_ir.h:315
@ IRT_CDATA
Definition: lj_ir.h:315
@ IRT_I16
Definition: lj_ir.h:315
@ IRT_NIL
Definition: lj_ir.h:315
@ IRT_P32
Definition: lj_ir.h:315
@ IRT_U64
Definition: lj_ir.h:315
@ IRT_U8
Definition: lj_ir.h:315
@ IRT_I64
Definition: lj_ir.h:315
#define IRTG(o, t)
Definition: lj_ir.h:343
#define TREF_TRUE
Definition: lj_ir.h:514
#define tref_iscdata(tr)
Definition: lj_ir.h:494
IROp
Definition: lj_ir.h:152
@ IR_CALLXS
Definition: lj_ir.h:154
@ IR_BROR
Definition: lj_ir.h:154
@ IR_FLOAD
Definition: lj_ir.h:154
@ IR_BSHL
Definition: lj_ir.h:154
@ IR_BSHR
Definition: lj_ir.h:154
@ IR_SUBOV
Definition: lj_ir.h:154
@ IR_ULE
Definition: lj_ir.h:154
@ IR_NEG
Definition: lj_ir.h:154
@ IR_LT
Definition: lj_ir.h:154
@ IR_XLOAD
Definition: lj_ir.h:154
@ IR_SUB
Definition: lj_ir.h:154
@ IR_CNEW
Definition: lj_ir.h:154
@ IR_EQ
Definition: lj_ir.h:154
@ IR_BOR
Definition: lj_ir.h:154
@ IR_ADDOV
Definition: lj_ir.h:154
@ IR_KINT64
Definition: lj_ir.h:154
@ IR_XBAR
Definition: lj_ir.h:154
@ IR_CNEWI
Definition: lj_ir.h:154
@ IR_ADD
Definition: lj_ir.h:154
@ IR_MUL
Definition: lj_ir.h:154
@ IR_NE
Definition: lj_ir.h:154
@ IR_ULT
Definition: lj_ir.h:154
@ IR_MULOV
Definition: lj_ir.h:154
@ IR_CARG
Definition: lj_ir.h:154
@ IR_XSTORE
Definition: lj_ir.h:154
@ IR_BAND
Definition: lj_ir.h:154
@ IR_LE
Definition: lj_ir.h:154
@ IR_XSNEW
Definition: lj_ir.h:154
@ IR_BROL
Definition: lj_ir.h:154
@ IR_BSAR
Definition: lj_ir.h:154
#define TREF_FRAME
Definition: lj_ir.h:476
#define ir_kint64(ir)
Definition: lj_ir.h:565
#define tref_isnil(tr)
Definition: lj_ir.h:488
#define IRTI(o)
Definition: lj_ir.h:341
#define IRCONV_SEXT
Definition: lj_ir.h:241
#define IRCONV_ANY
Definition: lj_ir.h:247
#define tref_islightud(tr)
Definition: lj_ir.h:491
#define tref_isstr(tr)
Definition: lj_ir.h:492
#define tref_istrue(tr)
Definition: lj_ir.h:490
uint32_t TRef
Definition: lj_ir.h:473
#define CCI_NARGS_MAX
Definition: lj_ircall.h:20
@ IRCALL_strlen
Definition: lj_ircall.h:233
@ IRCALL_lj_cdata_setfin
Definition: lj_ircall.h:233
@ IRCALL_lj_vm_errno
Definition: lj_ircall.h:233
@ IRCALL_lj_strfmt_putfxint
Definition: lj_ircall.h:233
@ IRCALL_memset
Definition: lj_ircall.h:233
@ IRCALL_memcpy
Definition: lj_ircall.h:233
TRef lj_opt_narrow_toint(jit_State *J, TRef tr)
TRef lj_opt_narrow_tobit(jit_State *J, TRef tr)
#define lj_ir_kfunc(J, func)
Definition: lj_iropt.h:68
#define lj_ir_kstr(J, str)
Definition: lj_iropt.h:66
#define lj_ir_set(J, ot, a, b)
Definition: lj_iropt.h:25
#define lj_ir_kintp(J, k)
Definition: lj_iropt.h:54
TRef lj_opt_narrow_cindex(jit_State *J, TRef key)
#define lj_ir_kptr(J, ptr)
Definition: lj_iropt.h:69
static LJ_AINLINE TRef lj_ir_knum(jit_State *J, lua_Number n)
Definition: lj_iropt.h:59
#define JIT_F_OPT_FOLD
Definition: lj_jit.h:66
#define JIT_F_OPT_LOOP
Definition: lj_jit.h:72
@ LJ_POST_FIXGUARDSNAP
Definition: lj_jit.h:147
@ LJ_POST_FIXBOOL
Definition: lj_jit.h:148
@ LJ_POST_FIXCOMP
Definition: lj_jit.h:145
@ LJ_POST_FIXCONST
Definition: lj_jit.h:149
@ LJ_POST_FIXGUARD
Definition: lj_jit.h:146
#define lj_needsplit(J)
Definition: lj_jit.h:374
#define tviscdata(o)
Definition: lj_obj.h:757
#define uddata(u)
Definition: lj_obj.h:326
#define tvisint(o)
Definition: lj_obj.h:761
#define funcV(o)
Definition: lj_obj.h:804
static LJ_AINLINE void setlightudV(TValue *o, void *p)
Definition: lj_obj.h:826
struct GCcdata GCcdata
#define udataV(o)
Definition: lj_obj.h:809
#define gcref(r)
Definition: lj_obj.h:75
#define tvistrue(o)
Definition: lj_obj.h:746
#define itype(o)
Definition: lj_obj.h:742
uint32_t MSize
Definition: lj_obj.h:19
MMS
Definition: lj_obj.h:549
@ MM_new
Definition: lj_obj.h:551
@ MM_eq
Definition: lj_obj.h:551
@ MM_newindex
Definition: lj_obj.h:551
@ MM_index
Definition: lj_obj.h:551
@ MM_add
Definition: lj_obj.h:551
@ MM_sub
Definition: lj_obj.h:551
@ MM_le
Definition: lj_obj.h:551
@ MM_gc
Definition: lj_obj.h:551
@ MM_call
Definition: lj_obj.h:551
@ MM_lt
Definition: lj_obj.h:551
#define cdataV(o)
Definition: lj_obj.h:807
#define tvisgcv(o)
Definition: lj_obj.h:767
uint32_t BCReg
Definition: lj_obj.h:149
#define tviszero(o)
Definition: lj_obj.h:772
static LJ_AINLINE void setfuncV(lua_State *L, TValue *o, GCfunc *v)
Definition: lj_obj.h:883
static LJ_AINLINE void setintV(TValue *o, int32_t i)
Definition: lj_obj.h:893
#define strdata(s)
Definition: lj_obj.h:300
#define intV(o)
Definition: lj_obj.h:811
#define tvistab(o)
Definition: lj_obj.h:758
#define gcval(o)
Definition: lj_obj.h:793
@ UDTYPE_FFI_CLIB
Definition: lj_obj.h:322
@ UDTYPE_IO_FILE
Definition: lj_obj.h:321
#define cdataptr(cd)
Definition: lj_obj.h:344
#define tvisfunc(o)
Definition: lj_obj.h:754
uint32_t BCIns
Definition: lj_obj.h:147
#define tvisnil(o)
Definition: lj_obj.h:743
#define tabV(o)
Definition: lj_obj.h:808
#define strV(o)
Definition: lj_obj.h:803
TRef lj_record_constify(jit_State *J, cTValue *o)
Definition: lj_record.c:218
void lj_snap_add(jit_State *J)
Definition: lj_snap.c:172
#define STRFMT_SH_PREC
Definition: lj_strfmt.h:46
@ STRFMT_UINT
Definition: lj_strfmt.h:24
uint32_t SFormat
Definition: lj_strfmt.h:11
#define STRFMT_F_UPPER
Definition: lj_strfmt.h:42
#define STRFMT_T_HEX
Definition: lj_strfmt.h:28
cTValue * lj_tab_getstr(GCtab *t, GCstr *key)
Definition: lj_tab.c:415
cTValue * lj_tab_get(lua_State *L, GCtab *t, cTValue *key)
Definition: lj_tab.c:425
void lj_trace_err(jit_State *J, TraceError e)
Definition: lj_trace.c:37
void lj_trace_err_info(jit_State *J, TraceError e)
Definition: lj_trace.c:45
#define lua_assert(c)
Definition: llimits.h:89
#define obj2gco(v)
Definition: lstate.h:238
double lua_Number
Definition: lua.h:88
static TRef crec_call_args(jit_State *J, RecordFFData *rd, CTState *cts, CType *ct)
Definition: lj_crecord.c:1077
static TRef crec_arith_int64(jit_State *J, TRef *sp, CType **s, MMS mm)
Definition: lj_crecord.c:1295
static TRef crec_ct_ct(jit_State *J, CType *d, CType *s, TRef dp, TRef sp, void *svisnz)
Definition: lj_crecord.c:388
static void crec_alloc(jit_State *J, RecordFFData *rd, CTypeID id)
Definition: lj_crecord.c:954
static IRType crec_ct2irt(CTState *cts, CType *ct)
Definition: lj_crecord.c:97
static int crec_isnonzero(CType *s, void *p)
Definition: lj_crecord.c:365
static MSize crec_copy_struct(CRecMemList *ml, CTState *cts, CType *ct)
Definition: lj_crecord.c:148
#define emitir(ot, a, b)
Definition: lj_crecord.c:40
static CTypeID argv2ctype(jit_State *J, TRef tr, cTValue *o)
Definition: lj_crecord.c:71
static void crec_finalizer(jit_State *J, TRef trcd, TRef trfin, cTValue *fin)
Definition: lj_crecord.c:939
static TRef crec_toint(jit_State *J, CTState *cts, TRef sp, TValue *sval)
Definition: lj_crecord.c:1598
static void crec_snap_caller(jit_State *J)
Definition: lj_crecord.c:1174
static void crec_fill_emit(jit_State *J, CRecMemList *ml, MSize mlp, TRef trdst, TRef trfill)
Definition: lj_crecord.c:299
static GCcdata * argv2cdata(jit_State *J, TRef tr, cTValue *o)
Definition: lj_crecord.c:47
#define CREC_FILL_MAXUNROLL
Definition: lj_crecord.c:128
#define CREC_COPY_REGWIN
Definition: lj_crecord.c:136
static TRef crec_reassoc_ofs(jit_State *J, TRef tr, ptrdiff_t *ofsp, MSize sz)
Definition: lj_crecord.c:698
static TRef crec_arith_meta(jit_State *J, TRef *sp, CType **s, CTState *cts, RecordFFData *rd)
Definition: lj_crecord.c:1413
static int crec_call(jit_State *J, RecordFFData *rd, GCcdata *cd)
Definition: lj_crecord.c:1196
static void crec_tailcall(jit_State *J, RecordFFData *rd, cTValue *tv)
Definition: lj_crecord.c:716
static void crec_fill(jit_State *J, TRef trdst, TRef trlen, TRef trfill, CTSize step)
Definition: lj_crecord.c:311
static MSize crec_copy_unroll(CRecMemList *ml, CTSize len, CTSize step, IRType tp)
Definition: lj_crecord.c:181
static CTypeID crec_bit64_type(CTState *cts, cTValue *tv)
Definition: lj_crecord.c:1740
static void crec_copy_emit(jit_State *J, CRecMemList *ml, MSize mlp, TRef trdst, TRef trsrc)
Definition: lj_crecord.c:205
#define CREC_COPY_MAXUNROLL
Definition: lj_crecord.c:125
static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp)
Definition: lj_crecord.c:547
static void crec_copy(jit_State *J, TRef trdst, TRef trsrc, TRef trlen, CType *ct)
Definition: lj_crecord.c:227
static TRef crec_arith_ptr(jit_State *J, TRef *sp, CType **s, MMS mm)
Definition: lj_crecord.c:1351
#define emitconv(a, dt, st, flags)
Definition: lj_crecord.c:42
static TRef crec_ct_tv(jit_State *J, CType *d, TRef dp, TRef sp, cTValue *sval)
Definition: lj_crecord.c:598
static void crec_index_meta(jit_State *J, CTState *cts, CType *ct, RecordFFData *rd)
Definition: lj_crecord.c:729
static void crec_index_bf(jit_State *J, RecordFFData *rd, TRef ptr, CTInfo info)
Definition: lj_crecord.c:755
static MSize crec_fill_unroll(CRecMemList *ml, CTSize len, CTSize step)
Definition: lj_crecord.c:276
#define CREC_COPY_MAXLEN
Definition: lj_crecord.c:126
static CTypeID crec_constructor(jit_State *J, GCcdata *cd, TRef tr)
Definition: lj_crecord.c:61
#define IR(ref)
Definition: lj_crecord.c:37
RETTYPE mp_ptr mp_size_t mp_srcptr dp
Definition: sec_div.c:70
#define str(s)
Definition: sh6.c:399
#define uint64_t
Definition: stdint.in.h:215
#define int32_t
Definition: stdint.in.h:167
GCtab * cache
Definition: lj_clib.h:19
CTSize ofs
Definition: lj_crecord.c:141
IRType tp
Definition: lj_crecord.c:142
GCtab * miscmap
Definition: lj_ctype.h:181
lua_State * L
Definition: lj_ctype.h:178
CTSize size
Definition: lj_ctype.h:145
GCRef name
Definition: lj_ctype.h:148
CTInfo info
Definition: lj_ctype.h:144
CTypeID1 sib
Definition: lj_ctype.h:146
uint16_t ctypeid
Definition: lj_obj.h:334
Definition: lj_obj.h:291
uint8_t udtype
Definition: lj_obj.h:310
TValue * argv
Definition: lj_ffrecord.h:15
ptrdiff_t nres
Definition: lj_ffrecord.h:16
uint32_t data
Definition: lj_ffrecord.h:17
Definition: usprintf.c:39
Definition: funcfont.h:31
Definition: sh.h:1226
Definition: tfmaux.c:31
Definition: stemdb.c:56
Definition: dvips.h:235
int j
Definition: t4ht.c:1589
op
Definition: tex4ht.c:3129
#define sp
Definition: stack.c:11
@ L
Definition: ubidiimp.h:45
@ S
Definition: ubidiimp.h:53
static UBool fallback(char *loc)
Definition: ucurr.cpp:604
Definition: lj_ir.h:533
IRRef1 op2
Definition: lj_ir.h:538
IROp1 o
Definition: lj_ir.h:547
IRRef1 op1
Definition: lj_ir.h:538
int32_t i
Definition: lj_ir.h:553
Definition: alloca.c:152