Skip to content
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

8250855: Address reliance on default constructors in the Java 2D APIs #152

Closed
wants to merge 1 commit into from

Conversation

c-cleary
Copy link
Contributor

@c-cleary c-cleary commented Sep 14, 2020

This issue relates to JDK-8250639 '☂ Address reliance on default constructors in the java.desktop module'. The changes address the reliance on default constructors by adding in basic constructors in the following classes:

  • java.awt.Image
  • java.awt.PrintJob
  • java.awt.font.GlyphVector
  • java.awt.font.LayoutPath
  • java.awt.font.LineMetrics
  • java.awt.image.AbstractMultiResolutionImage
  • java.awt.image.BufferStrategy
  • java.awt.image.ImageFilter
  • java.awt.image.RGBImageFilter
  • java.awt.image.VolatileImage
  • javax.print.PrintServiceLookup
  • javax.print.ServiceUI
  • javax.print.ServiceUIFactory
  • javax.print.StreamPrintServiceFactory
  • javax.print.event.PrintJobAdapter

specdiff: http://cr.openjdk.java.net/~ccleary/issues/webrevs-store/8250855/webrevs/webrev.02/specdiff/overview-summary.html
csr: https://bugs.openjdk.java.net/browse/JDK-8252495


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Error

 ⚠️ OCA signatory status must be verified

Issue

  • JDK-8250855: Address reliance on default constructors in the Java 2D APIs

Download

$ git fetch https://git.openjdk.java.net/jdk pull/152/head:pull/152
$ git checkout pull/152

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Sep 14, 2020
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 14, 2020

Hi @ccleary-oracle, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user ccleary-oracle" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@c-cleary c-cleary marked this pull request as draft September 14, 2020 13:32
@openjdk
Copy link

openjdk bot commented Sep 14, 2020

@ccleary-oracle The following label will be automatically applied to this pull request: 2d.

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 (add|remove) "label" command.

@c-cleary c-cleary closed this Sep 14, 2020
@c-cleary c-cleary deleted the JDK-8250855 branch September 14, 2020 14:02
fg1417 added a commit to fg1417/jdk that referenced this pull request Jul 12, 2024
This patch forces `CastX2P` to be a two-address instruction,
so that C2 could allocate the same register for dst and
src. Then we can remove the instruction completely in the
assembly.

The motivation comes from some cast operations like `castPP`.
The difference for ADLC between `castPP` and `CastX2P` lies in
that `CastX2P` always has different types for dst and src.
We can force ADLC to generate an extra `two_adr()` for `CastX2P`
like it does automatically for `castPP`, which could tell register
allocator that the instruction needs the same register for dst
and src.

However, sometimes, RA and GCM in C2 can't work as we expected.

For example, we have Assembly on the existing code:
```
  ldp    x10, x11, [x17,openjdk#136]
  add    x10, x10, x15
  add    x11, x11, x10
  ldr    x12, [x17,openjdk#152]
  str    x16, [x10]
  add    x10, x12, x15
  str    x16, [x11]
  str    x16, [x10]
```

After applying the patch, the assembly is:
```
  ldr    x10, [x16,openjdk#136]  <--- 1
  add    x10, x10, x15
  ldr    x11, [x16,openjdk#144]  <--- 2
  mov    x13, x10         <--- 3
  str    x17, [x13]
  ldr    x12, [x16,openjdk#152]
  add    x10, x11, x10
  str    x17, [x10]
  add    x10, x12, x15
  str    x17, [x10]
```

C2 generate a totally extra mov, see 3, and we even lost the chance
to merge load pair, see 1 and 2. That's terrible.

Although this scenario would disappear after combining with
openjdk#20157, I'm
still not sure if this patch is worthwhile.
pfirmstone added a commit to pfirmstone/jdk-with-authorization that referenced this pull request Nov 18, 2024
…96180d98b4c2417c4cbec1d

[Snyk] Upgrade org.ow2.asm:asm from 9.2 to 9.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2d [email protected] oca Needs verification of OCA signatory status
Development

Successfully merging this pull request may close these issues.

2 participants