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

Fix #9424: Add releaseFence() call when mixing in a trait val. #10493

Merged
merged 1 commit into from
Nov 26, 2020

Conversation

sjrd
Copy link
Member

@sjrd sjrd commented Nov 25, 2020

This is a forward port of relevant parts of the upstream PR
scala/scala#7028


Any idea how to test this? scala/scala used a jstress test for that, but it's outside my area of expertise at the moment. I "tested" it by inspection in a variety of cases (when it must appear and it must not appear), but that doesn't give much confidence.

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

Any idea how to test this?

I would be happy with a bytecode test (see https://github.com/lampepfl/dotty/blob/master/compiler/test/dotty/tools/backend/jvm/DottyBytecodeTests.scala) that verifies that the call is added in a few situations (and not added when not needed). Ideally we should port the jcstress test too, but even in scala 2 it's not hooked up to the CI...

This is a forward port of relevant parts of the upstream PR
scala/scala#7028
@sjrd
Copy link
Member Author

sjrd commented Nov 26, 2020

Bytecode tests added :)

@smarter smarter merged commit 2f26fad into scala:master Nov 26, 2020
@smarter smarter deleted the release-fence branch November 26, 2020 13:12
@Kordyjan Kordyjan modified the milestones: 3.0.0-M3, 3.0.0 Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

releaseFence needs to be added at the end of constructors of classes that contain mixin fields
4 participants