tail dependence function 尾部相关函数
For example, the print_report_i function described earlier compiled with tail-call optimization using -O2 on GCC 3.4 and therefore runs with a stack-size that is constant, not growing linearly.
例如,前面描述的 print_report_i 函数在 GCC 3.4 中使用 -O2 进行尾部调用优化编译, 因此运行时使用的栈的大小是固定的,而不是线性增长的。
This means that we have to manually rewrite the stack to fake a return address so that the tail-called function will return directly to our parent.
这意味着我们必须手工重新编写栈来仿造一个返回地址,以使得尾部调用的函数能直接返回到调用它的函数。
It seems that once control is passed to the tail-called function, nothing in the stack is useful anymore.
好像一旦控制权传递给了尾部调用的函数,栈中就再也没有有用的内容了。
应用推荐