[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
Fri Sep 21 09:46:08 UTC 2018
Thanks! I've been experiencing (2) a lot when working on posix libraries
few months ago, so at least on Linux this is something that will come
up, I think, quite frequently.
Maurizio
On 21/09/18 05:11, Sundararajan Athijegannathan wrote:
> I filed two issues:
>
> 1) https://bugs.openjdk.java.net/browse/JDK-8210992
>
> This is for the test failure on Linux. That test need not use limits.h
> at all.
>
> 2) https://bugs.openjdk.java.net/browse/JDK-8210993
>
> This is to handle limits.h & other related files as compiler built-ins.
>
> Thanks,
> -Sundar
>
> On 20/09/18, 10:53 PM, Maurizio Cimadamore wrote:
>> 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