CSC365 Compiler Design and Construction

Compiler Design and ConstructionModel question

Draw and explain the complete structure of an activation record with all components (return value, actual parameters, control link, access link, saved machine status, local data, temporaries). Show…

5

Draw and explain the complete structure of an activation record with all components (return value, actual parameters, control link, access link, saved machine status, local data, temporaries).

Show the activation tree and activation record contents for the following code at the point when factorial(1) is executing:

int factorial(int n) {

if (n <= 1)

return 1;

return n * factorial(n-1);

}

int main() {

int x = factorial(3);

}

A worked answer is on its wayMeanwhile, read the Compiler Design and Construction notes for this topic.

Discussion

Loading…

More Compiler Design and Construction questions

All Compiler Design and Construction old questions