O'Reilly logo

Modern Compiler Implementation in Java, Second Edition by Jens Palsberg, Andrew W. Appel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6Activation Records

stack: an orderly pile or heap

Webster’s Dictionary

In almost any modern programming language, a function may have local variables that are created upon entry to the function. Several invocations of the function may exist at the same time, and each invocation has its own instantiations of local variables.

In the Java method

image

a new instantiation of x is created (and initialized by f’s caller) each time that f is called. Because there are recursive calls, many of these x’s exist simultaneously. Similarly, a new instantiation of y is created each time the body of f is entered.

In many languages (including C, Pascal, and Java), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required