Skip to content

Conversation

@archiecobbs
Copy link
Contributor

@archiecobbs archiecobbs commented Jan 31, 2025

In JDK-8345263, a new method Lint.logIfEnabled(Log log, DiagnosticPosition pos, LintWarning warning) was added. It was decided at the time to pass a log parameter explicitly instead of having Lint keep its own reference to the Log singleton. This was done to keep a conservative approach with the refactoring and to avoid possible initialization ordering issues.

After other recent changes (JDK-8344079, JDK-8347474) the initialization ordering issues have been alleviated. It's also the case that there is only ever one Log instance per compiler Context. So the log parameter can be removed and Lint can just keep its own reference, as is the normal custom in the compiler code. This results in a minor code cleanup.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8349155: The "log" parameter to Lint.logIfEnabled() is not needed (Enhancement - P5)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23400

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/23400.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 31, 2025

👋 Welcome back acobbs! A progress list of the required criteria for merging this PR into master 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

openjdk bot commented Jan 31, 2025

@archiecobbs 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:

8349155: The "log" parameter to Lint.logIfEnabled() is not needed

Reviewed-by: mcimadamore

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 125 new commits pushed to the master branch:

  • 66a3898: 8348659: AArch64: IR rule failure with compiler/loopopts/superword/TestSplitPacks.java
  • 40603a5: 8349214: Improve size optimization flags for MSVC builds
  • 0926949: 8347629: Test FailOverDirectExecutionControlTest.java fails with -Xcomp
  • a51e669: 8349200: [JMH] time.format.ZonedDateTimeFormatterBenchmark fails
  • 9d23de5: 8184352: Remove Sun provider information from KeyPairGenerator javadoc
  • d222c18: 8349107: Remove RMI finalizers
  • bad39b6: 8348610: GenShen: TestShenandoahEvacuationInformationEvent failed with setRegions >= regionsFreed: expected 1 >= 57
  • 250ff86: 8349000: Performance improvement for Currency.isPastCutoverDate(String)
  • ee4caa4: 8349106: Change ChaCha20 intrinsic to use quarter-round parallel implementation on aarch64
  • b985347: 8348349: Refactor CDSConfig::is_dumping_heap()
  • ... and 115 more: https://git.openjdk.org/jdk/compare/907350e9e8e9b66365e9eaa3ae89ddc55cf9731f...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 31, 2025
@openjdk
Copy link

openjdk bot commented Jan 31, 2025

@archiecobbs The following label will be automatically applied to this pull request:

  • compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the compiler compiler-dev@openjdk.org label Jan 31, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 31, 2025

Webrevs

Copy link
Contributor

@mcimadamore mcimadamore left a comment

Choose a reason for hiding this comment

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

This change looks good - thanks for picking this up again!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Feb 5, 2025
@archiecobbs
Copy link
Contributor Author

Thanks for the review!

@archiecobbs
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Feb 6, 2025

Going to push as commit 89e5e7a.
Since your change was applied there have been 135 commits pushed to the master branch:

  • aad6664: 8333569: jpackage tests must run app launchers with retries on Linux only
  • b499c82: 8349383: (fs) FileTreeWalker.next() superfluous null check of visit() return value
  • 379c3f9: 8347836: Disabled PopupMenu shows shortcuts on Mac
  • 82bc0a7: 8344316: security/auth/callback/TextCallbackHandler/Password.java make runnable with JTReg and add the UI
  • 2f2f7cf: 8349084: Update vectors used in several PQC benchmarks
  • b9b62a0: 8346792: serviceability/jvmti/vthread/GetThreadState/GetThreadState.java testObjectWaitMillis failed
  • 6b994cd: 8333697: C2: Hit MemLimit in PhaseCFG::global_code_motion
  • 2ff8440: 8349344: Clarify documentation of Arena.ofConfined
  • 19399d2: 8348572: C2 compilation asserts due to unexpected irreducible loop
  • 6146588: 8348190: Framework for tracing makefile inclusion and parsing
  • ... and 125 more: https://git.openjdk.org/jdk/compare/907350e9e8e9b66365e9eaa3ae89ddc55cf9731f...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Feb 6, 2025
@openjdk openjdk bot closed this Feb 6, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Feb 6, 2025
@openjdk
Copy link

openjdk bot commented Feb 6, 2025

@archiecobbs Pushed as commit 89e5e7a.

💡 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

compiler compiler-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants