On Fri, 9 Dec 2022 14:17:24 GMT, Bernhard Urban-Forster <bur...@openjdk.org> wrote:
> The change in [JDK-8283415](https://bugs.openjdk.org/browse/JDK-8283415) made > use of the now available `sealed` keyword for `FinalReference<T>`. > > Unfortunately this introduced a problem for the Espresso VM (Java on > Truffle): Since Espresso is written in Java it uses the functionality of the > "Host VM" to implement finalization. It does that however by [introducing a > new subclass of > `FinalReference<T>`](https://github.com/oracle/graal/blob/f195395329fba573afc6f81c5e70a18ac334dd10/espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/ref/ClassAssembler.java#L85-L113) > which does not work anymore with the changes made in JDK-8283415. We cannot > use `Finalizer` itself because we want to inject an additional "Guest object". > > Making `FinalReference<T>` `non-sealed` would simplify things for Espresso. > Before pursuing other more involved solutions I thought I would ask how > strongly the maintainers of core-libs feel about such a change. Would that be > okay? Are there any implications for the GC for such a change? This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/11610