Lines Matching refs:top
425 StkId top; member
464 StkId top; member
518 #define luaD_checkstack(L,n)if((char*)L->stack_last-(char*)L->top<=(n)*(int)sizeof(TValue))luaD_gro…
519 #define incr_top(L){luaD_checkstack(L,1);L->top++;}
661 setsvalue(L,L->top,luaS_new(L,str)); in pushstr()
670 setsvalue(L,L->top,luaS_newlstr(L,fmt,e-fmt)); in luaO_pushvfstring()
687 setnvalue(L->top,cast_num(va_arg(argp,int))); in luaO_pushvfstring()
692 setnvalue(L->top,cast_num(va_arg(argp,l_uacNumber))); in luaO_pushvfstring()
719 luaV_concat(L,n+1,cast_int(L->top-L->base)-1); in luaO_pushvfstring()
720 L->top-=n; in luaO_pushvfstring()
721 return svalue(L->top-1); in luaO_pushvfstring()
1001 setobj(L,oldtop,L->top-1);
1005 L->top=oldtop+1;
1053 L->top=(L->top-oldstack)+L->stack;
1057 ci->top=(ci->top-oldstack)+L->stack;
1100 setnilvalue(L->top++);
1101 fixed=L->top-actual;
1102 base=L->top;
1104 setobj(L,L->top++,fixed+i);
1108 sethvalue(L,L->top++,htab);
1118 for(p=L->top;p>func;p--)setobj(L,p,p-1);
1141 if(L->top>base+p->numparams)
1142 L->top=base+p->numparams;
1145 int nargs=cast_int(L->top-func)-1;
1152 ci->top=L->base+p->maxstacksize;
1156 for(st=L->top;st<ci->top;st++)
1158 L->top=ci->top;
1168 ci->top=L->top+20;
1174 luaD_poscall(L,L->top-n);
1188 for(i=wanted;i!=0&&firstResult<L->top;i--)
1192 L->top=res;
1247 setclvalue(L,L->top,cl);
1255 status=luaD_pcall(L,f_parser,&p,savestack(L,L->top),L->errfunc);
1899 lim=l->top;
1901 if(lim<ci->top)lim=ci->top;
1903 for(o=l->stack;o<l->top;o++)
2060 setobj(L,L->top,tm);
2061 setuvalue(L,L->top+1,udata);
2062 L->top+=2;
2063 luaD_call(L,L->top-2,0);
2271 L1->top=L1->stack;
2273 L1->ci->func=L1->top;
2274 setnilvalue(L1->top++);
2275 L1->base=L1->ci->base=L1->top;
2276 L1->ci->top=L1->top+20;
2385 L->base=L->top=L->ci->base;
2458 setnilvalue(L->top);
2466 sethvalue(L,L->top,t);
2512 StkId func=L->top-1;
2516 L->top--;
2524 if(f==NULL)setnilvalue(L->top);
2525 else setclvalue(L,L->top,f);
2534 for(p=ci->base;p<ci->top;p++)
2582 setobj(L,L->top,L->top-1);
2583 setobj(L,L->top-1,errfunc);
2585 luaD_call(L,L->top-2,1);
3895 sethvalue(L,L->top,fs->h);
3897 setptvalue(L,L->top,f);
3920 L->top-=2;
4713 setobj(L,L->top,f);
4714 setobj(L,L->top+1,p1);
4715 setobj(L,L->top+2,p2);
4717 L->top+=3;
4718 luaD_call(L,L->top-3,1);
4720 L->top--;
4721 setobj(L,res,L->top);
4725 setobj(L,L->top,f);
4726 setobj(L,L->top+1,p1);
4727 setobj(L,L->top+2,p2);
4728 setobj(L,L->top+3,p3);
4730 L->top+=4;
4731 luaD_call(L,L->top-4,0);
4812 callTMres(L,L->top,tm1,p1,p2);
4813 return!l_isfalse(L->top);
4881 callTMres(L,L->top,tm,t1,t2);
4882 return!l_isfalse(L->top);
4886 StkId top=L->base+last+1;
4888 if(!(ttisstring(top-2)||ttisnumber(top-2))||!tostring(L,top-1)){
4889 if(!call_binTM(L,top-2,top-1,top-2,TM_CONCAT))
4890 luaG_concaterror(L,top-2,top-1);
4891 }else if(tsvalue(top-1)->len==0)
4892 (void)tostring(L,top-2);
4894 size_t tl=tsvalue(top-1)->len;
4897 for(n=1;n<total&&tostring(L,top-n-1);n++){
4898 size_t l=tsvalue(top-n-1)->len;
4905 size_t l=tsvalue(top-i)->len;
4906 memcpy(buffer+tl,svalue(top-i),l);
4909 setsvalue(L,top-n,luaS_newlstr(L,buffer,tl));
5140 if(b!=0)L->top=ra+b;
5148 if(nresults>=0)L->top=L->ci->top;
5159 if(b!=0)L->top=ra+b;
5169 for(aux=0;pfunc+aux<L->top;aux++)
5171 ci->top=L->top=func+aux;
5188 if(b!=0)L->top=ra+b-1;
5195 if(b)L->top=L->ci->top;
5231 L->top=cb+3;
5233 L->top=L->ci->top;
5248 n=cast_int(L->top-ra)-1;
5249 L->top=L->ci->top;
5296 L->top=ra+n;
5311 #define api_checknelems(L,n)luai_apicheck(L,(n)<=(L->top-L->base))
5313 #define api_incr_top(L){luai_apicheck(L,L->top<L->ci->top);L->top++;}
5317 luai_apicheck(L,idx<=L->ci->top-L->base);
5318 if(o>=L->top)return cast(TValue*,(&luaO_nilobject_));
5322 luai_apicheck(L,idx!=0&&-idx<=L->top-L->base);
5323 return L->top+idx;
5352 if(size>8000||(L->top-L->base+size)>8000)
5356 if(L->ci->top<L->top+size)
5357 L->ci->top=L->top+size;
5368 return cast_int(L->top-L->base);
5373 while(L->top<L->base+idx)
5374 setnilvalue(L->top++);
5375 L->top=L->base+idx;
5378 luai_apicheck(L,-(idx+1)<=(L->top-L->base));
5379 L->top+=idx+1;
5386 while(++p<L->top)setobj(L,p-1,p);
5387 L->top--;
5394 for(q=L->top;q>p;q--)setobj(L,q,q-1);
5395 setobj(L,p,L->top);
5406 luai_apicheck(L,ttistable(L->top-1));
5407 func->c.env=hvalue(L->top-1);
5408 luaC_barrier(L,func,L->top-1);
5411 setobj(L,o,L->top-1);
5413 luaC_barrier(L,curr_func(L),L->top-1);
5415 L->top--;
5418 setobj(L,L->top,index2adr(L,idx));
5521 setnilvalue(L->top);
5525 setnvalue(L->top,n);
5529 setnvalue(L->top,cast_num(n));
5534 setsvalue(L,L->top,luaS_newlstr(L,s,len));
5565 L->top-=n;
5567 setobj(L,&cl->c.upvalue[n],L->top+n);
5568 setclvalue(L,L->top,cl);
5572 setbvalue(L->top,(b!=0));
5576 setthvalue(L,L->top,L);
5584 luaV_gettable(L,t,L->top-1,L->top-1);
5592 luaV_gettable(L,t,&key,L->top);
5599 setobj(L,L->top-1,luaH_get(hvalue(t),L->top-1));
5605 setobj(L,L->top,luaH_getnum(hvalue(o),n));
5610 sethvalue(L,L->top,luaH_new(L,narray,nrec));
5632 sethvalue(L,L->top,mt);
5644 sethvalue(L,L->top,clvalue(o)->c.env);
5647 sethvalue(L,L->top,uvalue(o)->env);
5650 setobj(L,L->top,gt(thvalue(o)));
5653 setnilvalue(L->top);
5663 luaV_settable(L,t,L->top-2,L->top-1);
5664 L->top-=2;
5673 luaV_settable(L,t,&key,L->top-1);
5674 L->top--;
5681 setobj(L,luaH_set(L,hvalue(t),L->top-2),L->top-1);
5682 luaC_barriert(L,hvalue(t),L->top-1);
5683 L->top-=2;
5690 setobj(L,luaH_setnum(L,hvalue(o),n),L->top-1);
5691 luaC_barriert(L,hvalue(o),L->top-1);
5692 L->top--;
5700 if(ttisnil(L->top-1))
5703 luai_apicheck(L,ttistable(L->top-1));
5704 mt=hvalue(L->top-1);
5724 L->top--;
5733 luai_apicheck(L,ttistable(L->top-1));
5736 clvalue(o)->c.env=hvalue(L->top-1);
5739 uvalue(o)->env=hvalue(L->top-1);
5742 sethvalue(L,gt(thvalue(o)),hvalue(L->top-1));
5748 if(res)luaC_objbarrier(L,gcvalue(o),hvalue(L->top-1));
5749 L->top--;
5752 #define adjustresults(L,nres){if(nres==(-1)&&L->top>=L->ci->top)L->ci->top=L->top;}
5753 #define checkresults(L,na,nr)luai_apicheck(L,(nr)==(-1)||(L->ci->top-L->top>=(nr)-(na)))
5758 func=L->top-(nargs+1);
5783 c.func=L->top-(nargs+1);
5808 more=luaH_next(L,hvalue(t),L->top-1);
5813 L->top-=1;
5820 luaV_concat(L,n,cast_int(L->top-L->base)-1);
5821 L->top-=(n-1);
5824 setsvalue(L,L->top,luaS_newlstr(L,"",0));
5832 setuvalue(L,L->top,u);
7587 int top=lua_gettop(L);
7602 if(++arg>top)