[kaffe] CVS kaffe-extras (guilhem): Fixed too large namespace for import-on-demand.

Kaffe CVS cvs-commits at kaffe.org
Thu Aug 5 08:27:56 PDT 2004


PatchSet 41 
Date: 2004/08/05 09:51:18
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixed too large namespace for import-on-demand.

2004-08-04  Guilhem Lavaux <guilhem at kaffe.org>

        * kjc/CCompilationUnit.java
        (lookupClass): Removed explicit exploration of inner classes.

Members: 
	patches/kjc-kaffe.diff:1.8->1.9 

Index: kaffe-extras/patches/kjc-kaffe.diff
diff -u kaffe-extras/patches/kjc-kaffe.diff:1.8 kaffe-extras/patches/kjc-kaffe.diff:1.9
--- kaffe-extras/patches/kjc-kaffe.diff:1.8	Wed Jul 21 08:31:05 2004
+++ kaffe-extras/patches/kjc-kaffe.diff	Thu Aug  5 09:51:18 2004
@@ -1,7 +1,12 @@
 diff -N ChangeLog
 --- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ ChangeLog	21 Jul 2004 08:19:22 -0000	1.8
-@@ -0,0 +1,63 @@
++++ ChangeLog	4 Aug 2004 18:40:17 -0000	1.9
+@@ -0,0 +1,68 @@
++2004-08-04  Guilhem Lavaux <guilhem at kaffe.org>
++
++	* kjc/CCompilationUnit.java
++	(lookupClass): Removed explicit exploration of inner classes.
++
 +2004-07-21  Guilhem Lavaux <guilhem at kaffe.org>
 +
 +	* kjc/Main.java: Moved up checkModifiers to ensure modifiers has been
@@ -873,7 +878,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -984,7 +989,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +// Import the necessary classes
@@ -2457,7 +2462,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -4677,7 +4682,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm
@@ -4829,7 +4834,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +prefix Ksm
@@ -8075,7 +8080,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -8162,7 +8167,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -8354,7 +8359,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -8463,7 +8468,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +package at.dms.ksm;
@@ -8529,7 +8534,7 @@
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
 +
 +aaload ......... :
@@ -31521,7 +31526,7 @@
 +/*
 + * Based on skeleton.default from JFlex 1.4
 + *
-+ * $Id: kjc-kaffe.diff,v 1.8 2004/07/21 08:31:05 guilhem Exp $
++ * $Id: kjc-kaffe.diff,v 1.9 2004/08/05 09:51:18 guilhem Exp $
 + */
  
    /** This character denotes the end of file */
@@ -34002,37 +34007,10 @@
        } else if (! dest.getCClass().isFinal()) {
  	return true;
        } else {
-diff -u -r1.1.1.1 -r1.2
+diff -u -r1.1.1.1 -r1.3
 --- kjc/CCompilationUnit.java	6 Apr 2004 16:59:20 -0000	1.1.1.1
-+++ kjc/CCompilationUnit.java	6 Apr 2004 17:13:26 -0000	1.2
-@@ -79,6 +79,26 @@
- 	return cl;
-       }
- 
-+      // Now we must check whether the specified class is an inner class
-+      // of the imported classes.
-+      for (int i = 0; i < importedClasses.length; i++) {
-+	String qualifiedName = importedClasses[i].getQualifiedName() + '$' + name;
-+
-+	if (classReader.hasClassFile(qualifiedName)) {
-+	  CClass	lastClass = (CClass)loadedClasses.get(name);
-+	  
-+          if (lastClass!= null && !lastClass.isAccessible(caller)) {
-+             lastClass = null; // not accessible -> not imported
-+	  }
-+	  if (lastClass != null && !lastClass.getQualifiedName().equals(qualifiedName)) {
-+	      // Oops, the name is ambiguous (declared by more than one import-on-demand declaration)
-+	      throw new UnpositionedError(KjcMessages.CUNIT_RENAME2, name);
-+	  }
-+	  loadedClasses.put(name, classReader.loadClass(typeFactory, qualifiedName));
-+	  importedClasses[i].setUsed();
-+	}
-+      }
-+
-       // Otherwise, look for a type declared in another compilation unit of this package
-       if (packageName.length() == 0) {
- 	cl = classReader.hasClassFile(name) ? classReader.loadClass(typeFactory, name) : null;
-@@ -94,7 +114,7 @@
++++ kjc/CCompilationUnit.java	4 Aug 2004 18:40:17 -0000	1.3
+@@ -94,7 +94,7 @@
  	// Otherwise, look for a type declared by EXACTLY ONE import-on-demand declaration
  	for (int i = 0; i < importedPackages.length; i++) {
  	  String	qualifiedName;




More information about the kaffe mailing list