4 ms·
Nitpick: you also stored the function’s arguments there (if the language supported function arguments. I think most did, but am not sure about COBOL) On the pl
by Someone 7y ago
Nitpick: you also stored the function’s arguments there (if the language supported function arguments. I think most did, but am not sure about COBOL)
On the plus side, languages at the time (FORTRAN, COBOL) also required array sizes to be known at compile time, and memory allocators didn’t exist, so programs never ran out of memory (but would abort if an input file was larger than expected, even if the machine had plenty of memory available)
Consequently, CPU support for stacks was weak, because languages had no good use for them.
In theory, optimizers could do away with (part of) the activation record in cases where a function was called from only one place, or where arguments always were the same. I don’t know whether compilers that did that existed.