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 Build crashes in releaseFull mode #1980

Merged
merged 7 commits into from
Nov 16, 2020

Conversation

WojciechMazur
Copy link
Contributor

@WojciechMazur WojciechMazur commented Nov 2, 2020

Resolves #1976
As described in the linked issue SN was crashing in tests when releaseFull mode was used.
The combination of this PR and #1979 allows fixing this problem.
One of the root problems was the wrong calculation of the expected type when using Sub.lub methods. This PR allows passing bound as an optional argument to the mentioned method. Also in most of the usages of this method, we make sure to pass bound type basing on the current context.

To be noted, in one of the recent tests I've discovered that the current Xmx setting of 5G is not sufficient in release full mode - it throws OutOfMemoryError when dumping lowered Defns (the content of all methods is stored in memory, sorted, and then written to file). It's recommended to disable the default nativeDump setting in MyScalaNativePlugin or increase Xmx (build passed with Xmx 15G, not tested with the lower value). This problem should be addressed in later PR. was fixed in #1982

Interflow optimization in release full mode took for unit-tests took 51 minutes. Additional ~30 minutes are needed for compilation using clang.

Copy link
Collaborator

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

Basically looks good. I only suggest to remove the default values.

@WojciechMazur WojciechMazur merged commit e94f9e9 into scala-native:master Nov 16, 2020
vicopem pushed a commit to vicopem/scala-native that referenced this pull request Nov 19, 2020
* Sub.lub takes optional bound

* Pass expected retType to MergeProcessor.toSeq

* MergeProcessor mergePhis take additional bound parameter

* PolyInline use op.resty as bound for result type

* Trait.is should return true when passed j.l.Object

* Fix Opt comment

* Remove default arguments for dangerous methods
vicopem added a commit to vicopem/scala-native that referenced this pull request Nov 19, 2020
vicopem added a commit to vicopem/scala-native that referenced this pull request Nov 19, 2020
@WojciechMazur WojciechMazur deleted the fix/buildReleaseFull branch February 15, 2021 09:08
ekrich pushed a commit to ekrich/scala-native that referenced this pull request May 21, 2021
* Sub.lub takes optional bound

* Pass expected retType to MergeProcessor.toSeq

* MergeProcessor mergePhis take additional bound parameter

* PolyInline use op.resty as bound for result type

* Trait.is should return true when passed j.l.Object

* Fix Opt comment

* Remove default arguments for dangerous methods
WojciechMazur added a commit to WojciechMazur/scala-native that referenced this pull request Aug 25, 2021
* Sub.lub takes optional bound

* Pass expected retType to MergeProcessor.toSeq

* MergeProcessor mergePhis take additional bound parameter

* PolyInline use op.resty as bound for result type

* Trait.is should return true when passed j.l.Object

* Fix Opt comment

* Remove default arguments for dangerous methods
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.

Tests do not compile with releaseFull mode
3 participants