The problem reported in these bugs is an assertion
failure at
line 1110 of symbol.h. The problem occurs when reading a
previously compiled class file, so I thought that removing
the assertion might allow jikes to "work". And it does ...
I've done a bit of digging to work out why the assertion is
failing. The
underlying problem is that Jikes does not always set the
'outermost_type'
field for an anonymous inner type that it has read from a
class file.
The root cause is in the way the "inner classes" attribute
of a class file
is encoded for an anonymous inner class. Unlike a named
inner class,
the "inner classes" attribute does not explicitly encode the
anon class's
enclosing class. To cope with this, the ProcessNestedType
method
sets the enclosing ('owner') and outermost types from a
parameter
which gives the enclosing type. The problem is that sometimes,
the nested type has already been loaded via some other path.
For
example the nested type may be used in a method signature of
another type. Anyway, the result is that the good stuff in the
Semantic::ProcessNestedType method does not happen ... and
the 'outermost_type' field doesn't get set.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The patch
Logged In: YES
user_id=342007
I've done a bit of digging to work out why the assertion is
failing. The
underlying problem is that Jikes does not always set the
'outermost_type'
field for an anonymous inner type that it has read from a
class file.
The root cause is in the way the "inner classes" attribute
of a class file
is encoded for an anonymous inner class. Unlike a named
inner class,
the "inner classes" attribute does not explicitly encode the
anon class's
enclosing class. To cope with this, the ProcessNestedType
method
sets the enclosing ('owner') and outermost types from a
parameter
which gives the enclosing type. The problem is that sometimes,
the nested type has already been loaded via some other path.
For
example the nested type may be used in a method signature of
another type. Anyway, the result is that the good stuff in the
Semantic::ProcessNestedType method does not happen ... and
the 'outermost_type' field doesn't get set.