Lesson 18 - Static/Dynamic Link
Page 1 of 1
Lesson 18 - Static/Dynamic Link
you can leave curly braces out if the whole thing is one regular expression
activation record = points to memory of call
Activation Record = Frame
values stored in activiation record
compilier resolves the names
// advantage of the pointer?
// there is no size definition fro the variables. You can have variables of various length... all the ptr needs to do is point to
// some other location.
when proc Q finished, it got popped. Where in procedure did it come back to? IT comes right back to Call Q. Pick up
right where you left off.
puts return ADDR in Q's Frame back right after call Q
activation for x doesn't mean it is directly behind variable G. IT could be all over the place
dynamic link = points to activation record of process that called you (or this one)
static link = points to activation record of process that defined this one
lexical scoping = also called static coping.
activation record = points to memory of call
Activation Record = Frame
values stored in activiation record
compilier resolves the names
| Static Link|PTR, Dynamic Link |
| X |
| Y |
| Z |
| REturn aDdress |
| MISC |
// advantage of the pointer?
// there is no size definition fro the variables. You can have variables of various length... all the ptr needs to do is point to
// some other location.
Proc P
output 1
call Q
output 2
proc Q
output 3
when proc Q finished, it got popped. Where in procedure did it come back to? IT comes right back to Call Q. Pick up
right where you left off.
puts return ADDR in Q's Frame back right after call Q
procedure countdownup(N: Integer)
procedure f
var X
procedure g
var y;
y = x + 1;
activation for x doesn't mean it is directly behind variable G. IT could be all over the place
dynamic link = points to activation record of process that called you (or this one)
static link = points to activation record of process that defined this one
lexical scoping = also called static coping.
Similar topics
» Lesson 19
» Lesson 18 Notes
» Lesson 19 - InClassNotes
» Lesson 19: The Hapsburg Recovery 108 - 133
» Lesson 19 - Threads, Tasks & Concurrent Programming (pg 241 - 255)
» Lesson 18 Notes
» Lesson 19 - InClassNotes
» Lesson 19: The Hapsburg Recovery 108 - 133
» Lesson 19 - Threads, Tasks & Concurrent Programming (pg 241 - 255)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum