Questions tagged «calling-conventions»

6
如果可以内联嵌套函数调用,为什么程序要使用调用堆栈?
为什么不让编译器采用这样的程序: function a(b) { return b^2 }; function c(b) { return a(b) + 5 }; 并将其转换为这样的程序: function c(b) { return b^2 + 5 }; 从而消除了计算机记住c(b)的回信地址的需要? 我认为存储程序并支持其编译所需的硬盘空间和RAM分别增加,这就是我们使用调用堆栈的原因。那是对的吗?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.