Skip to content

8368497: [lworld] redo: New lint category initialization for code that would not be allowed in the prologue#1650

Closed
vicente-romero-oracle wants to merge 12 commits into
openjdk:lworldfrom
vicente-romero-oracle:JDK-8368497
Closed

8368497: [lworld] redo: New lint category initialization for code that would not be allowed in the prologue#1650
vicente-romero-oracle wants to merge 12 commits into
openjdk:lworldfrom
vicente-romero-oracle:JDK-8368497

Conversation

@vicente-romero-oracle
Copy link
Copy Markdown
Contributor

@vicente-romero-oracle vicente-romero-oracle commented Oct 1, 2025

redoing JDK-8367698 as the original fix had to be delta applied due to some test failures


Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8368497: [lworld] redo: New lint category initialization for code that would not be allowed in the prologue (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/valhalla.git pull/1650/head:pull/1650
$ git checkout pull/1650

Update a local copy of the PR:
$ git checkout pull/1650
$ git pull https://git.openjdk.org/valhalla.git pull/1650/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1650

View PR using the GUI difftool:
$ git pr show -t 1650

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1650.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Oct 1, 2025

👋 Welcome back vromero! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Oct 1, 2025

@vicente-romero-oracle This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8368497: [lworld] redo: New lint category `initialization` for code that would not be allowed in the prologue

Reviewed-by: liach

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 3 new commits pushed to the lworld branch:

  • a687d94: 8369044: [lworld] Interpreter does not emit barrier at the end of java.lang.Object::
  • 2abd3a9: 8367242: [lworld] C2 compilation asserts with "dead loop detected"
  • 2bc50b3: 8367767: [lworld] Interpreter adherence to new memory model rules for strict instance fields

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

@openjdk openjdk Bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 1, 2025
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Oct 1, 2025

Comment thread src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeInfo.java Outdated
Comment thread src/jdk.compiler/share/classes/module-info.java Outdated
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.main
* jdk.compiler/com.sun.tools.javac.tree
* jdk.compiler/com.sun.tools.javac.util
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (p.toString().endsWith("java")) {
javaFile = p;
} else if (p.toString().endsWith("out")) {
goldenFile = p;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just do baseDir.resolve(className + ".java"), and do a Files.exists check for the golden file, instead of having complicated stuf like this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep I wanted to clean that before pushing but then I forgot, thanks

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of patching individual microbenchmarks, we should just include initialization here:

DISABLED_WARNINGS := restricted this-escape processing rawtypes removal cast \
serial preview unchecked deprecation dangling-doc-comments, \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably ignore initialization warnings for test libs at:

DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview restricted varargs dangling-doc-comments, \

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we could, but I prefer not to. I found bugs in the original implementation by analyzing case by case the reason for the warnings. If we remove it for all tests then we could be blinded to lwrking bugs

Copy link
Copy Markdown
Member

@liach liach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for pushing

@vicente-romero-oracle
Copy link
Copy Markdown
Contributor Author

/integrate

@vicente-romero-oracle
Copy link
Copy Markdown
Contributor Author

@liach thanks for the comments

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Oct 2, 2025

Going to push as commit 1a33b86.
Since your change was applied there have been 3 commits pushed to the lworld branch:

  • a687d94: 8369044: [lworld] Interpreter does not emit barrier at the end of java.lang.Object::
  • 2abd3a9: 8367242: [lworld] C2 compilation asserts with "dead loop detected"
  • 2bc50b3: 8367767: [lworld] Interpreter adherence to new memory model rules for strict instance fields

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Oct 2, 2025
@openjdk openjdk Bot closed this Oct 2, 2025
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 2, 2025
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Oct 2, 2025

@vicente-romero-oracle Pushed as commit 1a33b86.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants