[foreign] RFR 8210935 C enum constants should be mapped to interface methods instead of static final int constants

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Sep 20 17:23:16 UTC 2018


I have an issue with this test when running on Linux:

/usr/include/limits.h:123:16: fatal error: 'limits.h' file not found
java.lang.RuntimeException: jextract returns non-zero value
     at JtregJextract.jextract(JtregJextract.java:85)
     at JtregJextract.main(JtregJextract.java:96)
     at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)
     at 
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     at 
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.base/java.lang.reflect.Method.invoke(Method.java:566)
     at 
com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:229)
     at java.base/java.lang.Thread.run(Thread.java:834)

I think the culprit is that we are not copying the clang version of 
limits.h into the JDK; from make/copy/Copy-jdk.jextract.gmk:

JEXTRACT_SRC_FILES := $(wildcard $(JEXTRACT_CONF_SRC)/*std*.h)

That is we are filtering with 'std'. I think we need limits.h too (and 
possibly others).

Maurizio


On 20/09/18 18:16, Maurizio Cimadamore wrote:
> Looks good!
>
> Maurizio
>
>
> On 20/09/18 16:22, Sundararajan Athijegannathan wrote:
>> Thanks. I've added few more tests to combine enum constants.
>>
>> Pushing this updated changes: 
>> http://cr.openjdk.java.net/~sundar/8210935/webrev.01/
>>
>> -Sundar
>>
>> On 20/09/18, 8:26 PM, Maurizio Cimadamore wrote:
>>> Looks good.
>>>
>>> Maybe in the test you could also check that e.g. combining enum 
>>> constants in Java and C yields the same - e.g.
>>>
>>> R | G
>>>
>>> ?
>>>
>>> Maurizio
>>>
>>>
>>>
>>> On 20/09/18 06:15, Sundararajan Athijegannathan wrote:
>>>> Please review.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8210935
>>>> Webrev: http://cr.openjdk.java.net/~sundar/8210935/webrev.00/
>>>>
>>>> Thanks,
>>>> -Sundar
>>>
>



More information about the panama-dev mailing list