[foreign] RFR 8217246: jextract should parse single header file with clang

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Jan 17 11:01:46 UTC 2019


+1

Maurizio

On 17/01/2019 04:56, Sundararajan Athijegannathan wrote:
> Yes, you're right. 'distinct' call can be removed.
>
> Updated: https://cr.openjdk.java.net/~sundar/8217246/webrev.01/
>
> All tests and samples fine on Mac. Tests fine on Linux.
>
> Thanks,
> -Sundar
>
> On 16/01/19, 11:25 PM, Maurizio Cimadamore wrote:
>> Looks good - I have one question: do we still need to call 'distinct' 
>> in JextractTool::processHeaders ?
>>
>> That is, shouldn't it be the case that now the parser will only give 
>> us a given cursor only once? I added this step because, since we were 
>> doing multiple clang passes, it was sometimes necessary to filter out 
>> duplicates (e.g. if two input headers both included time.h) - but now 
>> that we unify the headers under a single clang compilation unit, 
>> shouldn't the clang API already give us unique entities?
>>
>> [I'm saying this because I suspect that this distinct() call is 
>> causing much of the overhead introduced by the recent jextract 
>> refactoring]
>>
>> Maurizio
>>
>> On 16/01/2019 12:57, Sundararajan Athijegannathan wrote:
>>> Please review.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8217246
>>> Webrev: https://cr.openjdk.java.net/~sundar/8217246/webrev.00/
>>>
>>> Thanks,
>>> -Sundar


More information about the panama-dev mailing list