[foreign] RFR: refresh layout grammar

Henry Jen henry.jen at oracle.com
Wed May 23 18:10:16 UTC 2018



> On May 23, 2018, at 9:46 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> Hi,
> I've put together a change which tweaks the grammar of layout descriptions used in annotations to correspond to what's described here [1].
> 
> The big changes are in DescriptorParser, which now has to understand the new grammar, and also in TestDescriptorGrammar, which has to combinatorially generate sentences of the new grammar.
> 
> All the other tedious changes are test changes, required to go from the old to the new grammar; I've adhered to the following rules:
> 
> 'b' -> ‘u8'

b is a bit, so should it be u1?
o is octet, which is the byte and should be u8.

> 'c' -> ‘i8'

char is either signed or unsigned depends on platform. Since we are targeting x64 for now, unsigned is correct.

> 's' -> 'i16'
> 'i' -> 'i32'
> 'l' -> 'i64'
> 'q' -> 'i64'
> 
> Also note that in the new grammar capital letter denote big-endiannes, while in the old one they meant unsigned-ness.
> 
> There's a trivia in the DoubleUpcall test, which was using 'unsigned double' ('D') - not sure why…

Hmm, not sure.

Cheers,
Henry

> 
> Webrev here:
> 
> http://cr.openjdk.java.net/~mcimadamore/panama/layout-grammar-refresh/
> 
> P.S.
> Might be useful to give it a spin on Mac and see if UnixSystemTest works (the layout conversion was not very trivial w/o jextract support :-))
> 
> Cheers
> 
> Maurizio
> 
> 



More information about the panama-dev mailing list