peek()应该保留栈顶的项目。
跟踪缓冲区并不保存栈顶或由寄存器所指向的内存的内容。
Trace buffer doesn't save top of stack or contents of memory referenced by registers.
在碰到退出函数时,当前的活动函数就会返回,并释放栈顶元素。
When an exit address is encountered, the current active function has returned and the top element on the stack is discarded.
指令PULL或者PARSE PULL从栈顶取得一个字符串。
The instruction PULL or PARSE PULL take a string off the top of the stack.
栈顶的地址就代表最后一次被调用的函数(也就是当前的活动函数)。
The address at the top of the stack represents the function that was last called (that is, the active function).
有时,这将是不可能的,如果在栈顶的值来计算复杂的(不可预测)。
Sometimes it would not be possible, if the values on the top of the stack came from complex (unpredictable) calculations.
然后,lua_setglobal函数将栈顶的值赋给一个有名称的全局变量。
The lua_setglobal function then assigns the top value on the stack to a named global variable.
有一点要注意:数组的第一个元素(而不是最后一个元素)是这个调用跟踪的栈顶。
One thing to note: the first element of the arrray is the top of the call trace, not the last.
第20行访问栈顶(栈顶的索引为- 1)作为lua字符串,打印消息,然后从堆栈中删除该值。
Line 20 accesses the top of the stack (the top of the stack has an index of -1) as a Lua string, prints the message, and then removes the value from the stack.
现在,我的单元测试-向栈上压入2,4,6,然后从栈顶弹出两个元素以检验他们是否为6,4-失败了。
Now, my unit test -- which pushes 2, 4, and 6 onto the stack and pops the top two elements off to verify that they are 6 and 4 -- fails.
因此,0(1)引用的是概念上的栈顶,4(1)引用的是栈顶之下4个字节的位置(概念上的),24(1)从概念上来说位置更低,而100(1)又低一些。
So, 0 (1) refers to the conceptual top of the stack, 4 (1) refers to four bytes down from the top (conceptually), 24 (1) is even lower conceptually, and 100 (1) is lower still.
这种简单的设计,很有可能是考虑到数据操作都符合后进先出(LIFO )规则,这意味着访问栈的内容并不需要复杂的数据结构,一个简单的栈顶指针就能搞定一切。
This simple design, possible because the data obeys strict LIFO order, means that no complex data structure is needed to track stack contents - a simple pointer to the top of the stack will do.
由于栈可以非常沉重,哈伯斯特建议设计的M5020平顶的POM材料和PA链轮皮带输送机。
Since the stacks can be very heavy, Habasit proposed to design a conveyor with the M5020 Flat Top belt made of POM material and PA sprockets.
由于栈可以非常沉重,哈伯斯特建议设计的M5020平顶的POM材料和PA链轮皮带输送机。
Since the stacks can be very heavy, Habasit proposed to design a conveyor with the M5020 Flat Top belt made of POM material and PA sprockets.
应用推荐