lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I read the lua-5.2.0's code and I found  something strange in ldo.c f_parser function

642|  setptvalue2s(L, L->top, tf);
643|  incr_top(L);
644|  cl = luaF_newLclosure(L, tf);
645|  setclLvalue(L, L->top - 1, cl);
646|  for (i = 0; i < tf->sizeupvalues; i++)  /* initialize upvalues */
647|    cl->l.upvals[i] = luaF_newupval(L);

It seems that the code in line 642 is useless. Because the stack entry will be cover by the code in line 645.
Is it really useless or it has other effect?