Minor interface changes to symbol table API.
authorJayant DeSouza <jdesouza@uiuc.edu>
Thu, 13 May 2004 17:05:25 +0000 (17:05 +0000)
committerJayant DeSouza <jdesouza@uiuc.edu>
Thu, 13 May 2004 17:05:25 +0000 (17:05 +0000)
src/langs/jade/java.tree.g
src/langs/jade/java.tree1.g

index 301e0cc53c61b50dcbf2345c3cf633bb85e96fa8..04c3585cd7dfc5ed41dad49a8ba0badb1fde36f4 100644 (file)
@@ -104,10 +104,10 @@ typeDefinition
             IDENT { J.tmp.push(#IDENT.getText()); }
             e:extendsClause {
 
-                if (((ASTJ)c).status)
-                    System.out.println("pass3: " + #IDENT.getText() + "is main");
-                else
-                    System.out.println("pass3: " + #IDENT.getText() + "is NOT main");
+//                 if (((ASTJ)c).status)
+//                     System.out.println("pass3: " + #IDENT.getText() + "is main");
+//                 else
+//                     System.out.println("pass3: " + #IDENT.getText() + "is NOT main");
 
                 //{ //((ASTJ)#IDENT).genID(J.h);
                 if (J.isX(m, "synchronized")) { // is a chare
@@ -267,7 +267,7 @@ objBlock[AST className, boolean insertMigrateConstructor]
                 // Generate the class PUP method here
                 J.h.append(J.indent() + "public: virtual void pup(PUP::er &p);\n");
                 J.c.append(J.indent() + "void "+J.pE(className)+"::pup(PUP::er &p) {\n");
-                J.genPup(J.globalStack, J.pE(className));
+                J.genPup(J.pE(className));
                 J.c.append(J.indent() + "}\n");
                 ((StringBuffer)J.classInit.peek()).append("};\n");
 
@@ -456,8 +456,7 @@ variableDef[boolean classVarq, boolean outputOnNewLine]
 
                 String varName = J.printVariableDeclarator(vd);
                 if (!classVarq){
-                    J.localStack.push(varName);
-                    J.localStackShadow.push(v);
+                    J.localStackPush(varName, v);
                 }
 
                 // class variable def
@@ -631,8 +630,7 @@ variableDef[boolean classVarq, boolean outputOnNewLine]
 // Adds parameter to localStack.
 parameterDef
        :       #(p:PARAMETER_DEF modifiers typeSpec i:IDENT {
-                    J.localStack.push(i.getText());
-                    J.localStackShadow.push(p);
+                    J.localStackPush(i.getText(), p);
             })
        ;
 
@@ -714,7 +712,7 @@ stat
             {
                 J.c.append( ((e1!=null)? J.printExpression(e1): "") +";"
                     + J.printExpression(e2) + ";"
-                    + J.printExpression(e3) + ")");
+                    + J.printExpression(e3) + ")\n");
             }
                        stat
                )
index c596e4399f3c167390c09e9b87598890d8681b93..dbe5baaaec019fa9f0c67acfa439e8dc480d61e6 100644 (file)
@@ -141,8 +141,7 @@ methodDecl
 methodDef
        :       #(METHOD_DEF modifiers typeSpec mh:methodHead
             {
-                J.globalStack.push(new String(J.fullName(mh.getText())));
-                J.globalStackShadow.push(#METHOD_DEF);
+                J.globalStackPush(new String(J.fullName(mh.getText())), #METHOD_DEF);
                 J.tmp.push(new String(mh.getText()));
             }
             (slist)? { J.tmp.pop(); })
@@ -153,8 +152,7 @@ variableDef
             v:variableDeclarator {
                 //System.out.println("pass1: " + v.getText() + J.tmp + "\n");
                 if (J.tmp.size() == 2) {
-                    J.globalStack.push(new String(J.fullName(v.getText())));
-                    J.globalStackShadow.push(#VARIABLE_DEF);
+                    J.globalStackPush(new String(J.fullName(v.getText())), #VARIABLE_DEF);
                 } else {
                     // should print this only for public static final
                     if ( ((ASTJ)m).isX("static") )