[master] RFR: 8303769: [Lilliput] Fix interpreter asymmetric fast-locking [v2]

Roman Kennke rkennke at openjdk.org
Wed Mar 8 18:57:53 UTC 2023


On Wed, 8 Mar 2023 12:38:10 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> * As with the other PR, reusing named registers for something else confuses casual readers like me :-) consider using aliases within the scopes where they are used. Even if they are just named "tmp".

Done.

> * Accessing stack -1 looks scary. I would feel better with some sort of emitted assert that we don't access stack -1, unless this would increase the size of compiled code too much or unless we do this test somewhere else.

This raises an interesting question. I suspect that we may need to emit an underflow check there and throw an IllegalMonitorStateException when that happens. I don't think we need to do that in the compilers, because they would reject unbalanced monitorenter/exit bytecodes. But I'd rather tackle this separately, write a testcase for this, etc.

> * You also may want to fix riscv

Done. I hope it's correct, I did the change blindly.

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

PR: https://git.openjdk.org/lilliput/pull/76


More information about the lilliput-dev mailing list