Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903449

Jextract generates structs that cannot be compiled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      When compiling structs with lots and lots of function pointer fields, jextract can sometime end up with sources which cannot be compiled, due to classfile limitations (constant pool, or code size).

      The problem is caused by the fact that a functional interface reuses the "nearest" constant builder - so, if a functional interface is defined inside a struct, the struct class itself is used as holder for the upcall constants.

      While this behavior was meant to minimize the generation of constant classes, it is easy to see how it would fail to scale for very large structs (and also, how it would defeat the initialization performance guarantees provided by jextract).

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: