[code-reflection] RFR: Make sure method parameters keep their slots when lowering [v2]
Paul Sandoz
psandoz at openjdk.org
Mon Jan 29 19:24:47 UTC 2024
On Sat, 27 Jan 2024 08:12:06 GMT, Hannes Greule <hgreule at openjdk.org> wrote:
>> Previously, unused method parameters didn't get a slot, resulting in either wrong results or bad classfiles.
>>
>> I propose a simple fix: Make sure that all parameters of the entry block get a slot, in the order they are defined.
>> I didn't want to change too much code here, so I decided to add a boolean flag to indicate that even values without uses get a slot.
>> If you have a better idea or more plans on this, please let me know.
>>
>> I also added multiple test cases showcasing the issue: One that results in the wrong value returned, one with a type mismatch resulting in a VerifyError, and one with a type mismatch due to being non-static, also causing a VerifyError (this is the case that made me discover this issue).
>>
>> I ran the tests in `langtools/tools/javac/reflect/` and `java/lang/reflect/code/` to make sure they all (still) pass.
>
> Hannes Greule has updated the pull request incrementally with one additional commit since the last revision:
>
> apply suggestions
Yes, lets integrate, so we have a record of it and tests (which are valuable).
-------------
PR Comment: https://git.openjdk.org/babylon/pull/8#issuecomment-1915404195
More information about the babylon-dev
mailing list