Lines Matching refs:pStack
74 FICL_STACK *pStack = pVM->pStack; in vmCheckStack() local
75 int nFree = pStack->base + pStack->nCells - pStack->sp; in vmCheckStack()
77 if (popCells > STKDEPTH(pStack)) in vmCheckStack()
116 FICL_STACK *pStack = ficlMalloc(size); in stackCreate() local
120 assert (pStack != NULL); in stackCreate()
123 pStack->nCells = nCells; in stackCreate()
124 pStack->sp = pStack->base; in stackCreate()
125 pStack->pFrame = NULL; in stackCreate()
126 return pStack; in stackCreate()
135 void stackDelete(FICL_STACK *pStack) in stackDelete() argument
137 if (pStack) in stackDelete()
138 ficlFree(pStack); in stackDelete()
148 int stackDepth(FICL_STACK *pStack) in stackDepth() argument
150 return STKDEPTH(pStack); in stackDepth()
158 void stackDrop(FICL_STACK *pStack, int n) in stackDrop() argument
163 pStack->sp -= n; in stackDrop()
173 CELL stackFetch(FICL_STACK *pStack, int n) in stackFetch() argument
175 return pStack->sp[-n-1]; in stackFetch()
178 void stackStore(FICL_STACK *pStack, int n, CELL c) in stackStore() argument
180 pStack->sp[-n-1] = c; in stackStore()
190 CELL stackGetTop(FICL_STACK *pStack) in stackGetTop() argument
192 return pStack->sp[-1]; in stackGetTop()
205 void stackLink(FICL_STACK *pStack, int nCells) in stackLink() argument
207 stackPushPtr(pStack, pStack->pFrame); in stackLink()
208 pStack->pFrame = pStack->sp; in stackLink()
209 pStack->sp += nCells; in stackLink()
221 void stackUnlink(FICL_STACK *pStack) in stackUnlink() argument
223 pStack->sp = pStack->pFrame; in stackUnlink()
224 pStack->pFrame = stackPopPtr(pStack); in stackUnlink()
234 void stackPick(FICL_STACK *pStack, int n) in stackPick() argument
236 stackPush(pStack, stackFetch(pStack, n)); in stackPick()
246 CELL stackPop(FICL_STACK *pStack) in stackPop() argument
248 return *--pStack->sp; in stackPop()
251 void *stackPopPtr(FICL_STACK *pStack) in stackPopPtr() argument
253 return (*--pStack->sp).p; in stackPopPtr()
256 FICL_UNS stackPopUNS(FICL_STACK *pStack) in stackPopUNS() argument
258 return (*--pStack->sp).u; in stackPopUNS()
261 FICL_INT stackPopINT(FICL_STACK *pStack) in stackPopINT() argument
263 return (*--pStack->sp).i; in stackPopINT()
267 float stackPopFloat(FICL_STACK *pStack) in stackPopFloat() argument
269 return (*(--pStack->sp)).f; in stackPopFloat()
278 void stackPush(FICL_STACK *pStack, CELL c) in stackPush() argument
280 *pStack->sp++ = c; in stackPush()
283 void stackPushPtr(FICL_STACK *pStack, void *ptr) in stackPushPtr() argument
285 *pStack->sp++ = LVALUEtoCELL(ptr); in stackPushPtr()
288 void stackPushUNS(FICL_STACK *pStack, FICL_UNS u) in stackPushUNS() argument
290 *pStack->sp++ = LVALUEtoCELL(u); in stackPushUNS()
293 void stackPushINT(FICL_STACK *pStack, FICL_INT i) in stackPushINT() argument
295 *pStack->sp++ = LVALUEtoCELL(i); in stackPushINT()
299 void stackPushFloat(FICL_STACK *pStack, FICL_FLOAT f) in stackPushFloat() argument
301 *pStack->sp++ = LVALUEtoCELL(f); in stackPushFloat()
310 void stackReset(FICL_STACK *pStack) in stackReset() argument
312 pStack->sp = pStack->base; in stackReset()
325 void stackRoll(FICL_STACK *pStack, int n) in stackRoll() argument
334 pCell = pStack->sp - n - 1; in stackRoll()
346 pCell = pStack->sp - 1; in stackRoll()
365 void stackSetTop(FICL_STACK *pStack, CELL c) in stackSetTop() argument
367 pStack->sp[-1] = c; in stackSetTop()