just a variable renaming
authoradam <adam@megacz.com>
Fri, 3 Jun 2005 06:23:45 +0000 (06:23 +0000)
committeradam <adam@megacz.com>
Fri, 3 Jun 2005 06:23:45 +0000 (06:23 +0000)
darcs-hash:20050603062345-5007d-8bfb6fa2ba97f93f7cc18d7198903d73d4d6f6ff.gz

src/org/ibex/classgen/ConstantPool.java

index 8f51af5..6817ff8 100644 (file)
@@ -360,23 +360,22 @@ class ConstantPool {
             if (e instanceof LongEnt) index++;
         }
         
-        for(int index=1;index<usedSlots;index++) {
-            int i = index;
-            Ent e = entriesByIndex[index];
+        for(int i=1;i<usedSlots;i++) {
+            Ent e = entriesByIndex[i];
             if (e == null) throw new Error("should never happen: " + i + "/"+usedSlots);
             if (e instanceof LongEnt) {
-                index++;
+                i++;
                 continue;
             }
             if (!(e instanceof CPRefEnt)) continue;
             CPRefEnt ce = (CPRefEnt) e;
-            if (e1s[i] == 0 || e1s[i] >= usedSlots) throw new ClassFile.ClassReadExn("invalid cp index");
+            if (e1s[i] == 0 || e1s[i] >= usedSlots) throw new ClassFile.ClassReadExn("invalid cp i");
             ce.e1 = entriesByIndex[e1s[i]];
-            if (ce.e1 == null)  throw new ClassFile.ClassReadExn("invalid cp index");
+            if (ce.e1 == null)  throw new ClassFile.ClassReadExn("invalid cp i");
             if (ce.tag != 7 && ce.tag != 8) {
-                if (e2s[i] == 0 || e2s[i] >= usedSlots) throw new ClassFile.ClassReadExn("invalid cp index");
+                if (e2s[i] == 0 || e2s[i] >= usedSlots) throw new ClassFile.ClassReadExn("invalid cp i");
                 ce.e2 = entriesByIndex[e2s[i]];
-                if (ce.e2 == null)  throw new ClassFile.ClassReadExn("invalid cp index");
+                if (ce.e2 == null)  throw new ClassFile.ClassReadExn("invalid cp i");
             }
             switch(ce.tag) {
                 case 7: