fleft             141 lj_opt_fold.c  #define knumleft	(ir_knum(fleft)->n)
fleft             283 lj_opt_fold.c    return INTFOLD(kfold_intop(fleft->i, fright->i, (IROp)fins->o));
fleft             291 lj_opt_fold.c    lua_Number n = lj_vm_foldarith((lua_Number)fleft->i, (lua_Number)fright->i,
fleft             302 lj_opt_fold.c    return INTFOLD(~fleft->i);
fleft             308 lj_opt_fold.c    return INTFOLD((int32_t)lj_bswap((uint32_t)fleft->i));
fleft             322 lj_opt_fold.c    int32_t a = fleft->i, b = fright->i;
fleft             376 lj_opt_fold.c    return INT64FOLD(kfold_int64arith(ir_k64(fleft)->u64,
fleft             386 lj_opt_fold.c    uint64_t k1 = ir_k64(fleft)->u64, k2 = ir_k64(fright)->u64;
fleft             410 lj_opt_fold.c    uint64_t k = ir_k64(fleft)->u64;
fleft             422 lj_opt_fold.c    return INT64FOLD(~ir_k64(fleft)->u64);
fleft             432 lj_opt_fold.c    return INT64FOLD(lj_bswap64(ir_k64(fleft)->u64));
fleft             449 lj_opt_fold.c    uint64_t a = ir_k64(fleft)->u64, b = ir_k64(fright)->u64;
fleft             483 lj_opt_fold.c    GCstr *s = lj_str_new(J->L, (const char *)ir_kptr(fleft), (size_t)fright->i);
fleft             498 lj_opt_fold.c    GCstr *str = ir_kstr(fleft);
fleft             506 lj_opt_fold.c    PHIBARRIER(fleft);
fleft             508 lj_opt_fold.c      return fleft->op1;  /* strref(snew(ptr, len), 0) ==> ptr */
fleft             511 lj_opt_fold.c      IRIns *ir = IR(fleft->op1);
fleft             527 lj_opt_fold.c    if (irref_isk(fleft->op1) && irref_isk(fleft->op2)) {
fleft             528 lj_opt_fold.c      GCstr *a = ir_kstr(IR(fleft->op1));
fleft             529 lj_opt_fold.c      GCstr *b = ir_kstr(IR(fleft->op2));
fleft             560 lj_opt_fold.c        !(fleft->op2 & IRBUFHDR_APPEND) &&
fleft             561 lj_opt_fold.c        fleft->prev == fright->op2 &&
fleft             562 lj_opt_fold.c        fleft->op1 == IR(fright->op2)->op1) {
fleft             564 lj_opt_fold.c      IR(ref)->op2 = (fleft->op2 | IRBUFHDR_APPEND);  /* Modify BUFHDR. */
fleft             579 lj_opt_fold.c        if (fleft->o == IR_BUFPUT && irref_isk(fleft->op2) &&
fleft             580 lj_opt_fold.c  	  !irt_isphi(fleft->t)) {  /* Join two constant string puts in a row. */
fleft             581 lj_opt_fold.c  	GCstr *s1 = ir_kstr(IR(fleft->op2));
fleft             595 lj_opt_fold.c    lua_assert(fleft->o == IR_BUFHDR || fleft->o == IR_BUFPUT ||
fleft             596 lj_opt_fold.c  	     fleft->o == IR_CALLL);
fleft             598 lj_opt_fold.c      if (fleft->o == IR_BUFHDR) {  /* No put operations? */
fleft             599 lj_opt_fold.c        if (!(fleft->op2 & IRBUFHDR_APPEND))  /* Empty buffer? */
fleft             601 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft             602 lj_opt_fold.c        fins->op2 = fleft->prev;  /* Relies on checks in bufput_append. */
fleft             604 lj_opt_fold.c      } else if (fleft->o == IR_BUFPUT) {
fleft             605 lj_opt_fold.c        IRIns *irb = IR(fleft->op1);
fleft             607 lj_opt_fold.c  	return fleft->op2;  /* Shortcut for a single put operation. */
fleft             614 lj_opt_fold.c        IRIns *irs = IR(ref), *ira = fleft, *irb = IR(irs->op1);
fleft             637 lj_opt_fold.c    if (irref_isk(fleft->op2)) {
fleft             641 lj_opt_fold.c  						       ir_kstr(IR(fleft->op2)));
fleft             643 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft             653 lj_opt_fold.c    if (irref_isk(fleft->op2)) {
fleft             654 lj_opt_fold.c      IRIns *irc = IR(fleft->op1);
fleft             657 lj_opt_fold.c        sb = lj_buf_putstr_rep(sb, ir_kstr(IR(irc->op2)), IR(fleft->op2)->i);
fleft             675 lj_opt_fold.c    IRIns *irc = IR(fleft->op1);
fleft             677 lj_opt_fold.c    if (irref_isk(fleft->op2)) {
fleft             679 lj_opt_fold.c      IRIns *ira = IR(fleft->op2);
fleft             715 lj_opt_fold.c    GCobj *o = ir_kgc(fleft);
fleft             722 lj_opt_fold.c    if (irt_iscdata(fleft->t)) {
fleft             739 lj_opt_fold.c    void *p = ir_kptr(fleft);
fleft             745 lj_opt_fold.c    return lj_ir_kptr_(J, fleft->o, (char *)p + ofs);
fleft             753 lj_opt_fold.c    if (fleft->o == IR_KINT || fleft->o == IR_KINT64) {
fleft             771 lj_opt_fold.c    return lj_ir_knum(J, (lua_Number)fleft->i);
fleft             777 lj_opt_fold.c    return lj_ir_knum(J, (lua_Number)(uint32_t)fleft->i);
fleft             786 lj_opt_fold.c    int32_t k = fleft->i;
fleft             801 lj_opt_fold.c      return INT64FOLD((uint64_t)(int64_t)fleft->i);
fleft             803 lj_opt_fold.c      return INT64FOLD((uint64_t)(int64_t)(uint32_t)fleft->i);
fleft             809 lj_opt_fold.c    return lj_ir_knum(J, (lua_Number)(int64_t)ir_kint64(fleft)->u64);
fleft             815 lj_opt_fold.c    return lj_ir_knum(J, (lua_Number)ir_kint64(fleft)->u64);
fleft             822 lj_opt_fold.c    return INTFOLD((int32_t)ir_kint64(fleft)->u64);
fleft             870 lj_opt_fold.c    return lj_ir_kstr(J, lj_strfmt_num(J->L, ir_knum(fleft)));
fleft             877 lj_opt_fold.c  		       lj_strfmt_int(J->L, fleft->i) :
fleft             878 lj_opt_fold.c  		       lj_strfmt_char(J->L, fleft->i));
fleft             885 lj_opt_fold.c    if (lj_strscan_num(ir_kstr(fleft), &n))
fleft             920 lj_opt_fold.c    IRFPMathOp op = (IRFPMathOp)fleft->op2;
fleft             935 lj_opt_fold.c    PHIBARRIER(fleft);
fleft             936 lj_opt_fold.c    fins->op1 = fleft->op1;  /* abs(neg(x)) ==> abs(x) */
fleft             946 lj_opt_fold.c    PHIBARRIER(fleft);  /* See above. Fold would be ok, but not beneficial. */
fleft             947 lj_opt_fold.c    return fleft->op1;  /* f(g(x)) ==> x */
fleft             962 lj_opt_fold.c    PHIBARRIER(fleft);
fleft             965 lj_opt_fold.c    fins->op2 = fleft->op1;
fleft             990 lj_opt_fold.c    PHIBARRIER(fleft);
fleft             991 lj_opt_fold.c    fins->op2 = fleft->op1;  /* (-x) - k ==> (-k) - x */
fleft            1039 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1040 lj_opt_fold.c    fins->op1 = fleft->op1;  /* (-a) o k ==> a o (-k) */
fleft            1049 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1051 lj_opt_fold.c    fins->op1 = fleft->op1;  /* (-a) o (-b) ==> a o b */
fleft            1109 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1111 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) == IRT_NUM && irt_isguard(fleft->t))
fleft            1112 lj_opt_fold.c      return fleft->op1;  /* f(g(x)) ==> x */
fleft            1121 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) ==
fleft            1123 lj_opt_fold.c      return fleft->op1;
fleft            1131 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1132 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT) {
fleft            1134 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1137 lj_opt_fold.c    } else if ((fleft->op2 & IRCONV_SRCMASK) == IRT_U32) {
fleft            1139 lj_opt_fold.c      return fleft->op1;
fleft            1142 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1157 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1158 lj_opt_fold.c    src = (fleft->op2 & IRCONV_SRCMASK);
fleft            1161 lj_opt_fold.c        return fleft->op1;
fleft            1164 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft            1174 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1175 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) == IRT_FLOAT)
fleft            1176 lj_opt_fold.c      return fleft->op1;
fleft            1185 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT) {
fleft            1186 lj_opt_fold.c      lua_assert(irt_isnum(fleft->t));
fleft            1187 lj_opt_fold.c      return fleft->op1;
fleft            1188 lj_opt_fold.c    } else if ((fleft->op2 & IRCONV_SRCMASK) == IRT_U32) {
fleft            1189 lj_opt_fold.c      lua_assert(irt_isnum(fleft->t));
fleft            1191 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1204 lj_opt_fold.c    if ((fleft->op2 & IRCONV_SRCMASK) == IRT_INT ||
fleft            1205 lj_opt_fold.c        (fleft->op2 & IRCONV_SRCMASK) == IRT_U32)
fleft            1219 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1220 lj_opt_fold.c    if (fleft->o == IR_XLOAD && (irt_isu8(fleft->t) || irt_isu16(fleft->t)))
fleft            1222 lj_opt_fold.c    if (fleft->o == IR_ADD && irref_isk(fleft->op2)) {
fleft            1223 lj_opt_fold.c      ofs = (int64_t)IR(fleft->op2)->i;
fleft            1224 lj_opt_fold.c      ref = fleft->op1;
fleft            1260 lj_opt_fold.c    IROp op = (IROp)fleft->o;
fleft            1262 lj_opt_fold.c    IRRef op1 = fleft->op1, op2 = fleft->op2, mode = fins->op2;
fleft            1263 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1301 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1350 lj_opt_fold.c    if (fleft->o == IR_KINT ? (fleft->i == 0) : (ir_kint64(fleft)->u64 == 0)) {
fleft            1431 lj_opt_fold.c    if (fleft->i == 0)
fleft            1449 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1450 lj_opt_fold.c      if (fins->op2 == fleft->op1)  /* (i + j) - i ==> j */
fleft            1451 lj_opt_fold.c        return fleft->op2;
fleft            1452 lj_opt_fold.c      if (fins->op2 == fleft->op2)  /* (i + j) - j ==> i */
fleft            1453 lj_opt_fold.c        return fleft->op1;
fleft            1462 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1463 lj_opt_fold.c      if (fins->op2 == fleft->op1) {  /* (i - j) - i ==> 0 - j */
fleft            1465 lj_opt_fold.c        fins->op2 = fleft->op2;
fleft            1506 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1508 lj_opt_fold.c      if (fleft->op1 == fright->op1) {  /* (i + j1) - (i + j2) ==> j1 - j2 */
fleft            1509 lj_opt_fold.c        fins->op1 = fleft->op2;
fleft            1513 lj_opt_fold.c      if (fleft->op1 == fright->op2) {  /* (i + j1) - (j2 + i) ==> j1 - j2 */
fleft            1514 lj_opt_fold.c        fins->op1 = fleft->op2;
fleft            1518 lj_opt_fold.c      if (fleft->op2 == fright->op1) {  /* (j1 + i) - (i + j2) ==> j1 - j2 */
fleft            1519 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft            1523 lj_opt_fold.c      if (fleft->op2 == fright->op2) {  /* (j1 + i) - (j2 + i) ==> j1 - j2 */
fleft            1524 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft            1631 lj_opt_fold.c    int64_t k = fleft->o == IR_KINT ? (int64_t)fleft->i :
fleft            1632 lj_opt_fold.c  				    (int64_t)ir_k64(fleft)->u64;
fleft            1646 lj_opt_fold.c    int64_t k = fleft->o == IR_KINT ? (int64_t)fleft->i :
fleft            1647 lj_opt_fold.c  				    (int64_t)ir_k64(fleft)->u64;
fleft            1659 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1660 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1663 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1670 lj_opt_fold.c      IROpT ot = fleft->ot;
fleft            1671 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1684 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1686 lj_opt_fold.c        kfold_intop(-1, irk->i, (IROp)fleft->o) == fright->i)
fleft            1695 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1696 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1702 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft            1714 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1715 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1722 lj_opt_fold.c        fins->op1 = fleft->op1;
fleft            1741 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1746 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1747 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1762 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1766 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1767 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1783 lj_opt_fold.c    if (fins->op2 == fleft->op1 || fins->op2 == fleft->op2)
fleft            1791 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            1792 lj_opt_fold.c    if (fins->op2 == fleft->op1)  /* (a xor b) xor a ==> b */
fleft            1793 lj_opt_fold.c      return fleft->op2;
fleft            1794 lj_opt_fold.c    if (fins->op2 == fleft->op2)  /* (a xor b) xor b ==> a */
fleft            1795 lj_opt_fold.c      return fleft->op1;
fleft            1806 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1807 lj_opt_fold.c    PHIBARRIER(fleft);  /* The (shift any KINT) rule covers k2 == 0 and more. */
fleft            1819 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1832 lj_opt_fold.c    IRIns *irk = IR(fleft->op2);
fleft            1838 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1839 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1847 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            1848 lj_opt_fold.c      fins->op1 = fleft->op1;
fleft            1859 lj_opt_fold.c    if (fins->op2 == fleft->op1 || fins->op2 == fleft->op2)
fleft            2053 lj_opt_fold.c    PHIBARRIER(fleft);
fleft            2056 lj_opt_fold.c      IRRef strref = fleft->op1;
fleft            2060 lj_opt_fold.c        emitir(IRTGI(IR_EQ), fleft->op2, lj_ir_kint(J, len));
fleft            2064 lj_opt_fold.c        if (!irref_isk(fleft->op2))  /* Only handle the constant length case. */
fleft            2066 lj_opt_fold.c        if (IR(fleft->op2)->i != len)
fleft            2107 lj_opt_fold.c    lua_assert(ir_kptr(fleft) == niltvg(J2G(J)));
fleft            2132 lj_opt_fold.c      GCfunc *fn = ir_kfunc(fleft);
fleft            2168 lj_opt_fold.c    if (lj_tab_get(J->L, ir_ktab(IR(fleft->op1)), &keyv) == niltvg(J2G(J)) &&
fleft            2185 lj_opt_fold.c      return INTFOLD(fleft->op1);
fleft            2193 lj_opt_fold.c      return INTFOLD((1 << fleft->op2)-1);
fleft            2201 lj_opt_fold.c      return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->asize);
fleft            2209 lj_opt_fold.c      return INTFOLD((int32_t)ir_ktab(IR(fleft->op1))->hmask);
fleft            2229 lj_opt_fold.c      return INTFOLD((int32_t)ir_kstr(fleft)->len);
fleft            2237 lj_opt_fold.c      PHIBARRIER(fleft);
fleft            2238 lj_opt_fold.c      return fleft->op2;
fleft            2246 lj_opt_fold.c    if (LJ_LIKELY(J->flags & JIT_F_OPT_FOLD) && fleft->op2 == IRTOSTR_CHAR)
fleft            2256 lj_opt_fold.c      return INTFOLD((int32_t)ir_kcdata(fleft)->ctypeid);
fleft            2267 lj_opt_fold.c      void *p = cdataptr(ir_kcdata(fleft));
fleft            2281 lj_opt_fold.c      return fleft->op1;  /* No PHI barrier needed. CNEW/CNEWI op1 is const. */
fleft            2292 lj_opt_fold.c      return fleft->op2;  /* Fold even across PHI to avoid allocations. */
fleft            2327 lj_opt_fold.c    TRef tr = kfold_xload(J, fins, ir_kptr(fleft));
fleft            2458 lj_opt_fold.c      *fleft = *IR(fins->op1);
fleft            2460 lj_opt_fold.c        fleft[1] = IR(fins->op1)[1];
fleft             263 lj_opt_mem.c     IRRef tab = fleft->op1;