CSE 131
Quiz 5 Review

  Open / Closed / Leaf

  Calling Convention / Calling Sequence (SPARC/RISC vs. typical CISC)
    pre-call / post-return
    prologue / epilogue 

Subroutine Parameter Passing (Calling Convention)
  Call by Value

  Call by Reference

  const / READONLY parameters

  in parameters

  out parameters
    call by reference
    call by result

  in out parameters
    call by reference
    call by value/result

  Compiler-generated subroutine signatures for subroutine calls
    - subroutine overloading quiz

  default parameters, variable number of arguments



Exception Handling
  Exception table / Stack smashing

Local Variable layout on the runtime stack
  Data type alignment restrictions
  Negative offsets relative to Frame Pointer (%fp)
  Arrays and structures as local variables

Java Runtime Environment
  Class Area (Method Area)
    Class type data structure
      Pointer to class type data structure of superclass type
      Class Static variables
      Virtual function tables with entries pointing to Methods & Constructors
        Method overriding / dynamic runtime look-up
      Instance variables
      Pointer to the class type data structure describing this object's type
        getClass()          / getSuperclass() 
        [from class Object]   [from class Class]
    Stack Frames
      Local variables

  this reference


  Java compile-time checks and run-time checks

Linking and Loading
  Linkage Editor tasks

  Loader tasks

  C++ Issues
    Name Mangling
    Global Initializers and Destructors
    Static initialization with run time values
    Template Expansion


  Static vs. Dynamic Linking
  Link Time Optimizations

Code Improvement (Optimization)
  Where code improvement can occur in the compilation sequence
    Machine independent vs. machine dependent improvements

  Local (Basic Block)
  Global (Intraprocedural)
  Program-Global (Interprocedural)

  Elimination of redundant loads/stores
  Constant folding
  Constant propagation
  Dead code elimination
  Common subexpression elimination
  Copy propagation
  Strength reduction
  Elimination of useless instructions
  Filling delay slots and load dependencies with useful instructions
  Exploitation of the instruction set