[type-annos-observers] some errors in the specification (january 30 version)

Werner Dietl wdietl at gmail.com
Sun Feb 17 20:56:23 PST 2013


Hi Eric,

thanks for the update!

On Sun, Feb 17, 2013 at 2:22 AM, Eric Bruneton <ebruneton at free.fr> wrote:
> FYI, I updated the type annotation implementation in the ASM branch
> ASM_5_FUTURE, to match the latest version of the JSR. I hope it is correct,
> but I have no reference implementation against which to test it (is there
> one)?

The reference implementation for JSR 308 is available here:

http://openjdk.java.net/projects/type-annotations/

It has also been recently integrated into the main TL branch and
should be included in JDK 8 binary builds.

You could compile a source program with this javac and then see
whether ASM presents the results correctly.
You could insert type annotations using ASM and then see whether this
javap presents the results correctly.

Please do let me know if you see any problem with the reference implementation.
cu, WMD.


> By doing this, I noticed two small bugs in the specification:
> - the first sentence in 3.3.10 references invocation_type_argument_target
> and method_reference_type_argument, which are not defined.
> - in 3.4, in the type_path_entry struct definition, the type_argument_index
> comment is inconsistent with the sentence just below "When type_path_kind is
> 0, 1, or 2, then type_argument_index must be 0" (0 is valid for a
> type_path_kind 3, and designates the 1st type arg).
>
> Finally I'm wondering, in 3.3.10, how the value of type_argument_index is
> defined for a castinstruction.
>
> Eric



-- 
http://www.google.com/profiles/wdietl


More information about the type-annotations-spec-comments mailing list