Home > Lectures > Lecture Details

Moving from C Code Generation to C++ Code Generation: Basic Swap Example

By Jerry Cain - Stanford
get flash player

Lecture Description

Moving from C Code Generation to C++ Code Generation: Basic Swap Example, Code Generation for the Pointer Swap Function, Code Generation for the C++ Version Of Swap Using References, Which Are Treated as Automatically Dereferenced Pointers, Local Variables Declared as References, Difference Between References and Pointers, Effect Of Declaring a Class on Memory in the Stack, Class Methods, Which Take a "This" Pointer as An invisible First Parameter, Effect Of the "This" Pointer on the Activation Record for a Class Method, Static Class Methods (Standalone Functions), Which Don't Contain a "This" Pointer, Compilation and Linking - #Define and the Preprocessor

Course Description

Related Resources

Transcript   |  Assignment 4   |  Assignment 4 Solutions

Course Index

  1. Introduction to Programming Paradigms Course
  2. Data Types - Interpretations
  3. Converting Between Types of Different Sizes and Bit Representations Using Pointers
  4. Creating a Generic Swap Function for Data Types of Arbitrary Size
  5. Generic Lsearch - Prototype
  6. Integer Stack Implementation - Constructor and Destructor
  7. Problems with Ownership of Memory
  8. Heap Management - How Information about Allocations are Stored in the Heap
  9. How a Code Snippet is Translated into Assembly Instructions
  10. More Detail about Activation Records - Layout of Memory During a Function Call
  11. Moving from C Code Generation to C++ Code Generation: Basic Swap Example
  12. Preprocessing Commands
  13. Review of Compilation Process of a Simple Program
  14. Sequential Programming vs. Concurrent Programming
  15. Transitioning from Sequential Programming to Concurrent Programming in the Ticket Sale Example
  16. Semaphores
  17. Review of the Dining Philosopher Problem
  18. Ice Cream Store Problem
  19. Introduction to the Functional Paradigm (Scheme)
  20. Car-Cdr Recursion Problem
  21. Introduction to the Kawa Development Environment: Evaluation of Expressions
  22. Writing a Recursive Power Set Function in Scheme
  23. Scheme Memory Model
  24. Overarching Features of Python
  25. Python Object Model
  26. XML Processing and Python
  27. Introduction to Haskell