JDK-8277077 : Replace "->" with "." for use cases of LIR_Opr
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-11-12
  • Updated: 2021-11-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
In JDK-8276453, we introduced a workaround in LIR_Opr to minimize the patch size in order to ease backporting the fix to released major JDK versions:

  const LIR_Opr* operator->() const { return this; }
  LIR_Opr* operator->() { return this; }

Ideally, this workaround should be removed and all callers should be updated from `opr->fn()` to `opr.fn()`.
Comments
Personally, leaving the -> doesn't bother me. Using -> instead of . seems more agnostic about the underlying implementation. The compiler is going to generate the same code either way, right?
12-11-2021

Assigning to Chuck as he has work-in-progress patches.
12-11-2021