[kaffe] CVS kaffe-extras (guilhem): Fixed kaffe-extras's bootstrap:

Kaffe CVS cvs-commits at kaffe.org
Thu Aug 19 08:34:09 PDT 2004


PatchSet 46 
Date: 2004/08/19 15:33:58
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fixed kaffe-extras's bootstrap:
  * KJC is taken directly from CVS now.
  * Kaffe 1.1.4 is patched to have a working UNIXProcess class.

Patch by Dalibor Topic and Guilhem Lavaux.

Members: 
	bootstrap-kaffe+ant.sh:1.14->1.15 
	build.xml:1.21->1.22 
	patches/kaffe-bugfix.diff:INITIAL->1.1 
	patches/kjc-kaffe.diff:1.9->1.10(DEAD) 

Index: kaffe-extras/bootstrap-kaffe+ant.sh
diff -u kaffe-extras/bootstrap-kaffe+ant.sh:1.14 kaffe-extras/bootstrap-kaffe+ant.sh:1.15
--- kaffe-extras/bootstrap-kaffe+ant.sh:1.14	Wed Aug 18 16:23:27 2004
+++ kaffe-extras/bootstrap-kaffe+ant.sh	Thu Aug 19 15:33:58 2004
@@ -9,8 +9,8 @@
 KAFFE=kaffe-1.1.4
 ANT=apache-ant-1.6.2
 JIKESVER=1.21
-JIKES=jikes-$JIKESVER
-export TOPDIR PREFIX KAFFE ANT JIKES JIKESVER
+JIKESPKG=jikes-$JIKESVER
+export TOPDIR PREFIX KAFFE ANT JIKESPKG JIKESVER
 
 cd $TOPDIR
 
@@ -29,8 +29,8 @@
 	wget -N http://archive.apache.org/dist/ant/source/$ANT-src.zip
 fi
 
-if [ ! -f $JIKES.tar.bz2 ]; then
-        wget -N ftp://www-126.ibm.com/pub/jikes/$JIKESVER/$JIKES.tar.bz2
+if [ ! -f $JIKESPKG.tar.bz2 ]; then
+        wget -N ftp://www-126.ibm.com/pub/jikes/$JIKESVER/$JIKESPKG.tar.bz2
 fi
 
 )
@@ -43,11 +43,11 @@
 cd build
 
 # Build jikes and install it
-tar xjvf ../tarballs/$JIKES.tar.bz2
+tar xjvf ../tarballs/$JIKESPKG.tar.bz2
 (
 set -e
 
-cd $JIKES
+cd $JIKESPKG
 ./configure --prefix=$PREFIX
 make
 make install
@@ -59,7 +59,8 @@
 set -e
 
 cd $KAFFE
-./configure --prefix=$PREFIX --with-jikes=$PREFIX/bin/jikes
+patch -p1 -d . < ../../patches/kaffe-bugfix.diff
+./configure --prefix=$PREFIX
 make
 make install
 )
@@ -73,7 +74,9 @@
 patch -p1 < ../../patches/ant-kaffe-1.1.3.diff
 JAVA_HOME=$PREFIX
 JAVACMD=$JAVA_HOME/bin/java
-JAVAC=jikes
+JAVAC=$PREFIX/bin/jikes
+PATH=$PREFIX/bin:$PATH
+export PATH
 BOOTJAVAC_OPTS="-bootclasspath $PREFIX/jre/lib/rt.jar"
 export CLASSPATH JAVA_HOME JAVACMD KAFFELIBRARYPATH JAVAC BOOTJAVAC_OPTS
 ./build.sh -Dbuild.compiler=jikes -Djikes.class.path=$PREFIX/jre/lib/rt.jar:.
@@ -101,5 +104,5 @@
 export PATH JAVA_HOME ANT_HOME
 " > $TOPDIR/BUILD_ENVIRONMENT 
 
-mkdir $TOPDIR/install/lib/app
+test -d $TOPDIR/install/lib/app || mkdir -p $TOPDIR/install/lib/app
 mv -f $TOPDIR/install/lib/kjc.jar $TOPDIR/install/lib/app/kjc.jar
Index: kaffe-extras/build.xml
diff -u kaffe-extras/build.xml:1.21 kaffe-extras/build.xml:1.22
--- kaffe-extras/build.xml:1.21	Mon Aug 16 21:18:41 2004
+++ kaffe-extras/build.xml	Thu Aug 19 15:33:59 2004
@@ -140,55 +140,38 @@
 
   <!-- kopi/kjc -->
 
-  <property name="kopi_ver" value="kopi-2.1B"/>
-  <property name="kjcsuite_ver" value="kjc-suite-2.1B"/>
-  <property name="kjc_ver" value="kjc-2.1B"/>
-  <property name="kjcsuite_dir" location="${build_dir}/${kjcsuite_ver}"/>
-  <property name="kjcsuite_rearranged_dir" location="${build_dir}/${kjcsuite_ver}-rearranged"/>
-  <property name="kjcsuite_tarball" value="${kjcsuite_ver}-src.tar.gz"/>
-  <property name="kjcsuite_unpacked_stamp" location="${timestamps_dir}/kjcsuite-unpacked.stamp"/>
+  <property name="kaffe_cvsroot" value=":pserver:readonly at cvs.kaffe.org:/cvs/kaffe"/>
+  <property name="kaffe_cvspass" value="readonly"/>
+  <property name="kaffe_cvs_kjc_module" value="kjc"/>
+  <property name="kjcsuite_dir" location="${build_dir}/${kaffe_cvs_kjc_module}"/>
+  <property name="kjcsuite_rearranged_dir" location="${build_dir}/kjc-rearranged"/>
   <property name="kjcsuite_built_stamp" location="${timestamps_dir}/kjcsuite-built.stamp"/>
 
   <target name="kjcsuite-check" depends="init">
-	<available property="kjcsuite-download.not-required"
-		file="${tarballs_dir}/${kjcsuite_tarball}"/>
-	<available property="kjcsuite-unpack.not-required"
-		file="${kjcsuite_unpacked_stamp}"/>
+	<available property="kjcsuite-checkout.not-required"
+		file="${kjcsuite_dir}"/>
 	<available property="kjcsuite-build.not-required"
 		file="${kjcsuite_built_stamp}"/>
   </target>
 
-  <target name="kjcsuite-download" depends="kjcsuite-check"
-	unless="kjcsuite-download.not-required"
-        description="download kjcsuite" >
-	<!-- FIXME: doesn't work with kaffe
-	<get src="http://www.dms.at/kopi/download/${kjcsuite_tarball}"
-	     dest="${tarballs_dir}/${kjcsuite_tarball}"
-	     verbose="true"/> -->
-	<exec executable="wget"
-		dir="${tarballs_dir}"
-		failonerror="true">
-		<arg line="http://www.dms.at/kopi/download/${kjcsuite_tarball}"/>
-	</exec>
-  </target>
+  <target name="kjcsuite-checkout" depends="kjcsuite-check"
+	unless="kjcsuite-checkout.not-required"
+        description="checkout kjcsuite" >
+
+        <cvspass 
+           cvsroot="${kaffe_cvsroot}"
+           password="${kaffe_cvspass}"
+        />
 
-  <target name="kjcsuite-unpack" depends="kjcsuite-check, kjcsuite-download"
-	unless="kjcsuite-unpack.not-required"
-        description="unpack kjcsuite" >
-	<delete dir="${kjcsuite_dir}"/>
-	<untar src="${tarballs_dir}/${kjcsuite_tarball}"
-		dest="${build_dir}"
-		compression="gzip"/>
-	<move todir="${kjcsuite_dir}">
-		<fileset dir="${build_dir}/${kopi_ver}"/>
-	</move>
-	<patch patchfile="${patches_dir}/kjc-kaffe.diff"
-		strip="0"
-		dir="${kjcsuite_dir}/src"/>
-	<touch file="${kjcsuite_unpacked_stamp}"/>
+        <cvs cvsRoot="${kaffe_cvsroot}"
+           package="${kaffe_cvs_kjc_module}"
+           dest="${build_dir}"
+           compression="true"
+           failonerror="true"
+        />
   </target>
 
-  <target name="kjcsuite-rearrange" depends="kjcsuite-unpack"
+  <target name="kjcsuite-rearrange" depends="kjcsuite-checkout, kjcsuite-check"
         description="rearrange kjcsuite so it's easy to work with in a Java IDE" >
 	<delete dir="${kjcsuite_rearranged_dir}"/>
 	<copy todir="${kjcsuite_rearranged_dir}/at/dms">
@@ -206,7 +189,7 @@
 	</copy>
   </target>
 
-  <target name="kjcsuite-build" depends="kjcsuite-check, kjcsuite-unpack, jflex, getopt"
+  <target name="kjcsuite-build" depends="kjcsuite-checkout, kjcsuite-check, jflex, getopt"
 	unless="kjcsuite-build.not-required"
         description="compile and install kjcsuite" >
 	<!-- FIXME: Dies when this target is run using Kaffe -->
@@ -214,7 +197,7 @@
 	<mkdir dir="${kjcsuite_dir}/classroot"/>
 	<echo message="RT Jar ${rtjar_file}"/>
 	<exec executable="/usr/bin/make"
-		dir="${kjcsuite_dir}/src"
+		dir="${kjcsuite_dir}"
 		failonerror="true">
 		<env key="CLASSROOT" file="${kjcsuite_dir}/classroot"/>
 		<!-- <env key="CLASSPATH" path="${lib_dir}/gnu.getopt.jar:${lib_dir}/JFlex.jar:${install_dir}/jre/lib/rt.jar:${lib_dir}/kjc.jar"/> -->
@@ -227,7 +210,6 @@
              basedir="${kjcsuite_dir}/classroot"
        	     includes="at/** gnu/**"
 	     filesonly="true"
-	     manifest="${kjcsuite_dir}/src/manifest"
   	/>
 	<touch file="${kjcsuite_built_stamp}"/>
   </target>
===================================================================
Checking out kaffe-extras/patches/kaffe-bugfix.diff
RCS:  /home/cvs/kaffe/kaffe-extras/patches/kaffe-bugfix.diff,v
VERS: 1.1
***************
--- /dev/null	Sun Aug  4 19:57:58 2002
+++ kaffe-extras/patches/kaffe-bugfix.diff	Thu Aug 19 15:34:06 2004
@@ -0,0 +1,13 @@
+--- kaffe-1.1.4/libraries/clib/native/UNIXProcess.c.old	2003-08-30 16:18:24.000000000 +0200
++++ kaffe-1.1.4/libraries/clib/native/UNIXProcess.c	2004-08-19 14:32:31.016269162 +0200
+@@ -187,7 +187,9 @@
+ 			if (access (file, X_OK) != -1) {
+ 				rc = 0;
+ 				nptr = NULL;
+-			}
++				KFREE(argv[0]);
++				argv[0] = file;
++			} else
+ 			KFREE (file);
+ 		}
+ 	}
===================================================================
Checking out kaffe-extras/patches/kjc-kaffe.diff
RCS:  /home/cvs/kaffe/kaffe-extras/patches/Attic/kjc-kaffe.diff,v
VERS: 1.9
***************
--- kaffe-extras/patches/kjc-kaffe.diff	Thu Aug 19 15:34:06 2004
+++ /dev/null	Sun Aug  4 19:57:58 2002
@@ -1,39019 +0,0 @@
-diff -N ChangeLog
---- /dev/null	1 Jan 1970 00:00:00 -0000
-+++ 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
-+	updated for the join pass.
-+
-+2004-07-19  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* compiler/base/CompilerMessages.java,
-+	compiler/base/CompilerMessages.msg: New message to announce the
-+	modifiers has been checked.
-+
-+	* kjc/JClassDeclaration.java, kjc/JCompilationUnit.java,
-+	kjc/JInterfaceDeclaration.java, kjc/JTypeDeclaration.java,
-+	kjc/Main.java: New common interface in JTypeDeclaration to be able to
-+	check modifiers before everything else. After the modifiers has been
-+	updated, we can run the full second pass.
-+
-+	* kjc/JNullLiteral.java, kjc/JSynchronizedStatement.java:
-+	Fixed typos.
-+
-+2004-07-19  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* bytecode/classfile/ClassInfo.java,
-+	compiler/resource/skeleton.shared,
-+	kjc/CMethod.java,
-+	kjc/JMethodCallExpression.java,
-+	kjc/JNullLiteral.java,
-+	kjc/JSynchronizedStatement.java:
-+	Synchronized with Kopi's CVS 2004-07-19.
-+
-+2004-07-07  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* kjc/CBinaryClass.java: Fixed circular reference of an inner class
-+	to itself so the right symbol can be solved when invoking a class
-+	of the same name in that inner class.
-+
-+2004-05-23  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* bytecode/ssa/Node.java
-+	(removeSuccessor): Return immediately after having deleting the
-+	requested element. In the other ConcurrentModificationException may be
-+	raised.
-+
-+2004-05-23  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* kjc/JIfStatement.java
-+	(analyse): Removed patch. It was all wrong and the Tree-SSA optimizer
-+	was already excluding it.
-+
-+2004-05-22  Guilhem Lavaux <guilhem at kaffe.org>
-+
-+	* kjc/JIfStatement.java
-+	(analyse): Check whether the context is actually reachable. It is the
-+	case if the condition is a constant.
-+
-+2004-05-22  Guilhem Lavaux <guilhem at kaffe.org>
-+	
-+	* ChangeLog: new file.
-+
-+	* kjc/JClassDeclaration.java: modifier of the default constructor
-+	for inner classes must never be private (because in that case we will
-+	not be able to construct it). If it is an inner class we use the
-+	default constructor.
-diff -u -r1.1.1.1 -r1.2
---- assertion/PreconditionError.java	6 Apr 2004 16:59:30 -0000	1.1.1.1
-+++ assertion/PreconditionError.java	10 Apr 2004 10:28:29 -0000	1.2
-@@ -90,6 +90,6 @@
-   }
- 
-   private PreconditionError     pe;
--  private final static String   nl = System.getProperty("line.separator");
-+  private static final String   nl = System.getProperty("line.separator");
-   private Class                 clazz = null;
- }
-diff -u -r1.1.1.1 -r1.4
---- bytecode/classfile/ClassInfo.java	6 Apr 2004 16:59:35 -0000	1.1.1.1
-+++ bytecode/classfile/ClassInfo.java	19 Jul 2004 13:18:33 -0000	1.4
-@@ -44,6 +44,8 @@
-   // CONSTRUCTORS
-   // --------------------------------------------------------------------
- 
-+	private String sourceDir;
-+
-   /**
-    * Constructs a class info structure.
-    *
-@@ -64,6 +66,7 @@
- 		   FieldInfo[] fields,
- 		   MethodInfo[] methods,
- 		   InnerClassInfo[] innerClasses,
-+		   String sourceDir,
- 		   String sourceFile,
-                    String genericSignature,
- 		   boolean deprecated,
-@@ -81,7 +84,11 @@
-     this.fields = fields;
-     this.methods = methods;
-     this.interfaces = interfaces;
--
-+    if (sourceDir == null || sourceDir.equals(""))
-+	this.sourceDir = ".";
-+    else
-+	this.sourceDir = sourceDir;
-+	
-     this.attributes = new AttributeList(innerClasses != null ? new InnerClassTable(innerClasses) : null,
- 					sourceFile != null ? new SourceFileAttribute(sourceFile) : null,
- 					genericSignature != null ? new SignatureAttribute(genericSignature) : null,
-@@ -111,6 +118,7 @@
- 		   Vector fields,
- 		   Vector methods,
- 		   InnerClassInfo[] innerClasses,
-+		   String sourceDir,
- 		   String sourceFile,
-                    String genericSignature,
- 		   boolean deprecated,
-@@ -123,6 +131,7 @@
- 	 (FieldInfo[])Utils.toArray(fields, FieldInfo.class),
- 	 (MethodInfo[])Utils.toArray(methods, MethodInfo.class),
- 	 innerClasses,
-+	 sourceDir,
- 	 sourceFile,
-          genericSignature,
- 	 deprecated,
-@@ -399,7 +408,16 @@
-     constantPool.write(out);
- 
-     // Class hierarchy/access
--    out.writeShort((getModifiers() | ACC_SUPER) & MODIFIER_MASK);
-+    int         class_modifier = getModifiers();
-+
-+    // JVMS 4.1 table 4.1 : ACC_PROTECTED is not a modifier of a class,
-+    // ACC_PUBLIC must be used instead
-+    if ((class_modifier & ACC_PROTECTED) != 0) {
-+      class_modifier |= ACC_PUBLIC;
-+      // ACC_PROTECTED is not in the mask MODIFIER_MASK
-+      // so is is not written to the class file
-+    }
-+    out.writeShort((class_modifier | ACC_SUPER) & MODIFIER_MASK);
-     out.writeShort(thisClass.getIndex());
-     out.writeShort(superClass == null ? 0 : superClass.getIndex());
- 
-@@ -444,12 +462,13 @@
- //     if (destination != null && destination != "") {
- //       if (classPath[0] != null && classPath[0] != "") {
-     if (destination == null || destination.equals("")) {
--      destination = ".";
--    }
-- 
-+    	destination = sourceDir;
-+    } else {
-+   
-     if (classPath[0] != null && !classPath[0].equals("")) {
-       // the class is part of a package
-       destination += File.separator + classPath[0].replace('/', File.separatorChar);
-+    }
-     }
- 
-       // check that destination exists or else create it
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/ClassPath.java	6 Apr 2004 16:59:35 -0000	1.1.1.1
-+++ bytecode/classfile/ClassPath.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -46,7 +46,13 @@
-    *
-    * @param	path		the directory names defining the class path
-    */
--  public ClassPath(String path, String extdirs) {
-+  public ClassPath(String workingDir, String path, String extdirs) {
-+    if (workingDir != null) {
-+      workingDirectory = new File(workingDir);
-+      // because it is used as parent in the constructor of File, it should 
-+      // be absolute (otherwise Java 1.4 has problems)
-+      workingDirectory = workingDirectory.getAbsoluteFile();
-+    }
-     if (path == null) {
-       // no path specified, use default
-       path = System.getProperty("java.class.path");
-@@ -63,32 +69,20 @@
-     }
- 
-     if (extdirs != null) {
--      Vector		container = new Vector();
--      ClassDirectory	dir;
--      ClassDirectory[]  tmp;
--      File              extDirectory = new File(extdirs);
--      
--      if (extDirectory.isDirectory()) {
--        File[]        extFiles = extDirectory.listFiles();
-+      // According to
-+      // http://java.sun.com/j2se/1.4/docs/guide/extensions/spec.html,
-+      // extension directory property can refer to several directories
- 
--        for (int i=0; i < extFiles.length; i++) {
--          File        file = extFiles[i];
-+      Vector            container = new Vector();
-+      StringTokenizer   entries;
-+      ClassDirectory[]  tmp;
- 
--          if (file.isFile() && (file.getName().endsWith(".zip") || file.getName().endsWith(".jar"))) {
--            try {
--              container.add(new ZipClassDirectory(new ZipFile(file)));
--            } catch (ZipException e) {
--              // it was not a zip file, ignore it
--            } catch (IOException e) {
--              // ignore it
--            }
--          } else {
--	  // wrong suffix, ignore it
--          }
--        }
-+      entries = new StringTokenizer(extdirs, File.pathSeparator);
-+      while(entries.hasMoreTokens()) {
-+        loadExtensionDirectory(container, entries.nextToken());
-       }
--      
--      tmp = new ClassDirectory[dirs.length+container.size()];
-+
-+      tmp = new ClassDirectory[dirs.length + container.size()];
-       container.copyInto(tmp);
-       System.arraycopy(dirs, 0, tmp, container.size(), dirs.length);
-       dirs = tmp;
-@@ -96,11 +90,60 @@
-   }
- 
-   /**
-+   * returns the absoulte path as File object of the file represented as string.
-+   */
-+  private File createAbsoluteFile(String filestring) {
-+    // a) WORKAROUND !!! there are some problems with the names of files, if they are 
-+    // not absolute (not bsolute path is used as "parent", "." in the path ...)
-+    // b) the working directory not the System.property user.dir should 
-+    // be used to create the absolute path.
-+
-+    File file = new File(filestring);
-+    
-+    if (file.isAbsolute()) {
-+      return file;
-+    } else {
-+      if (workingDirectory != null) {
-+        // use workingDirectory as prefix
-+        return new File(workingDirectory, filestring);
-+      } else {
-+        // uses system property user.dir as prefix
-+        return file.getAbsoluteFile();
-+      }
-+    }
-+  }
-+
-+  /**
-+   * Check that specified directory is a valid directory and add all
-+   * zip or jar files in the container.
-+   *
-+   * @param     container       the container to put the jar files
-+   * @param     directory       the directory where to get the files
-+   */
-+  private void loadExtensionDirectory(Vector container, String directory) {
-+    File                extDirectory = createAbsoluteFile(directory);
-+    
-+    if (extDirectory.isDirectory()) {
-+      File[]        extFiles = extDirectory.listFiles();
-+      
-+      for (int i = 0; i < extFiles.length; i++) {
-+        if (extFiles[i].isFile()) {
-+          // We consider only files in this directory
-+          container.add(loadCompressedFile(extFiles[i]));
-+        }
-+      }
-+    } else {
-+      System.err.println(directory + "is not a valid directory");
-+    }
-+  }
-+
-+
-+  /**
-    * Loads the conceptual directories defining the class path.
-    *
-    * @param	classPath	the directory names defining the class path
-    */
--  private static ClassDirectory[] loadClassPath(String classPath) {
-+  private ClassDirectory[] loadClassPath(String classPath) {
-     Vector		container = new Vector();
- 
-     // load specified class directories
-@@ -152,28 +195,24 @@
-    *
-    * @param	name		the name of the directory
-    */
--  private static ClassDirectory loadClassDirectory(String name) {
--    try {
--      File	file = new File(name);
-+  private ClassDirectory loadClassDirectory(String name) {
-+    return loadClassDirectory(createAbsoluteFile(name));
-+  }
- 
-+  /**
-+   * Loads a conceptual class directory.
-+   *
-+   * @param	file		the directory
-+   */
-+  private ClassDirectory loadClassDirectory(File file) {
-+    if (! file.isAbsolute()) {
-+      file = createAbsoluteFile(file.getAbsolutePath());
-+    }
-+    try {
-       if (file.isDirectory()) {
- 	return new DirClassDirectory(file);
-       } else if (file.isFile()) {
--	// check if file is zipped (.zip or .jar)
--	if (file.getName().endsWith(".zip") || file.getName().endsWith(".jar")) {
--	  try {
--	    return new ZipClassDirectory(new ZipFile(file));
--	  } catch (ZipException e) {
--	    // it was not a zip file, ignore it
--	    return null;
--	  } catch (IOException e) {
--	    // ignore it
--	    return null;
--	  }
--	} else {
--	  // wrong suffix, ignore it
--	  return null;
--	}
-+        return loadCompressedFile(file);
-       } else {
- 	// wrong file type, ignore it
- 	return null;
-@@ -184,6 +223,30 @@
-     }
-   }
- 
-+  /**
-+   * Loads a zip/jar file.
-+   *
-+   * @param	file		the compressed file
-+   */
-+  private static ClassDirectory loadCompressedFile(File file) {
-+    // check if file is zipped (.zip or .jar)
-+    final String    filename = file.getName();
-+        
-+    if (filename.endsWith(".zip") || filename.endsWith(".jar")) {
-+      try {
-+        return new ZipClassDirectory(new ZipFile(file));
-+      } catch (ZipException e) {
-+        // it was not a zip file, ignore it
-+        return null;
-+      } catch (IOException e) {
-+        // ignore it
-+        return null;
-+      }
-+    } else {
-+      // wrong suffix, ignore it
-+      return null;
-+    }
-+  }
- 
-   // ----------------------------------------------------------------------
-   // CLASS LOADING
-@@ -231,8 +294,8 @@
-   // ----------------------------------------------------------------------
- 
-   private static ClassPath	self = null;
--
-   private ClassDirectory[]	dirs;	// list of directories in class path
-+  private File                  workingDirectory = null;
- }
- 
- /**
-@@ -279,7 +342,7 @@
-   public ClassInfo loadClass(String name, boolean interfaceOnly) {
-     File		file;
- 
--    file = new File(dir.getPath(),
-+    file = new File(dir.getAbsolutePath(),
- 		    name.replace('/', File.separatorChar) + ".class");
-     if (!file.canRead()) {
-       return null;
-@@ -455,7 +518,7 @@
-   // DATA MEMBERS
-   // ----------------------------------------------------------------------
- 
--  private InputStream	is;
--  private byte[]	ba;
--  private static Stack	stack = new Stack();
-+  private InputStream           is;
-+  private byte[]                ba;
-+  private static Stack          stack = new Stack();
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/ClassfileOptions.java	6 Apr 2004 16:59:35 -0000	1.1.1.1
-+++ bytecode/classfile/ClassfileOptions.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -48,7 +48,7 @@
- 
- 
-   public void version() {
--    System.out.println("Version 2.1A released 11. February 2002");
-+    System.out.println("Version 2.1B released 17. July 2002");
-   }
- 
- 
-@@ -56,16 +56,6 @@
-     System.err.println("usage: at.dms.classfile.Main [option]* [--help] <class-files, zip-file, directory>");
-   }
- 
--
--  public void help() {
--    System.err.println("usage: at.dms.classfile.Main [option]* [--help] <class-files, zip-file, directory>");
--    printOptions();
--    System.err.println();
--    version();
--    System.err.println();
--    System.err.println("This program is part of the Kopi Suite.");
--    System.err.println("For more info, please see: http://www.dms.at/kopi");
--  }
- 
-   public LongOpt[] getLongOptions() {
-     LongOpt[]	parent = super.getLongOptions();
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/ConstraintsAttribute.java	6 Apr 2004 16:59:35 -0000	1.1.1.1
-+++ bytecode/classfile/ConstraintsAttribute.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -133,8 +133,9 @@
-   // DATA MEMBERS
-   // --------------------------------------------------------------------
- 
--  public final static String    NAME = "Constraints";
-+  public static final String    NAME = "Constraints";
-+  private static AsciiConstant  attr = new AsciiConstant(NAME);
-+
-   private MethodRefConstant     precondition;
-   private MethodRefConstant     postcondition;
--  private static AsciiConstant  attr = new AsciiConstant(NAME);
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/InstructionHandle.java	6 Apr 2004 16:59:34 -0000	1.1.1.1
-+++ bytecode/classfile/InstructionHandle.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -131,8 +131,61 @@
-     } else {
-       stackHeight = curStack;
-       insn.check(env, curStack);
--      return insn.canComplete();
-+
-+      // return true iff the next instruction in textual order is accessible.
-+      if (insn.getOpcode() == Constants.opc_jsr
-+          || insn.getOpcode() == Constants.opc_jsr_w)
-+        {
-+          return retAccessible((InstructionHandle) ((JumpInstruction)insn).getTarget());
-+        }
-+      else
-+        {
-+          return insn.canComplete();
-+        }
-+    }
-+  }
-+
-+  /**
-+   * Return true iff control flow can reach a ret instruction
-+   *
-+   * @param inst the first instruction
-+   */
-+  protected boolean retAccessible(InstructionHandle inst) {
-+    Instruction insn = inst.getInstruction();
-+    if (insn.getOpcode() == Constants.opc_ret) {
-+      return true;
-+    }
-+
-+    // search for a ret in the next instruction if the current instruction
-+    // can complete. A jsr can complete here only if a ret instruction is
-+    // accessible.
-+    if (insn instanceof JumpInstruction
-+        && insn.getOpcode() == Constants.opc_jsr
-+        && insn.getOpcode() == Constants.opc_jsr_w) {
-+      if (retAccessible((InstructionHandle)((JumpInstruction)insn).getTarget())) {
-+        return inst.getNext() != null && retAccessible(inst.getNext());
-+      }
-+    } else if (insn.canComplete()
-+               && inst.getNext() != null
-+               && retAccessible(inst.getNext()))
-+      {
-+        return true;
-+      }
-+
-+    // search for a ret instruction in the target(s) of jumps.
-+    if (insn instanceof JumpInstruction
-+        && insn.getOpcode() != Constants.opc_jsr
-+        && insn.getOpcode() != Constants.opc_jsr_w) {
-+      return retAccessible((InstructionHandle)((JumpInstruction) insn).getTarget());
-+    } else if (insn instanceof SwitchInstruction) {
-+      SwitchInstruction si = (SwitchInstruction) insn;
-+      for (int i = -1; i < si.getSwitchCount(); i++) {
-+        if (retAccessible((InstructionHandle) si.getTarget(i))) {
-+          return true;
-+        }
-+      }
-     }
-+    return false;
-   }
- 
-   /**
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/InvariantAttribute.java	6 Apr 2004 16:59:34 -0000	1.1.1.1
-+++ bytecode/classfile/InvariantAttribute.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -95,6 +95,6 @@
-   // DATA MEMBERS
-   // --------------------------------------------------------------------
- 
--  public final static String            NAME = "Invariant";
-+  public static final String            NAME = "Invariant";
-   private static AsciiConstant		attr = new AsciiConstant(NAME);
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/PostconditionAttribute.java	6 Apr 2004 16:59:34 -0000	1.1.1.1
-+++ bytecode/classfile/PostconditionAttribute.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -110,7 +110,7 @@
-   // DATA MEMBERS
-   // --------------------------------------------------------------------
- 
--  public final static String            NAME = "Postcondition";
-+  public static final String            NAME = "Postcondition";
-   private static AsciiConstant		attr = new AsciiConstant(NAME);
-   private ClassConstant                 oldValueClass;
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/PreconditionAttribute.java	6 Apr 2004 16:59:35 -0000	1.1.1.1
-+++ bytecode/classfile/PreconditionAttribute.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -84,6 +84,6 @@
-   // DATA MEMBERS
-   // --------------------------------------------------------------------
- 
--  public final static String            NAME = "Precondition";
-+  public static final String            NAME = "Precondition";
-   private static AsciiConstant		attr = new AsciiConstant(NAME);
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/classfile/SignatureAttribute.java	6 Apr 2004 16:59:34 -0000	1.1.1.1
-+++ bytecode/classfile/SignatureAttribute.java	10 Apr 2004 10:28:30 -0000	1.2
-@@ -106,7 +106,7 @@
-   // DATA MEMBERS
-   // --------------------------------------------------------------------
- 
--  public final static String            NAME = "Signature";
-+  public static final String            NAME = "Signature";
-   private static AsciiConstant		attr = new AsciiConstant(NAME);
-   private AsciiConstant			signature;
- }
-diff -u -r1.1.1.1 -r1.2
---- bytecode/dis/DisOptions.java	6 Apr 2004 16:59:31 -0000	1.1.1.1
-+++ bytecode/dis/DisOptions.java	10 Apr 2004 10:28:31 -0000	1.2
-@@ -68,7 +68,7 @@
- 
- 
-   public void version() {
--    System.out.println("Version 2.1A released 11. February 2002");
-+    System.out.println("Version 2.1B released 17. July 2002");
-   }
- 
- 
-@@ -76,16 +76,6 @@
-     System.err.println("usage: at.dms.dis.Main [option]* [--help] <class-files, class-names>");
-   }
- 
--
--  public void help() {
--    System.err.println("usage: at.dms.dis.Main [option]* [--help] <class-files, class-names>");
--    printOptions();
--    System.err.println();
--    version();
--    System.err.println();
--    System.err.println("This program is part of the Kopi Suite.");
--    System.err.println("For more info, please see: http://www.dms.at/kopi");
--  }
- 
-   public LongOpt[] getLongOptions() {
-     LongOpt[]	parent = super.getLongOptions();
-diff -u -r1.1.1.1 -r1.2
---- bytecode/dis/Main.java	6 Apr 2004 16:59:30 -0000	1.1.1.1
-+++ bytecode/dis/Main.java	10 Apr 2004 10:28:31 -0000	1.2
-@@ -67,7 +67,7 @@
-       return false;
-     }
- 
--    ClassPath classpath = new ClassPath(options.classpath, options.extdirs);
-+    ClassPath classpath = new ClassPath(null, options.classpath, options.extdirs);
- 
-     String[]	infiles = options.nonOptions;
- 
-diff -u -r1.1.1.1 -r1.2
---- bytecode/ksm/KsmLexer.java	6 Apr 2004 16:59:31 -0000	1.1.1.1
-+++ bytecode/ksm/KsmLexer.java	10 Apr 2004 10:28:32 -0000	1.2
-@@ -20,169 +20,169 @@
- 	super(state);
- 	literals = new Hashtable();
- 	literals.put(new ANTLRHashString("@iand", this), new Integer(88));
--	literals.put(new ANTLRHashString("@ifne", this), new Integer(151));
- 	literals.put(new ANTLRHashString("@fneg", this), new Integer(76));
-+	literals.put(new ANTLRHashString("@ifne", this), new Integer(151));
- 	literals.put(new ANTLRHashString("@switch", this), new Integer(174));
- 	literals.put(new ANTLRHashString("@i2b", this), new Integer(80));
- 	literals.put(new ANTLRHashString("@ifle", this), new Integer(155));
-+	literals.put(new ANTLRHashString("public", this), new Integer(12));
-+	literals.put(new ANTLRHashString("@putstatic", this), new Integer(133));
- 	literals.put(new ANTLRHashString("@invokeinterface", this), new Integer(172));
- 	literals.put(new ANTLRHashString("@aconst_null", this), new Integer(38));
- 	literals.put(new ANTLRHashString("@dup_x1", this), new Integer(61));
--	literals.put(new ANTLRHashString("@putstatic", this), new Integer(133));
--	literals.put(new ANTLRHashString("public", this), new Integer(12));
- 	literals.put(new ANTLRHashString("@faload", this), new Integer(70));
--	literals.put(new ANTLRHashString("@arraylength", this), new Integer(40));
- 	literals.put(new ANTLRHashString("@pop2", this), new Integer(124));
- 	literals.put(new ANTLRHashString("@iadd", this), new Integer(86));
--	literals.put(new ANTLRHashString("@fload", this), new Integer(160));
- 	literals.put(new ANTLRHashString("@l2i", this), new Integer(103));
--	literals.put(new ANTLRHashString("@baload", this), new Integer(42));
-+	literals.put(new ANTLRHashString("@getstatic", this), new Integer(131));
- 	literals.put(new ANTLRHashString("@if_icmpne", this), new Integer(145));
- 	literals.put(new ANTLRHashString("@d2l", this), new Integer(48));
- 	literals.put(new ANTLRHashString("@lcmp", this), new Integer(108));
--	literals.put(new ANTLRHashString("@athrow", this), new Integer(41));
--	literals.put(new ANTLRHashString("@caload", this), new Integer(44));
-+	literals.put(new ANTLRHashString("@signature", this), new Integer(9));
- 	literals.put(new ANTLRHashString("@if_icmple", this), new Integer(149));
--	literals.put(new ANTLRHashString("@daload", this), new Integer(50));
- 	literals.put(new ANTLRHashString("implements", this), new Integer(24));
- 	literals.put(new ANTLRHashString("@ddiv", this), new Integer(54));
- 	literals.put(new ANTLRHashString("@land", this), new Integer(106));
- 	literals.put(new ANTLRHashString("@ineg", this), new Integer(92));
--	literals.put(new ANTLRHashString("@catch", this), new Integer(34));
-+	literals.put(new ANTLRHashString("@fcmpl", this), new Integer(73));
- 	literals.put(new ANTLRHashString("@bastore", this), new Integer(43));
--	literals.put(new ANTLRHashString("@monitorenter", this), new Integer(120));
-+	literals.put(new ANTLRHashString("@laload", this), new Integer(105));
- 	literals.put(new ANTLRHashString("@lastore", this), new Integer(107));
-+	literals.put(new ANTLRHashString("@anewarray", this), new Integer(140));
- 	literals.put(new ANTLRHashString("@aaload", this), new Integer(36));
-+	literals.put(new ANTLRHashString("@if_acmpeq", this), new Integer(142));
-+	literals.put(new ANTLRHashString("@aastore", this), new Integer(37));
- 	literals.put(new ANTLRHashString("@f2d", this), new Integer(66));
- 	literals.put(new ANTLRHashString("@i2l", this), new Integer(84));
-+	literals.put(new ANTLRHashString("@iload", this), new Integer(159));
- 	literals.put(new ANTLRHashString("synchronized", this), new Integer(20));
- 	literals.put(new ANTLRHashString("@fmul", this), new Integer(75));
-+	literals.put(new ANTLRHashString("@default", this), new Integer(175));
- 	literals.put(new ANTLRHashString("@ladd", this), new Integer(104));
-+	literals.put(new ANTLRHashString("@dastore", this), new Integer(51));
- 	literals.put(new ANTLRHashString("@sastore", this), new Integer(127));
--	literals.put(new ANTLRHashString("@if_acmpne", this), new Integer(143));
--	literals.put(new ANTLRHashString("@lushr", this), new Integer(118));
-+	literals.put(new ANTLRHashString("@newarray", this), new Integer(170));
-+	literals.put(new ANTLRHashString("@dcmpg", this), new Integer(52));
-+	literals.put(new ANTLRHashString("@aload", this), new Integer(161));
-+	literals.put(new ANTLRHashString("@const", this), new Integer(129));
-+	literals.put(new ANTLRHashString("abstract", this), new Integer(16));
- 	literals.put(new ANTLRHashString("@ishl", this), new Integer(96));
- 	literals.put(new ANTLRHashString("@lor", this), new Integer(112));
- 	literals.put(new ANTLRHashString("@lneg", this), new Integer(111));
--	literals.put(new ANTLRHashString("@fcmpg", this), new Integer(72));
-+	literals.put(new ANTLRHashString("@lreturn", this), new Integer(114));
- 	literals.put(new ANTLRHashString("protected", this), new Integer(13));
--	literals.put(new ANTLRHashString("@iastore", this), new Integer(89));
- 	literals.put(new ANTLRHashString("@l2f", this), new Integer(102));
- 	literals.put(new ANTLRHashString("@pop", this), new Integer(123));
- 	literals.put(new ANTLRHashString("@ixor", this), new Integer(100));
- 	literals.put(new ANTLRHashString("@fsub", this), new Integer(79));
- 	literals.put(new ANTLRHashString("@ifgt", this), new Integer(154));
--	literals.put(new ANTLRHashString("class", this), new Integer(10));
- 	literals.put(new ANTLRHashString("@d2i", this), new Integer(47));
-+	literals.put(new ANTLRHashString("@deprecated", this), new Integer(8));
- 	literals.put(new ANTLRHashString("@source", this), new Integer(6));
--	literals.put(new ANTLRHashString("@invokespecial", this), new Integer(135));
- 	literals.put(new ANTLRHashString("throws", this), new Integer(28));
- 	literals.put(new ANTLRHashString("strictfp", this), new Integer(19));
- 	literals.put(new ANTLRHashString("@monitorexit", this), new Integer(121));
- 	literals.put(new ANTLRHashString("@frem", this), new Integer(77));
- 	literals.put(new ANTLRHashString("@instanceof", this), new Integer(138));
--	literals.put(new ANTLRHashString("@fastore", this), new Integer(71));
- 	literals.put(new ANTLRHashString("@dreturn", this), new Integer(58));
- 	literals.put(new ANTLRHashString("@imul", this), new Integer(91));
--	literals.put(new ANTLRHashString("@dcmpl", this), new Integer(53));
--	literals.put(new ANTLRHashString("@return", this), new Integer(125));
-+	literals.put(new ANTLRHashString("@fstore", this), new Integer(165));
- 	literals.put(new ANTLRHashString("transient", this), new Integer(21));
- 	literals.put(new ANTLRHashString("@new", this), new Integer(139));
-+	literals.put(new ANTLRHashString("@lload", this), new Integer(162));
- 	literals.put(new ANTLRHashString("native", this), new Integer(18));
--	literals.put(new ANTLRHashString("@castore", this), new Integer(45));
--	literals.put(new ANTLRHashString("@invokestatic", this), new Integer(134));
- 	literals.put(new ANTLRHashString("@areturn", this), new Integer(39));
- 	literals.put(new ANTLRHashString("@lshl", this), new Integer(115));
--	literals.put(new ANTLRHashString("@putfield", this), new Integer(132));
- 	literals.put(new ANTLRHashString("@if_icmpgt", this), new Integer(148));
- 	literals.put(new ANTLRHashString("interface", this), new Integer(11));
- 	literals.put(new ANTLRHashString("@lxor", this), new Integer(119));
- 	literals.put(new ANTLRHashString("@isub", this), new Integer(98));
--	literals.put(new ANTLRHashString("@iushr", this), new Integer(99));
-+	literals.put(new ANTLRHashString("@dload", this), new Integer(163));
-+	literals.put(new ANTLRHashString("volatile", this), new Integer(22));
- 	literals.put(new ANTLRHashString("@dadd", this), new Integer(49));
- 	literals.put(new ANTLRHashString("@l2d", this), new Integer(101));
--	literals.put(new ANTLRHashString("final", this), new Integer(17));
-+	literals.put(new ANTLRHashString("@lstore", this), new Integer(167));
-+	literals.put(new ANTLRHashString("@ifnonnull", this), new Integer(156));
-+	literals.put(new ANTLRHashString("@invokevirtual", this), new Integer(136));
- 	literals.put(new ANTLRHashString("@irem", this), new Integer(94));
- 	literals.put(new ANTLRHashString("@ret", this), new Integer(169));
- 	literals.put(new ANTLRHashString("@lmul", this), new Integer(110));
-+	literals.put(new ANTLRHashString("final", this), new Integer(17));
- 	literals.put(new ANTLRHashString("@f2l", this), new Integer(68));
--	literals.put(new ANTLRHashString("@invokevirtual", this), new Integer(136));
--	literals.put(new ANTLRHashString("@ifnonnull", this), new Integer(156));
--	literals.put(new ANTLRHashString("@lstore", this), new Integer(167));
--	literals.put(new ANTLRHashString("@ifge", this), new Integer(153));
- 	literals.put(new ANTLRHashString("@dneg", this), new Integer(56));
--	literals.put(new ANTLRHashString("volatile", this), new Integer(22));
--	literals.put(new ANTLRHashString("@dload", this), new Integer(163));
-+	literals.put(new ANTLRHashString("@ifge", this), new Integer(153));
-+	literals.put(new ANTLRHashString("@iushr", this), new Integer(99));
- 	literals.put(new ANTLRHashString("@fdiv", this), new Integer(74));
- 	literals.put(new ANTLRHashString("@swap", this), new Integer(128));
- 	literals.put(new ANTLRHashString("@var", this), new Integer(29));
- 	literals.put(new ANTLRHashString("@d2f", this), new Integer(46));
- 	literals.put(new ANTLRHashString("@istore", this), new Integer(164));
-+	literals.put(new ANTLRHashString("@putfield", this), new Integer(132));
- 	literals.put(new ANTLRHashString("@ifeq", this), new Integer(150));
-+	literals.put(new ANTLRHashString("@castore", this), new Integer(45));
-+	literals.put(new ANTLRHashString("@invokestatic", this), new Integer(134));
- 	literals.put(new ANTLRHashString("@i2s", this), new Integer(85));
--	literals.put(new ANTLRHashString("@lload", this), new Integer(162));
- 	literals.put(new ANTLRHashString("@lsub", this), new Integer(117));
- 	literals.put(new ANTLRHashString("@goto", this), new Integer(141));
--	literals.put(new ANTLRHashString("@fstore", this), new Integer(165));
-+	literals.put(new ANTLRHashString("@return", this), new Integer(125));
- 	literals.put(new ANTLRHashString("@ior", this), new Integer(93));
- 	literals.put(new ANTLRHashString("@synthetic", this), new Integer(7));
--	literals.put(new ANTLRHashString("@if_icmpge", this), new Integer(147));
-+	literals.put(new ANTLRHashString("@dcmpl", this), new Integer(53));
- 	literals.put(new ANTLRHashString("@getfield", this), new Integer(130));
-+	literals.put(new ANTLRHashString("@if_icmpge", this), new Integer(147));
- 	literals.put(new ANTLRHashString("@dup", this), new Integer(60));
- 	literals.put(new ANTLRHashString("@i2f", this), new Integer(83));
- 	literals.put(new ANTLRHashString("extends", this), new Integer(23));
-+	literals.put(new ANTLRHashString("@fastore", this), new Integer(71));
- 	literals.put(new ANTLRHashString("@lrem", this), new Integer(113));
- 	literals.put(new ANTLRHashString("private", this), new Integer(14));
--	literals.put(new ANTLRHashString("@deprecated", this), new Integer(8));
-+	literals.put(new ANTLRHashString("@invokespecial", this), new Integer(135));
- 	literals.put(new ANTLRHashString("@dstore", this), new Integer(168));
-+	literals.put(new ANTLRHashString("class", this), new Integer(10));
- 	literals.put(new ANTLRHashString("@if_icmpeq", this), new Integer(144));
- 	literals.put(new ANTLRHashString("@ifnull", this), new Integer(157));
- 	literals.put(new ANTLRHashString("@saload", this), new Integer(126));
- 	literals.put(new ANTLRHashString("@idiv", this), new Integer(90));
--	literals.put(new ANTLRHashString("@multianewarray", this), new Integer(171));
- 	literals.put(new ANTLRHashString("@dup2_x2", this), new Integer(65));
--	literals.put(new ANTLRHashString("@lreturn", this), new Integer(114));
-+	literals.put(new ANTLRHashString("@multianewarray", this), new Integer(171));
-+	literals.put(new ANTLRHashString("@iastore", this), new Integer(89));
-+	literals.put(new ANTLRHashString("@fcmpg", this), new Integer(72));
- 	literals.put(new ANTLRHashString("static", this), new Integer(15));
- 	literals.put(new ANTLRHashString("@dup2", this), new Integer(63));
--	literals.put(new ANTLRHashString("abstract", this), new Integer(16));
- 	literals.put(new ANTLRHashString("@wide", this), new Integer(35));
--	literals.put(new ANTLRHashString("@const", this), new Integer(129));
- 	literals.put(new ANTLRHashString("@f2i", this), new Integer(67));
-+	literals.put(new ANTLRHashString("@lushr", this), new Integer(118));
- 	literals.put(new ANTLRHashString("@dmul", this), new Integer(55));
--	literals.put(new ANTLRHashString("@aload", this), new Integer(161));
--	literals.put(new ANTLRHashString("@dcmpg", this), new Integer(52));
--	literals.put(new ANTLRHashString("@iflt", this), new Integer(152));
-+	literals.put(new ANTLRHashString("@if_acmpne", this), new Integer(143));
- 	literals.put(new ANTLRHashString("@line", this), new Integer(33));
--	literals.put(new ANTLRHashString("@newarray", this), new Integer(170));

*** Patch too long, truncated ***




More information about the kaffe mailing list