RFR: 8243996: Remove hardcoded field offsets from HotSpot

Frederic Parain frederic.parain at oracle.com
Wed May 13 18:23:12 UTC 2020


Erik,

Thank you for fixing this long standing technical debt.
Looks good to me, comments are very helpful.
If you change accessibility as suggested by John, let
me know if you need another review.

Regards,

Fred

> On May 13, 2020, at 11:26, Erik Österlund <erik.osterlund at oracle.com> wrote:
> 
> Hi,
> 
> Let's remove hardcoded field offsets. Main trick to get this done is to split interpreter initialization
> into two parts: 1. reserve the interpreter memory, 2. generate the interpreter. This allows reserving
> it before loading methods (which generates i2c adapters that assert things are "in the interpreter",
> requiring knowledge about its address range), and then load the methods, and then generate the interpreter.
> This moving of interpreter code generation until after methods have been loaded allows offsets to be
> looked up, needed by code generation. That way, we no longer need to hardcode field offsets, which
> makes it less annoying to change the field layout code in the future.
> 
> Thanks to Coleen for pre-reviewing this.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8243996
> 
> Webrev:
> http://cr.openjdk.java.net/~eosterlund/8243996/webrev.01/
> 
> Thanks,
> /Erik



More information about the hotspot-dev mailing list