Fixed
authorbdemsky <bdemsky>
Thu, 6 Apr 2006 00:35:33 +0000 (00:35 +0000)
committerbdemsky <bdemsky>
Thu, 6 Apr 2006 00:35:33 +0000 (00:35 +0000)
Robust/src/IR/Flat/BuildCode.java
Robust/src/IR/TypeUtil.java
Robust/src/Main/Main.java

index 05d1cdc168ad7442802468e7a7094270a0ea86c4..cf269d1f22f764d3c6519d1a96e8504b09a1a880 100644 (file)
@@ -491,7 +491,6 @@ public class BuildCode {
 
        if (fc.getReturnTemp()!=null)
            output.print(generateTemp(fm,fc.getReturnTemp())+"=");
-
        if (md.isStatic()||md.getReturnType()==null||singleCall(fc.getThis().getType().getClassDesc(),md)) {
            output.print(cn.getSafeSymbol()+md.getSafeSymbol()+"_"+md.getSafeMethodDescriptor());
        } else {
index 3a3cf8d84ae976719081a1c92c231f93852967f9..fcf7a63ea7eab27a5514d415bd41af7f8e32e9fd 100644 (file)
@@ -20,7 +20,6 @@ public class TypeUtil {
 
     private void createTables() {
        supertable=new Hashtable();
-       subclasstable=new Hashtable();
 
        Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
        while(classit.hasNext()) {
@@ -30,8 +29,17 @@ public class TypeUtil {
                ClassDescriptor cd_super=getClass(superc);
                supertable.put(cd,cd_super);
            }
-           
+       }
+    }
+
+    public void createFullTable() {
+       subclasstable=new Hashtable();
+    
+       Iterator classit=state.getClassSymbolTable().getDescriptorsIterator();
+       while(classit.hasNext()) {
+           ClassDescriptor cd=(ClassDescriptor)classit.next();
            ClassDescriptor tmp=cd.getSuperDesc();
+           
            while(tmp!=null) {
                if (!subclasstable.containsKey(tmp))
                    subclasstable.put(tmp,new HashSet());
index cc28e0012311c2075d0c30fe8dc95165fb84aeee..731398b3210327dc7b5b0ac41e8a262ec628cc02 100644 (file)
@@ -49,7 +49,8 @@ public class Main {
       
       SemanticCheck sc=new SemanticCheck(state,tu);
       sc.semanticCheck();
-      
+      tu.createFullTable();
+
       BuildFlat bf=new BuildFlat(state);
       bf.buildFlat();