Skip to content

Recognize calls to generic Array.apply with primitive arguments in CleanUp#9544

Merged
lrytz merged 1 commit intoscala:2.13.xfrom
jxnu-liguobin:p12201
Mar 25, 2021
Merged

Recognize calls to generic Array.apply with primitive arguments in CleanUp#9544
lrytz merged 1 commit intoscala:2.13.xfrom
jxnu-liguobin:p12201

Conversation

@jxnu-liguobin
Copy link
Member

@jxnu-liguobin jxnu-liguobin commented Mar 19, 2021

Array[Double](1.0) targets the generic Array.apply overload. This case was not handled by CleanUp and therefore not emitted as an array literal in bytecode.

Fixes scala/bug#12201

@scala-jenkins scala-jenkins added this to the 2.13.6 milestone Mar 19, 2021
@jxnu-liguobin jxnu-liguobin marked this pull request as draft March 19, 2021 07:49
@jxnu-liguobin jxnu-liguobin marked this pull request as ready for review March 23, 2021 09:00
Copy link
Member

@lrytz lrytz left a comment

Choose a reason for hiding this comment

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

Thanks, this is looking good! Just a few small points.

@lrytz lrytz changed the title Fixes scala/bug#12201 Recognize calls to generic Array.apply with primitive arguments in CleanUp Mar 24, 2021
@jxnu-liguobin
Copy link
Member Author

@lrytz Would it be impertinent to ask, is this PR ready to merge?

Copy link
Member

@lrytz lrytz 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, thank you!

@lrytz lrytz merged commit 5d025ac into scala:2.13.x Mar 25, 2021
@SethTisue SethTisue added the performance the need for speed. usually compiler performance, sometimes runtime performance. label Mar 25, 2021
@jxnu-liguobin jxnu-liguobin deleted the p12201 branch March 26, 2021 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance the need for speed. usually compiler performance, sometimes runtime performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Array[Double](1) not optimized by compiler

4 participants