/* Create expression 't'. 't' must have its final result already in a register or upvalue. Upvalues can only be indexed by literal strings. Keys can be literal strings in the constant table or arbitrary values in registers.  */
void luaK_indexed(FuncState *fs, expdesc *t, expdesc *k)
/* Create expression 't'. 't' must have its final result already in a register or upvalue. Upvalues can only be indexed by literal strings. Keys can be literal strings in the constant table or arbitrary values in registers.  */
void luaK_indexed(FuncState *fs, expdesc *t, expdesc *k)
{
    t->u.ind.t = t->u.info;
    t->u.ind.idx = k->u.info;
    t->k = VINDEXUP;
  }
  else {
    t->u.ind.t = (t->k == VLOCAL) ? t->u.var.ridx: t->u.info;
    if (isKstr(fs, k)) {
      t->u.ind.idx = k->u.info;
      t->k = VINDEXSTR;
    }
    else if (isCint(k)) {
      t->u.ind.idx = cast_int(k->u.ival);
      t->k = VINDEXI;
    }
    else {
      t->u.ind.idx = luaK_exp2anyreg(fs, k);
      t->k = VINDEXED;
    }
  }
}