Activation Frames - Another Perspective

We can visualise the activation-frames using the above diagram too. Here we are drawing the activation frames from the top of the page down. For example, the activation frame at the top, which would actually be at the bottom of the run-time stack, represents the first call to the recursive method. The downward-pointing arrows connect each statement that calls a method with the frame for that particular execution of that method. The upward pointing arrows show the return point from each lower-level call with the value returned alongside the arrow. For each frame, the return point is to the addition operator in the statement return 1 + length(...)

For each frame,the code inside the rectangular box is executed prior to the creation of the next activation frame;the rest of the code shown is executed after the return.

results matching ""

    No results matching ""