public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/30076]  New: Annotations don't work with interpreted code
@ 2006-12-05 18:47 aph at gcc dot gnu dot org
  2006-12-05 18:55 ` [Bug libgcj/30076] " aph at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-12-05 18:47 UTC (permalink / raw)
  To: gcc-bugs

Annotations don't work with interpreted code


-- 
           Summary: Annotations don't work with interpreted code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: libgcj
        AssignedTo: tromey at gcc dot gnu dot org
        ReportedBy: aph at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
@ 2006-12-05 18:55 ` aph at gcc dot gnu dot org
  2006-12-05 19:08 ` aph at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-12-05 18:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from aph at gcc dot gnu dot org  2006-12-05 18:54 -------
Created an attachment (id=12749)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12749&action=view)
.

Expected output:

class pp: @A1(enumF=ACE, doubleF=99.0, stringF=A1, arrayF=[1, 2], intF=0,
classF=class java.lang.Class, nestedF=@Inner(stringInnerF=class annotation))
class pp: @Another(classF=class java.lang.Integer)
public static void pp.barf(int,int):
    arg 0: @Inner(stringInnerF=Param anno)
    arg 1: @Another(classF=class pp)
    arg 1: @Inner(stringInnerF=second anno)
public static void pp.main(java.lang.String[]):
   @A1(enumF=DEUCE, doubleF=99.0, stringF=ff, arrayF=[33], intF=2868724,
classF=class java.lang.Class, nestedF=@Inner(stringInnerF=another method))
public static transient void pp.write(java.lang.String[]):
   @A1(enumF=ACE, doubleF=3.0, stringF=Abandon hope, arrayF=[0], intF=12,
classF=class pp, nestedF=@Inner(stringInnerF=method annotation))
public final native void java.lang.Object.wait(long) throws
java.lang.InterruptedException:
public final void java.lang.Object.wait(long,int) throws
java.lang.InterruptedException:
public boolean java.lang.Object.equals(java.lang.Object):
public int pp.arse:
   @Another(classF=class java.lang.String)
   @Inner(stringInnerF=field)
public int pp.too:
   @Inner(stringInnerF=ff)

What we get:

 ~/gcc/gcj-eclipse-merge-branch/install/bin/gij pp
Exception in thread "main" java.lang.NullPointerException
   at java.lang.Class.getDeclaredAnnotationsInternal(natClass.cc:1389)
   at java.lang.Class.getDeclaredAnnotations(Class.java:1305)
   at java.lang.Class.getAnnotations(Class.java:1275)
   at pp.main(pp.java:80)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
  2006-12-05 18:55 ` [Bug libgcj/30076] " aph at gcc dot gnu dot org
@ 2006-12-05 19:08 ` aph at gcc dot gnu dot org
  2006-12-05 20:12 ` [Bug libgcj/30076] [ecj] " aph at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-12-05 19:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from aph at gcc dot gnu dot org  2006-12-05 19:08 -------
The cause of this bug is that libgcj sorts fields so that static fields come
first, followed by instance fields.  Any annotation indexes that refer to a
field will be wrong after this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
  2006-12-05 18:55 ` [Bug libgcj/30076] " aph at gcc dot gnu dot org
  2006-12-05 19:08 ` aph at gcc dot gnu dot org
@ 2006-12-05 20:12 ` aph at gcc dot gnu dot org
  2006-12-08  0:15 ` tromey at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aph at gcc dot gnu dot org @ 2006-12-05 20:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from aph at gcc dot gnu dot org  2006-12-05 20:12 -------
Created an attachment (id=12750)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12750&action=view)
.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-05 20:12 ` [Bug libgcj/30076] [ecj] " aph at gcc dot gnu dot org
@ 2006-12-08  0:15 ` tromey at gcc dot gnu dot org
  2006-12-08  1:14 ` tromey at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-08  0:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tromey at gcc dot gnu dot org  2006-12-08 00:15 -------
Also we appear to incorrect create the annotation data
structure for one of the methods.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-12-08 00:15:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-12-08  0:15 ` tromey at gcc dot gnu dot org
@ 2006-12-08  1:14 ` tromey at gcc dot gnu dot org
  2006-12-08  1:16 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-08  1:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tromey at gcc dot gnu dot org  2006-12-08 01:13 -------
I needed this to see correct output.
There's still some oddity where main sorts before barf in the output,
I haven't looked at that.

--- pp.java.~1~ 2006-12-05 11:49:25.000000000 -0700
+++ pp.java     2006-12-07 17:53:09.000000000 -0700
@@ -103,7 +103,7 @@
          }
        int j = 0;
        Annotation[][] annosAnnos = m.getParameterAnnotations();
-       Arrays.sort(annosAnnos, myCollator);
+       // Arrays.sort(annosAnnos, myCollator);
        for (Annotation[] a : annosAnnos)
          {
            Arrays.sort(a, myCollator);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-12-08  1:14 ` tromey at gcc dot gnu dot org
@ 2006-12-08  1:16 ` tromey at gcc dot gnu dot org
  2006-12-08  1:19 ` tromey at gcc dot gnu dot org
  2006-12-08  1:26 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-08  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from tromey at gcc dot gnu dot org  2006-12-08 01:15 -------
Oh, I see.  It is just that we need:

    Arrays.sort(methods, myCollator);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-12-08  1:16 ` tromey at gcc dot gnu dot org
@ 2006-12-08  1:19 ` tromey at gcc dot gnu dot org
  2006-12-08  1:26 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-08  1:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from tromey at gcc dot gnu dot org  2006-12-08 01:19 -------
Subject: Bug 30076

Author: tromey
Date: Fri Dec  8 01:19:17 2006
New Revision: 119644

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119644
Log:
        PR libgcj/30076:
        * defineclass.cc (read_fields): Sort fields here.
        (handleFieldsEnd): Removed.
        (handleField): Added field map argument.
        (struct _Jv_ClassReader): Updated.
        (handleParameterAnnotations): Use writeInt for the length.

Modified:
    branches/gcj/gcj-eclipse-merge-branch/libjava/ChangeLog
    branches/gcj/gcj-eclipse-merge-branch/libjava/defineclass.cc


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libgcj/30076] [ecj] Annotations don't work with interpreted code
  2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-12-08  1:19 ` tromey at gcc dot gnu dot org
@ 2006-12-08  1:26 ` tromey at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-12-08  1:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from tromey at gcc dot gnu dot org  2006-12-08 01:26 -------
Fix checked in.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30076


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-08  1:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-05 18:47 [Bug libgcj/30076] New: Annotations don't work with interpreted code aph at gcc dot gnu dot org
2006-12-05 18:55 ` [Bug libgcj/30076] " aph at gcc dot gnu dot org
2006-12-05 19:08 ` aph at gcc dot gnu dot org
2006-12-05 20:12 ` [Bug libgcj/30076] [ecj] " aph at gcc dot gnu dot org
2006-12-08  0:15 ` tromey at gcc dot gnu dot org
2006-12-08  1:14 ` tromey at gcc dot gnu dot org
2006-12-08  1:16 ` tromey at gcc dot gnu dot org
2006-12-08  1:19 ` tromey at gcc dot gnu dot org
2006-12-08  1:26 ` tromey at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).