bytecode compilation

Richard Henderson rth@redhat.com
Fri Dec 21 19:09:00 GMT 2001


I'd been trying to figure out why testsuite/libjava.lang/stringconst2.java
fails when compiled from source but succeeds when compiled from bytecode.
But I got sidetracked by what looks to be a broken bytecode compiler.
Perhaps I'm confused about how to replicate this, but if I do 
 ./jc1 -femit-class-files -g stringconst2.java
then stringconst2.class contains
Method void main(java.lang.String[])
 0 ldc #13 <String "stringconst2">
 2 invokestatic #19 <Method java.lang.Class forName(java.lang.String)>
 5 astore_1
 6 aload_1
 7 astore_2
 8 getstatic #25 <Field java.io.PrintStream out>
 11 goto 15
 14 astore_1
 15 return
Exception table:
 from to target type
 0 11 14 <Class java.lang.Throwable>
which looks decidedly wrong. There's no call to println for one.
Does this work properly on other machines?
r~


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /