+1 vote
140 views
in Compilers & Operating Systems by

1 Answer

+1 vote
by
selected by (user.guest)
 
Best answer

There are two methods of implementing block structure in compiler construction:

1. STACK ALLOCATION: This is based on the observation that scope of a declaration does not extend outside the block in which it appears, the space for declared name can be allocated when the block is entered and de-allocated when controls leave the block. The view treat block as a "parameter less procedure" called only from the point just before the block and returning only to the point just before the block. 

2. COMPLETE ALLOCATION: Here you allocate the complete memory at one time. If there are blocks within the procedure, then allowance is made for the storage needed for declarations within the books. If two variables are never alive at the same time and are at same depth they can  be assigned same storage.


Related questions

+1 vote
1 answer 519 views
+1 vote
1 answer 55 views
+1 vote
1 answer 62 views
+1 vote
1 answer 677 views
+1 vote
1 answer 91 views
+1 vote
1 answer 1.0k views
+1 vote
1 answer 879 views
0 votes
1 answer 141 views
+1 vote
1 answer 90 views
+1 vote
1 answer 189 views
+1 vote
1 answer 581 views
+1 vote
1 answer 279 views
asked May 24, 2021 in Compilers & Operating Systems by anonymous
0 votes
1 answer 85 views
0 votes
1 answer 104 views
asked Oct 28, 2021 in Computer Networks by (user.guest)
0 votes
1 answer 78 views
asked Oct 28, 2021 in Computational Tools by (user.guest)
0 votes
1 answer 262 views
+1 vote
1 answer 1.0k views
+3 votes
1 answer 502 views
0 votes
1 answer 69 views
+1 vote
1 answer 14 views
+1 vote
1 answer 14 views
+1 vote
1 answer 30 views
+1 vote
1 answer 31 views
+1 vote
1 answer 72 views
Welcome to CPENTalk.com
Solution-oriented students of computer engineering on one platform to get you that

ONE SOLUTION

...