-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8341275: Explicit counter support for Code attribute building #24903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back liach! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
Webrevs
|
|
Testing: tier 1-3 |
|
Stack counter already serves to very limited set of use cases. |
|
I think the original issue was created in response to a public request https://mail.openjdk.org/pipermail/classfile-api-dev/2024-August/000545.html. It just happens that we and another public audience both want this API, so I guess it is not too much of a "corner case"? |
|
Thanks, withdrawing this for now. A better approach may be to optimize StackCounter when a SMT is present. |
Internal explicit counter support for Code max_stack and max_locals has been already added in #24807. Since that example works well, we may consider opening this functionality up to general users under strict restrictions.
This is an advanced API; thus, I chose a more complex name
withExplicitStackAndLocalsthat discourages accidental use, and indicates the exact order of stack and locals arguments. For integrity, the argument checks are unconditional. And this is also barred behindDROP_STACK_MAPSadvanced option.I have enhanced the tests with a
CodeBuilderTypeutility to test all types of code builders; it is already effective at increasing coverage in some of our existing tests that only cover DirectCodeBuilder, and simplify other tests. It is particularly helpful for my newBuilderExplicitMaxsTest.Progress
Issues
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24903/head:pull/24903$ git checkout pull/24903Update a local copy of the PR:
$ git checkout pull/24903$ git pull https://git.openjdk.org/jdk.git pull/24903/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24903View PR using the GUI difftool:
$ git pr show -t 24903Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24903.diff
Using Webrev
Link to Webrev Comment