28 votes 28 votes Faster access to non-local variables is achieved using an array of pointers to activation records called a stack heap display activation tree Compiler Design gate1998 programming compiler-design normal runtime-environment + – Kathleen asked Sep 25, 2014 Kathleen 8.8k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply suvasish pal commented Sep 1, 2017 reply Follow Share anyone plz explain it! 0 votes 0 votes ShouvikSVK commented Jan 21, 2022 reply Follow Share https://www.cse.iitk.ac.in/users/swarnendu/courses/spring2020-cs335/Runtime%20Environments.pdf from page 63-73 5 votes 5 votes Pranavpurkar commented Nov 29, 2022 reply Follow Share @ShouvikSVK Thanks :) 1 votes 1 votes Please log in or register to add a comment.
Best answer 44 votes 44 votes Correct Option: C Properties of displays Use a pointer array to store the activation records along the static chain. Fast access for non-local but may be complicated to maintain. Calling a subprogram in the same level – simply replace and restore. Calling a subprogram in the higher level – add an entry and may need to save the old pointers. Calling a subprogram in the lower level – shrink the pointer and restore it when the subprogram returns. http://users.dickinson.edu/~wahlst/356/ch10.pdf sumit kumar answered Nov 17, 2014 • edited May 5, 2021 by soujanyareddy13 sumit kumar comment Share Follow See all 7 Comments See all 7 7 Comments reply Sachin Mittal 1 commented Dec 19, 2016 reply Follow Share If a variable or a code or block or anything, that is not in my function but in other function, Then my function will use "access link" of Activation record to access them. Displays are an optimization technique that replaces access links. There are implemented as an array (of pointer) in this array each entry points to one of the activation records. The size of the array is the maximum nesting depth in the program use: if disp is the display, then disp[i] points to the activation record associated with the current scope at nesting depth i. Now if function j wants to access something that is in function i then Step-1: go to the activation record pointed to by disp[i] Step-2: find the nonlocal via an offset in this activation record 76 votes 76 votes Hemant Parihar commented Jun 14, 2017 reply Follow Share @sachin can you please provide some reference for display. I know nothing about them. But i'm seeing few question about them. Thank You. 0 votes 0 votes Ayush Upadhyaya commented Oct 12, 2017 reply Follow Share @Hemant-Ullman 2ed compilers 0 votes 0 votes skyby commented Dec 14, 2017 reply Follow Share adding info to above comment ullman page 432 5 votes 5 votes talha hashim commented Jul 25, 2018 reply Follow Share nice point sachin sir 0 votes 0 votes Gyanu commented Nov 25, 2019 reply Follow Share thnx @Sachin Mittal 1 sir 0 votes 0 votes jiminpark commented Nov 24, 2021 reply Follow Share Is this part in syllabus now? 0 votes 0 votes Please log in or register to add a comment.