Anonymous structs have strange issues with scala and intellij in ea+44

Mark Hammons mark.hammons at inaf.cnrs-gif.fr
Tue Feb 19 23:56:24 UTC 2019


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 /home/mhammons/Documents/MyProjects/waylandTest/lib/wlroots/backend$anon$backend_h$444.class
  Last modified Feb 19, 2019; size 1526 bytes
  MD5 checksum aa246352e29805f315e8d76c97f2ab28
public interface wlroots.backend$anon$backend_h$444 extends java.foreign.memory.Struct<wlroots.backend$anon$backend_h$444>
  minor version: 0
  major version: 52
  flags: (0x0601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT
  this_class: #2                          // wlroots/backend$anon$backend_h$444
  super_class: #5                         // java/lang/Object
  interfaces: 1, fields: 0, methods: 9, attributes: 3
Constant pool:
   #1 = Utf8               wlroots/backend$anon$backend_h$444
   #2 = Class              #1             // wlroots/backend$anon$backend_h$444
   #3 = Utf8               Ljava/lang/Object;Ljava/foreign/memory/Struct<Lwlroots/backend$anon$backend_h$444;>;
   #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            21
  #13 = Utf8               column
  #14 = Integer            2
  #15 = Utf8               Ljava/foreign/annotations/NativeStruct;
  #16 = Utf8               value
  #17 = Utf8               [${wl_signal}(destroy)${wl_signal}(new_input)${wl_signal}(new_output)](anon$backend_h$444)
  #18 = Utf8               wlroots/backend
  #19 = Class              #18            // wlroots/backend
  #20 = Utf8               anon$backend_h$444
  #21 = Utf8               destroy$get
  #22 = Utf8               ()Lusr/include/wayland/wayland_server_core$wl_signal;
  #23 = Integer            23
  #24 = Integer            20
  #25 = Utf8               Ljava/foreign/annotations/NativeGetter;
  #26 = Utf8               destroy
  #27 = Utf8               destroy$set
  #28 = Utf8               (Lusr/include/wayland/wayland_server_core$wl_signal;)V
  #29 = Utf8               Ljava/foreign/annotations/NativeSetter;
  #30 = Utf8               destroy$ptr
  #31 = Utf8               ()Ljava/foreign/memory/Pointer;
  #32 = Utf8               ()Ljava/foreign/memory/Pointer<Lusr/include/wayland/wayland_server_core$wl_signal;>;
  #33 = Utf8               Ljava/foreign/annotations/NativeAddressof;
  #34 = Utf8               new_input$get
  #35 = Integer            25
  #36 = Utf8               new_input
  #37 = Utf8               new_input$set
  #38 = Utf8               new_input$ptr
  #39 = Utf8               new_output$get
  #40 = Integer            27
  #41 = Utf8               new_output
  #42 = Utf8               new_output$set
  #43 = Utf8               new_output$ptr
  #44 = Utf8               Signature
  #45 = Utf8               RuntimeVisibleAnnotations
  #46 = Utf8               InnerClasses
{
  public abstract usr.include.wayland.wayland_server_core$wl_signal destroy$get();
    descriptor: ()Lusr/include/wayland/wayland_server_core$wl_signal;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #22                          // ()Lusr/include/wayland/wayland_server_core$wl_signal;
    RuntimeVisibleAnnotations:
      0: #8(#9=s#10,#11=I#23,#13=I#24)
        java.foreign.annotations.NativeLocation(
          file="/usr/include/wlr/backend.h"
          line=23
          column=20
        )
      1: #25(#16=s#26)
        java.foreign.annotations.NativeGetter(
          value="destroy"
        )

  public abstract void destroy$set(usr.include.wayland.wayland_server_core$wl_signal);
    descriptor: (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #28                          // (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    RuntimeVisibleAnnotations:
      0: #29(#16=s#26)
        java.foreign.annotations.NativeSetter(
          value="destroy"
        )

  public abstract java.foreign.memory.Pointer<usr.include.wayland.wayland_server_core$wl_signal> destroy$ptr();
    descriptor: ()Ljava/foreign/memory/Pointer;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #32                          // ()Ljava/foreign/memory/Pointer<Lusr/include/wayland/wayland_server_core$wl_signal;>;
    RuntimeVisibleAnnotations:
      0: #33(#16=s#26)
        java.foreign.annotations.NativeAddressof(
          value="destroy"
        )

  public abstract usr.include.wayland.wayland_server_core$wl_signal new_input$get();
    descriptor: ()Lusr/include/wayland/wayland_server_core$wl_signal;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #22                          // ()Lusr/include/wayland/wayland_server_core$wl_signal;
    RuntimeVisibleAnnotations:
      0: #8(#9=s#10,#11=I#35,#13=I#24)
        java.foreign.annotations.NativeLocation(
          file="/usr/include/wlr/backend.h"
          line=25
          column=20
        )
      1: #25(#16=s#36)
        java.foreign.annotations.NativeGetter(
          value="new_input"
        )

  public abstract void new_input$set(usr.include.wayland.wayland_server_core$wl_signal);
    descriptor: (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #28                          // (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    RuntimeVisibleAnnotations:
      0: #29(#16=s#36)
        java.foreign.annotations.NativeSetter(
          value="new_input"
        )

  public abstract java.foreign.memory.Pointer<usr.include.wayland.wayland_server_core$wl_signal> new_input$ptr();
    descriptor: ()Ljava/foreign/memory/Pointer;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #32                          // ()Ljava/foreign/memory/Pointer<Lusr/include/wayland/wayland_server_core$wl_signal;>;
    RuntimeVisibleAnnotations:
      0: #33(#16=s#36)
        java.foreign.annotations.NativeAddressof(
          value="new_input"
        )

  public abstract usr.include.wayland.wayland_server_core$wl_signal new_output$get();
    descriptor: ()Lusr/include/wayland/wayland_server_core$wl_signal;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #22                          // ()Lusr/include/wayland/wayland_server_core$wl_signal;
    RuntimeVisibleAnnotations:
      0: #8(#9=s#10,#11=I#40,#13=I#24)
        java.foreign.annotations.NativeLocation(
          file="/usr/include/wlr/backend.h"
          line=27
          column=20
        )
      1: #25(#16=s#41)
        java.foreign.annotations.NativeGetter(
          value="new_output"
        )

  public abstract void new_output$set(usr.include.wayland.wayland_server_core$wl_signal);
    descriptor: (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #28                          // (Lusr/include/wayland/wayland_server_core$wl_signal;)V
    RuntimeVisibleAnnotations:
      0: #29(#16=s#41)
        java.foreign.annotations.NativeSetter(
          value="new_output"
        )

  public abstract java.foreign.memory.Pointer<usr.include.wayland.wayland_server_core$wl_signal> new_output$ptr();
    descriptor: ()Ljava/foreign/memory/Pointer;
    flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
    Signature: #32                          // ()Ljava/foreign/memory/Pointer<Lusr/include/wayland/wayland_server_core$wl_signal;>;
    RuntimeVisibleAnnotations:
      0: #33(#16=s#41)
        java.foreign.annotations.NativeAddressof(
          value="new_output"
        )
}
InnerClasses:
  public static #20= #2 of #19;           // anon$backend_h$444=class wlroots/backend$anon$backend_h$444 of class wlroots/backend
Signature: #3                           // Ljava/lang/Object;Ljava/foreign/memory/Struct<Lwlroots/backend$anon$backend_h$444;>;
RuntimeVisibleAnnotations:
  0: #8(#9=s#10,#11=I#12,#13=I#14)
    java.foreign.annotations.NativeLocation(
      file="/usr/include/wlr/backend.h"
      line=21
      column=2
    )
  1: #15(#16=s#17)
    java.foreign.annotations.NativeStruct(
      value="[${wl_signal}(destroy)${wl_signal}(new_input)${wl_signal}(new_output)](anon$backend_h$444)"
    )


More information about the panama-dev mailing list