This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bytecode compilation


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]