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);
1898 lim=l->top;
1900 if(lim<ci->top)lim=ci->top;
1902 for(o=l->stack;o<l->top;o++)
2059 setobj(L,L->top,tm);
2060 setuvalue(L,L->top+1,udata);
2061 L->top+=2;
2062 luaD_call(L,L->top-2,0);
2270 L1->top=L1->stack;
2272 L1->ci->func=L1->top;
2273 setnilvalue(L1->top++);
2274 L1->base=L1->ci->base=L1->top;
2275 L1->ci->top=L1->top+20;
2384 L->base=L->top=L->ci->base;
2457 setnilvalue(L->top);
2465 sethvalue(L,L->top,t);
2511 StkId func=L->top-1;
2515 L->top--;
2523 if(f==NULL)setnilvalue(L->top);
2524 else setclvalue(L,L->top,f);
2533 for(p=ci->base;p<ci->top;p++)
2581 setobj(L,L->top,L->top-1);
2582 setobj(L,L->top-1,errfunc);
2584 luaD_call(L,L->top-2,1);
3894 sethvalue(L,L->top,fs->h);
3896 setptvalue(L,L->top,f);
3919 L->top-=2;
4712 setobj(L,L->top,f);
4713 setobj(L,L->top+1,p1);
4714 setobj(L,L->top+2,p2);
4716 L->top+=3;
4717 luaD_call(L,L->top-3,1);
4719 L->top--;
4720 setobj(L,res,L->top);
4724 setobj(L,L->top,f);
4725 setobj(L,L->top+1,p1);
4726 setobj(L,L->top+2,p2);
4727 setobj(L,L->top+3,p3);
4729 L->top+=4;
4730 luaD_call(L,L->top-4,0);
4811 callTMres(L,L->top,tm1,p1,p2);
4812 return!l_isfalse(L->top);
4880 callTMres(L,L->top,tm,t1,t2);
4881 return!l_isfalse(L->top);
4885 StkId top=L->base+last+1;
4887 if(!(ttisstring(top-2)||ttisnumber(top-2))||!tostring(L,top-1)){
4888 if(!call_binTM(L,top-2,top-1,top-2,TM_CONCAT))
4889 luaG_concaterror(L,top-2,top-1);
4890 }else if(tsvalue(top-1)->len==0)
4891 (void)tostring(L,top-2);
4893 size_t tl=tsvalue(top-1)->len;
4896 for(n=1;n<total&&tostring(L,top-n-1);n++){
4897 size_t l=tsvalue(top-n-1)->len;
4904 size_t l=tsvalue(top-i)->len;
4905 memcpy(buffer+tl,svalue(top-i),l);
4908 setsvalue(L,top-n,luaS_newlstr(L,buffer,tl));
5139 if(b!=0)L->top=ra+b;
5147 if(nresults>=0)L->top=L->ci->top;
5158 if(b!=0)L->top=ra+b;
5168 for(aux=0;pfunc+aux<L->top;aux++)
5170 ci->top=L->top=func+aux;
5187 if(b!=0)L->top=ra+b-1;
5194 if(b)L->top=L->ci->top;
5230 L->top=cb+3;
5232 L->top=L->ci->top;
5247 n=cast_int(L->top-ra)-1;
5248 L->top=L->ci->top;
5295 L->top=ra+n;
5310 #define api_checknelems(L,n)luai_apicheck(L,(n)<=(L->top-L->base))
5312 #define api_incr_top(L){luai_apicheck(L,L->top<L->ci->top);L->top++;}
5316 luai_apicheck(L,idx<=L->ci->top-L->base);
5317 if(o>=L->top)return cast(TValue*,(&luaO_nilobject_));
5321 luai_apicheck(L,idx!=0&&-idx<=L->top-L->base);
5322 return L->top+idx;
5351 if(size>8000||(L->top-L->base+size)>8000)
5355 if(L->ci->top<L->top+size)
5356 L->ci->top=L->top+size;
5367 return cast_int(L->top-L->base);
5372 while(L->top<L->base+idx)
5373 setnilvalue(L->top++);
5374 L->top=L->base+idx;
5377 luai_apicheck(L,-(idx+1)<=(L->top-L->base));
5378 L->top+=idx+1;
5385 while(++p<L->top)setobj(L,p-1,p);
5386 L->top--;
5393 for(q=L->top;q>p;q--)setobj(L,q,q-1);
5394 setobj(L,p,L->top);
5405 luai_apicheck(L,ttistable(L->top-1));
5406 func->c.env=hvalue(L->top-1);
5407 luaC_barrier(L,func,L->top-1);
5410 setobj(L,o,L->top-1);
5412 luaC_barrier(L,curr_func(L),L->top-1);
5414 L->top--;
5417 setobj(L,L->top,index2adr(L,idx));
5520 setnilvalue(L->top);
5524 setnvalue(L->top,n);
5528 setnvalue(L->top,cast_num(n));
5533 setsvalue(L,L->top,luaS_newlstr(L,s,len));
5564 L->top-=n;
5566 setobj(L,&cl->c.upvalue[n],L->top+n);
5567 setclvalue(L,L->top,cl);
5571 setbvalue(L->top,(b!=0));
5575 setthvalue(L,L->top,L);
5583 luaV_gettable(L,t,L->top-1,L->top-1);
5591 luaV_gettable(L,t,&key,L->top);
5598 setobj(L,L->top-1,luaH_get(hvalue(t),L->top-1));
5604 setobj(L,L->top,luaH_getnum(hvalue(o),n));
5609 sethvalue(L,L->top,luaH_new(L,narray,nrec));
5631 sethvalue(L,L->top,mt);
5643 sethvalue(L,L->top,clvalue(o)->c.env);
5646 sethvalue(L,L->top,uvalue(o)->env);
5649 setobj(L,L->top,gt(thvalue(o)));
5652 setnilvalue(L->top);
5662 luaV_settable(L,t,L->top-2,L->top-1);
5663 L->top-=2;
5672 luaV_settable(L,t,&key,L->top-1);
5673 L->top--;
5680 setobj(L,luaH_set(L,hvalue(t),L->top-2),L->top-1);
5681 luaC_barriert(L,hvalue(t),L->top-1);
5682 L->top-=2;
5689 setobj(L,luaH_setnum(L,hvalue(o),n),L->top-1);
5690 luaC_barriert(L,hvalue(o),L->top-1);
5691 L->top--;
5699 if(ttisnil(L->top-1))
5702 luai_apicheck(L,ttistable(L->top-1));
5703 mt=hvalue(L->top-1);
5723 L->top--;
5732 luai_apicheck(L,ttistable(L->top-1));
5735 clvalue(o)->c.env=hvalue(L->top-1);
5738 uvalue(o)->env=hvalue(L->top-1);
5741 sethvalue(L,gt(thvalue(o)),hvalue(L->top-1));
5747 if(res)luaC_objbarrier(L,gcvalue(o),hvalue(L->top-1));
5748 L->top--;
5751 #define adjustresults(L,nres){if(nres==(-1)&&L->top>=L->ci->top)L->ci->top=L->top;}
5752 #define checkresults(L,na,nr)luai_apicheck(L,(nr)==(-1)||(L->ci->top-L->top>=(nr)-(na)))
5757 func=L->top-(nargs+1);
5782 c.func=L->top-(nargs+1);
5807 more=luaH_next(L,hvalue(t),L->top-1);
5812 L->top-=1;
5819 luaV_concat(L,n,cast_int(L->top-L->base)-1);
5820 L->top-=(n-1);
5823 setsvalue(L,L->top,luaS_newlstr(L,"",0));
5831 setuvalue(L,L->top,u);
7581 int top=lua_gettop(L);
7596 if(++arg>top)