[foreign] RFR 8211281: Strenghten the logic for parsing header declarations

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Sep 28 17:01:38 UTC 2018


The previous webrev link was pointing to an older version - please use 
the one below

http://cr.openjdk.java.net/~mcimadamore/panama/8211281-v3/

Apologies for the inconvenience.

Maurizio


On 28/09/18 17:53, Maurizio Cimadamore wrote:
> Hi,
> this patch revisits the logic for parsing the contents of header 
> declaration annotations. As noted in [1] the old logic was too lax, 
> and certain errors were not caught at parse time, which then generated 
> weird issue at bind time.
>
> The new logic works inside the parser (and not using parser as a black 
> box, as before); this means we can now check for things like:
>
> * the declaration name is not valid (e.g. "fo!*** = (i32)v")
>
> * the declaration name has spaces (e.g. "fo o=(i32)v")
>
> * there's no declaration name (e.g. "=(i32)v")
>
> * there's no equal (e.g. "(i32)v")
>
> I've added a test which checks many such conditions - the test is 
> slightly more general than the examples above in that it tries to test 
> a given configuration against different kinds of prefix and suffixes.
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/panama/8211281/
>
> Cheers
> Maurizio
>
> [1] - 
> http://mail.openjdk.java.net/pipermail/panama-dev/2018-September/002788.html
>



More information about the panama-dev mailing list