CSCI 310 Spring 2005 Day 24

  1. Administrivia
    1. Project 4 reminder and demo note...
    2. AST stuff...
      2003-10-11 17:53:57     kevin k. Agbakpem 
      
              * Fix bug related to the generation of a production for list elements
                and modify sablecc3 grammar to add comma between elements in square
                brackets used to represent a list.
      
      Class decision time: should I update to beta3-3 or stay at beta3-2?

    3. Office Hours today

  2. Call stacks: here is example 6.1 as scheme.

  3. Frames
    1. Reminder of rough layout of the Frame
    2. What else does a Frame do? Is this really and Activation Record?
    3. Challenge work :-): Given code, walk through the process and layout the frames.
    4. The static link is a link to the enclosing lexical scope. Do we use this for objects? If so, how? If not, how can we pass the correct scope when a method on an object is called?

  4. Implementing the Frame class
    1. The issues
      • want it to be semi-architecture independent
      • there's a Frame class holding info about
      • Accesses which represent space for locals and params.
      • Accesses may be stored in the frame, or in the registers. [When *must* it be in the frame rather than register?]
      • but we don't want to commit particular registers yet!
      • and that means we just track "temporary" addresses/registers, and "labels" to track labels we'll want in machine language (like method names).

    2. Walk through some code; turn it into an AST; decide how to visit it and assign Frames to each method.

Gary Lewandowski
Last modified: Mon Mar 14 12:25:43 EST 2005