[foreign-jextract] RFR: 8252047: jextract generates uncompilable code with --source option

Athijegannathan Sundararajan sundar at openjdk.java.net
Thu Aug 20 12:20:36 UTC 2020


On Thu, 20 Aug 2020 11:52:00 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> I wonder if the multiple constant class generation could be implemented as a decorator around ConstantHelper instead?
> That way it could also be used for the ClassConstantHelper (it is needed there as well). i.e. basically:
> ```
> class MultiConstantHelper implements ConstantHelper {
>     ConstantHelper delegate;
> 
>     DirectMethodHandleDesct addConstant(...) {
>         newConstantClass(); // might update `delegate`
>         delegate.addConstant(...);
>     }
> }
> ```

May be. But the class constant helper can handle larger cases (it already does) compared to source constant helper.
Perhaps a refactoring later (with considerations for different thresholds etc.)

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

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


More information about the panama-dev mailing list