[foreign-jextract] RFR: 8261642: improve jextract source generation mode and remove class generation [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon Feb 15 14:22:44 UTC 2021

On Mon, 15 Feb 2021 14:07:37 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/jdk.incubator.jextract/share/classes/jdk/internal/jextract/impl/JavaSourceBuilder.java line 270:
>>> 268:             }
>>> 269:             constant_counter = 0;
>>> 270:             constantBuilder = new ConstantBuilder(this, Kind.CLASS, javaName + "_constants");
>> Using the java name of some constant to uniqueify the name of the constant class seems a bit strange to me... Couldn't there be collisions? (e.g. if struct and unction are named the same?) Why not just use an id/number here like before?
> there could be collisions, yes - not sure I get what you propose by using "id/number"

I see what you mean - I thought you meant collisions in case an header contains `foo` and `foo_constants` - but you mean conflicts between members that have same native name.


PR: https://git.openjdk.java.net/panama-foreign/pull/450

More information about the panama-dev mailing list