With regard to the execution context of the tail call, why is f directly out of the stack?

I"d like to ask you a big question about the execution context of the last call,
function f (x) {

.

return g (x);

}
ECStack.push (< f > functionContext);
ECStack.pop ();
ECStack.push (< g > functionContext);
ECStack.pop (); the answer is this
this code should not first put the execution context of the f function into the stack, and then the g function is called here, so the execution context of the g function is also put into the stack, and then the g function is out of the stack after the g function is executed, does f need the execution context to get out of the stack? Why is f out of stack before g call,


because there is return ah, return all the lines of code are not important, why keep the context.

Menu