RFR: 8316628: [lw5] remove vnew, aconst_init, and withfield [v4]

ExE Boss duke at openjdk.org
Fri Oct 6 18:26:34 UTC 2023


On Tue, 3 Oct 2023 23:24:00 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> This PR is removing bytecods vnew, aconst_init, and withfield. Some tests will have to be ignored as for them to pass some changes need to be made to the verifier which still expects value classes to have factory methods (vnew)
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
> 
>   minor fixes

I still think that having a magic `static T.<new>:(…)T` factory method for every `T.<init>:(…)V` method, which would do the `new`, `dup`, `<init>` dance behind the scenes, would be a good idea.[^1]

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

This would allow the `new` bytecode to eventually go the way of `jsr`/`ret`, and `<init>:(…)V` would become a method called by the VM, similarly to `<clinit>:()V`, except that `<init>:(…)V` allows calling `super.<init>:(…)V`.


[^1]: This has been suggested in:
https://mail.openjdk.org/pipermail/valhalla-spec-experts/2023-July/002342.html
https://mail.openjdk.org/pipermail/valhalla-spec-experts/2023-July/002343.html

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

PR Comment: https://git.openjdk.org/valhalla/pull/934#issuecomment-1751223717



More information about the valhalla-dev mailing list