Re: [Jastadd] Testing JastAddJ

From: Jesper Öqvist <jesper.oqvist_at_cs.lth.se>
Date: Mon, 28 Nov 2011 12:33:43 +0100

On 11/27/2011 09:07 PM, Na, Hyunik wrote:
> Hello Jesper,
>
>
>
>
>> I have seen the second error message. I solved that by removing all
>> *.class files and compiling all *.java files at once using the _at_<file>
>> option to provide the list of *.java files.
>>
> Probably, you meant 'detoured around' rather than 'solved'.
>

Yes, that would be more correct :) Although it did solve my current
problem at that time!
>
>> I do not know if there is an error in the bytecode generation, or only the bytecode parsing of JastAddJ.
>> I added a ticket for this error when I noticed it and continued without
>> more investigation.
>>
>>
> At least, bytecode generation seems to have some problems.
>
> While I use javac in compiling the 7638 java files in the "one-by-one" fashion and with -verbose option,
> if I put the class files produced by Java7Backend (revision 9178)
> in the foremost part of the boot class path, then I encounter many error messages from javac, such as
>
> -=-=-=
>
> ### compiling ./org/jcp/xml/dsig/internal/DigesterOutputStream.java
> [parsing started ./org/jcp/xml/dsig/internal/DigesterOutputStream.java]
> [parsing completed 122ms]
> [search path for source files: .]
> [search path for class files: ../byjastaddj/build,.,./build,/home/hina/myWork/research/openjdk-1.6.0.0.hina/build/linux-i586/classes,.]
> [loading ../byjastaddj/build/java/io/ByteArrayInputStream.class]
> [loading ../byjastaddj/build/java/io/InputStream.class]
> [loading ../byjastaddj/build/java/io/OutputStream.class]
> [loading ../byjastaddj/build/java/security/MessageDigest.class]
> [loading ../byjastaddj/build/java/util/logging/Logger.class]
> [loading ./java/util/logging/Level.java]
> [parsing started ./java/util/logging/Level.java]
> [parsing completed 14ms]
> [loading ./com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java]
> [parsing started ./com/sun/org/apache/xml/internal/security/utils/UnsyncByteArrayOutputStream.java]
> [parsing completed 3ms]
> [loading ../byjastaddj/build/java/io/Closeable.class]
> [loading ../byjastaddj/build/java/lang/Object.class]
> [loading ../byjastaddj/build/java/io/Flushable.class]
> [loading ../byjastaddj/build/java/io/ByteArrayOutputStream.class]
> [loading ../byjastaddj/build/java/util/ResourceBundle.class]
> [loading ../byjastaddj/build/java/io/Serializable.class]
> [loading ../byjastaddj/build/java/util/ArrayList.class]
> ./java/util/logging/Level.java:62: cannot access java.util.ArrayList
> bad class file: ../byjastaddj/build/java/util/ArrayList.class
> bad signature: ^H^_at_´^A^_at_^H, S
> Please remove or make sure it appears in the correct subdirectory of the classpath.
> private static java.util.ArrayList<Level> known = new java.util.ArrayList<Level>();
> ^
> ### result = 1, compiling ./org/jcp/xml/dsig/internal/DigesterOutputStream.java
>
> -=-=-=
>
> and
>
> -=-=-=
>
> ### compiling ./sun/rmi/server/MarshalInputStream.java
> [parsing started ./sun/rmi/server/MarshalInputStream.java]
> [parsing completed 125ms]
> [search path for source files: .]
> [search path for class files: ../byjastaddj/build,.,./build,/home/hina/myWork/research/openjdk-1.6.0.0.hina/build/linux-i586/classes,.]
> [loading ../byjastaddj/build/java/io/IOException.class]
> [loading ../byjastaddj/build/java/io/InputStream.class]
> [loading ../byjastaddj/build/java/io/ObjectInputStream.class]
> [loading ../byjastaddj/build/java/io/ObjectStreamClass.class]
> [loading ../byjastaddj/build/java/io/StreamCorruptedException.class]
> [loading ../byjastaddj/build/java/net/URL.class]
> [loading ../byjastaddj/build/java/security/AccessControlException.class]
> [loading ../byjastaddj/build/java/security/Permission.class]
> [loading ./java/rmi/server/RMIClassLoader.java]
> [parsing started ./java/rmi/server/RMIClassLoader.java]
> [parsing completed 13ms]
> [loading ../byjastaddj/build/java/io/ObjectInput.class]
> [loading ../byjastaddj/build/java/io/DataInput.class]
> [loading ../byjastaddj/build/java/lang/Object.class]
> [loading ../byjastaddj/build/java/io/ObjectStreamConstants.class]
> [loading ../byjastaddj/build/java/io/Closeable.class]
> [loading ../byjastaddj/build/java/util/Map.class]
> [loading ../byjastaddj/build/java/lang/Runnable.class]
> [loading ../byjastaddj/build/java/lang/Class.class]
> An exception has occurred in the compiler (1.6.0_20). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
> java.lang.AssertionError
> at com.sun.tools.javac.code.Type.asMethodType(Type.java:365)
> at com.sun.tools.javac.code.Type$ForAll.asMethodType(Type.java:1059)
> at com.sun.tools.javac.jvm.ClassReader.readMemberAttr(ClassReader.java:865)
> at com.sun.tools.javac.jvm.ClassReader.readMemberAttrs(ClassReader.java:1027)
> ...
> ...
>
> -=-=-=
>
> That is, javac fails to load some jastaddj-produced class files.
> ( I attach the first half of the whole messages (gzipped) to this posting. )
>
> On the contrary, while I use Java7Backend compiler,
> if I remove jastaddj-produced class files from the boot class path and
> put the OpenJDK-produced class files there,
> then I don't see any error messages regarding class loading.
>
>
> -- Hyunik

Thank you, your testing is very valuable! I was only interested in
measuring compilation time with JastAddJ for my thesis, so I did not try
to load any of the compiled class files in any JVM - mainly due to lack
of time. I think you are correct that there is an error in the bytecode
generation.

On wednesday I might be able to debug some of this.

/Jesper
>
>
> _______________________________________________
> JastAdd mailing list
> JastAdd_at_cs.lth.se
> https://mail1.cs.lth.se/cgi-bin/mailman/listinfo/jastadd
Received on Mon Nov 28 2011 - 12:33:49 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST