Skip to content

Remove staged tuples #6311

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

Merged
merged 2 commits into from
Apr 16, 2019
Merged

Conversation

nicolasstucki
Copy link
Contributor

Until now tuples had two implementations, one with staging and one with plain inline
and inliner constant folding. The second one was used in practice as the first one could not be used if tuples where used (macros expanded) in the library due to bootstrapping issues.

These implementations were never intended to actually be used, they mostly showed the power of match types, inline and staging. Eventually, this logic will be special cased in the compiler for performance.

Until now tuples had two implementations, one with staging and one with plain inline
and inliner constant folding. The second one was used in practice as the first one could not be used if tuples where used (macros expanded) in the library due to bootstrapping issues.

These implementations were never intended to actually be used, they mostly showed the power of match types, inline and staging. Eventually, this logic will be special cased in the compiler for performance.
Copy link
Contributor

@biboudis biboudis left a comment

Choose a reason for hiding this comment

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

Can we add a test that uses StagedTuples? Maybe the tests/run/tuples1.scala.

@nicolasstucki
Copy link
Contributor Author

We would have to duplicate the logic in Tuple. Not sure it is worth it or even possible without some hard coded logic in the compiler.

@biboudis
Copy link
Contributor

Something manual and minimal by just using stagedCons, stagedConcat directly?

@nicolasstucki
Copy link
Contributor Author

I will hack something up to test it as a run test

@biboudis biboudis self-requested a review April 16, 2019 11:13
@biboudis biboudis merged commit 1f132e7 into scala:master Apr 16, 2019
@biboudis biboudis deleted the remove-staged-tuples branch April 16, 2019 11:15
@ghost ghost removed the stat:needs review label Apr 16, 2019
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.

2 participants