[foreign-jextract] Integrated: 8278962: Support for _Bool not working correctly

Maurizio Cimadamore mcimadamore at openjdk.java.net
Fri Dec 17 22:04:46 UTC 2021


On Fri, 17 Dec 2021 15:17:53 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> TypeTranslator does not deal with _Bool layout correctly. Instead of turning it into the `boolean.class` carrier, it turns it into a `byte.class` carrier. This is caused by the fact that we still have some old logic for deriving carriers from layouts which does not take into account the fact that the carrier is now attached to the layout.
> 
> Fixing this breaks the macro `ConstantTest` - as one `_Bool` constant is not generated correctly. Again the solution is to take the `_Bool` case into account when reparsing a macro, so that we can generate a macro whose value is a Boolean, not just a numeric value.

This pull request has now been integrated.

Changeset: f05c2ffc
Author:    Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/panama-foreign/commit/f05c2ffce095f564ad47ed58486ad6963a8f3773
Stats:     36 lines in 4 files changed: 8 ins; 18 del; 10 mod

8278962: Support for _Bool not working correctly

Reviewed-by: sundar

-------------

PR: https://git.openjdk.java.net/panama-foreign/pull/627


More information about the panama-dev mailing list