Anonymous structs have strange issues with scala and intellij in ea+44
Mark Hammons
mark.hammons at inaf.cnrs-gif.fr
Wed Feb 20 00:28:51 UTC 2019
Sure,
I'd like to note one thing quickly. Before I was extracting the jar with
an archive extracter and calling javap on the raw classfiles. Just now I
tried "javap -p -v -cp wlroots.jar wlroots.backend.anon$backend_h$444"
and it couldn't find the class, but "javap -p -v -cp wlroots.jar
wlroots.backend.anon.backend_h.444" had it able to find the class in
question. Ditto for "javap -p -v -cp wlroots.jar
wlroots.backend_headers.session.anon.session_h.751". I'm attaching my
wlroots.jar along with the javap of wlr_backend.class.
This seems to be a recurring issue with the anonymous structs generated
by jextract.
Mark
On 2/20/19 1:04 AM, Maurizio Cimadamore wrote:
> Thanks,
> can you please also post the dump of the 'wlr_backend' struct?
>
> Maurizio
>
> On 19/02/2019 23:56, Mark Hammons wrote:
>> Here's the javap dump. Tell me if there's anything else I can get you.
>>
>> Mark
>>
>>
>> On 2/20/19 12:44 AM, Maurizio Cimadamore wrote:
>>>
>>> On 19/02/2019 23:29, Jorn Vernee wrote:
>>>> I tried to reproduce the problem without using jextract as well,
>>>> but was not able to, so the bug seems to be up to a particularity
>>>> of the classes generated by jextract. I'm not sure if the bug
>>>> should be attributed to jextract or IntelliJ though.
>>>
>>> I wonder if this could be due to some missing (or, most likely, just
>>> bad) Signature attributes in the resulting classfile?
>>>
>>> Would you be able to post a 'javap -v -p' dump of the classfile, so
>>> that we can take a look at it and look for anomalies?
>>>
>>> Maurizio
>>>
-------------- next part --------------
Classfile jar:file:///home/mhammons/Documents/MyProjects/waylandTest/lib/wlroots.jar!/wlroots/backend$wlr_backend.class
Last modified Feb 20, 2019; size 1514 bytes
MD5 checksum e08c8b145d49b19c05c3ff9f3c5647fc
public interface wlroots.backend$wlr_backend extends java.foreign.memory.Struct<wlroots.backend$wlr_backend>
minor version: 0
major version: 52
flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
this_class: #2 // wlroots/backend$wlr_backend
super_class: #5 // java/lang/Object
interfaces: 1, fields: 0, methods: 6, attributes: 3
Constant pool:
#1 = Utf8 wlroots/backend$wlr_backend
#2 = Class #1 // wlroots/backend$wlr_backend
#3 = Utf8 Ljava/lang/Object;Ljava/foreign/memory/Struct<Lwlroots/backend$wlr_backend;>;
#4 = Utf8 java/lang/Object
#5 = Class #4 // java/lang/Object
#6 = Utf8 java/foreign/memory/Struct
#7 = Class #6 // java/foreign/memory/Struct
#8 = Utf8 Ljava/foreign/annotations/NativeLocation;
#9 = Utf8 file
#10 = Utf8 /usr/include/wlr/backend.h
#11 = Utf8 line
#12 = Integer 18
#13 = Utf8 column
#14 = Integer 8
#15 = Utf8 Ljava/foreign/annotations/NativeStruct;
#16 = Utf8 value
#17 = Utf8 [u64(impl):${wlr_backend_impl}${anon$backend_h$444}(events)](wlr_backend)
#18 = Utf8 wlroots/backend
#19 = Class #18 // wlroots/backend
#20 = Utf8 wlr_backend
#21 = Utf8 impl$get
#22 = Utf8 ()Ljava/foreign/memory/Pointer;
#23 = Utf8 ()Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;
#24 = Integer 19
#25 = Integer 33
#26 = Utf8 Ljava/foreign/annotations/NativeGetter;
#27 = Utf8 impl
#28 = Utf8 impl$set
#29 = Utf8 (Ljava/foreign/memory/Pointer;)V
#30 = Utf8 (Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;)V
#31 = Utf8 Ljava/foreign/annotations/NativeSetter;
#32 = Utf8 impl$ptr
#33 = Utf8 ()Ljava/foreign/memory/Pointer<Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;>;
#34 = Utf8 Ljava/foreign/annotations/NativeAddressof;
#35 = Utf8 events$get
#36 = Utf8 ()Lwlroots/backend$anon$backend_h$444;
#37 = Integer 28
#38 = Integer 4
#39 = Utf8 events
#40 = Utf8 events$set
#41 = Utf8 (Lwlroots/backend$anon$backend_h$444;)V
#42 = Utf8 events$ptr
#43 = Utf8 ()Ljava/foreign/memory/Pointer<Lwlroots/backend$anon$backend_h$444;>;
#44 = Utf8 Signature
#45 = Utf8 RuntimeVisibleAnnotations
#46 = Utf8 InnerClasses
{
public abstract java.foreign.memory.Pointer<wlroots.backend$wlr_backend_impl> impl$get();
descriptor: ()Ljava/foreign/memory/Pointer;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #23 // ()Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;
RuntimeVisibleAnnotations:
0: #8(#9=s#10,#11=I#24,#13=I#25)
java.foreign.annotations.NativeLocation(
file="/usr/include/wlr/backend.h"
line=19
column=33
)
1: #26(#16=s#27)
java.foreign.annotations.NativeGetter(
value="impl"
)
public abstract void impl$set(java.foreign.memory.Pointer<wlroots.backend$wlr_backend_impl>);
descriptor: (Ljava/foreign/memory/Pointer;)V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #30 // (Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;)V
RuntimeVisibleAnnotations:
0: #31(#16=s#27)
java.foreign.annotations.NativeSetter(
value="impl"
)
public abstract java.foreign.memory.Pointer<java.foreign.memory.Pointer<wlroots.backend$wlr_backend_impl>> impl$ptr();
descriptor: ()Ljava/foreign/memory/Pointer;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #33 // ()Ljava/foreign/memory/Pointer<Ljava/foreign/memory/Pointer<Lwlroots/backend$wlr_backend_impl;>;>;
RuntimeVisibleAnnotations:
0: #34(#16=s#27)
java.foreign.annotations.NativeAddressof(
value="impl"
)
public abstract wlroots.backend$anon$backend_h$444 events$get();
descriptor: ()Lwlroots/backend$anon$backend_h$444;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #36 // ()Lwlroots/backend$anon$backend_h$444;
RuntimeVisibleAnnotations:
0: #8(#9=s#10,#11=I#37,#13=I#38)
java.foreign.annotations.NativeLocation(
file="/usr/include/wlr/backend.h"
line=28
column=4
)
1: #26(#16=s#39)
java.foreign.annotations.NativeGetter(
value="events"
)
public abstract void events$set(wlroots.backend$anon$backend_h$444);
descriptor: (Lwlroots/backend$anon$backend_h$444;)V
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #41 // (Lwlroots/backend$anon$backend_h$444;)V
RuntimeVisibleAnnotations:
0: #31(#16=s#39)
java.foreign.annotations.NativeSetter(
value="events"
)
public abstract java.foreign.memory.Pointer<wlroots.backend$anon$backend_h$444> events$ptr();
descriptor: ()Ljava/foreign/memory/Pointer;
flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
Signature: #43 // ()Ljava/foreign/memory/Pointer<Lwlroots/backend$anon$backend_h$444;>;
RuntimeVisibleAnnotations:
0: #34(#16=s#39)
java.foreign.annotations.NativeAddressof(
value="events"
)
}
InnerClasses:
public static #20= #2 of #19; // wlr_backend=class wlroots/backend$wlr_backend of class wlroots/backend
Signature: #3 // Ljava/lang/Object;Ljava/foreign/memory/Struct<Lwlroots/backend$wlr_backend;>;
RuntimeVisibleAnnotations:
0: #8(#9=s#10,#11=I#12,#13=I#14)
java.foreign.annotations.NativeLocation(
file="/usr/include/wlr/backend.h"
line=18
column=8
)
1: #15(#16=s#17)
java.foreign.annotations.NativeStruct(
value="[u64(impl):${wlr_backend_impl}${anon$backend_h$444}(events)](wlr_backend)"
)
More information about the panama-dev
mailing list