Question: Probem 2 - Lexical Scoping Code Generation Assume that all variables are lexically scoped program mainO int a, b; procedure fO f int c; procedure

 Probem 2 - Lexical Scoping Code Generation Assume that all variables

Probem 2 - Lexical Scoping Code Generation Assume that all variables are lexically scoped program mainO int a, b; procedure fO f int c; procedure gO print a,b,c; end g; a = 0; c= 1; call gO; print c; end f; procedure g) 1 int a,b; a=3; b = 7; call fO; print a,b; end g, a= 2; b= 3; print a,b; call gO; print a,b; end main; 1. Show the runtime stack with its stack frames, access and control links, and local variables when the execution reaches program point *A*). 2. Give the ILOC RISC code for the expressions at program points (*A*) ad B*). The value of the expressions need to be loaded into a register. The particular register umbers are not important here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!