Download presentation
Presentation is loading. Please wait.
1
ISBN 0-321-19362-8 Chapter 10 Implementing Subprograms
2
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-2 Figure 10.1 An activation record for “simple” subprograms
3
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-3 Figure 10.2 The code and activation records of a program with “simple” subprograms
4
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-4 Figure 10.3 A typical activation record for a language with stack-dynamic local variables
5
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-5 Figure 10.4 The activation record for function sub
6
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-6 Figure 10.5 Stack contents for three points in a program
7
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-7 Figure 10.6 The activation record for factorial
8
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-8 Figure 10.7 Stack contents at position 1 in factorial
9
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-9 Figure 10.8 Stack contents during execution of main and factorial
10
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-10 Figure 10.9 Stack contents at position 1 in the program Main_2
11
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-11 Figure 10.10 Block variable storage when blocks are not treated as parameterless procedures
12
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-12 Figure 10.11 Stack contents for a dynamic-scoped program
13
Copyright © 2004 Pearson Addison-Wesley. All rights reserved.10-13 Figure 10.12 One method of using shallow access to implement dynamic scoping
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.