John Simmons's Wiki Site

 

CompilersFrames

Page history last edited by John Simmons 2 yrs ago

Now I need to work on chapter 6.

 

set SOURCEDIR=D:\uofm\c4041s2005\src\chap6

 

Variables escape in, not out.

 

In AccessListBuilder, I could comment out the superfluous initialization of

this.index in the constructor.

 

I could make the JVMFrame constructor private, and then give the class a

singleton prototype frame that is used only to create new frames. The class

initializer would create the prototype frame and make it available by a static

method.

 

I could even add a getPrototypeFrame() method to the abstract

frame class. But this would not work, since it would have to be an instance

method for the subclass to override it. I guess I could try calling it by

reflection as a static method in each subclass. Then I would have to make the

name of it available to the main compiler somehow.

 

There is a comment in the chapter 6 BuildMiniJavaSymbolTable.visit(MethodDecl)

that I need to look at: something about the first element in the formals list

being incorrect but it does not matter.

 

I've javadoced all the classes in chapter 6 except those that I got from the

MiniJava site.

Comments (0)

You don't have permission to comment on this page.